Skip to content

Drop the Node engines field so npx runs are not blocked by version checks - #73

Merged
adelrodriguez merged 2 commits into
mainfrom
t3code/remove-engine-requirements
Oct 9, 2026
Merged

adelrodriguez merged 2 commits into
mainfrom
t3code/remove-engine-requirements

Conversation

@adelrodriguez

@adelrodriguez adelrodriguez commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Most people run Packref with npx. The engines.node: ">=22" field did not help them. It only made npm warn, or fail with engine-strict, on Node versions where the CLI works. Development already gets its Node version from .node-version. This PR removes the field. The README now says that Packref supports Node.js 22.19 or later. npm still checks dependency engines, and undici@8 (from @effect/platform-node) requires >=22.19.0.

Why Node 22.19 and not lower

I ran the built CLI against the registry on several Node versions:

Node Result
18.20.8, 20.11.1 Fails at startup: node:util does not export styleText (needed by @clack/prompts)
20.12.0, 20.20.2 add, list, remove, install, sync work
22.0.0, 22.19.0 All work

The real floor is 20.12. But Node 20 is end-of-life, and a dependency update could break it with no warning. Node 22 is the oldest LTS that still gets support. Packref does not load undici at runtime because it uses NodeHttpClient.layerFetch. But with engine-strict=true, npm refuses to install on Node versions below 22.19, so the README states 22.19.

The tsdown output is byte-for-byte the same with and without the engines field.

Merge danger

  • Door: two-way. To undo it, add the field back in a later release.
  • Blast radius: small. It changes only the install-time engine check for package consumers.

Changes made by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

…ecks

Packref runs mostly through npx, and the engines field only served
development. The README now states Node.js 22 or later as the supported
floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ One documentation correction: dependency engine checks still apply.

Reviewed changes I reviewed the package metadata, README, and changeset, and verified the packed CLI with pnpm run build:verify.

  • Package metadata: Removes Packref's engines.node declaration without changing dependencies or runtime code.
  • Supported versions: Adds a Node.js 22-or-later statement to the README.
  • Release note: Adds a patch changeset for the removal of Packref's version check.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread .changeset/drop-node-engines.md Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes I reviewed the documentation changes in f9772d5 since the prior Pullfrog review.

  • Limited the release claim: Clarified that this change removes only Packref's own engines.node declaration and that dependency engine checks still apply.
  • Corrected the supported version: Changed the README minimum to Node.js 22.19, which matches the current dependency requirement.

The dependency lockfile confirms that undici@8.11.2 requires Node.js >=22.19.0. The current CI build, check, analyze, unit, and integration checks passed. I did not repeat local runtime tests for these documentation changes.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@adelrodriguez
adelrodriguez merged commit fe726b3 into main Oct 9, 2026
8 checks passed
@adelrodriguez
adelrodriguez deleted the t3code/remove-engine-requirements branch October 9, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant