release-it-plugins / workspaces

A release-it plugin for publishing projects with workspaces
MIT License
62 stars 14 forks source link

Ensure `workspace:` prefix is updated correctly when using PNPM. #110

Closed NullVoxPopuli closed 10 months ago

NullVoxPopuli commented 1 year ago

I was trying to publish glimmer-vm, and ran in to an issue, noted here: https://github.com/release-it-plugins/workspaces/pull/79#issuecomment-1760589158

I believe this is a reasonable way to move forward with pnpm + "workspace protocol" support, as its opt-in, and existing behavior is unchanged.

lemme know what you think, thanks!

rwjblue commented 1 year ago

Hmmm. Seems like we should make using workspace: "just work" (IOW, we shouldn't require an opt-in).

Can you create a test here that emulates the repo structure?

NullVoxPopuli commented 1 year ago

, we shouldn't require an opt-in

Fwiw, the way glimmer-vm is setup now is that release it isn't used at all for releasing, but we use it for everything else it does. We have a gh workflow that'll release when a tag occurs

rwjblue commented 1 year ago

I think we probably need two things:

  1. allow folks to configure what command to actually use for publishing (instead of always using npm publish here) -- pnpm publish is required to support these workspace: prefixes
  2. when we figure out what version to use here we need it to be aware of workspace: and preserve it properly (but it should still update the version part)
NullVoxPopuli commented 1 year ago
  1. seesm like separate work -- I can open a PR for this tho -- a config for switching npm publish to pnpm publish doesn't address my use case
  2. I can remove the config option, and just detect "workspace:" and not touch it. I'll do that in this PR
NullVoxPopuli commented 1 year ago

PR for #1 here: https://github.com/release-it-plugins/workspaces/pull/111

NullVoxPopuli commented 1 year ago

2 is done in this PR, thanks for reviewing!

IvanLi-CN commented 1 year ago

Any progress? I have used this PR in the pnpm workspace project and feel good so far ❤️