chore: migrate toolchain to Vite+#134
Conversation
Staging area for the toolchain migration. Will be merged into the project root once the existing files are ported. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Move source files into file-selector/src/ and test files into file-selector/tests/, adjusting imports for the new layout. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Add DOM types to tsconfig and explicit .ts import extensions for nodenext resolution. Migrate test files to use vite-plus/test imports and replace deprecated done() callbacks with async/await. Configure jsdom as the test environment. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Remove dead tslint directive comments, drop unused Proxy handler parameter, fix floating promise, and silence template expression warnings with type casts. Mark the redundant `any` parameter type and unhelpful error messages for future improvement. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Drop Jest, TSLint, Rollup configs, all tsconfig variants, the old package-lock.json, .editorconfig, and root .gitignore. Merge package metadata into the Vite+ package.json. Move LICENSE, README, and all scaffold contents from file-selector/ to the project root. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Add staged config to run vp check --fix on commit and generate the .vite-hooks/pre-commit hook file. Signed-off-by: Jon Koops <jonkoops@gmail.com>
Replace setup-node with voidzero-dev/setup-vp@v1 which handles Node.js, dependency install, and caching in one step. Bump actions/checkout to v7, actions/stale to v10, and semantic-release to ^25. Drop EOL Node 20 from test matrix (now 22/24) and set engines to >= 22. Add coverage-v8 provider and lcov reporter for coveralls. Add github-actions ecosystem to dependabot config. Signed-off-by: Jon Koops <jonkoops@gmail.com>
|
I'll go with #133 for now. The reasoning is:
Once vp is out of beta, we can transition to it - it'll be a nice cleanup. |
|
Closing in favor of #133 . |
|
Few thoughts now that #133 is merged.
From the beta announcement:
Build, test, lint, format — that's all we need; vp has it.
Sure, same tools underneath. But "direct control" here means 6 config files (tsdown.config.ts, vitest.config.ts, .oxfmtrc.json, .oxlintrc.json, .npmrc, tsconfig.build.json) vs 2 with vp (vite.config.ts, tsconfig.json). No custom build plugins, no transforms — there's nothing to control that vp doesn't already expose.
vp can do CJS, but I'd argue it should be dropped regardless of tooling choice. Every stable Node version supports ESM, and bundlers default to it. Shipping CJS alongside just bloats the package for no real benefit.
Same — vp/tsdown can emit
Fair. The dep tree issue you hit in #132 is the TS 7 peer dep conflict — vite-plus and its bundled tsdown still declare Anyway — the hard part is done now that the old toolchain is gone. Going from raw oxc to vp is just config consolidation once TS 7 support lands. Happy to put that PR up when it does. |
Replaces the existing Rollup + tsc + Jest + TSLint toolchain with Vite+, giving the project a single CLI (
vp) for building, testing, linting, formatting, and dependency management.The migration was done incrementally: scaffold a Vite+ library template, port source and tests into it, adapt for the new toolchain (explicit
.tsextensions, Vitest imports,async/awaitinstead ofdone()callbacks, jsdom test environment), resolve lint warnings and strip dead TSLint directives, then consolidate everything back into the project root. No runtime behaviour was changed — the ESM build output was compared against the old one to verify.CI workflows now use
voidzero-dev/setup-vp@v1instead ofactions/setup-node, which handles Node.js, dependency installation, and caching in one step. Action versions were bumped (actions/checkoutv7,actions/stalev10,semantic-release^25). The test matrix was narrowed to Node 22 and 24 (active LTS), andengineswas set to>= 22. Coverage reporting uses@vitest/coverage-v8with an lcov reporter for Coveralls. Dependabot was extended to track GitHub Actions with conventional commit prefixes.A pre-commit hook runs
vp check --fixon staged files via thestagedconfig block.bumppwas removed since the repo already usessemantic-release.Not in scope: Vitest Browser Mode (replacing jsdom with real Chromium via Playwright).
Breaking changes