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

plugin node_workspace doesn't work with pnpm? #1587

Closed
agufagit opened this issue Aug 18, 2022 · 13 comments · Fixed by #1819 or #2058
Closed

plugin node_workspace doesn't work with pnpm? #1587

agufagit opened this issue Aug 18, 2022 · 13 comments · Fixed by #1819 or #2058
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@agufagit
Copy link

I'm trying to update local deps, monorepo is pnpm workspace

i tried to use plugin node_workspace, and got error:

Unsupported URL Type "workspace:": workspace:^0.2.0

I see that there is no way to write a custom manifest plugin

I did write a script, which's just simply 'cd' into each package folder, regex match workspace deps in package.json, and run 'pnpm update --workspace @scope/package1 @scope/package2'. The reason to run 'pnpm update' is to update pnpm-lock.yaml file also, for pnpm --frozen-lock option.

I'm not sure if this script fits your plugin system, if you want this, I can contribute

@agufagit agufagit added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Aug 18, 2022
@chingor13
Copy link
Contributor

I don't recognize that error message Unsupported URL Type "workspace:": workspace:^0.2.0, do you have a stack trace for it (and an example of your config)?

Manifest plugins are abstracted in this repository and you should be able to register new plugin types if you control the execution environment of release-please (i.e. we run a GitHub bot on GCP that uses the release-please library where we could theoretically register additional plugins). The CLI does not have a built-in dynamic loader for plugins (yet).

As for the design of this library, we do not shell out to manipulate code as a design decision because we didn't want to add additional requirements on the runtime (like requiring additional binaries). If you'd like to contribute a pnpm-workspace plugin to this repository, it would probably be useful to others as well.

@chingor13
Copy link
Contributor

Related: #1098

@agufagit
Copy link
Author

I'll do it in my spare time, so this means I have to manually modify pnpm-lock.yaml file right?

@chingor13
Copy link
Contributor

modify pnpm-lock.yaml file right?

I'm not sure exactly how a pnpm workspace works, but we do have updaters already for generic yaml files and workspace plugins can add additional files to update.

@oneton
Copy link

oneton commented Aug 22, 2022

I've run into the same problem. My Github action failed after logging "Building list of all packages". I must admit I did not run a debugger, but by analysing the code I found the following:

  • NodeWorkspace->buildAllPackages (node-workspace.ts) is called from the WorkspacePlugin
  • This method creates instances of Package (defined in the same file), which extends Package from @lerna/package
  • The constructor for @lerna/package calls resolve() from downstream dependency npm-package-arg
  • npm-package-arg doesn't recognise the workspace: protocol

It seems lerna is working on pnpm support as we speak, which will most likely resolve the issue.
lerna/lerna#3284

@agufagit
Copy link
Author

awesome, I'll just wait then

@oneton
Copy link

oneton commented Aug 23, 2022

It might be useful to keep this issue open. Updating the lerna dependencies would be the minimum change required to address this once the lerna changes have been completed.

@agufagit
Copy link
Author

ok

@agufagit agufagit reopened this Aug 23, 2022
@freddy38510
Copy link

Hello guys,

I just noticed that the commit has been merged and lerna v5.5.0 supports pnpm.

@re-taro
Copy link

re-taro commented Dec 3, 2022

Hello, I have the same issue.

I would assume that this PR will be resolved once it is merged, but what do you think?

@lotyp
Copy link

lotyp commented Jan 16, 2023

Hey, I'm currently using changesets in my pnpm monorepo, but I would like to switch to release-please.
As I understand, release-please currently can't generate Changelog if a repository uses pnpm and workspace:* tags in package.log?

@mpetrunic
Copy link
Contributor

@chingor13 Merging #1449 will add support for this^^

@nahsi
Copy link

nahsi commented Feb 6, 2023

Still doesn't work with pnpm.
#1819 added yarn support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
8 participants