build: exclude vitest.config*.ts from production tsc output#46
Merged
Conversation
`packages/lf-api-js/tsconfig.json` and `packages/lf-repository-api-client-v1/tsconfig.json` default-include root *.ts files. Their `exclude` lists covered `test/`, `dist/`, and `jest.*.js` but not the new `vitest.config*.ts` files added in #44, so `tsc -b` was emitting `dist/vitest.config.{js,d.ts,js.map}` (and the `.browser` variant for V1) into the published artifact. Add `vitest.config*.ts` to both excludes, matching what `lf-repository-api-client-v2` already does. Verified by clean rebuild: `dist/` no longer contains vitest config files. Vitest tests still pass (vitest reads its config independent of tsc).
alexgomezlf
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fast-follow on #44. After the jest → vitest migration,
packages/lf-api-js/tsconfig.jsonandpackages/lf-repository-api-client-v1/tsconfig.jsonwere leaking the newvitest.config*.tsfiles into their publisheddist/artifacts because theirexcludelists coveredtest/,dist/, andjest.*.jsbut not the vitest counterparts.packages/lf-repository-api-client-v2/tsconfig.jsonalready excludedvitest.config*.ts. This PR brings the V1 client and the lf-api-js root package into line.Changes
packages/lf-api-js/tsconfig.json— add"vitest.config*.ts"toexclude.packages/lf-repository-api-client-v1/tsconfig.json— same.Two-line patch.
Verification
Before fix: V1 emitted
dist/vitest.config.{js,d.ts,js.map}+.browservariants; lf-api-js emitteddist/vitest.config.{js,d.ts,js.map}. After clean rebuild on this branch: bothdist/directories are vitest-config-free, andpnpm teststill passes (vitest reads its config independently of tsc).Why it matters
Without this, the npm artifact includes a test-only TypeScript config that imports the dev dependency
vitest/config. Consumers installing the package would get extra files in theirnode_modulesand a phantom dev-only import path — not a runtime break (the file isn't in the entry tree) but unwanted shipping noise.This must land before publishing 1.1.0 from main so the released artifact is clean.
Test plan
vitest.config*files indist/for either package.pnpm --filter @laserfiche/lf-api-js run testpasses.