Skip to content

chore(website): migrate to pnpm and enable minimum release age#855

Open
B4nan wants to merge 13 commits intomasterfrom
chore/migrate-website-to-pnpm
Open

chore(website): migrate to pnpm and enable minimum release age#855
B4nan wants to merge 13 commits intomasterfrom
chore/migrate-website-to-pnpm

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented Apr 14, 2026

Summary

Migrates the website/ subdirectory from Yarn 4 to pnpm 10 as part of an org-wide supply-chain hardening migration. The Python root (managed by uv) is unchanged.

Enables pnpm's minimumReleaseAge (1 day / 1440 minutes) to block installing packages published within the last 24h, with exclusions for first-party scopes @apify/* and @crawlee/*. Renovate is updated with internalChecksFilter: strict and a matching 0-day package rule so our own releases are not held back.

Changes

  • website/package.jsonpackageManager now pnpm@10.24.0; adds name: apify-sdk-python-website and private: true; all scripts rewritten from yarn X to pnpm X
  • website/pnpm-workspace.yaml (new) — minimumReleaseAge: 1440 plus exclusions for @apify/* and @crawlee/*
  • website/.npmrc (new) — node-linker=hoisted + workspace hoisting settings to mirror the previous yarn node-modules layout
  • website/.yarnrc.yml, website/yarn.lock — removed (no .yarn/patches/ existed in this repo, so nothing was preserved)
  • website/pnpm-lock.yaml (new) — generated via pnpm install
  • website/docusaurus.config.js — renamed future.experimental_faster -> future.faster (Docusaurus 3.10 rename, forward-compatible)
  • .github/actions/pnpm-install/action.yml (new) — composite action copied from apify-client-js, extended with a working-directory input so it can install inside website/ without changing the caller's default directory
  • .github/workflows/_release_docs.yamlgit add website/yarn.lock -> git add website/pnpm-lock.yaml in the auto-commit step of the docs-theme update
  • .github/workflows/manual_release_stable.yaml — removed corepack enable && yarn install, installs via the new composite action with working-directory: website; npx docusaurus -> pnpm exec docusaurus
  • pyproject.toml — poe tasks update-docs-theme, build-docs, run-docs now invoke pnpm directly (no more corepack enable && yarn)
  • renovate.json — adds internalChecksFilter: strict and a packageRule matching @apify/* / @crawlee/* with minimumReleaseAge: 0 days. ignoreDeps unchanged (did not contain yarn).
  • .gitignore — replaced website/.yarn with website/.pnpm-store

Verification

  • pnpm install and pnpm install --frozen-lockfile both succeed in website/
  • Existing peer-dependency warnings (eslint v10, typescript v6, styled-components) pre-date this migration and are carried over unchanged
  • Local docusaurus build was attempted but could not complete outside CI because the typedoc plugin spawns python (not python3) and this laptop doesn't expose python on PATH; in CI actions/setup-python provides python so this will resolve there. This is orthogonal to the pnpm migration.
  • pnpm lint surfaces an eslint v10 flat-config error that pre-dates this PR (no eslint.config.js present). Not introduced here.

🤖 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 the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.96%. Comparing base (03e73d3) to head (cc66f09).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #855   +/-   ##
=======================================
  Coverage   86.96%   86.96%           
=======================================
  Files          48       48           
  Lines        2930     2930           
=======================================
  Hits         2548     2548           
  Misses        382      382           
Flag Coverage Δ
e2e 37.78% <ø> (ø)
integration 59.18% <ø> (ø)
unit 75.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
Copy link
Copy Markdown
Contributor

vdusek commented Apr 14, 2026

could you do it for crawlee-python as well?

@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 14, 2026
@B4nan B4nan force-pushed the chore/migrate-website-to-pnpm branch from 6060d71 to 5f2e326 Compare April 15, 2026 12:23
Comment thread renovate.json
@B4nan B4nan force-pushed the chore/migrate-website-to-pnpm branch from eaf9d0f to 114c28f Compare April 15, 2026 14:03
@B4nan B4nan marked this pull request as ready for review April 15, 2026 14:23
@vdusek vdusek self-requested a review April 16, 2026 07:46
Copy link
Copy Markdown
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

From Claude:

One inconsistency compared to apify-client-python #724:

This PR correctly replaces website/.yarn with website/.pnpm-store in .gitignore, but apify-client-python only removes website/.yarn without adding website/.pnpm-store. Just flagging in case you want to fix it there.

Otherwise this looks consistent with the other repos.

@B4nan
Copy link
Copy Markdown
Member Author

B4nan commented Apr 16, 2026

Is this automated? I don't need the same hint 3 times 🙃 I am managing this from a single session, not per repo.

@B4nan
Copy link
Copy Markdown
Member Author

B4nan commented Apr 16, 2026

So .pnpm-store shouldn't be necessary, pnpm wont use a project scoped folder by default. Also frozen lockfile flag was misused, it is supposed to be used in the CI which is handled in the shared install action.

@B4nan B4nan force-pushed the chore/migrate-website-to-pnpm branch from b791ead to 85e3aaf Compare April 20, 2026 12:42
B4nan and others added 13 commits April 22, 2026 17:41
Migrates the website/ subdirectory from Yarn 4 to pnpm 10 as part of an
org-wide supply-chain hardening migration. The Python root (uv) is
unchanged.

Changes:
- website/package.json: replace packageManager with pnpm@10.24.0, add
  name/private, rewrite scripts from yarn to pnpm
- website/pnpm-workspace.yaml: add minimumReleaseAge=1440 minutes (1 day)
  with exclusions for @apify/* and @crawlee/*
- website/.npmrc: hoisted linker to match yarn's node-modules layout
- website/.yarnrc.yml, website/yarn.lock: removed
- website/docusaurus.config.js: rename future.experimental_faster to
  future.faster (Docusaurus 3.10+ rename)
- .github/actions/pnpm-install/action.yml: add composite action for
  installing website deps with a working-directory input
- .github/workflows/_release_docs.yaml: commit pnpm-lock.yaml instead of
  yarn.lock on automatic docs-theme updates
- .github/workflows/manual_release_stable.yaml: drop corepack+yarn,
  use the pnpm-install composite action, swap npx for pnpm exec
- pyproject.toml: update poe tasks (update-docs-theme, build-docs,
  run-docs) to invoke pnpm instead of yarn/corepack
- renovate.json: add internalChecksFilter=strict and a packageRule
  with minimumReleaseAge=0 days for @apify/* and @crawlee/*
- .gitignore: replace website/.yarn with website/.pnpm-store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…stall

apify-sdk-python's version_docs job needs pnpm install in website/,
but the shared action doesn't take a working-directory input, so
inline pnpm/action-setup + pnpm install for that one job.
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.
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).
Adds `pull: '--rebase --autostash'` to the EndBug/add-and-commit step
that pushes versioned docs, avoiding push failures when the branch has
moved ahead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@B4nan B4nan force-pushed the chore/migrate-website-to-pnpm branch from 85e3aaf to cc66f09 Compare April 22, 2026 15:41
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants