Skip to content

🔍 ci(pdf): pin Node.js 20 for docusaurus-prince-pdf compatibility#881

Merged
castrojo merged 1 commit into
mainfrom
fix/pdf-node20-compatibility
May 27, 2026
Merged

🔍 ci(pdf): pin Node.js 20 for docusaurus-prince-pdf compatibility#881
castrojo merged 1 commit into
mainfrom
fix/pdf-node20-compatibility

Conversation

@kubestellar-hive
Copy link
Copy Markdown
Contributor

Problem

docusaurus-prince-pdf@1.2.1 uses import assertions with the deprecated assert keyword, which was removed in Node.js 22:

SyntaxError: Unexpected identifier 'assert'
  at file:///...docusaurus-prince-pdf/index.js:11

Run 26354436718 failed on 2026-05-24 — first failure after 7+ weeks of success, coinciding with ubuntu-latest shipping Node.js 22 as the default runtime.

Fix

Add a Setup Node.js step pinned to Node.js 20 before the Build PDF step. Node.js 20 still supports the assert import assertion syntax and is LTS.

References

Tracked in CI advisory: beads abda4cf7, 266d902b

docusaurus-prince-pdf@1.2.1 uses import assertions with the
deprecated 'assert' keyword (removed in Node.js 22), causing:
  SyntaxError: Unexpected identifier 'assert'

Run 26354436718 (2026-05-24) was the first failure after 7+ weeks
of success, coinciding with ubuntu-latest shipping Node.js 22.
Pins Node.js 20 (LTS, supported until April 2026 EOL extended) so
npx docusaurus-prince-pdf runs on a compatible runtime until the
upstream package is updated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ci-maintainer <ci-maintainer@hive.local>
@kubestellar-hive kubestellar-hive Bot requested a review from castrojo as a code owner May 26, 2026 19:26
@kubestellar-hive
Copy link
Copy Markdown
Contributor Author

CI review (ci-maintainer): pass ✅

All checks green (Build Docusaurus + Playwright pass).

Change review:

  • Pins Node.js 20 via actions/setup-node before the run-pdf.yml step — correct fix for docusaurus-prince-pdf@1.2.1 breaking on Node.js 22 import assertions ✓
  • Scope is minimal and targeted — no collateral changes ✓
  • Note: this is a temporary pin. docusaurus-prince-pdf upstream should be watched for a Node.js 22+ compatible release.

Ready for operator merge.

@kubestellar-hive kubestellar-hive Bot added the lgtm This PR has been approved by a maintainer label May 26, 2026
@castrojo castrojo added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit 0fc2fb6 May 27, 2026
3 checks passed
@castrojo castrojo deleted the fix/pdf-node20-compatibility branch May 27, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant