Skip to content

chore: migrate to pnpm and enable minimum release age - #534

Merged
barjin merged 16 commits into
masterfrom
chore/migrate-to-pnpm
Apr 22, 2026
Merged

barjin merged 16 commits into
masterfrom
chore/migrate-to-pnpm

Conversation

@B4nan

@B4nan B4nan commented Apr 14, 2026

Copy link
Copy Markdown
Member

Summary

Migrates fingerprint-suite from npm to pnpm as part of an org-wide supply-chain hardening effort, aligning with the patterns established in apify/apify-shared-js#616, apify/actor-scraper#273 and apify/got-scraping#175.

Enables a 24-hour minimumReleaseAge for third-party packages both at install time (via pnpm-workspace.yaml) and at dependency-update time (via renovate.json). @apify/* and @crawlee/* are excluded so our own releases can still be consumed immediately.

Changes

  • Replace package-lock.json with pnpm-lock.yaml.
  • Move workspaces config from package.json to pnpm-workspace.yaml and add minimumReleaseAge settings with an exclude list for @apify/* and @crawlee/*.
  • Switch internal cross-package dependencies (generative-bayesian-network, header-generator, fingerprint-generator) to the workspace:* protocol so pnpm links the local copies rather than fetching from the registry.
  • Add .npmrc with node-linker=hoisted, link-workspace-packages=true, prefer-workspace-packages=true, public-hoist-pattern[]=*; drop .npmrc from .gitignore.
  • Add reusable composite action .github/actions/pnpm-install and use it from every workflow that installs deps (test-and-sync, publish-to-npm, e2e-benchmark, model-updater).
  • Replace all npm run X / npx with pnpm X / pnpm exec in root and package scripts and in workflows.
  • Bump engines.node to >=18.0.0 in every workspace package and update the CI test matrix to [18, 20, 22, 24].
  • Bump packageManager to pnpm@10.24.0.
  • scripts/publish.sh uses pnpm publish --no-git-checks.
  • Update renovate.json: add "minimumReleaseAge": "1 day" and "internalChecksFilter": "strict", remove the legacy "constraints": { "npm": "^7.0.0" }, and add a package rule that sets minimumReleaseAge: 0 days for @apify/* and @crawlee/*.

🤖 Generated with Claude Code

Migrates the repository's package manager from npm to pnpm as part of
an org-wide supply-chain hardening effort. Enables a 24h minimum
release age for third-party packages (via pnpm-workspace.yaml and
renovate.json) while excluding @apify/* and @crawlee/* so internal
releases can still be consumed immediately.

- Replace package-lock.json with pnpm-lock.yaml
- Move workspaces config from package.json to pnpm-workspace.yaml
- Use workspace:* protocol for internal package cross-deps
- Add .npmrc with hoisted node-linker
- Add reusable .github/actions/pnpm-install composite action
- Update all CI workflows to use pnpm
- Bump Node engine floor to >=18 and CI test matrix to [18, 20, 22, 24]
- Bump packageManager to pnpm@10.24.0
- pnpm publish --no-git-checks in release script
- Add renovate rule: @apify/* and @crawlee/* bypass minimumReleaseAge

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the 138th sprint - Tooling team milestone Apr 14, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 14, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 14, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Apr 15, 2026
@B4nan
B4nan marked this pull request as ready for review April 15, 2026 15:55
B4nan and others added 7 commits April 15, 2026 18:43
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.
… with pnpm-workspace exclusions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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).
@barjin
barjin merged commit 21fc2cf into master Apr 22, 2026
6 checks passed
@barjin
barjin deleted the chore/migrate-to-pnpm branch April 22, 2026 09:36
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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants