fix(engines): require Node 20.13.0, the floor clack's code actually needs - #219
Merged
Merged
Conversation
…eeds @clack/prompts 1.8.1 declares ">= 20.12.0" but passes an ARRAY of formats to util.styleText, which Node accepts only from 20.13.0. On 20.12.x, cancelling a confirm prompt (or a picker after selecting something) crashed with ERR_INVALID_ARG_VALUE and exit 1 instead of "Cancelled" and exit 0 — measured in a pty against the packed CLI on the official 20.12.0 / 20.13.0 binaries. - engines.node -> ">=20.13.0" (package.json + the lockfile root entry, regenerated with npm 11.20.0 so nothing else moves). - tests/engines.test.ts also scans the runtime dependencies' shipped code against a measured known-API table, instead of trusting their declared floors; planted-text cases prove the scanner fires and stays quiet; the smoke workflow's FLOOR is pinned to package.json. - node-floor.yml: FLOOR 20.13.0, job renamed to the version-free `Smoke (node floor)` (not a required check). - README, SECURITY.md, CLAUDE.md, contributing, getting-started, troubleshooting and CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199owRmYfskqYQVQrVP679o
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Plan A of the second batch from the PHARN-01..18 review (finding F6), shipped through
/pharn-dev-ship.@clack/prompts1.8.1 declares>= 20.12.0, but it passes an array of formats toutil.styleText. Node accepts that only from 20.13.0. On Node 20.12.x, cancelling a confirmation (or a picker after selecting something) crashed withERR_INVALID_ARG_VALUEand exit 1. It should print "Cancelled" and exit 0.Measured here in a pty against the packed CLI (
pharn remove), on the official binaries:ERR_INVALID_ARG_VALUEERR_INVALID_ARG_VALUEengines.nodeis now>=20.13.0, inpackage.jsonand the lockfile's root entry. The lockfile was regenerated with npm 11.20.0, so nothing else in it changes.tests/engines.test.tsno longer trusts only the dependencies' declared floors:@clack/promptswas actually read.FLOORis pinned topackage.json.node-floor.ymlnow usesFLOOR: 20.13.0. The job is renamed to the version-freeSmoke (node floor), so future floor bumps never rename it. It is not a required check.### Changedentry.Type of change
feat— new stack option, wizard step, or command capabilityfix— bug fixdocs— docs-only changechore/refactor— tooling or internal restructure, no behavior changeArea(s) touched
package metadata ·
tests/engines.test.ts· repo tooling (node-floor.yml, aci.ymlcomment) · docs ·.dev/features/engines-styletext-floor/(pipeline artifacts)Checklist
.js-extension import convention.tests/*.test.ts— the code-floor case fails on the base (>=20.12.0).docs/pages.Quality gates
npm run checkpasses locally (format:check+lint+typecheck+test) — 1513 tests.npm run buildsucceeds.npm run test:coveragepasses (coverage thresholds met).Notes for the reviewer
validateexit 0, regressno-regressions, verifyPASS, review GREEN with 2 minor advisory findings (.dev/features/engines-styletext-floor/REVIEW.md).🤖 Generated with Claude Code
https://claude.ai/code/session_0199owRmYfskqYQVQrVP679o
Generated by Claude Code