Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Package packing and test matrix .github/workflows/engines.yml |
The workflow checks that public packages declare a Node engine floor using >=, runs prepublishOnly when present, and packs packages. It creates a matrix with each package’s floor and transitive workspace dependency tarballs. |
Installation and export smoke test .github/workflows/engines.yml |
The matrix job installs each package and its workspace dependency tarballs with --engine-strict. It then loads eligible export entry points and fails on load errors or undefined results. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Other
Merge Risk: 
Minimal · previous review 488d1
-
No actionable merge-blocking risk was identified.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
cacheable-response
Details
| Benchmark suite | Current: 6891155 | Previous: 86562b7 | Ratio |
|---|---|---|---|
cache hit |
98.4 ms (96.2-100.3) |
98.9 ms (96.5-99.3) |
0.99 |
cache miss |
79.2 ms (75.9-80) |
77 ms (76-80.6) |
1.03 |
cache hit 304 via If-None-Match |
98.3 ms (93-99.1) |
96.2 ms (93.8-97.4) |
1.02 |
cache hit with brotli compression |
180.4 ms (172.1-186.6) |
179.9 ms (176.3-193.2) |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
c86543b to
ce97920
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ce97920 to
6891155
Compare
|
Closing: not pursuing the floor CI job. |
Adds
.github/workflows/engines.yml, which checks that every published package installs and loads on the lowest Node.js version itsengines.nodeallows. A dependency bump or new syntax that raises the real floor now turns CI red instead of breaking users on that version.What it does
pnpm install, then for each non-private workspace package (the root package in a single-package repo): runprepublishOnlyif present, andpnpm packit. The floor is read from that package'sengines.nodeat run time. Nothing is hardcoded in the workflow. A range that is not>= xfails the job.npm install --engine-strictof the package tarball, plus the tarballs of the workspace packages it depends on. This is what a user does: production dependencies only, lifecycle scripts included. Any package in the tree whoseenginesexcludes the floor fails the install withEBADENGINE. Without--engine-strict, npm only warns.requireevery runtime entry inexports(ormainwhen there is noexports). Entries that are import-only fall back toimport(). Type-only entries and*patterns are skipped.It runs as its own workflow on
pull_requestand on push to the default branch, so the release logic inmain.ymlis untouched.Why npm on the floor side
pnpm needs Node 18 or later, so it cannot run on older floors, and npm ships with every Node.js version. The install happens in a fresh directory from tarballs, so devDependencies never enter the tree and the test toolchain (ava, c8, standard), which needs a newer Node, is not involved.
Limits
setup-noderesolves a major-only floor such as>= 20to the latest 20.x. The job cannot tell 20.0 from 20.12. A floor written with a minor, such as>= 20.19, is checked at the latest 20.19.x.binscripts are not executed.enginesaccept the running Node. A user on the floor can get an older dependency than a user on current Node, and the job checks the tree the floor user gets. It goes red only when no version in range supports the floor, which is the case that breaks users.Proof that it catches a violation
On microlinkhq/keyvhq#294,
@keyvhq/redisdeclares>= 20and depends onioredis@6, which requires>=20.0.0. A throwaway commit lowered@keyvhq/redisto>= 18:>= 18:Node 18 @keyvhq/redisfails, the other 15 packages pass.>= 20, after dropping that commit: all 16 jobs pass.🤖 Generated with Claude Code
Note
Low Risk
Adds CI-only workflow and smoke tests; no application, auth, or runtime deployment changes.
Overview
Adds a standalone
enginesGitHub Actions workflow (PRs and pushes tomaster) so release CI inmain.ymlstays unchanged.The Pack job installs with pnpm on Node LTS, runs
prepublishOnlywhen present,pnpm packs each non-private package, and builds a matrix from each package’sengines.nodefloor (only>= xranges are allowed). Workspacedependencies/optionalDependenciesare resolved into tarball closures for matrix installs.Floor jobs run one per published package on that floor’s Node version: a clean consumer dir gets
npm install --engine-strictfrom those tarballs (production-like install), then a smoke scriptrequires or dynamic-imports every runtimeexportsentry (skipping types-only and*patterns).Dependency or syntax that raises the real Node floor should fail CI with
EBADENGINEor load errors instead of breaking users on the declared minimum.Reviewed by Cursor Bugbot for commit 6891155. Bugbot is set up for automated code reviews on this repo. Configure here.