From ca6d5f71342d4485f6bf9627cacb0d1440e34edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 11 May 2026 15:56:56 +0200 Subject: [PATCH] fix: drop only-allow preinstall, enforce pnpm via devEngines The "preinstall": "npx only-allow pnpm" script ships in the published npm tarball and fires when downstream consumers install this package via npm/yarn. In the `npm install -g apify-cli` flow the npx bootstrap of only-allow fails to put the binary on PATH in time, breaking the global install (exit 127 on Linux, exit 1 on Windows). Replaces with devEngines.packageManager (Node 22+/npm 10+) with onFail:warn. This keeps the developer-visible signal that pnpm is expected without breaking CI steps that indirectly invoke npm (pnpm v10 shells to npm for `pnpm version`, `pnpm config`, etc.). devEngines is only checked at the package's own repo root, never on transitive installs, so downstream consumers stay unaffected. Mirrors apify/apify-client-js#895 + #896. --- package.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 30c3c4a..a9017e5 100644 --- a/package.json +++ b/package.json @@ -51,10 +51,9 @@ "test": "vitest run", "test:watch": "vitest", "pretest:blocking": "pnpm build", - "test:blocking": "ts-node -T ./test/live-testing/index.js", - "preinstall": "npx only-allow pnpm" + "test:blocking": "ts-node -T ./test/live-testing/index.js" }, - "packageManager": "pnpm@10.24.0", + "packageManager": "pnpm@10.33.4", "author": { "name": "Apify", "email": "support@apify.com", @@ -67,5 +66,12 @@ }, "bugs": { "url": "https://github.com/apify/got-scraping/issues" + }, + "devEngines": { + "packageManager": { + "name": "pnpm", + "version": "10.33.4", + "onFail": "warn" + } } }