Thinkmill / manypkg

☔️ An umbrella for your monorepo
MIT License
886 stars 48 forks source link

INTERNAL_DEV_DEP_NOT_STAR rule breaks repo when using prerelease versions #34

Closed spudly closed 4 years ago

spudly commented 4 years ago

Just tried this lib for the first time, and it's awesome, except for one issue: setting local dev dependency versions to '*' makes it so that yarn won't install anything. Instead I get variations of the following error about a million times:

Error: Couldn't find package "my_package_a@*" required by "my-package_b@1.2.3-rc.4" on the "npm" registry.

This happens because '*' doesn't match prerelease versions.

I think that when the dependency's current version is a prerelease version, it should be set to that version; otherwise, use the wildcard.

See https://github.com/yarnpkg/yarn/issues/6719

In the meantime, is there a way to selectively disable rules so that I can continue to use manypkg?

Noviny commented 4 years ago

Issue #26 discusses some of what you're talking about (turning rules off and/or adding your own rules) but while we want to do it soon, it's not got any scheduled work for it yet.

I'm going to come back with some thoughts on how to resolve this issue for you, but in the meantime, the easiest path forwards is to use 0.7.0 of manypkg, as all changes since then have been about getting the * ranges working.

I think that when the dependency's current version is a prerelease version, it should be set to that version; otherwise, use the wildcard.

Agree this is probably the solution. Want to have a bit of a think of how this plays with changesets, as we develop the two very closely with each other, and I think it will all play nice, but I'm not 100%

spudly commented 4 years ago

Perfect, thanks. 0.7.0 worked like a charm.