Describe the bug
I tried out yarn v2 last night, and found that my prettier pre-commit hooks using husky and lint-staged were broken. As far as I can tell, it is because of an issue in a sub-dependency, listr: https://github.com/SamVerschueren/listr/pull/127
I don't think any action is necessarily required by yarn, but wanted to at least document a problem I had when trying out berry.
As a workaround, I was able to explicitly add rxjs@6 to my devDependencies.
We actually use both lint-staged (9.2.5) and Husky (^4) at work so I'm surprised 🤔
I'm using lint-staged@10, so that could be the difference. ¯\_(ツ)_/¯
Ah! We had rxjs in our dependencies too, hence why I couldn't reproduce it. As a workaround for anyone finding this, the right fix is to add the following into your .yarnrc.yml:
packageExtensions:
"@samverschueren/stream-to-observable@*":
peerDependenciesMeta:
rxjs:
optional: true
zen-observable:
optional: true
"any-observable@*":
peerDependenciesMeta:
rxjs:
optional: true
zen-observable:
optional: true
This should be fixed in master as of #733 (which adds support for builtin package extensions, as an experiment).
Most helpful comment
This should be fixed in master as of #733 (which adds support for builtin package extensions, as an experiment).