Skip to content

Switch from Yarn classic to pnpm - #7

Merged
guillaume-sainthillier merged 3 commits into
mainfrom
chore/pnpm
Oct 14, 2026
Merged

guillaume-sainthillier merged 3 commits into
mainfrom
chore/pnpm

Conversation

@guillaume-sainthillier

@guillaume-sainthillier guillaume-sainthillier commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Replaces Yarn classic (v1) with pnpm 12.

Changes

  • Workspace: pnpm-workspace.yaml (packages/*, site) replaces the Yarn workspaces field. site now depends on @silarhi/docs-kit through workspace:* (pnpm does not link a * range to the local package by default), so the hub keeps building with the local theme.
  • Lockfile: pnpm-lock.yaml generated with pnpm import from yarn.lock, so resolved versions are unchanged. yarn.lock removed.
  • Version pinning: "packageManager": "pnpm@12.11.2" in the root package.json.
  • allowBuilds: none needed, no dependency runs an install script (sharp ships prebuilt binaries through optional deps).
  • Reusable docs-site.yml: pnpm only. pnpm/action-setup@v6 reads packageManager from the root package.json (every caller pins it there), then setup-node with cache: pnpm keyed on **/pnpm-lock.yaml, pnpm install --frozen-lockfile, pnpm run build.
  • CI: pnpm/action-setup + cache: pnpm, pnpm install --frozen-lockfile, pnpm lint:ci. The Package contents step runs npm pack --dry-run inside packages/docs-kit (the --workspace flag needed the removed Yarn/npm workspaces field).
  • Publishing: release.yml keeps npm publish (trusted publishing/provenance as before). The package has no workspace: dependency, so the tarball is the same as on main.
  • Docs: README, package README (pnpm add @silarhi/docs-kit …), Getting started (layout with pnpm-lock.yaml + pnpm-workspace.yaml, install commands) and Versions pages.

Verified locally

  • pnpm install --frozen-lockfile, pnpm build (hub), pnpm lint:ci ✅
  • npm pack --dry-run file list identical to main (12 files). For reference, pnpm pack would add the root LICENSE (13 files), another reason to keep npm publish.

Merge order

The workflow no longer supports Yarn: merge this together with the 8 library PRs (qif-library, cfonb-parser, caf-parser, llms-txt-bundle, tabler-ux-components, cursor-pagination, turbo-bundle, picasso-bundle). Merge this one first; a library still on yarn.lock would fail its docs build until its own PR lands.

After merge

rm -rf node_modules site/node_modules && pnpm install.

- pnpm workspace (pnpm-workspace.yaml) in place of the Yarn workspaces; the hub
  depends on the theme through workspace:* so it always links the local package
- pnpm-lock.yaml imported from yarn.lock (same resolved versions), pnpm pinned
  by packageManager
- docs-site.yml detects pnpm-lock.yaml or yarn.lock (in the site folder, or at
  the root for a workspace member) so callers can migrate one by one
- CI on pnpm; the package is still packed and published by npm, unchanged
- README and theme guide show pnpm commands
@guillaume-sainthillier
guillaume-sainthillier merged commit 89438a0 into main Oct 14, 2026
3 checks passed
@guillaume-sainthillier
guillaume-sainthillier deleted the chore/pnpm branch October 14, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant