Skip to content

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

Merged
B4nan merged 9 commits intov4from
chore/migrate-to-pnpm-v4
Apr 20, 2026
Merged

chore: migrate to pnpm and enable minimum release age#3581
B4nan merged 9 commits intov4from
chore/migrate-to-pnpm-v4

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented Apr 17, 2026

Summary

Port the pnpm migration from master (#3568) to the v4 branch. Same goals:

  • Yarn 4 → pnpm 10.24.0
  • minimumReleaseAge: 1440 supply-chain guard at both pnpm and Renovate layers
  • Internal @apify/*, @crawlee/*, apify-client, apify, crawlee, got-scraping whitelisted
  • only-allow pnpm preinstall hook blocks npm/yarn usage
  • Shared apify/workflows/pnpm-install@main action in all CI workflows

v4-specific adaptations

  • Node matrix [22, 24] (v4 already dropped 18, 20)
  • oxlint/oxfmt (not eslint/biome)
  • publish dist-tag v4 instead of next
  • No eslint-config pin needed
  • Internal deps: workspace:* for regular deps, workspace:^ for peerDeps

Incidentally fixed

Four packages were missing explicit @crawlee/* deps that yarn's hoisting masked:

  • @crawlee/http@crawlee/core
  • @crawlee/linkedom@crawlee/utils
  • @crawlee/playwright@crawlee/basic
  • @crawlee/puppeteer@crawlee/core

🤖 Generated with Claude Code

Port the pnpm migration from master to v4. Adaptations for v4:

- Node matrix [22, 24] (v4 already dropped 18, 20)
- oxlint/oxfmt (v4's linter, not eslint/biome)
- publish dist-tag 'v4' instead of 'next'
- No @apify/eslint-config override needed
- No devEngines (uses only-allow in preinstall instead)

Internal deps use workspace:* (deps) and workspace:^ (peerDeps)
pattern. docs and website are workspace members. CI uses the shared
apify/workflows/pnpm-install@main action everywhere.
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 17, 2026
B4nan added 3 commits April 17, 2026 16:47
- build/ci:build/clean/prepublishOnly now use --filter=./packages/*
  so website (docusaurus) isn't included in the package build
- revert docusaurus future.faster rename (v4 is on 3.9.2 where the
  key is still experimental_faster)
- pin @docusaurus/theme-mermaid to 3.9.2 (caret resolved to 3.10.0
  which docusaurus rejects due to version mismatch with core)
Docs has examples importing these packages but they weren't listed
as workspace deps.
The robots test uses nock with .persist().delay(500) while the
timeout/abort tests expect rejection at 200ms. After the test ends
and nock.cleanAll() runs, the 500ms delay still fires, tries to
respond to an already-handled request, and throws InterceptorError.

Vitest 4 surfaces this as an unhandled async error and fails the
run. Call nock.abortPendingRequests() before cleanAll() to clear
the pending timer.
@B4nan B4nan marked this pull request as ready for review April 20, 2026 09:01
B4nan and others added 2 commits April 20, 2026 11:24
…to website

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lint-staged was running oxfmt on every staged .js/.ts file regardless of
location, reformatting files in website/ that the top-level format/lint
scripts intentionally skip. Scope the hook to packages/test/docs to
match that intent, and revert the accidental reformatting of
website/docusaurus.config.js to a minimal diff (just the
exclude node_modules entry).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@B4nan B4nan requested a review from vladfrangu April 20, 2026 09:52
Comment thread scripts/cleanup-nested-readmes.mjs Outdated
Comment thread website/package.json Outdated
- Drop scripts/cleanup-nested-readmes.mjs + its postinstall hook. With
  nodeLinker=hoisted and publicHoistPattern='*' the Docusaurus typedoc
  plugin no longer trips over nested package READMEs. Verified locally
  that a full `pnpm run build` in website/ succeeds with those READMEs
  still in place.
- Simplify website build/deploy to `NODE_OPTIONS=... docusaurus <cmd>`
  instead of resolving core/bin/docusaurus.mjs by path. The docusaurus
  binary is already in PATH via pnpm's node_modules/.bin.

Addresses review comments on #3581.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v4 no longer pins cheerio to an RC; we track latest. Drop the ignore
entry that was inadvertently carried over from master.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@B4nan
Copy link
Copy Markdown
Member Author

B4nan commented Apr 20, 2026

Good points, it wasn't needed in the end. Let's see how this works, merging once the CI is green.

@B4nan B4nan merged commit 930b2ef into v4 Apr 20, 2026
6 checks passed
@B4nan B4nan deleted the chore/migrate-to-pnpm-v4 branch April 20, 2026 11:24
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants