fix: lower published engines.node to >=18 (release 0.3.1) - #9
Merged
Conversation
Separate the development Node requirement from the consumer requirement, using the official npm fields for each. - Published packages (`core`, `react`): lower `engines.node` from `>=22` to `>=18`. The shipped `dist` targets es2022 and uses no Node-22-only API, so the previous floor needlessly warned (or, under `engine-strict`, blocked) installs on Node 18/20 with no runtime gain. - Private workspace root: replace `engines.node >=22` with `devEngines.runtime` (`name: node`, `version: >=22`, `onFail: error`) — the field npm documents for alerting people working on the source. Verified that npm 10.9.8 enforces it: an impossible version fails `npm install` with EBADDEVENGINES, while Node 22 passes. - Align the core README "Supported runtimes" to Node.js 18+ (the only consumer-facing doc that stated a Node minimum). CONTRIBUTING/RELEASING intentionally keep Node 22 as the development requirement.
Lockstep bump of core + react to 0.3.1 (react -> core ^0.3.1) and cut the [0.3.1] changelog section. The release contains the published engines.node >=18 relaxation.
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.
Summary
Release 0.3.1 (patch). Separates the development Node requirement from the consumer requirement, using the official npm field for each, and relaxes the published floor that 0.3.0 set too high.
0.3.0 shipped
engines.node >=22on the published packages. But the shippeddisttargets es2022 and uses no Node-22-only API — so that floor needlessly warned (or, underengine-strict/ pnpm / yarn, blocked) installs on Node 18/20 with no runtime benefit. The strict Node 22 is really a toolchain requirement (Vitest 4 etc.), not a runtime one.Changes
core+react:engines.node>=22→>=18(the consumer-facing field).engines.node >=22withdevEngines.runtime({ name: node, version: >=22, onFail: error }) — the field npm documents for "people interacting with the source code", validated beforeinstall/ci/run.packages/core/README.md: "Supported runtimes" → Node.js 18+ (the only consumer doc that stated a Node minimum).CONTRIBUTING.md/RELEASING.mdintentionally keep Node 22 as the development requirement.0.3.1(react → core^0.3.1);[0.3.1]changelog section in all three changelogs.Why this is correct per the official docs
Per npm package.json docs:
enginesis "designed to alert the user when a dependency uses a different node version than the project it's being used in" (consumer), whereasdevEngines"is used to alert people interacting with the source code of a project" (dev). Soengines = >=18(consumer) +devEngines.runtime = >=22(dev) is the documented split.Verification
devEngines.runtime >=99.0.0failsnpm installwithEBADDEVENGINES;>=22passes on Node 22. npm here is 10.9.8.bin/quality-gate.sh --full— green (build · format · lint · typecheck · 420 core + 18 react). The gate runsnpm run, which also exercises thedevEnginesvalidation.npm run docs:build— green.package-lock.jsonreflects only the engines/version changes — no dependency churn.Note
SemVer: relaxing the engine floor is backward-compatible (wider install surface, no API change) → patch. The npm publish stays gated behind the
npm-publishenvironment manual approval after thev0.3.1tag is pushed.