Skip to content

refactor: drop only-allow preinstall, enforce pnpm via devEngines#2519

Open
B4nan wants to merge 1 commit into
masterfrom
fix/drop-only-allow-preinstall
Open

refactor: drop only-allow preinstall, enforce pnpm via devEngines#2519
B4nan wants to merge 1 commit into
masterfrom
fix/drop-only-allow-preinstall

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented May 11, 2026

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:

  • Linux: sh: 1: only-allow: not found (exit 127)
  • Windows: 'only-allow' is not recognized as an internal or external command (exit 1)

Replaces with devEngines.packageManager (Node 22+/npm 10+) with onFail: "warn". This keeps the developer-visible signal 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 are unaffected.

Mirrors apify/apify-client-js#895 + #896.

@apify-service-account
Copy link
Copy Markdown

apify-service-account commented May 11, 2026

✅ Preview for this PR (commit 3c56668) is ready at https://pr-2519.preview.docs.apify.com (see action run).

@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 11, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label May 11, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label May 11, 2026
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.
@B4nan B4nan force-pushed the fix/drop-only-allow-preinstall branch from 68c7061 to 3c56668 Compare May 11, 2026 14:36
@B4nan B4nan requested a review from vladfrangu May 11, 2026 14:43
@B4nan B4nan changed the title fix: drop only-allow preinstall, enforce pnpm via devEngines refactor: drop only-allow preinstall, enforce pnpm via devEngines May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants