fix: drop only-allow preinstall, enforce pnpm via devEngines#1129
Merged
Conversation
The "preinstall": "npx only-allow pnpm" script ships in the published npm tarball and fires when downstream consumers install apify-cli via npm. 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). The apify-cli issue was the user-visible symptom that first surfaced this bug. Adds devEngines.packageManager (pnpm@10.33.0, onFail:warn) alongside the existing devEngines.runtime so local devs still get the visible "use pnpm" signal. onFail:warn (not error) avoids tripping CI steps that indirectly invoke npm (pnpm v10 shells to npm for `pnpm version`, `pnpm config`, etc.). devEngines is checked at the package's own repo root, never on transitive installs, so downstream consumers are unaffected. Mirrors apify/apify-client-js#895 + #896 and apify/apify-sdk-js#606.
bd7fcb5 to
ffa6579
Compare
vladfrangu
approved these changes
May 11, 2026
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.
The
preinstall: npx only-allow pnpmscript ships in the published npm tarball and fires when downstream consumers installapify-clivia npm. In thenpm install -g apify-cliflow the npx bootstrap ofonly-allowfails to put the binary on PATH in time:sh: 1: only-allow: not found(exit 127)'only-allow' is not recognized as an internal or external command(exit 1)This was the user-visible symptom that first surfaced the bug (apify/apify-client-js#893).
Adds
devEngines.packageManager(pnpm@10.33.0,onFail: "warn") alongside the existingdevEngines.runtime.onFail: "warn"avoids tripping CI steps that indirectly invoke npm (pnpm v10 shells to npm forpnpm version,pnpm config, etc.).devEnginesis 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 and apify/apify-sdk-js#606. Patch release needed after merge.