Skip to content

Conversation

@MKruschke
Copy link
Contributor

@MKruschke MKruschke commented Dec 26, 2025

see #1576

additional fixed the unwanted behaviour to create an catalog entry if a named catalog default is present

}

// For pnpm, also expose the 'default' catalog as a top-level 'catalog' property
if (yamlData.catalogs?.default) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this doesn't make really sense to me and would create an catalog entry which wasn't defined before (see also workspace.test.ts)

Copy link
Owner

@raineorshine raineorshine Dec 27, 2025

Choose a reason for hiding this comment

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

Are we sure this was wrong? I'm hesitant to remove anything from the existing catalog implementation, as this would be a breaking change.

i.e. is this a patch change or major change, and how many people are relying on this behavior currently.

@jakeboone02 Can you weigh in on the purpose of this block and the implications of removing it?

Copy link
Contributor Author

@MKruschke MKruschke Dec 28, 2025

Choose a reason for hiding this comment

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

Hi @raineorshine, Hi @jakeboone02 ,
yes I'm pretty sure that this is the wrong behaviour and needs to be removed. Would even classify it as bug and not as breaking change.

Details:

For everyone that explicit is using a named catalog with the name default (e.g. catalogs.default it will also break the usage of pnpm (see provide screenshot) because it will automatically introduce the default catalog catalog (in the current ncu implementation called singular catalog) after running ncu. I tested it without ncu just added a named catalog default and run install with v10.13.1 as well as v10.26.2 of pnpm.

image

output.should.deep.equal({
'pnpm-workspace.yaml': {
packages: ['packages/**'],
catalog: { 'ncu-test-v2': '2.0.0' },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this shouldn't happen because catalog wasn't defined in the config before so it shouldn't be created by ncu

@raineorshine
Copy link
Owner

Thanks so much for your submission!

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.

2 participants