Removed @vitest/utils patch that broke the production build#28011
Conversation
- #28009 shipped a pnpm patch of @vitest/utils. The production Docker build runs `pnpm install --prod`, which fails with ENOENT because the patches/ directory isn't part of the build context — breaking Build & Publish on main - the patch was redundant anyway: it suppressed a vitest source-map crash that was actually triggered by milestone-queries.test.js throwing "Invalid knex instance". That test was fixed in the same PR, which removed the trigger — the full vitest suite passes without the patch (verified: 544 files / 6522 tests, services bucket 256 / 3290, exit 0)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
WalkthroughThis PR removes the Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28011 +/- ##
==========================================
- Coverage 73.83% 73.83% -0.01%
==========================================
Files 1523 1523
Lines 128982 128982
Branches 15483 15483
==========================================
- Hits 95229 95228 -1
+ Misses 32815 32792 -23
- Partials 938 962 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
#28009 shipped a
pnpm patchof@vitest/utils. The production Docker build runspnpm install --prod, which fails withENOENT: no such file or directory, open '/patches/@vitest__utils@4.1.5.patch'— thepatches/directory isn't part of the Docker build context, sopackage.json'spatchedDependenciesreference points at a file that isn't there. Build & Publish is currently broken onmain.Why the patch is safe to drop
The patch suppressed a vitest source-map crash (
convert-source-mapchoking ontsx's bundled loader while parsing an error stack). But that crash was only ever triggered bymilestone-queries.test.jsthrowingInvalid knex instance— and that test was fixed in the same PR (#28009), which removed the trigger.With the trigger gone, the patch is redundant. Verified without it:
pnpm test:vitest(full): 544 files / 6522 tests pass, exit 0pnpm test:vitest test/unit/server/services: 256 files / 3290 tests pass, exit 0 — no source-map crash, no errorsChanges
patchedDependenciesfrompackage.jsonpatches/@vitest__utils@4.1.5.patchpnpm-lock.yamlNote
The underlying vitest behaviour (it can throw while extracting a sourcemap from a file with an unparseable embedded
sourceMappingURL) is a pre-existing, latent vitest/tsx fragility — it only surfaces while reporting an error, so a passing suite never hits it. If it needs a real fix later, it must be done withoutpnpm patch(incompatible with the prod build) — e.g. a runtime workaround or an upstream vitest fix.