Skip to content

Commit 7c2e483

Browse files
B4nanclaude
andcommitted
chore(website): migrate to pnpm and enable minimum release age
Migrates the website/ subdirectory from Yarn 4 to pnpm. The Python root (uv) is untouched. Adds @apify/* + @crawlee/* whitelist at the Renovate layer (minimumReleaseAge was already present in renovate.json). - website/package.json: rename to crawlee-python-website + private: true, packageManager -> pnpm@10.24.0, yarn/npx -> pnpm - website/pnpm-workspace.yaml: minimumReleaseAge 1440 with @apify/* + @crawlee/* excluded - website/.npmrc: hoisted linker + workspace linking flags - website/docusaurus.config.js: rename future.experimental_faster -> future.faster (Docusaurus 3.10 renamed the key) - Delete website/yarn.lock and website/.yarnrc.yml - pyproject.toml poe tasks build-docs/run-docs: drop corepack + yarn, use pnpm install --frozen-lockfile + pnpm build/start - New .github/actions/pnpm-install composite action (pattern from apify/apify-cli#1068) - manual_release_stable.yaml version_docs job: pnpm/action-setup + pnpm install --frozen-lockfile instead of corepack + yarn; npx docusaurus -> pnpm exec docusaurus; commit pnpm-lock.yaml - renovate.json: add internalChecksFilter "strict" and @apify/* + @crawlee/* whitelist (minimumReleaseAge "1 day" was already set) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f241ead commit 7c2e483

File tree

11 files changed

+16914
-18432
lines changed

11 files changed

+16914
-18432
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "pnpm install"
2+
description: "Run pnpm install with cache enabled"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Set up swap space
7+
if: runner.os == 'Linux'
8+
uses: pierotofy/set-swap-space@v1.0
9+
with:
10+
swap-size-gb: 10
11+
12+
- uses: pnpm/action-setup@v4.1.0
13+
name: Install pnpm
14+
with:
15+
run_install: false
16+
17+
- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
18+
id: pnpm-config
19+
shell: bash
20+
run: |
21+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
22+
23+
- name: Cache rotation keys
24+
id: cache-rotation
25+
shell: bash
26+
run: |
27+
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
28+
29+
- uses: actions/cache@v4
30+
name: Setup pnpm cache
31+
with:
32+
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
33+
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
34+
restore-keys: |
35+
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-
36+
37+
- name: Install dependencies
38+
shell: bash
39+
run: |
40+
pnpm install --frozen-lockfile --prefer-offline --loglevel error
41+
env:
42+
HUSKY: "0"

.github/workflows/manual_release_stable.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,14 @@ jobs:
141141
- name: Install Python dependencies
142142
run: uv run poe install-dev
143143

144+
- name: Install pnpm
145+
uses: pnpm/action-setup@v4.1.0
146+
with:
147+
run_install: false
148+
144149
- name: Install website dependencies
145-
run: |
146-
cd website
147-
corepack enable
148-
yarn install
150+
run: pnpm install --frozen-lockfile
151+
working-directory: website
149152

150153
- name: Snapshot the current version
151154
run: |
@@ -159,8 +162,8 @@ jobs:
159162
jq 'map(select(. != env.MAJOR_MINOR))' versions.json > tmp.json && mv tmp.json versions.json
160163
# Build API reference and create version snapshots
161164
bash build_api_reference.sh
162-
npx docusaurus docs:version "$MAJOR_MINOR"
163-
npx docusaurus api:version "$MAJOR_MINOR"
165+
pnpm exec docusaurus docs:version "$MAJOR_MINOR"
166+
pnpm exec docusaurus api:version "$MAJOR_MINOR"
164167
# Changelog is not versioned - it is copied from root at build time
165168
rm -f "versioned_docs/version-${MAJOR_MINOR}/changelog.md"
166169
echo "changelog.md" > "versioned_docs/version-${MAJOR_MINOR}/.gitignore"
@@ -169,7 +172,7 @@ jobs:
169172
id: commit_versioned_docs
170173
uses: EndBug/add-and-commit@v10
171174
with:
172-
add: "website/versioned_docs website/versioned_sidebars website/versions.json"
175+
add: "website/versioned_docs website/versioned_sidebars website/versions.json website/pnpm-lock.yaml"
173176
message: "docs: version ${{ needs.release_prepare.outputs.version_number }} docs [skip ci]"
174177
default_author: github_actions
175178

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ uv run pytest \
331331
"""
332332

333333
[tool.poe.tasks.build-docs]
334-
shell = "./build_api_reference.sh && corepack enable && yarn && yarn build"
334+
shell = "./build_api_reference.sh && pnpm install --frozen-lockfile && pnpm build"
335335
cwd = "website"
336336

337337
[tool.poe.tasks.run-docs]
338-
shell = "./build_api_reference.sh && corepack enable && yarn && yarn start"
338+
shell = "./build_api_reference.sh && pnpm install --frozen-lockfile && pnpm start"
339339
cwd = "website"

renovate.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"separateMajorMinor": false,
66
"dependencyDashboard": false,
77
"semanticCommits": "enabled",
8+
"minimumReleaseAge": "1 day",
9+
"internalChecksFilter": "strict",
810
"lockFileMaintenance": {
911
"enabled": true,
1012
"automerge": true,
@@ -19,9 +21,12 @@
1921
"groupSlug": "dev-dependencies",
2022
"automerge": true,
2123
"automergeType": "branch"
24+
},
25+
{
26+
"matchPackageNames": ["@apify/*", "@crawlee/*"],
27+
"minimumReleaseAge": "0 days"
2228
}
2329
],
24-
"minimumReleaseAge": "1 day",
2530
"schedule": ["before 7am every weekday"],
2631
"ignoreDeps": ["crawlee", "docusaurus-plugin-typedoc-api"]
2732
}

website/.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node-linker=hoisted
2+
link-workspace-packages=true
3+
prefer-workspace-packages=true
4+
public-hoist-pattern[]=*

website/.yarnrc.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

website/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
],
4747
githubHost: 'github.com',
4848
future: {
49-
experimental_faster: true,
49+
faster: true,
5050
v4: {
5151
removeLegacyPostBuildHeadAttribute: true,
5252
useCssCascadeLayers: false, // this breaks styles on homepage and link colors everywhere

website/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"name": "crawlee",
2+
"name": "crawlee-python-website",
3+
"private": true,
34
"scripts": {
45
"examples": "docusaurus-examples",
5-
"postinstall": "npx patch-package",
6+
"postinstall": "pnpm exec patch-package",
67
"start": "rimraf .docusaurus && docusaurus start",
78
"start:fast": "rimraf .docusaurus && CRAWLEE_DOCS_FAST=1 docusaurus start",
89
"build": "rimraf .docusaurus && node --max_old_space_size=16000 node_modules/@docusaurus/core/bin/docusaurus.mjs build",
@@ -15,8 +16,8 @@
1516
"deploy": "rimraf .docusaurus && node --max_old_space_size=16000 node_modules/@docusaurus/core/bin/docusaurus.mjs deploy",
1617
"docusaurus": "docusaurus",
1718
"clean": "rimraf .docusaurus build",
18-
"lint": "yarn lint:code",
19-
"lint:fix": "yarn lint:code:fix",
19+
"lint": "pnpm lint:code",
20+
"lint:fix": "pnpm lint:code:fix",
2021
"lint:code": "eslint .",
2122
"lint:code:fix": "eslint . --fix"
2223
},
@@ -68,5 +69,5 @@
6869
"rimraf": "^6.0.0",
6970
"typescript": "^6.0.0"
7071
},
71-
"packageManager": "yarn@4.13.0"
72+
"packageManager": "pnpm@10.24.0"
7273
}

0 commit comments

Comments
 (0)