Skip to content

Reconcile the lockfile after vitest 5 landed on top of lock file maintenance - #110

Merged
wormeyman merged 1 commit into
mainfrom
fix/reconcile-lockfile-after-vitest-5
Sep 11, 2026
Merged

wormeyman merged 1 commit into
mainfrom
fix/reconcile-lockfile-after-vitest-5

Conversation

@wormeyman

Copy link
Copy Markdown
Collaborator

npm ci in src/vue is currently broken on main:

npm error `npm ci` can only install packages when your package.json and
package-lock.json are in sync.
npm error Missing: tinyexec@1.3.0 from lock file

What happened

The cause is merge order, not either change on its own.

  1. Lock file maintenance #109 (lock file maintenance) re-resolved the whole lockfile while vitest was still 4.1.11, and hoisted tinyexec to the top level at 1.3.1, because 4.1.11 accepted that.
  2. Update dependency vitest to v5 #107 (vitest 5) was branched before Lock file maintenance #109 and merged after it. Its own lockfile hunks were resolved against the older tree.

Git merged both without a textual conflict, because they touch different regions of the file. The result was still wrong: vitest 5.0.0 wants tinyexec 1.3.0, so package-lock.json named a dependency it no longer contained.

The fix

One npm install. tinyexec moves from a hoisted node_modules/tinyexec at 1.3.1 to a nested node_modules/vitest/node_modules/tinyexec at 1.3.0. Nothing else in the tree changes - vitest is now its only consumer.

Why CI did not catch it

ci.yml's "Build front-end" job runs npm install, not npm ci. npm install quietly repairs an out-of-sync lockfile in the runner and carries on, so every check passed on a tree that no clean install could reproduce. The committed lockfile stayed broken for anyone who uses npm ci - which includes any fresh clone following the documented setup.

Switching that step to npm ci would turn this class of problem into a failing check instead of a silent one. That is a separate change and is not included here.

Verification

On this branch:

  • npm ci - exits 0 (it exits 1 on main)
  • npm audit - 0 vulnerabilities
  • npm run build - passes
  • npm run test - 51 of 51 passing, confirmed running on vitest 5.0.0
  • npx eslint . - exit 0
  • committed src/vue/src/lib/FactorioToolsApi.ts does not drift

🤖 Generated with Claude Code

https://claude.ai/code/session_01DAVZSEbjCkr9sbumdMPKy2

…tenance

`npm ci` in src/vue failed on main with:

  npm error `npm ci` can only install packages when your package.json and
  package-lock.json are in sync.
  npm error Missing: tinyexec@1.3.0 from lock file

Cause is the merge order, not either change. #109 (lock file maintenance)
re-resolved the whole lockfile while vitest was still 4.1.11, and hoisted
tinyexec 1.3.1 to the top level because 4.1.11 accepted it. #107 (vitest 5)
was branched before that and merged after it. Git took both diffs without a
textual conflict, but vitest 5.0.0 wants tinyexec 1.3.0, so the result named
a dependency the lockfile no longer contained.

The repair is one `npm install`: tinyexec moves from a hoisted
node_modules/tinyexec at 1.3.1 to a nested node_modules/vitest/node_modules/
tinyexec at 1.3.0. Nothing else in the tree changes, and vitest is now the
only consumer.

CI would not have caught this. The "Build front-end" job runs `npm install`,
which quietly repairs an out-of-sync lockfile in the runner and passes, so
the committed lockfile stays broken for anyone using `npm ci`. Worth
considering `npm ci` there instead, which is what a lockfile is for.

Verified on this branch: `npm ci` exits 0, `npm audit` reports 0
vulnerabilities, `npm run build` passes, `vitest run` passes 51 of 51 on
vitest 5.0.0, `npx eslint .` exits 0, and the committed FactorioToolsApi.ts
does not drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAVZSEbjCkr9sbumdMPKy2
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • src/vue/package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 78feb0fe-c621-44d2-9c14-6ebec38b01fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wormeyman
wormeyman merged commit 6128c71 into main Sep 11, 2026
6 checks passed
@wormeyman
wormeyman deleted the fix/reconcile-lockfile-after-vitest-5 branch September 11, 2026 16:36
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.

1 participant