From 1ca444ef3f0ac1af2aef6640873b9a360717bc16 Mon Sep 17 00:00:00 2001 From: Larslllllll Date: Tue, 18 Aug 2026 22:28:17 +0200 Subject: [PATCH] fix(packaging): declare engines.node on the three published packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `@profullstack/sh1pt`, `-core` and `-policy` publish to npm without an `engines` field, but the CLI depends on global `fetch` (login.ts, build.ts, cloud-vault.ts, core/setup-helpers.ts), which Node only exposes from v18. A user on Node 16 installs cleanly and then hits `ReferenceError: fetch is not defined` at first run instead of an install-time engine warning. Declares `"engines": { "node": ">=20" }` — Node 20 is the oldest maintained LTS that has global fetch and covers the ES2022 output target. mise.toml pins 22 and CI runs 22 (threatcrush uses 20), so >=20 is satisfied by every environment the project already builds and tests in. Tighten to >=22 if you prefer the declared floor to match mise exactly. Only the three published packages are touched; the private root is unchanged. --- packages/cli/package.json | 3 +++ packages/core/package.json | 3 +++ packages/policy/package.json | 3 +++ 3 files changed, 9 insertions(+) diff --git a/packages/cli/package.json b/packages/cli/package.json index d5e5ddfa..47cde5c0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,6 +19,9 @@ "devtools" ], "type": "module", + "engines": { + "node": ">=20" + }, "bin": { "sh1pt": "./bin/sh1pt.js" }, diff --git a/packages/core/package.json b/packages/core/package.json index ff0e2ef5..87141d06 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,6 +17,9 @@ "adapter" ], "type": "module", + "engines": { + "node": ">=20" + }, "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { diff --git a/packages/policy/package.json b/packages/policy/package.json index aa6351ae..7b371af9 100644 --- a/packages/policy/package.json +++ b/packages/policy/package.json @@ -17,6 +17,9 @@ "lint" ], "type": "module", + "engines": { + "node": ">=20" + }, "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": {