fix(deploy): use Bun.Glob, pin CI Node to 24#355
Conversation
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).
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.globusage intko.io/scripts/bundle-tests.mjswithBun.Globand deduped matched spec paths via aSet. - Updated
tko.io’sprebuildscript to run local.mjsbuild scripts usingbuninstead ofnode. - Pinned the docs deployment workflow to Node
24.xusingactions/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. |
Summary
deploy-docs.ymlfailing on the first post-Live in-browser test runner at /tests #353 run withSyntaxError: The requested module 'node:fs/promises' does not provide an export named 'glob'. Ubuntu-latest ships Node 20;node:fs/promises.globis Node 22+.node:fs/promises.glob→Bun.Globintko.io/scripts/bundle-tests.mjs. The script already runs under Bun via the workspace setup, so no new dep.tko.io/package.jsonprebuildentries fromnode ./scripts/*.mjstobun ./scripts/*.mjsso the runtime is pinned by.tool-versions, not the runner default.deploy-docs.ymlto Node 24.x viaactions/setup-node, matchingrelease.ymlandpublish-check.yml, so any other rawnodeinvocation in the pipeline is on a modern runtime.Test plan
cd tko.io && bun ./scripts/bundle-tests.mjs→ 145 source specs, setup, build bundle all emit./testspage still reaches 2708/0/42 in ~5s.