Skip to content

chore: migrate to pnpm and enable minimum release age#883

Open
B4nan wants to merge 17 commits intomasterfrom
chore/migrate-to-pnpm
Open

chore: migrate to pnpm and enable minimum release age#883
B4nan wants to merge 17 commits intomasterfrom
chore/migrate-to-pnpm

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented Apr 14, 2026

Summary

Part of the org-wide supply-chain hardening + pnpm migration. Migrates apify-client-js from npm workspaces to pnpm workspaces and adds a 1-day minimum release age guard at two layers:

  • pnpm layerminimumReleaseAge: 1440 in pnpm-workspace.yaml blocks installs of versions < 1 day old
  • Renovate layerminimumReleaseAge: "1 day" delays PR creation
  • Internal allowlist@apify/* and @crawlee/* excluded at both layers

The website/ directory becomes a proper workspace (previously had its own package-lock.json). Single root lockfile now.

Changes

  • package.json: packageManagerpnpm@10.24.0; npm run Xpnpm X
  • pnpm-workspace.yaml: packages: [website] + release age settings
  • .npmrc: node-linker=hoisted, link-workspace-packages=true, prefer-workspace-packages=true, public-hoist-pattern[]=* (kept pre-existing legacy-peer-deps=true)
  • website/package.json: add "name": "apify-client-website" so pnpm recognises the workspace; npm runpnpm
  • website/docusaurus.config.js: rename future.experimental_fasterfuture.faster. Docusaurus 3.10 renamed the key, and that's what pnpm resolves from the ^3.8.1 range (npm previously resolved 3.9.x via --force).
  • New .github/actions/pnpm-install composite action (cached pnpm store, year-month + lockfile hash key — pattern from chore: move to pnpm from yarn apify-cli#1068)
  • All 5 CI workflows (check, docs, publish_to_npm, release, pre_release) use the composite; npmpnpm everywhere. publish switches to pnpm publish --no-git-checks.
  • renovate.json: minimumReleaseAge: "1 day", internalChecksFilter: "strict", @apify/* + @crawlee/* whitelist; drop old npm constraint
  • Both package-lock.json files deleted; single root pnpm-lock.yaml

🤖 Generated with Claude Code

@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 14, 2026
B4nan and others added 2 commits April 15, 2026 14:22
Migrates apify-client-js from npm workspaces to pnpm workspaces and
adds a 1-day minimum release age supply-chain guard at the package
manager layer (pnpm-workspace.yaml) and at the Renovate layer.
Internal `@apify/*` and `@crawlee/*` packages are whitelisted at
both layers.

The website/ directory becomes a proper workspace (previously had
its own lockfile). Single root lockfile now.

Notable changes:
- package.json: set packageManager to pnpm@10.24.0; "npm run X"
  -> "pnpm X" in scripts
- pnpm-workspace.yaml: packages [website], release-age settings
- .npmrc: node-linker=hoisted, link-workspace-packages=true,
  prefer-workspace-packages=true, public-hoist-pattern[]=*
  (kept the pre-existing legacy-peer-deps=true)
- website/package.json: add "name": "apify-client-website" so pnpm
  recognises it as a workspace; "npm run" -> "pnpm" in scripts
- website/docusaurus.config.js: rename future.experimental_faster
  -> future.faster (renamed in Docusaurus 3.10, which is what pnpm
  resolves from the ^3.8.1 range; npm previously resolved 3.9.x
  via --force)
- New .github/actions/pnpm-install composite action (cached pnpm
  store, keyed by year-month + lockfile hash — pattern from
  apify/apify-cli#1068)
- All 5 CI workflows (check, docs, publish_to_npm, release,
  pre_release) use the composite; npm/npx/`npm version` -> pnpm
  equivalents. docs workflow's `npm update @apify/docs-theme`
  becomes `pnpm --filter apify-client-website update @apify/docs-theme`.
  publish uses `pnpm publish --tag X --no-git-checks`.
- renovate.json: add minimumReleaseAge "1 day",
  internalChecksFilter "strict", @apify/* + @crawlee/* whitelist;
  drop old npm constraint
- Both package-lock.json files deleted; single pnpm-lock.yaml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@B4nan B4nan force-pushed the chore/migrate-to-pnpm branch from 827f25c to d762cd0 Compare April 15, 2026 12:22
@github-actions github-actions bot added this to the 138th sprint - Tooling team milestone Apr 15, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 15, 2026
B4nan added 7 commits April 15, 2026 15:05
pnpm hoists @apify/docs-theme to root node_modules, not website/node_modules.
Using require.resolve makes the staticDirectories path work under both
npm (nested) and pnpm (hoisted) layouts.
pnpm 10's build script approval via onlyBuiltDependencies isn't
reliably downloading Chrome in CI. Run the explicit command instead.
@B4nan B4nan marked this pull request as ready for review April 15, 2026 13:41
B4nan and others added 8 commits April 15, 2026 15:43
Replaces the local .github/actions/pnpm-install composite copy
with the shared one from apify/workflows@main. Identical behavior,
less duplication.
Silences npm warnings about unknown options like node-linker; pnpm
reads the same keys from pnpm-workspace.yaml in camelCase form.
Block accidental npm/yarn install — npm 10.5+ and pnpm 10.x both
honor devEngines.packageManager and refuse to run when it doesn't
match.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… with pnpm-workspace exclusions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
devEngines.packageManager breaks pnpm commands that delegate to npm
(pnpm version, pnpm pkg set, etc). Use the battle-tested only-allow
approach instead (same as Vite, Vue, Astro).
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