Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

chore: migrate v4 to pnpm 11 (#3645)

Martin Adámekf673ca54f3f7
diff --git a/package.json b/package.json
index 1cd8b6e18..1c3722a36 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,6 @@
},
"homepage": "https://crawlee.dev",
"scripts": {
- "preinstall": "npx only-allow pnpm",
"prepublishOnly": "turbo run copy --filter=./packages/*",
"clean": "turbo run clean --filter=./packages/* && rimraf .turbo packages/*/.turbo packages/*/*.tsbuildinfo",
"build": "turbo run build --filter=./packages/* && node ./scripts/typescript_fixes.mjs",
@@ -120,9 +119,16 @@
"oxfmt --write --no-error-on-unmatched-pattern"
]
},
- "packageManager": "[email protected]",
+ "packageManager": "[email protected]",
+ "devEngines": {
+ "packageManager": {
+ "name": "pnpm",
+ "version": "11.0.9",
+ "onFail": "error"
+ }
+ },
"volta": {
"node": "24.18.0",
- "pnpm": "10.24.0"
+ "pnpm": "11.0.9"
}
}
diff --git a/packages/stagehand-crawler/package.json b/packages/stagehand-crawler/package.json
index c4c4b3140..a49e78d85 100644
--- a/packages/stagehand-crawler/package.json
+++ b/packages/stagehand-crawler/package.json
@@ -3,7 +3,7 @@
"version": "3.17.0",
"description": "AI-powered web crawling with Stagehand integration for Crawlee - enables natural language browser automation with act(), extract(), and observe() methods.",
"engines": {
- "node": ">=16.0.0"
+ "node": ">=22.0.0"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9c0f7ff73..932408b83 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11,9 +11,7 @@ overrides:
lerna>minimatch: ^3.1.4
patchedDependencies:
- '@docusaurus/[email protected]':
- hash: 7e95e0e59f770d24c0e51e1e2635b0a25edf33b38938162fa8c69ab42d38b1fb
- path: patches/@[email protected]
+ '@docusaurus/[email protected]': 7e95e0e59f770d24c0e51e1e2635b0a25edf33b38938162fa8c69ab42d38b1fb
importers:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index d051357b6..1807ca6e8 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -27,20 +27,27 @@ overrides:
"lerna>js-yaml": "^4.2.0"
"lerna>minimatch": "^3.1.4"
-onlyBuiltDependencies:
- - "@apify/ui-icons"
- - "@playwright/browser-chromium"
- - "@playwright/browser-firefox"
- - "@playwright/browser-webkit"
- - "@swc/core"
- - better-sqlite3
- - bufferutil
- - core-js
- - esbuild
- - nx
- - protobufjs
- - puppeteer
- - unrs-resolver
+# pnpm 11 replaces `onlyBuiltDependencies` with an explicit `allowBuilds` map.
+# Each entry must be true (build allowed) or false (build skipped) — pnpm 11
+# refuses to install if any dep needs a build decision that isn't in the map
+# (combined with `strictDepBuilds: false` below so the install can still
+# proceed when new build-requesting deps appear without a manual entry).
+allowBuilds:
+ "@apify/ui-icons": true
+ "@playwright/browser-chromium": true
+ "@playwright/browser-firefox": true
+ "@playwright/browser-webkit": true
+ "@swc/core": true
+ better-sqlite3: true
+ bufferutil: true
+ core-js: true
+ esbuild: true
+ nx: true
+ protobufjs: true
+ puppeteer: true
+ unrs-resolver: true
+
+strictDepBuilds: false
nodeLinker: hoisted
linkWorkspacePackages: true