Closed
Description
@pichlermarc I'm not sure what the right thing to do for package-lock.json updates is with the following.
#1771 went in, adding the package-lock.json file.
Then, the #1723 renovate PR was just merged. Looking at just a part of that change:
diff --git a/package-lock.json b/package-lock.json
index 70e9e172..4464f673 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30606,23 +30607,23 @@
"node_modules/systeminformation": {
- "version": "5.21.15",
- "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.15.tgz",
- "integrity": "sha512-vMLwsGgJZW6GvoBXVWNZuRQG0MPxlfQnIIIY9ZxoogWftUpJ9C33qD+32e1meFlXuWpN0moNApPFLpbsSi4OaQ==",
+ "version": "5.21.17",
+ "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.17.tgz",
+ "integrity": "sha512-JZYRCbIjk3WuBV59A9/rTla2rROX+aAJ9uo2Z1dI+bjieORcukClN8rlM1zE9NYKpULSbaGc+KKct/870lO0DA==",
@@ -34355,21 +34356,21 @@
"packages/opentelemetry-host-metrics": {
"name": "@opentelemetry/host-metrics",
"version": "0.33.2",
"license": "Apache-2.0",
"dependencies": {
"@opentelemetry/sdk-metrics": "^1.8.0",
- "systeminformation": "^5.0.0"
+ "systeminformation": "^5.21.17"
},
"devDependencies": {
...
- It updates the actually installed version of
systeminformation
from5.21.15
to5.21.17
. That's well and good. - The second hunk, however, looks potentially problematic. It updates the
dependencies["systeminformation"]
value for what I had understood was meant to be a cache of the value in "packages/opentelemetry-host-metrics/package.json". However the value in those two files are no longer the same thing. (My understanding comes from the somewhat loose docs of the package-lock.json format here -- https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json#packages -- and from the following commands.)
If one gets the latest and tries to regenerate the package-lock.json file:
npm install --package-lock-only
The result is this diff that undoes all those second hunk changes:
trentm@81ea8df
I came across this same issue with sync'ing the "package-lock.json" file when trying to update my PR #1763 now that there is a package-lock.json file. The latest commit there is also "undoing" those renovate second hunk changes:
b0b74e0
Is it possible that renovate changes, like #1723, are not updating package-lock.json correctly?