Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): handle pnpm catalogs #318

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

userquin
Copy link
Contributor

@userquin userquin commented Jan 26, 2025

This PR handles pnpm catalogs including named catalogs with a simple algorithm to replace all catalog: and catalog:<name> found in dependencies, devDependencies and peerDependencies before writing first time the package.json file.

Right now using process.cwd() to detect pnpm-workspace.yaml file to load the catalogs. I need to confirm the logic is fine, check the Catalogs: Shareable dependency version specifiers rfc at pnpm repo.

/cc @Aslemammad

closes #204

@userquin
Copy link
Contributor Author

userquin commented Jan 27, 2025

I just added a valid git url repository url to all package.json files and the packages now are fine (we have git repository type): https://github.com/unocss/unocss/runs/36216006512

Maybe SB registry was wrong? I send a PR to fix the catalogs before running pkg-pr-new in this another PR unocss/unocss#4407 (in the new PR unocss/unocss#4409 the packages seems to be fine)

/cc @Aslemammad

@Aslemammad
Copy link
Member

all this packages have resolved catalogs properly now without doing anything?

@Aslemammad
Copy link
Member

can you point me to the place where they do not resolve catalogs and the place where now they do? so i see the difference and investigate it.

@userquin
Copy link
Contributor Author

userquin commented Jan 29, 2025

Wrong tgz files when testing uno, check this comment:

unocss/unocss#4397 (comment)

@Aslemammad
Copy link
Member

in the git url pr it is emitting the right files?

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.

pnpm: "catalog:" is not supported
2 participants