JamieMason / shrinkpack

Fast, resilient, reproducible builds with npm install.
https://www.npmjs.com/package/shrinkpack
MIT License
793 stars 38 forks source link

Integrities are concatenated #96

Open Shakeskeyboarde opened 2 years ago

Shakeskeyboarde commented 2 years ago

Description

When run multiple times, the lock file changes every time, because the integrity strings are concatenated to the old integrity value.

Suggested Solution

Replace the integrity value instead of adding to it.

Help Needed

N/A

JamieMason commented 2 years ago

Thanks for reporting, will take a look.

JamieMason commented 1 year ago

Do you have a fix for this in your rewrite @Shakeskeyboarde? No worries if not but may save me some time if so.

Shakeskeyboarde commented 1 year ago

I'm not sure I have a fix exactly, but here's my lock file handler: https://github.com/Shakeskeyboarde/npm-offline-mirror/blob/main/src/lock.ts

alltom commented 7 months ago

Besides the noisy diffs, does this cause any problems? I noticed this in a new project, where it's my first time using shrinkpack.

JamieMason commented 7 months ago

I don't think it causes problems no, it just may have more hashes in that it needs to.