Skip to content

fix(wasm): pin vite to 8.3.4 so reporter errors stay visible under vitest - #179

Closed
shunsuke-shimomura wants to merge 1 commit into
mainfrom
fix/pin-vite-8.3.4-for-vitest-reporter
Closed

shunsuke-shimomura wants to merge 1 commit into
mainfrom
fix/pin-vite-8.3.4-for-vitest-reporter

Conversation

@shunsuke-shimomura

@shunsuke-shimomura shunsuke-shimomura commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Why

The Renovate lock file maintenance PR #176 fails Test the TypeScript binding: three adapter tests expect the reporter's explicit error message (includeTaskLocation, more than once), but the nested vitest run prints TypeError: code.charCodeAt is not a function instead.

Vite 8.3.5 switched its inline source-map extraction to code.charCodeAt (vitejs/vite#23775), while vitest 5.0.5 passes a Buffer for modules served from its transform cache (our dist/vitest.js reporter among them). Any error thrown by a reporter then crashes vitest's error formatting. Tracked upstream as vitest-dev/vitest#11682; the fix (vitest-dev/vitest#11709) is merged but not in any released vitest yet (latest is 5.0.5).

What

  • Pin vite to 8.3.4 through overrides in crate/inka-evidence-wasm/package.json only. The lock file on main already resolves 8.3.4, so it is unchanged here.
  • Document the pin and when to drop it in the package README.

The web UI keeps vite 8.3.5; it has no reporter that throws and its CI passed on #176.

Verification

Applied the same override on top of the #176 branch (vite 8.3.5 in the lock), ran npm install and npm test in crate/inka-evidence-wasm: 53 tests in 4 files pass. Without the override the same three tests fail as in CI. prek run --files on the changed files passes.

Follow-up

After this merges, rebase #176 (tick its rebase checkbox) so the lock file maintenance keeps vite at 8.3.4 and CI goes green. Remove the override once a vitest release ships #11709; tracked in #180.

🤖 Generated with Claude Code

…test

Vite 8.3.5 reads the inline source map with `code.charCodeAt`, but
vitest 5.0.5 hands it a Buffer for modules served from its transform
cache (vitest-dev/vitest#11682). Any error thrown by a reporter then
crashes vitest's error formatting with `code.charCodeAt is not a
function`, which hides the reporter's explicit failures and breaks the
adapter tests that assert on them. The upstream fix (vitest-dev/vitest#11709)
is merged but not released yet, so pin vite through `overrides` in this
package only; the web UI is unaffected.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added sys::SE システムズエンジニアリング documentation 📓 Improvements or additions to documentation labels Nov 2, 2026
@shunsuke-shimomura

Copy link
Copy Markdown
Member Author

Superseded: the same commit now sits on the Renovate branch itself (#176), which carries the explanation in its description. Closing this one so a single PR lands the lock file maintenance together with the vite 8.3.4 override.

@shunsuke-shimomura
shunsuke-shimomura deleted the fix/pin-vite-8.3.4-for-vitest-reporter branch November 2, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📓 Improvements or additions to documentation sys::SE システムズエンジニアリング

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant