Skip to content

[font] prefix leading numeric google-font name with underscore #78127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

ospira
Copy link
Contributor

@ospira ospira commented Apr 14, 2025

Fixes #77488

Error: https://github.com/vercel/next.js/actions/runs/14414095731/job/40427803167

An identifier or keyword cannot immediately follow a numeric literal

Triggered by the 42dot Sans font.

Note this leads family[0] to be '4' which triggers the error...

function 42dot_Sans... // ⚠️⚠️ bad

Fixed by prepending font names starting with digits (/\d/.test()) with an _.

(thanks to this comment from MoSadie)

@ijjk ijjk added the Font (next/font) Related to Next.js Font Optimization. label Apr 14, 2025
@ijjk
Copy link
Member

ijjk commented Apr 14, 2025

Allow CI Workflow Run

  • approve CI run for commit: a84b3b5

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sorry, something went wrong.

@ospira ospira force-pushed the google-font-update-bugfix branch from 9c1fcc3 to a701efd Compare April 14, 2025 07:47
@ospira ospira force-pushed the google-font-update-bugfix branch from a701efd to a84b3b5 Compare April 14, 2025 07:48
@huozhi huozhi added the CI approved Approve running CI for fork label Apr 14, 2025
@huozhi huozhi enabled auto-merge (squash) April 14, 2025 07:56
@huozhi huozhi disabled auto-merge April 14, 2025 07:56
@huozhi huozhi changed the title google-font-update-bugfix [font] prefix leading numeric google-font name with underscore Apr 14, 2025
@huozhi huozhi enabled auto-merge (squash) April 14, 2025 07:57
@ijjk
Copy link
Member

ijjk commented Apr 14, 2025

Failing test suites

Commit: a84b3b5

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/development/acceptance-app/ReactRefreshLogBox.test.ts (PPR)

  • ReactRefreshLogBox app > server component can recover from error thrown in the module
Expand output

● ReactRefreshLogBox app › server component can recover from error thrown in the module

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `ReactRefreshLogBox app server component can recover from error thrown in the module 1`

- Snapshot  - 16
+ Received  +  1

- {
-   "description": "Error: module error",
-   "environmentLabel": null,
-   "label": "Runtime Error",
-   "source": "index.js (1:7) @ eval
- > 1 | throw new Error('module error')
-     |       ^",
-   "stack": [
-     "eval index.js (1:7)",
-     "<FIXME-next-dist-dir>",
-     "<FIXME-next-dist-dir>",
-     "eval ./app/server/page.js",
-     "<FIXME-next-dist-dir>",
-     "<FIXME-next-dist-dir>",
-   ],
- }
+ "Expected Redbox but found no visible one."

  1446 |         await session.assertHasRedbox()
  1447 |       } else {
> 1448 |         await expect({ browser, next }).toDisplayRedbox(`
       |                                         ^
  1449 |          {
  1450 |            "description": "Error: module error",
  1451 |            "environmentLabel": null,

  at Object.toDisplayRedbox (development/acceptance-app/ReactRefreshLogBox.test.ts:1448:41)

Read more about building and testing Next.js in contributing.md.

@huozhi huozhi disabled auto-merge April 14, 2025 08:18
@huozhi huozhi merged commit f53db59 into vercel:canary Apr 14, 2025
139 of 149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI approved Approve running CI for fork Font (next/font) Related to Next.js Font Optimization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To Whoever Controls the Google Font Update Github Bot
3 participants