Skip to content

fix(store): restore default tsconfig in setFiles#400

Open
ifer47 wants to merge 1 commit into
vuejs:mainfrom
ifer47:agent/preserve-tsconfig-on-set-files
Open

fix(store): restore default tsconfig in setFiles#400
ifer47 wants to merge 1 commit into
vuejs:mainfrom
ifer47:agent/preserve-tsconfig-on-set-files

Conversation

@ifer47

@ifer47 ifer47 commented Jul 20, 2026

Copy link
Copy Markdown

What changed

  • Restore the default tsconfig.json whenever setFiles() receives no tsconfig.
  • Reuse the same defaulting path during store initialization and file replacement.
  • Keep an explicitly provided tsconfig.json unchanged.
  • Add focused Node test-runner coverage through Vite's SSR module loader, without adding a dependency.

Why

setFiles() replaces the store's entire file record. Store initialization adds a default tsconfig.json, but the replacement path did not restore that default, so language tooling lost its configuration after callers replaced only their source files.

Fixes #383.

How tested

  • pnpm test
  • pnpm typecheck
  • pnpm lint
  • pnpm exec prettier --check src/store.ts test/store.test.mjs package.json
  • pnpm build (passes; retains the existing API Extractor warning about its bundled TypeScript version)
  • Vercel preview is unavailable for this fork because the check requires Vue organization deployment authorization; the local production build passes.

Risk and rollout

  • Risk: Low. The only new runtime behavior is adding the existing default tsconfig when setFiles() omits it; caller-provided tsconfig content still wins.
  • Rollback: Revert this commit to restore the previous replacement behavior.

Notes for reviewers

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@ifer47 is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

@ifer47
ifer47 marked this pull request as ready for review July 20, 2026 10:40
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.

Using setFiles removes tsconfig.json

1 participant