#How to force lock-file integrity checksum recalculations

1 messages · Page 1 of 1 (latest)

molten merlin
#

I have created a script which migrates our Yarn Berry yarn.lock into a bun.lock. The only remaining challenge is the checksum. It seems Yarn's checksum is base64 vs Bun's SHA-512, but they're hashed on different things so a conversion cannot work.

Setting the Bun integrity checksum to "" gets an install to execute, but unfortunately I cannot find a way to force Bun to recalculate new checksums for all existing packages.

I do not wish to nuke my yarn.lock as we have quite a mature monorepo project and, quite frankly, a nuke introduces a seemingly endless list of bugs/regressions.

severe wave
#

I can't imagine this is easier than to generate a new lock-file 😯

woven mason
#

@molten merlin the lockfile's integrity values come directly from npm's registry API. We don't generate these ourselves. It's possible yarn berry is generating it on their end.

Fortunately, if the dependencies are on npm, you could copy paste the values from npm's registry api.

#

If you want to recalculate it, you could do --force but I think that would also invalidate versions in the lockfile

#

but it might get you closer

molten merlin