Migrate to Vitest and Oxc with compatible TypeScript builds - #212
Merged
Conversation
jdalton
force-pushed
the
chore/vitest-oxc-rolldown
branch
from
September 6, 2026 01:50
92d8f18 to
7242c0a
Compare
jdalton
force-pushed
the
chore/vitest-oxc-rolldown
branch
from
September 6, 2026 02:07
7242c0a to
5c9e373
Compare
This was referenced Sep 6, 2026
This was referenced Sep 6, 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.
Tooling
Use Vitest 5.0.0, Oxlint 1.81.0,
Oxfmt 0.66.0, Rolldown 1.2.7, and Vite 8.2.2. Replace ESLint and Terser;
the dependency tree has no esbuild. Keep one Node.js 26 CI job with pinned actions.
Move runtime sources, tooling, configuration, and tests to
.mts. Runtime sourcefiles are exact renames, without selector changes or wholesale reformatting.
Vitest runs the existing tests, restores the adapter loader spy, and rebuilds
generated files before watch-mode reruns.
Package compatibility
Rolldown's transform and minify APIs preserve the existing script wrappers.
npm packandnpm publishbuild the same nine published files, includingsrc/nwsapi.js,src/dom-selector.js, both extension modules, anddist/nwsapi.min.js. The package stays CommonJS with the same main and deep-importpaths. TypeScript sources and build tools are not shipped. The lazy optional
css-treepeer remains external.Syntax tests enforce the existing ES2015 core, ES5 extension, and ES2019 adapter
levels. The browser global and AMD factory remain supported. No npm release is
published by this PR.
Dependency tools
Require npm ^11.19.0 or ≥ 12.0.2, or pnpm ^11.25.0 or ≥ 12.3.4 for development. The npm 11 minimum includes the release-age fix backported from 12.0.2. New resolutions have a one-day release-age delay, dependency scripts need explicit approval, and non-registry subdependencies are restricted. pnpm also checks for trust downgrades. Both lockfiles are included; shared scripts and package tests work with either manager. CI uses npm 12.0.2. These are development requirements, not consumer runtime requirements.
Packed-consumer tests pass with npm 11.19.0 and 12.0.2 and pnpm 11.25.0 and 12.3.4. Older version boundaries are rejected.
Validation
Follows merged #167 and #211.