Skip to content

Mk/review/tl/dev/fix package lock 1350#206

Closed
printminion-co wants to merge 4 commits intoionos-devfrom
mk/review/tl/dev/fix-package-lock-1350
Closed

Mk/review/tl/dev/fix package lock 1350#206
printminion-co wants to merge 4 commits intoionos-devfrom
mk/review/tl/dev/fix-package-lock-1350

Conversation

@printminion-co
Copy link

  • Resolves: #

Summary

TODO

  • ...

Checklist

thlehmann-ionos and others added 3 commits July 29, 2025 16:45
== Background

The current branch and recent tags fail buils due to npm ci failing with
these errors:

   ...
   npm error Invalid: lock file's @volar/language-core@2.4.20 does not satisfy @volar/language-core@2.4.22
   npm error Invalid: lock file's @volar/source-map@2.4.20 does not satisfy @volar/source-map@2.4.22
   ...

After installing the dependencies using npm install for diagnosis,
running npm why showed the dependency graph:

  @volar/language-core@2.4.11 dev
  custom-npms/nc-nextcloud-vue/node_modules/@volar/language-core
  ...

The fact that this dependency originated from a transitive dependency and
is not included in package.json is suspicious already, meaning we have no
direct control over it by updating dependencies.

Bisecting showed the error first appeared with the v31 merge

   1a19b2f

Builds prior this version install just fine.

I suspect the merge conflict for package-lock.json was not correctly
solved back then and left the package-lock semantically broken.

== Approach to fix

1. Checkout upstream package* files prior to the merge (this commit)
2. Apply all changes compared to upstream again (next commit)

== Command

   git checkout v31.0.6 -- package.json package-lock.json
== Background

The current branch and recent tags fail buils due to npm ci failing with
these errors:

   ...
   npm error Invalid: lock file's @volar/language-core@2.4.20 does not satisfy @volar/language-core@2.4.22
   npm error Invalid: lock file's @volar/source-map@2.4.20 does not satisfy @volar/source-map@2.4.22
   ...

After installing the dependencies using npm install for diagnosis,
running npm why showed the dependency graph:

  @volar/language-core@2.4.11 dev
  custom-npms/nc-nextcloud-vue/node_modules/@volar/language-core
  ...

The fact that this dependency originated from a transitive dependency and
is not included in package.json is suspicious already, meaning we have no
direct control over it by updating dependencies.

Bisecting showed the error first appeared with the v31 merge

   1a19b2f

Builds prior this version install just fine.

I suspect the merge conflict for package-lock.json was not correctly
solved back then and left the package-lock semantically broken.

== Previous commit

In the previous commit we checked out the upstream package.json and
package-lock.json, taking them as ground truth.

== Approach to fix

1. Checkout upstream package* files prior to the merge (previous commit)
2. Apply all changes compared to upstream again (this commit)

== Re-applying our customizations

Previous merge was:

   1a19b2f
   Merge tag 'v31.0.6' into tmp/update-to-v31.0.6-20250702100826

Our HEAD before merge was:

   7e474f1
   IONOS(simplesettings): submodule update (workflows, refactor core code)

Determining the changes from our pre-merge revision to the current revision:

   git diff 7e474f1..HEAD -- package.json | grep 'file:'

Changes from ours to v31.0.6:

   git diff 7e474f1..HEAD --no-ext-diff -- package.json | grep 'file:'
   -    "@nextcloud/vue": "file:./custom-npms/nc-nextcloud-vue",
   -    "vue-material-design-icons": "file:./custom-npms/nc-vue-material-design-icons/dist",
   -    "@mdi/svg": "file:./custom-npms/nc-mdi-svg/dist",
   -    "@mdi/js": "file:./custom-npms/nc-mdi-js"

Install:

   $ rm -rf node_modules/
   $ npm ci

Change modules:

   -    "@mdi/js": "^7.4.47",
   -    "@mdi/svg": "^7.4.47",
   +    "@mdi/js": "file:custom-npms/nc-mdi-js",
   +    "@mdi/svg": "file:custom-npms/nc-mdi-svg/dist",

   -    "@nextcloud/vue": "^8.27.0",
   +    "@nextcloud/vue": "file:custom-npms/nc-nextcloud-vue",

   -    "vue-material-design-icons": "^5.3.1",
   +    "vue-material-design-icons": "file:custom-npms/nc-vue-material-design-icons/dist",

Add overrides

   "vue-material-design-icons" : "$vue-material-design-icons",
   "@mdi/svg" : "$@mdi/svg",
   "@mdi/js" : "$@mdi/js",
   "@nextcloud/vue" : "$@nextcloud/vue"

Re-install of overrides:

   $ npm install
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
@printminion-co printminion-co force-pushed the mk/review/tl/dev/fix-package-lock-1350 branch from 2ce6cba to de66bb2 Compare August 8, 2025 13:30
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
@printminion-co printminion-co deleted the mk/review/tl/dev/fix-package-lock-1350 branch August 11, 2025 09:29
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.

2 participants