Skip to content

Conversation

@aramissennyeydd
Copy link
Contributor

@aramissennyeydd aramissennyeydd commented Nov 25, 2025

Summary

Adds support for defining pnpm catalog values to pnpm-config.json. This makes updating versions across a monorepo way easier because you can specify a version once and it gets picked up in a bunch of other places.

Details

https://pnpm.io/9.x/catalogs, basically this allows using an alias for common versions to reduce the size of changesets that target global versions.

My goal is for this to resemble the existing pnpm options. Weirdly, this needs to be in the pnpm-workspace file and isn't supported as a package.json pnpm property.

How it was tested

Added unit tests.

Tested in our monorepo with a catalog: package for install/update and add. The catalog: specifier works for all 3, for install, a new catalog top level property is added into the lockfile and for add, if catalog: is the global version, add will automatically use it for new packages. I also tested that the temp shrinkwrap files still work, they use the resolved version in the specifier.

I will likely need a preview version to test this with publish to make sure it works there as well.

Impacted documentation

Not sure? Might need additional documentation where pnpm-options values are described.

Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage Dec 3, 2025
@aramissennyeydd
Copy link
Contributor Author

@dmichon-msft Anything else we need here before this can be 🚢 -ed ?

@dmichon-msft dmichon-msft merged commit 98d7c1a into microsoft:main Dec 3, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Bug Triage Dec 3, 2025
@benkeen
Copy link
Contributor

benkeen commented Jan 26, 2026

Hi @aramissennyeydd - thanks for this, great stuff.

Question about how you're using update. We're currently using commands like rush-pnpm up --recursive \"@fluentui/*\" \"@griffel/*\" for updating groups of deps in our monorepo. After moving to catalogs, that command runs without errors but doesn't make any changes to the catalog itself. Curious to know your usage.

@aramissennyeydd
Copy link
Contributor Author

aramissennyeydd commented Jan 26, 2026

@benkeen Good question, it's unfortunately not something I have experience with - we don't use any of the rush-pnpm beyond pnpm-patch.

I know pnpm update itself has support for catalogs through the root pnpm-workspace.yaml file, but not sure how we'd hook into that with the rush wrapper to update the config added in this PR.

@benkeen
Copy link
Contributor

benkeen commented Jan 26, 2026

Thanks the info! I put in a request ticket here:
#5578

@St2r
Copy link

St2r commented Jan 27, 2026

Hi, the CDN version of pnpm-config.schema.json also needs to be update. Catalog related schemas are missing.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

5 participants