Skip to content

fix: pass global families to fontless for fallback injection - #985

Merged
danielroe merged 1 commit into
mainfrom
fix/global-fallbacks
Nov 25, 2026
Merged

danielroe merged 1 commit into
mainfrom
fix/global-fallbacks

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

this passes the global families through to fontless as globalFamilies, so fontless can add metric fallbacks for them even when their @font-face rules land in the same chunk as the usage site.

it won't do anything until we release fontless + bump here to read globalFamilies (made-in-common/fontaine#937).

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/fonts/@nuxt/fonts@985

commit: 5d5d686

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.56%. Comparing base (4b8a288) to head (5d5d686).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
- Coverage   71.18%   70.56%   -0.62%     
==========================================
  Files          20       20              
  Lines         923      924       +1     
  Branches      259      260       +1     
==========================================
- Hits          657      652       -5     
  Misses        220      220              
- Partials       46       52       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The plugin options now include an optional globalFamilies set. The module supplies the names of configured families whose overrides are marked global.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: Minimal · up to 5d5d6

This adds configuration data for a future Fontless integration and has no runtime effect until Fontless reads it. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: global font families are passed to Fontless as globalFamilies so it can inject fallbacks. The raw summary confirms the globalFamilies addition in the plugin configura…
Description check Passed The description states that global families are passed through to Fontless as globalFamilies, so Fontless can add metric fallbacks. It also notes the change has no effect until Fontless is released an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: global font families are passed to Fontless as globalFamilies so it can inject fallbacks. The raw summary confirms the globalFamilies addition in the plugin configuration and the transform declaration. The title uses the fix: prefix, which fits the intent, though the PR is partly a forward-compatible change that has no effect until Fontless is released.

Full details: Description check

Explanation

The description states that global families are passed through to Fontless as globalFamilies, so Fontless can add metric fallbacks. It also notes the change has no effect until Fontless is released and this project reads globalFamilies (linked fontaine#937). This relates directly to the changeset. The linked issue section is an unfilled template placeholder.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04e7c71f-f6aa-4d1d-a4cb-950958badf0d
Commits

Reviewing files that changed from the base of the PR and between 4b8a288 and 5d5d686.

Files selected for processing: 2

  • src/module.ts
  • src/plugins/transform.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@danielroe
danielroe added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit cda2ac2 Nov 25, 2026
12 checks passed
@danielroe
danielroe deleted the fix/global-fallbacks branch November 25, 2026 13:35
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants