Skip to content

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

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

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

Conversation

@B4nan

@B4nan B4nan commented Apr 14, 2026

Copy link
Copy Markdown
Member

Summary

Migrates camoufox-js from Yarn 4 to pnpm and adds a 1-day minimum release age supply-chain guard at both the package-manager layer (pnpm-workspace.yaml) and the Renovate layer. Internal @apify/* and @crawlee/* packages are whitelisted at both layers. Part of the org-wide pnpm migration; follows the same pattern as apify/apify-shared-js#616, apify/actor-scraper#273, and apify/got-scraping#175.

Changes

  • package.json: set packageManager to pnpm@10.24.0 (was yarn@4.13.0); replace npm run copy-files with pnpm copy-files in the build script
  • Removed Yarn artifacts: yarn.lock, .yarnrc.yml
  • Removed .yarn/ and .npmrc entries from .gitignore so pnpm's .npmrc is committed
  • pnpm-workspace.yaml: non-monorepo minimumReleaseAge: 1440 with @apify/* + @crawlee/* exclusions
  • .npmrc: node-linker=hoisted, link-workspace-packages=true, prefer-workspace-packages=true, public-hoist-pattern[]=*
  • New .github/actions/pnpm-install composite action (cached pnpm store, year-month + lockfile hash key)
  • CI workflows (test.yml, release.yml): delegate install to the composite; corepack step removed; yarn X -> pnpm X; npx camoufox fetch -> pnpm exec camoufox fetch; npm publish -> pnpm publish --no-git-checks; Node matrix [20, 22, 24] (engines.node requires >=20, so Node 18 is intentionally omitted)
  • renovate.json: add minimumReleaseAge: "1 day", internalChecksFilter: "strict", and a packageRule whitelisting @apify/* + @crawlee/* at 0 days

🤖 Generated with Claude Code

@github-actions github-actions Bot added this to the 138th sprint - Tooling team milestone Apr 14, 2026
@github-actions github-actions Bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Apr 14, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 14, 2026
@B4nan
B4nan force-pushed the chore/migrate-to-pnpm branch from 401a5a9 to 1f506ce Compare April 15, 2026 12:18
@B4nan
B4nan marked this pull request as ready for review April 15, 2026 13:41
B4nan and others added 8 commits April 15, 2026 19:35
Migrates camoufox-js from Yarn 4 to pnpm 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.

Notable changes:
- package.json: set packageManager to pnpm@10.24.0 (was yarn@4.13.0);
  replace "npm run copy-files" with "pnpm copy-files" in build script
- Removed Yarn artifacts: yarn.lock, .yarnrc.yml
- Removed .yarn/ and .npmrc entries from .gitignore so pnpm's
  .npmrc is committed
- pnpm-workspace.yaml: non-monorepo minimumReleaseAge settings only
- .npmrc: node-linker=hoisted + link-workspace-packages=true +
  prefer-workspace-packages=true + public-hoist-pattern[]=*
- New .github/actions/pnpm-install composite action (cached pnpm
  store, year-month + lockfile hash key)
- CI workflows (test.yml, release.yml): delegate install to the
  composite; corepack step removed; `yarn X` -> `pnpm X`;
  `npx camoufox fetch` -> `pnpm exec camoufox fetch`; `npm publish`
  -> `pnpm publish --no-git-checks`; Node matrix 20/22/24
  (engines.node requires >=20)
- renovate.json: add minimumReleaseAge "1 day",
  internalChecksFilter "strict", and @apify/* + @crawlee/* whitelist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The package's bin is `camoufox-js` (derived from package name); the
master workflow used npx which tolerated the name mismatch, but pnpm
exec is strict. Also approve esbuild's postinstall.
The package.json bin is derived from the package name (camoufox-js);
pnpm exec is strict about name matching.
pnpm only symlinks bins at install time; since dist/__main__.js
doesn't exist until after build, the camoufox-js bin is never
added to node_modules/.bin.
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.
@B4nan
B4nan force-pushed the chore/migrate-to-pnpm branch from 0206558 to e00ec58 Compare April 15, 2026 17:36
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.
@B4nan
B4nan force-pushed the chore/migrate-to-pnpm branch from e00ec58 to 82d7814 Compare April 15, 2026 17:42

@barjin barjin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you 👍

B4nan and others added 5 commits April 16, 2026 15:52
Add --no-git-tag-version flag to pnpm version calls to prevent
auto-commits and tags that conflict with the EndBug/add-and-commit step.

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).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@barjin
barjin merged commit 55164fd into master Apr 22, 2026
4 checks passed
@barjin
barjin deleted the chore/migrate-to-pnpm branch April 22, 2026 08:56
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