syncpack icon indicating copy to clipboard operation
syncpack copied to clipboard

question(config): how to pin local packages to "workspace:*"? (2)

Open clabnet opened this issue 1 year ago • 4 comments

Description

On a pnpm monorepo I have dependency as "@pomini-apps/shared": "workspace:*", that point at package with the current version on the workspace. Maintain the assignment `"workspace:*"' is useful to avoid frequently changes to version number.

Suggested Solution

For this case don't change the version as current dependency version, but maintain the assignment "workspace:*"

Before syncpack fix command: image

After syncpack fix command: image

Thank's

clabnet avatar Jan 12 '24 07:01 clabnet

This still works on version 11.2.1 . So it seems to be a bug introduced afterwards.

KeKs0r avatar Jan 12 '24 13:01 KeKs0r

I can confirm the wrong behaviour on v12.3.0.

clabnet avatar Jan 12 '24 13:01 clabnet

Thanks both, yes this is a regression in v12. I'm a bit surprised as I added a test for this scenario [1] after it had happened in a previous version, obviously I've missed something and this is a new scenario I don't have covered.

Will it be easy to reproduce? What can you tell me about your situations?

[1] https://github.com/JamieMason/syncpack/blob/db2b31ccdb1a28fdbe0c42d27ce956ea5c6c543a/src/version-group/standard.spec.ts#L2212-L2289

JamieMason avatar Jan 12 '24 13:01 JamieMason

Right, this isn't the bug I thought it was (the one whose test I linked).

I'm pretty sure this will be a configuration issue. I don't have a reproduction from you so for now please see this similar issue question(config): how to pin local packages to "workspace:*"? particularly this comment.

JamieMason avatar Jan 15 '24 18:01 JamieMason

how can I keep the workspace:*

sibelius avatar Jul 30 '24 11:07 sibelius