Skip to content

ci: upgrade yarn for Node 24 TypeDoc build#3728

Draft
thepastaclaw wants to merge 1 commit into
dashpay:v3.1-devfrom
thepastaclaw:fix-pages-typedoc-node
Draft

ci: upgrade yarn for Node 24 TypeDoc build#3728
thepastaclaw wants to merge 1 commit into
dashpay:v3.1-devfrom
thepastaclaw:fix-pages-typedoc-node

Conversation

@thepastaclaw
Copy link
Copy Markdown
Collaborator

@thepastaclaw thepastaclaw commented May 22, 2026

ci: upgrade yarn for Node 24 TypeDoc build

Issue being fixed or feature implemented

The GitHub Pages book deployment is failing in the Build JS/TS API docs job
when yarn typedoc runs under Node.js 24.15.0 with Yarn PnP enabled.

Failing job:
https://github.com/dashpay/platform/actions/runs/26277810277/job/77346306870

The crash is:

Error: EBADF: bad file descriptor, fstat
    at tryStatSync (node:fs:391:25)
    at readFileSync (node:fs:447:17)
    at getSourceSync (node:internal/modules/esm/load:37:14)
    at createCJSModuleWrap (node:internal/modules/esm/translators:210:32)

What was done?

Upgraded the repo-managed Yarn Berry release from 4.12.0 to 4.14.1 and kept
the Pages book workflow on Node.js 24.

Updated files:

  • package.json packageManager
  • .yarnrc.yml yarnPath
  • .yarn/releases/yarn-4.14.1.cjs
  • generated Yarn metadata: .pnp.cjs, .pnp.loader.mjs, yarn.lock
  • .github/workflows/book.yml path filters for Yarn/PnP files, so Yarn-only
    changes also trigger the Pages deploy workflow

This keeps the fix in the dependency manager layer instead of pinning the
workflow back to Node.js 22.

Validation

  • Parsed .github/workflows/book.yml as YAML successfully.

  • Smoke-tested the upgraded Yarn setup with:

    npx -y node@24.15.0 .yarn/releases/yarn-4.14.1.cjs workspaces list --json
  • Node 24.15.0 A/B result:

    A. Base branch state, Yarn 4.12.0, reproduced the failure from a clean
    origin/v3.1-dev snapshot:

    YARN_ENABLE_SCRIPTS=false npx -y node@24.15.0 \
      .yarn/releases/yarn-4.12.0.cjs install --inline-builds
    npx -y node@24.15.0 .yarn/releases/yarn-4.12.0.cjs typedoc \
      --options docs/typedoc.json --out /tmp/js-out-base412-node2415-ab

    Result: install completed, then TypeDoc failed with EBADF: bad file descriptor, fstat under Node.js 24.15.0.

    B. Updated branch state, Yarn 4.14.1, passed with the workflow-equivalent
    commands:

    YARN_ENABLE_SCRIPTS=false npx -y node@24.15.0 \
      .yarn/releases/yarn-4.14.1.cjs install --inline-builds
    npx -y node@24.15.0 .yarn/releases/yarn-4.14.1.cjs typedoc \
      --options docs/typedoc.json --out /tmp/js-out-yarn4141-node2415-final

    Result: TypeDoc generated HTML successfully with 0 errors and 3 pre-existing
    warnings.

  • Ran pre-PR code review gate; fixed the path-filter finding by adding Yarn/PnP
    files to .github/workflows/book.yml triggers.

Breaking Changes

None.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the
    corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 735b6500-9932-43ba-9391-41d18c54f892

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates the GitHub Actions workflow for documentation builds to use Node.js v22 instead of v24 when running the build-js-docs job. This is a single configuration change affecting the JavaScript/TypeScript documentation generation step.

Changes

Documentation Build Workflow Configuration

Layer / File(s) Summary
Documentation build Node.js version update
.github/workflows/book.yml
The build-js-docs job's Node.js setup step downgrades from v24 to v22 for yarn and TypeDoc execution.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through versions old and new,
From twenty-four to twenty-two we flew,
The docs will build with Node so fine,
Each workflow step in perfect line. 🐰📚

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title states 'upgrade yarn for Node 24' but the actual change pins Node.js to version 22, not upgrades to version 24 as the title suggests. Update the title to accurately reflect the change, such as 'ci: pin book TypeDoc build to Node 22' to match the actual objective of downgrading to Node.js 22 to avoid Node 24 runtime issues.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added this to the v3.1.0 milestone May 22, 2026
@thepastaclaw
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/book.yml (1)

149-149: 💤 Low value

Consider documenting the version pin.

Adding an inline comment explaining why v22 is pinned would help future maintainers understand this isn't an oversight.

📝 Suggested documentation
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
+          # Pinned to v22 due to EBADF errors in TypeDoc with Yarn PnP under Node 24+
           node-version: "22"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/book.yml at line 149, Add an inline comment next to the
node-version: "22" pin explaining why Node 22 is required (e.g., compatibility
with runtime, specific package or CI tools, or security/maintenance policy).
Update the workflow snippet containing node-version: "22" so the comment states
the reason and any link to issue/PR or upgrade plan, making future maintainers
aware this pin is intentional and how to change it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/book.yml:
- Line 149: Add an inline comment next to the node-version: "22" pin explaining
why Node 22 is required (e.g., compatibility with runtime, specific package or
CI tools, or security/maintenance policy). Update the workflow snippet
containing node-version: "22" so the comment states the reason and any link to
issue/PR or upgrade plan, making future maintainers aware this pin is
intentional and how to change it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c338253b-745c-471e-a083-f9e7fb031269

📥 Commits

Reviewing files that changed from the base of the PR and between 12fd1a3 and d4a3b46.

📒 Files selected for processing (1)
  • .github/workflows/book.yml

@thepastaclaw thepastaclaw force-pushed the fix-pages-typedoc-node branch from d4a3b46 to 260174c Compare May 22, 2026 18:38
@thepastaclaw thepastaclaw changed the title ci: pin book TypeDoc build to Node 22 ci: upgrade yarn for Node 24 TypeDoc build May 22, 2026
@thepastaclaw thepastaclaw force-pushed the fix-pages-typedoc-node branch from 1844399 to 2e58665 Compare May 22, 2026 18:58
@thepastaclaw thepastaclaw force-pushed the fix-pages-typedoc-node branch from 2e58665 to 3dd26f4 Compare May 22, 2026 19:02
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.

1 participant