Skip to content

fix: remove engines.node from published package (#165)#166

Merged
puckey merged 1 commit into
masterfrom
fix/relax-engines-node
Jun 26, 2026
Merged

fix: remove engines.node from published package (#165)#166
puckey merged 1 commit into
masterfrom
fix/relax-engines-node

Conversation

@puckey

@puckey puckey commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Problem

Since v6.0.1, @pmndrs/detect-gpu declares engines.node: ">=24". Under engine-strict=true this hard-fails consumer installs on Node 20/22 LTS:

npm error code EBADENGINE
npm error Required: {"node":">=24"}
npm error Actual:   {"node":"v22.17.0","npm":"11.4.2"}

The library is browser-only — the published dist only uses window, navigator, WebGL and fetch, with no Node runtime requirement. The >=24 constraint leaked in from a dev-environment bump (chore: bump node version to 24).

Fix

Remove the engines field entirely, restoring the v6.0.0 behavior (which had no engines).

The build/publish Node version is enforced independently of this field and is unaffected:

  • .nvmrc24 (local dev)
  • node-version: '24' hard-pinned in both .github/workflows/test.yml and release.yml

Also removes the now-inaccurate "Node.js 24+" consumer requirement from the README.

Fixes #165

The browser-only published library declared engines.node ">=24",
which hard-fails consumer installs on Node 20/22 LTS under
engine-strict (#165). The published dist only uses browser APIs
(window, navigator, WebGL, fetch) and needs no Node runtime.

The build/publish Node version is already pinned to 24 independently
of this field via .nvmrc and the '24' node-version in both CI
workflows, so dropping engines does not affect building or
publishing. This restores the v6.0.0 behavior (no engines field).

Fixes #165
@puckey puckey merged commit f528d16 into master Jun 26, 2026
1 check passed
@puckey puckey deleted the fix/relax-engines-node branch June 26, 2026 19:41
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.

Relax/remove engines.node ">=24"

1 participant