Linaria doesn't follow semver - causing frequent breakages when lockfiles cannot be used #1309
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: webpack 📦
Issue is related to webpack bundler
cat: monorepo 🔱
Issues related to usage of linaria in monorepo
needs: complete repro 🖥️
Issue need to have complete repro provided
Description
Linaria 4.5 tried to do some radical stuff which has many bugs. These are still being worked on but the problem is, each part of linaria relies on specifying a ^ range with other parts (like utils and tags). But these are not correct as 4.5 was a breaking change. So anyone trying to downgrade to keep it working is forced to specify resolutions.
For context, when I create stackblitz demos it installs without the monorepo so it misses the lockfile and this causes issues. (for example going to https://stackblitz.com/github/data-client/rest-hooks/tree/rest-hooks-site/examples/todo-app?file=src%2Fpages%2FHome%2FTodoList.tsx and you'll see
_tags.hasMeta
is not a function)I could specify ~ in my dependencies; but since linaria updating it's own nested dependencies this will not work. (This goes beyond 4.5 just breaking in general - even if it worked perfectly - each linaria package is not cross compatible with past versions.)
If not using semver, I suggest the libraries specify their dependencies using ~ instead of ^ so they can correctly match compatible versions. (Since for this library minor is considered breaking).
BTW: I'm not trying to suggest this library conform to semver. Just that it understands its own internal compatibility and specifies correctly.
Reproducible Demo
https://github.com/ntucker/anansi/tree/master/examples/linaria
PS
Thanks for the hard work on maintaining this library!
The text was updated successfully, but these errors were encountered: