berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: When resolving conflicts in `yarn.lock`, `--mode=update-lockfile` adds `checksum: undefined` fields

Open ipanasenko opened this issue 2 years ago • 3 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

When resolving conflicts in yarn.lock, yarn --mode=update-lockfile adds checksum: undefined fields. Simply running yarn to resolve conflicts doesn't produce these fields. Subsequent run of yarn removes these fields as well.

To reproduce

Reproduction repo: https://github.com/ipanasenko/yarn-bug-demo

git clone https://github.com/ipanasenko/yarn-bug-demo
cd yarn-bug-demo
git cherry-pick origin/react-17
# fix conflicts ONLY in package.json, accept react ^18.0.0
yarn --mode=update-lockfile
git diff

You will see following diff:

image

Running simple yarn instead of yarn --mode=update-lockfile doesn't produce checksum: undefined field

Environment

System:
    OS: macOS 14.2.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 18.19.0 - /private/var/folders/w9/0qrtk4z55rx0tmxxz9rzbnc00000gn/T/xfs-2a2eca29/node
    Yarn: 4.0.2 - /private/var/folders/w9/0qrtk4z55rx0tmxxz9rzbnc00000gn/T/xfs-2a2eca29/yarn
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/63411_1703092512356/bin/npm
    pnpm: 8.11.0 - /usr/local/bin/pnpm
    bun: 0.3.0 - ~/.bun/bin/bun

Additional context

No response

ipanasenko avatar Dec 20 '23 17:12 ipanasenko

Still reproduces in 4.1.0

ipanasenko avatar Feb 02 '24 20:02 ipanasenko