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 38 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Package discovery and packing .github/workflows/engines.yml |
The workflow validates package Node engine floors, runs defined prepublishOnly scripts, packs packages, and includes recursive workspace dependencies in the test matrix. |
Engine-floor installation .github/workflows/engines.yml |
The matrix job installs package tarballs in a clean consumer directory with npm --engine-strict on each declared Node floor. |
Exported entry-point smoke tests .github/workflows/engines.yml |
The consumer smoke test loads eligible exported entry points with require or supported dynamic import fallbacks. It fails on load errors or undefined results. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Other
Sequence Diagram(s)
sequenceDiagram
participant GitHubActions as GitHub Actions
participant PackJob as Pack job
participant Artifact as Workflow artifact
participant FloorJob as Floor job
participant Consumer as Consumer directory
GitHubActions->>PackJob: Start package discovery and packing
PackJob->>Artifact: Upload package tarballs
Artifact->>FloorJob: Provide package tarballs
FloorJob->>Consumer: Install tarballs with engine-strict
FloorJob->>Consumer: Smoke-test exported entry points
Merge Risk: 
Minimal · previous review af133
-
The workflow adds Node engine-floor installation and loading checks. No actionable merge-blocking issue was established; the browser-only export concern does not affect the current package.
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.
html-encode
Details
| Benchmark suite | Current: 8b51693 | Previous: 5e42485 | Ratio |
|---|---|---|---|
decode windows-1250 from content-type |
505.6 ms (492.1-516.2) |
502.2 ms (493.7-514.3) |
1.01 |
decode shift_jis from meta charset |
354.6 ms (349.6-358.4) |
359.1 ms (349.5-359.8) |
0.99 |
infer shift_jis with jschardet |
681.5 ms (646.6-747.6) |
686.4 ms (636.5-926.2) |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
7d95536 to
c57c4b4
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c57c4b4 to
8b51693
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8b51693. Configure here.
|
|
||
| const OUT = path.resolve('tarballs') | ||
| const FLOOR = /^>=\s*(\d+(?:\.\d+){0,2})$/ | ||
| const WORKSPACE_DEPENDENCY_FIELDS = ['dependencies', 'optionalDependencies'] |
There was a problem hiding this comment.
Optional workspace deps installed required
Medium Severity
Workspace packages listed in optionalDependencies are packed into matrix.tarballs and passed to npm install as positional packages. That makes them required in the consumer, so an optional workspace package whose engines exclude the floor fails the job with EBADENGINE even though a user install would skip it.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 8b51693. Configure here.
|
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 automation with no application or runtime code changes; failures surface misdeclared
engines.nodeor incompatible dependencies before release.Overview
Adds a dedicated
enginesGitHub Actions workflow so published packages are validated against the minimum Node.js version declared in each package’sengines.node(>= xonly).The Pack job runs on Node LTS with pnpm: installs the workspace, runs
prepublishOnlywhere defined, **pnpm pack**s every non-private package, derives the Node floor from each manifest, and builds a matrix that includes workspace dependency tarballs for install closure. The Floor jobs use npm with--engine-stricton that floor version (npm ships with Node; pnpm cannot run on older floors), install from tarballs in a clean consumer directory, then smoke-load every runtimeexportsentry (withimport()fallback for ESM-only paths).Runs on pull requests and pushes to
master, separate from existing release/CI workflows.Reviewed by Cursor Bugbot for commit 8b51693. Bugbot is set up for automated code reviews on this repo. Configure here.