Skip to content

Conversation

@nlf
Copy link
Contributor

@nlf nlf commented Mar 22, 2021

this seems to avoid some platform related optimizations that result in integrity mismatches due to the resulting compressed output not being byte for byte identical.

it's a band-aid, but it did allow me to get the same end result in both arm and intel builds of node on my m1 mbp.

tested and found same results in:

  • Big Sur, arm64, node 15.11.0
  • Big Sur, intel, node 15.11.0
  • Catalina, intel, node 14.16.0
  • Windows 10.1, intel, node 15.0.1
  • Ubuntu 20.04, intel, node 14.15.4
  • Alpine 3.11, intel, node 15.12.0

References

Closes npm/cli#2846

this seems to avoid some platform related optimizations that result
in integrity mismatches due to the resulting compressed output not
being byte for byte identical.
@isaacs
Copy link
Contributor

isaacs commented Mar 22, 2021

Forcing compression level to 9 also saves us bytes over the wire in exchange for a bit extra CPU utilization at either end, which is a good trade-off.

LGTM.

@isaacs isaacs merged commit 143a0b9 into latest Mar 22, 2021
@lukekarrys lukekarrys deleted the nlf/more-consistent-results branch July 2, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] package-lock.json integrity value for git dependencies depends on the architecture (Apple Silicon M1 differs)

2 participants