You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Description
Fixes#8849
This is a port of yarnpkg/yarn#9023 our
codebase.
Previously, Yarn would collapse all identical entries to share a slot in
the lockfile with the keys joined by `,` e.g. `next@latest,
[email protected]`. We copied that logic which resulted in
`string-width-cjs@npm:[email protected]` and `[email protected]`
getting collapsed as they have identical data:
```
version "4.2.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.0"
```
This behavior was altered in the PR linked above where now it will no
longer group keys for identical entries if they have different package
names in the keys. So since `string-width-cjs != string-width` these
will have separate slots.
This PR intentionally isn't super Rust-y so we're able to better update
our behavior to match Yarn in case we need to update.
### Testing Instructions
Added a unit test from reproduction to ensure that we no longer merge
the problematic entries.
0 commit comments