Skip to content

fix(local): scan for font files during module setup - #929

Merged
danielroe merged 2 commits into
mainfrom
fix/local-provider-lazy-init
Oct 8, 2026
Merged

danielroe merged 2 commits into
mainfrom
fix/local-provider-lazy-init

Conversation

@danielroe

@danielroe danielroe commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

now that we initialise providers lazily in unifont, we accidentally broke the local provider, which then registered nitro hooks too late.

@socket-security

socket-security Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedunifont@​1.0.1 ⏵ 1.0.297 +1100100 +195 +1100
Updatednuxt-nightly@​5.0.0-29835892.99af6dec ⏵ 5.0.0-2610071710-0296ca496 +5100100 +197100
Updatedfontless@​1.1.0 ⏵ 1.2.199 +1100100 +196 +1100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 0f0b187

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying fonts with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0f0b187
Status: ✅  Deploy successful!
Preview URL: https://80f89dd5.fonts-dsw.pages.dev
Branch Preview URL: https://fix-local-provider-lazy-init.fonts-dsw.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8bfe5c31-f600-4855-bb75-d406184a8748
📥 Commits

Reviewing files that changed from the base of the PR and between abe2e2d and 0f0b187.

📒 Files selected for processing (4)
  • test/basic.test.ts
  • test/css-frameworks/scss.test.ts
  • test/css-frameworks/tailwind.test.ts
  • test/nuxt5.test.ts

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


📝 Walkthrough

Walkthrough

The module now creates the local provider during setup when options.providers.local is undefined. setupLocalProvider accepts the Nuxt instance and returns the provider. Tests now invoke captured nitro:init hooks and verify that a font becomes resolvable after Nitro scans the public asset directory. The fontless and unifont dependency ranges also changed.

Priority: ➖ Normal

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

Merge Risk: ⚪ Minimal · up to 0f0b1

No actionable regression is established in the provider setup or updated font snapshots; the PR appears ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the local-provider fix and the font-file scanning during module setup.
Description check ✅ Passed The description explains the local-provider regression and its cause: lazy initialization registered Nitro hooks too late.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@danielroe
danielroe enabled auto-merge October 8, 2026 07:44
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.51%. Comparing base (efc8448) to head (0f0b187).

Files with missing lines Patch % Lines
src/providers/local.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
+ Coverage   71.91%   72.51%   +0.60%     
==========================================
  Files          15       15              
  Lines         712      713       +1     
  Branches      189      190       +1     
==========================================
+ Hits          512      517       +5     
+ Misses        171      165       -6     
- Partials       29       31       +2     

☔ 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.

@danielroe
danielroe disabled auto-merge October 8, 2026 07:49
@danielroe
danielroe merged commit 8a6216b into main Oct 8, 2026
12 checks passed
@danielroe
danielroe deleted the fix/local-provider-lazy-init branch October 8, 2026 07:49
@github-actions github-actions Bot mentioned this pull request Sep 24, 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