Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(yarn-cling): breaks on dependency cycle (#18188)
In a recent upgrade, one of our dependencies (`json-diff`) has taken a dependency on a cluster of packages that have dependency cycles between them. Specifically: ``` json-diff => cli-color => [ d => es5-ext => es6-iterator => d ]. json-diff => cli-color => d => [ es5-ext => es6-iterator => es5-ext ]. json-diff => cli-color => [ d => es5-ext => es6-iterator => es6-symbol => d ]. json-diff => cli-color => [ d => es5-ext => es6-symbol => d ]. json-diff => cli-color => [ es5-ext => es6-iterator => d => es5-ext ]. json-diff => cli-color => [ es5-ext => es6-iterator => es6-symbol => d => es5-ext ]. json-diff => cli-color => [ es5-ext => es6-symbol => d => es5-ext ]. json-diff => cli-color => [ es6-iterator => d => es5-ext => es6-iterator ]. json-diff => cli-color => [ es6-iterator => es5-ext => es6-iterator ]. json-diff => cli-color => [ es6-iterator => es6-symbol => d => es5-ext => es6-iterator ]. json-diff => cli-color => es6-iterator => [ es6-symbol => d => es5-ext => es6-symbol ]. json-diff => cli-color => memoizee => es6-weak-map => [ es6-symbol => d => es5-ext => es6-iterator => es6-symbol ]. ``` `yarn-cling` used to go into infinite recursion trying to resolve this dependency tree, as it was not prepared to handle cycles. Add a dependency breaker. Since I wasn't sure whether or not this might break the dependency tree, add a validation step as well. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information