Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
ipanasenko opened this issue Dec 20, 2023 · 3 comments · Fixed by #6704
Closed
1 task
Labels
bug Something isn't working

Comments

@ipanasenko
Copy link

ipanasenko commented Dec 20, 2023

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 ipanasenko added the bug Something isn't working label Dec 20, 2023
@ipanasenko
Copy link
Author

Still reproduces in 4.1.0

@ipanasenko
Copy link
Author

Still reproduces in 4.5.0

@ipanasenko
Copy link
Author

I've tried to make tests in packages/acceptance-tests/pkg-tests-specs/sources/features/mergeConflictResolution.test.ts fail to reproduce this bug, but could not figure it out

ReDrUm pushed a commit to ReDrUm/yarn-berry that referenced this issue Feb 25, 2025
ReDrUm pushed a commit to ReDrUm/yarn-berry that referenced this issue Feb 26, 2025
ReDrUm pushed a commit to ReDrUm/yarn-berry that referenced this issue Feb 26, 2025
@arcanis arcanis closed this as completed in 4d5ddda Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant