Skip to content

fix: prevent catalogs using the workspace:, link:, and file: protocols#8255

Merged
zkochan merged 2 commits intomainfrom
gluxon/catalog-error-on-unsupported-protocols
Jun 28, 2024
Merged

fix: prevent catalogs using the workspace:, link:, and file: protocols#8255
zkochan merged 2 commits intomainfrom
gluxon/catalog-error-on-unsupported-protocols

Conversation

@gluxon
Copy link
Member

@gluxon gluxon commented Jun 28, 2024

Changes

Using pnpm catalogs with the workspace:, link:, and file: protocols "kind of works in the beta release today". However, I think there's surprising behavior in each.

  • For the workspace: protocol, it's kind of weird to see the workspace:* protocol defined in catalogs in the first place. I can't think of a good reason for this indirection. I think spending time trying to support this isn't a good use of developer time.
  • The link: and file: protocols are often used to refer to relative paths. Since pnpm catalogs are defined in pnpm-workspace.yaml, I think most users will expect paths to be relative to that file. Unfortunately they're relative to the project's package.json, which doesn't feel right. Let's disable this until we have time to better support it in a future pnpm release.

@gluxon gluxon marked this pull request as ready for review June 28, 2024 06:29
@gluxon gluxon requested a review from zkochan as a code owner June 28, 2024 06:29
@zkochan zkochan merged commit b339e10 into main Jun 28, 2024
@zkochan zkochan deleted the gluxon/catalog-error-on-unsupported-protocols branch June 28, 2024 07:18
@gluxon gluxon mentioned this pull request Jul 7, 2024
18 tasks
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