Skip to content

chore(deps): upgrade dependencies and fix docker-e2e Vitest RPC timeout - #448

Merged
arabold merged 1 commit into
mainfrom
claude/docker-test-timeout-43b6e6
Jul 20, 2026
Merged

chore(deps): upgrade dependencies and fix docker-e2e Vitest RPC timeout#448
arabold merged 1 commit into
mainfrom
claude/docker-test-timeout-43b6e6

Conversation

@arabold

@arabold arabold commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes npm run test:docker reporting a false-positive failure: test/docker-e2e.test.ts used spawnSync for docker build/docker run, which blocks Node's event loop for the whole command duration. Vitest's worker↔main-thread RPC heartbeat has a hardcoded 60s timeout, so any long-running synchronous call tripped [vitest-worker]: Timeout calling "onTaskUpdate" and failed the run even though every test assertion passed. Switched to async spawn-based helpers so the event loop stays responsive.
  • Upgrades all dependencies except typescript and tree-sitter (see below), after reviewing each changelog for breaking changes:
    • @fastify/static 9→10, @kreuzberg/node 4.4→4.10 (kept tilde-pinned given its license churned MIT→Elastic→MIT across minors), @types/archiver 7→8 (now matches archiver@8's ESM exports — removed the @ts-expect-error workarounds), @types/yauzl 2→3, @types/node 24→26, defuddle 0.18→0.19, vite-plugin-dts 4→5 (confirmed unused in this repo).
    • vite/vite-node/vitest bumped together (7→8 / 5→6 / 3→4) since Vitest 3 doesn't support Vite 8.
  • Fixes required by the Vitest 4 bump:
    • Vitest 4 mock constructors use real new semantics, so arrow-function mockImplementations used to mock classes now throw "is not a constructor". Converted the affected call sites across test files to function expressions, and extended the existing test-file Biome override to disable useArrowFunction (which otherwise fights this fix).
    • Re-spying an already-spied prototype method no longer resets its call count, which broke HtmlPipeline/MarkdownPipeline middleware-count assertions; added afterEach(() => vi.restoreAllMocks()).
  • @kreuzberg/node 4.10.2 stopped embedding the sheet name inside XLSX table markdown; DocumentPipeline now reconstructs it from metadata.sheetNames so indexed spreadsheet content doesn't silently lose that context.
  • Cleaned up lint drift from the Biome 2.4→2.5 bump (formatter reflow of it.each calls) plus two small fixes (unused param, optional chain).
  • typescript stays on ^5.9.3: bumping breaks npm ci outright (ERESOLVE@kitajs/ts-html-plugin@4.1.4 peer-depends on typescript@^5.9.3). Its only newer-TS-compatible release is a 5.0.0-next.2 prerelease pinned to the exact typescript@6.0.2 and requiring a @kitajs/html@5.0.0-next.1 prerelease bump too — holding off until a stable release exists.
  • tree-sitter/tree-sitter-javascript/tree-sitter-python are intentionally left unchanged (no mutually compatible newer versions available).

Test plan

  • npm run typecheck
  • npm run lint (clean — 0 errors/warnings/info)
  • npm run build
  • npm test — 130/130 test files, 1874/1874 tests passing
  • npm run test:docker — all 5 Docker image tests passing, no more spurious RPC-timeout failure

🤖 Generated with Claude Code

Bump @fastify/static, @kreuzberg/node, @types/{archiver,yauzl,node}, defuddle,
vite-plugin-dts, and vite/vite-node/vitest (coordinated, since vitest 3
doesn't support vite 8) after reviewing each changelog for breaking changes.
typescript stays on 5.9.x for now (see follow-up); tree-sitter is unchanged
per known incompatibility.

Fixes required by the vitest 3->4 bump:
- Vitest 4 mock constructors use real `new` semantics, so arrow-function
  mockImplementations used to mock classes threw "is not a constructor";
  converted the affected call sites across test files to function
  expressions and extended the existing test-file Biome override to
  disable useArrowFunction, which otherwise fights this fix.
- Re-spying an already-spied prototype method no longer resets its call
  count, which broke HtmlPipeline/MarkdownPipeline middleware-count
  assertions; added afterEach(() => vi.restoreAllMocks()).

@kreuzberg/node 4.10.2 stopped embedding the sheet name inside XLSX table
markdown; DocumentPipeline now reconstructs it from metadata.sheetNames so
indexed spreadsheet content doesn't silently lose that context.

Removed the @ts-expect-error workarounds now that @types/archiver@8 matches
archiver@8's ESM exports.

Also cleaned up lint drift from the Biome 2.4->2.5 bump (formatter reflow of
it.each calls) plus two small fixes (unused param, optional chain).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 20, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo’s dependency set (notably Vite/Vitest/Biome and related tooling) and adjusts tests + pipeline behavior to stay compatible, while also fixing npm run test:docker flakiness by avoiding long-running spawnSync calls that block Vitest’s worker heartbeat.

Changes:

  • Replace spawnSync Docker invocations in test/docker-e2e.test.ts with async spawn helpers to keep the event loop responsive during long Docker operations.
  • Upgrade dependencies (incl. @fastify/static, @kreuzberg/node, Vite/Vitest, Biome) and apply the required test/mocking updates for Vitest 4 semantics.
  • Restore XLSX sheet-name context in DocumentPipeline output when Kreuzberg no longer includes it in per-table markdown.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/docker-e2e.test.ts Switch Docker build/run to async helpers to prevent Vitest RPC timeouts during long operations
test/archive-integration.test.ts Remove obsolete @ts-expect-error now that archiver typings match exports
src/web/main.client.ts Simplify HTMX xhr header check using optional chaining
src/utils/archive/ArchiveFactory.test.ts Biome-driven it.each formatting change
src/tools/ScrapeTool.test.ts Update mock constructor implementation for Vitest 4 “new” semantics + formatting
src/tools/CancelJobTool.test.ts Biome-driven it.each formatting change
src/telemetry/telemetry.test.ts Convert mocked class constructor to function expression for Vitest 4 semantics
src/telemetry/postHogClient.test.ts Convert mocked constructor to function expression for Vitest 4 semantics
src/store/DocumentManagementService.test.ts Convert mocked constructors to function expressions for Vitest 4 semantics
src/splitter/splitters/TextContentSplitter.test.ts Tighten spy typing and update vitest import types
src/splitter/SemanticMarkdownSplitter.test.ts Remove unused param warning by prefixing with _
src/scraper/utils/sandbox.test.ts Convert JSDOM mock implementations to function expressions for Vitest 4 semantics
src/scraper/strategies/GitHubScraperStrategy.test.ts Convert mockImplementation to function expression for Vitest 4 semantics
src/scraper/pipelines/MarkdownPipeline.test.ts Add afterEach(vi.restoreAllMocks) to prevent spy call-count leakage in Vitest 4
src/scraper/pipelines/HtmlPipeline.test.ts Add afterEach(vi.restoreAllMocks) to prevent spy call-count leakage in Vitest 4
src/scraper/pipelines/DocumentPipeline.ts Reconstruct XLSX sheet-name headings from Kreuzberg metadata when available
src/pipeline/PipelineManager.test.ts Convert mocked worker constructor to function expression + formatting
src/index.test.ts Convert mocked service constructor to function expression for Vitest 4 semantics
src/cli/index.test.ts Convert multiple mocked constructors/tools to function expressions for Vitest 4 semantics
src/cli/commands/search.test.ts Convert mocked tool constructor to function expression
src/cli/commands/scrape.test.ts Convert mocked tool/event bus constructors to function expressions
src/cli/commands/refresh.test.ts Convert mocked tool/event bus constructors to function expressions
src/cli/commands/mcp.test.ts Convert mocked store constructors to function expressions
src/cli/commands/list.test.ts Convert mocked tool constructor to function expression
src/cli/commands/findVersion.test.ts Convert mocked tool constructor to function expression
src/cli/commands/fetchUrl.test.ts Convert mocked fetchers/tools to function expressions
src/cli/commands/default.test.ts Convert mocked store constructor to function expression
src/auth/ProxyAuthManager.test.ts Adjust proxy provider mock + Biome formatting
src/app/AppServer.test.ts Convert mocked auth manager constructor to function expression
package.json Upgrade runtime/dev dependencies (Fastify static, Kreuzberg, Vite/Vitest, typings, etc.)
package-lock.json Lockfile updates corresponding to dependency upgrades
biome.json Bump Biome schema + disable useArrowFunction for src/**/*.test.ts to avoid fighting Vitest 4 constructor-mocking needs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines +156 to +159
"vite": "^8.1.5",
"vite-node": "^6.0.0",
"vite-plugin-dts": "^5.0.3",
"vitest": "^4.1.10"
@arabold
arabold merged commit cb8a48d into main Jul 20, 2026
5 checks passed
@arabold
arabold deleted the claude/docker-test-timeout-43b6e6 branch July 20, 2026 13:41
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