Skip to content

Conversation

cyril-sf
Copy link

@cyril-sf cyril-sf commented Aug 19, 2025

When using pnpm workspaces with the catalog feature, updating a dependency version in the catalog section of pnpm-workspace.yaml is detected as a change by changesets.

Allow changeset add and changeset status to include updates from pnpm workspace catalogs when requested via the new flag.

Fixes #1707

Copy link

changeset-bot bot commented Aug 19, 2025

🦋 Changeset detected

Latest commit: 3f7aac5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@changesets/cli Minor
@changesets/git Minor
@changesets/apply-release-plan Patch
@changesets/read Patch
@changesets/release-utils Patch
@changesets/get-release-plan Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 9 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ca0be26). Learn more about missing BASE report.
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/git/src/index.ts 89.13% 5 Missing ⚠️
packages/cli/src/run.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1714   +/-   ##
=======================================
  Coverage        ?   80.87%           
=======================================
  Files           ?       54           
  Lines           ?     2311           
  Branches        ?      703           
=======================================
  Hits            ?     1869           
  Misses          ?      437           
  Partials        ?        5           

☔ 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.

@cyril-sf cyril-sf force-pushed the pnpm-catalog-support branch 2 times, most recently from 60c1607 to 17358fd Compare August 19, 2025 21:06
@chriswiggins
Copy link

Found out about pnpm catalogs yesterday (awesome feature!) and this is the only blocker stopping us from adopting them. Anything we can do to help with merging this PR?

@cyril-sf
Copy link
Author

I'm happy to work on any change that would be necessary to get this through the finish line.

@Andarist
Copy link
Member

Is catalog: useful mainly for external packages outside of the monorepo? If yes, then it seems we should make the auto-bumps based on its changes an option. If you think about catalog: as being just a sugar over inlined versions from the catalog then Changesets would, traditionally, not bump your monorepo packages based on changes to external dependencies. There were requests to make that work though so perhaps this would be a good occasion to implement this as a flag if you have already implemented the core sinceRef~ logic for the catalog anyway.

@cyril-sf
Copy link
Author

cyril-sf commented Sep 12, 2025

Thanks for the reply!

Changesets would, traditionally, not bump your monorepo packages based on changes to external dependencies

This doesn't seem right. If my package depends on React 17 and I bump it to 18, it requires a version bump of my package.

But happy to have a flag if that's what it takes. I can try to take a stab at it next week.

@chriswiggins
Copy link

Changesets will generate a change for any files in a normal (flat) repository right? In the monorepo catalog case, there could be no file changes under each of the packages, but the workspace file (and associated catalog entries) IS modified, which would mean a change, which is what @cyril-sf has implemented I think?

@cyril-sf
Copy link
Author

@chriswiggins correct!

@cyril-sf cyril-sf changed the title Add support for catalog feature with pnpm workspace Add --enable-pnpm-catalog flag to opt into pnpm workspace catalog detection Oct 20, 2025
@cyril-sf cyril-sf force-pushed the pnpm-catalog-support branch from 23858af to 7edcd69 Compare October 20, 2025 15:09
…ection

When using pnpm workspaces with the catalog feature, updating a dependency version in the catalog section of pnpm-workspace.yaml is detected as a change by changesets

- Allow changeset add and changeset status to include updates from pnpm workspace catalogs when requested via the new flag.
- Keep catalog-only edits ignored by default, while documenting and surfacing the opt-in behaviour.
@cyril-sf cyril-sf force-pushed the pnpm-catalog-support branch from 7edcd69 to 3f7aac5 Compare October 20, 2025 15:11
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.

Changesets doesn't detect changes when updating dependency versions in pnpm workspace catalog

3 participants