Skip to content

Migrate to pnpm#519

Open
florianduros wants to merge 4 commits into
mainfrom
florianduros/pnpm
Open

Migrate to pnpm#519
florianduros wants to merge 4 commits into
mainfrom
florianduros/pnpm

Conversation

@florianduros

@florianduros florianduros commented Jul 1, 2026

Copy link
Copy Markdown
Member

Replaces Yarn with pnpm as the package manager.

  • Package manager: Added "packageManager": "pnpm@11.9.0" to package.json and replaced yarn.lock with pnpm-lock.yaml
  • CI workflows: Updated all GitHub Actions workflows (analysis.yml, npm_release.yml, storybook.yml) to use pnpm/action-setup and pnpm commands
  • Scripts: Updated all yarn … references in package.json scripts to pnpm …
  • Workspace config: Added pnpm-workspace.yaml with an allowBuilds allowlist to control native addon compilation
  • Missing deps: Added @storybook/react and @floating-ui/react-dom which were implicit transitive dependencies not declared directly
  • README: Updated command examples to use pnpm; removed the yarn link workaround (no longer applicable with pnpm's symlink-based linking)
  • Prettier: Added pnpm-lock.yaml to .prettierignore

Caution

PR should be merged at the same time than the cloudflare settings update.
Cloudflare settings should be updated to use pnpm install --frozen-lockfile --ignore-scripts && pnpm build-storybook to deploy storybook.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploying compound-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 545bc5c
Status:🚫  Build failed.

View logs

@florianduros florianduros force-pushed the florianduros/pnpm branch 2 times, most recently from 63c432b to 900c230 Compare July 2, 2026 08:31
Comment thread .github/workflows/analysis.yml Fixed
Comment thread .github/workflows/analysis.yml Fixed
Comment thread .github/workflows/analysis.yml Fixed
Comment thread .github/workflows/analysis.yml Fixed
Comment thread .github/workflows/npm_release.yml Fixed
Comment thread .github/workflows/storybook.yml Fixed
@florianduros florianduros added the X-Blocked Cannot be merged due to external dependencies label Jul 2, 2026
@florianduros florianduros marked this pull request as ready for review July 2, 2026 13:34
@florianduros florianduros requested a review from a team as a code owner July 2, 2026 13:34
@florianduros florianduros requested review from Half-Shot and MidhunSureshR and removed request for a team July 2, 2026 13:34

@dbkr dbkr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for doing this!

run: pnpm install --frozen-lockfile --ignore-scripts

- name: 🚧 Build
run: pnpm build

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sonar is probably right to want ignore scripts here (and elsewhere)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, a sane approach

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pnpm has a whole allowBuilds thing where you allowlist scripts on a per-dep basis and Sonar doesn't consider it

Comment thread package.json
"@storybook/addon-docs": "^10.3.1",
"@storybook/addon-links": "^10.3.1",
"@storybook/addon-themes": "^10.3.1",
"@storybook/react": "^10.3.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why did we gain dependencies?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

pnpm and yarn don't organize the deps at the same level. We are using these deps without declaring them (they are deps of other deps) and moving to pnpm flaged it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ah okay, cool

@florianduros florianduros requested a review from dbkr July 3, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X-Blocked Cannot be merged due to external dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants