Skip to content

fix(deploy): use Bun.Glob, pin CI Node to 24#355

Merged
brianmhunt merged 1 commit into
mainfrom
fix/deploy-docs-node-glob
Apr 22, 2026
Merged

fix(deploy): use Bun.Glob, pin CI Node to 24#355
brianmhunt merged 1 commit into
mainfrom
fix/deploy-docs-node-glob

Conversation

@brianmhunt
Copy link
Copy Markdown
Member

Summary

  • Hotfix for deploy-docs.yml failing on the first post-Live in-browser test runner at /tests #353 run with SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'glob'. Ubuntu-latest ships Node 20; node:fs/promises.glob is Node 22+.
  • Swap node:fs/promises.globBun.Glob in tko.io/scripts/bundle-tests.mjs. The script already runs under Bun via the workspace setup, so no new dep.
  • Flip tko.io/package.json prebuild entries from node ./scripts/*.mjs to bun ./scripts/*.mjs so the runtime is pinned by .tool-versions, not the runner default.
  • Pin deploy-docs.yml to Node 24.x via actions/setup-node, matching release.yml and publish-check.yml, so any other raw node invocation in the pipeline is on a modern runtime.

Test plan

  • Local: cd tko.io && bun ./scripts/bundle-tests.mjs → 145 source specs, setup, build bundle all emit.
  • Local: /tests page still reaches 2708/0/42 in ~5s.
  • CI: watch deploy-docs on this branch's merge to main.

deploy-docs.yml runs under ubuntu-latest's default Node (20) and
broke on the first post-merge run because `node:fs/promises.glob`
only lands in Node 22. Three changes:

- Drop `node:fs/promises.glob` from bundle-tests.mjs; use
  Bun.Glob since the prebuild already runs under Bun workspaces.
- Switch tko.io/package.json prebuild from `node ./scripts/*.mjs`
  to `bun ./scripts/*.mjs` so the runtime is pinned by
  .tool-versions instead of the runner default.
- Pin deploy-docs.yml to Node 24.x via actions/setup-node so any
  raw `node` invocation elsewhere in the pipeline is on a modern
  runtime too (matches release.yml, publish-check.yml).
Copilot AI review requested due to automatic review settings April 22, 2026 13:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@brianmhunt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0045e214-e2ed-4e68-9f07-da08ed8bc7f2

📥 Commits

Reviewing files that changed from the base of the PR and between fe8b3c0 and 1e889a7.

📒 Files selected for processing (3)
  • .github/workflows/deploy-docs.yml
  • tko.io/package.json
  • tko.io/scripts/bundle-tests.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-docs-node-glob

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.

@brianmhunt brianmhunt merged commit f30c0df into main Apr 22, 2026
11 checks passed
@brianmhunt brianmhunt deleted the fix/deploy-docs-node-glob branch April 22, 2026 13:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Hotfix to stabilize the docs deploy pipeline by removing reliance on Node 22+ APIs in the tko.io test-bundling script and by explicitly pinning the CI Node runtime for any remaining node invocations.

Changes:

  • Replaced node:fs/promises.glob usage in tko.io/scripts/bundle-tests.mjs with Bun.Glob and deduped matched spec paths via a Set.
  • Updated tko.io’s prebuild script to run local .mjs build scripts using bun instead of node.
  • Pinned the docs deployment workflow to Node 24.x using actions/setup-node.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tko.io/scripts/bundle-tests.mjs Avoids Node 22+ glob export by using Bun.Glob; ensures stable, deduped spec discovery.
tko.io/package.json Ensures prebuild scripts run under Bun (matching repo pin via .tool-versions).
.github/workflows/deploy-docs.yml Pins CI Node version to 24.x to avoid runner-default Node mismatches.

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