Skip to content

Releases: sonukapoor/warpdom

warpdom 0.1.4

Choose a tag to compare

@sonukapoor sonukapoor released this 17 Oct 18:42
  • warpdom migrate: switches a project's tests from jsdom or happy-dom to warpdom. npx warpdom migrate makes the changes (Vitest and Jest configs and projects, per-file @vitest-environment / @jest-environment comments, --environment flags in scripts, dependencies), --dry-run only prints the plan. It keeps the removed jsdom version as a setting when it differs from warpdom's default, so results stay the same; stops on a git working tree with uncommitted changes unless --force; lists what it cannot change exactly instead of guessing. See docs/migrate.md.
  • jsdom 20-26 style profiles (found adopting Ant Design, #13): computed CSS-wide keywords, var() shorthands, background and border-side accessors, re-setting a shorthand moves it to the end, calc() and whitespace in serialized values, -webkit- properties a profile keeps, color rounding and hwb(). All 15 Ant Design tests that differed now match jsdom.
  • jsdom before 16.5.2: a click on a checkbox or radio that is not in a document also fires input and change (Element Plus, #14).
  • QuotaExceededError instances are of their class on Node releases whose DOMException ignores subclassing (Node 24.6).
  • The user agent names warpdom's real version.
  • Fixed: the package's bin entry (npm 11.9 drops ./-prefixed paths).

npm: warpdom@0.1.4

warpdom 0.1.3

Choose a tag to compare

@sonukapoor sonukapoor released this 16 Oct 11:38
  • Warning for a newer jsdom: warpdom models jsdom 20.0.3 to 30.1.2. When a project installs a later minor or major jsdom release, the Vitest and Jest environments print one warning per process, saying that tests get jsdom 30.1.2's behavior and where to report a difference. Patch releases do not warn.
  • main field in package.json, for tools that do not read the exports map (eslint-plugin-import could not resolve warpdom).
  • Upstream watch: a weekly workflow opens an issue when jsdom releases a version newer than the modeled one, when a fresh jsdom@latest install's inline style behavior differs from warpdom's default profile, or when Vitest or Jest release a new major version; it also runs the tests with the newest Vitest. The Web Platform Tests workflow also runs monthly at the newest WPT commit.

npm: warpdom@0.1.3

warpdom 0.1.2

Choose a tag to compare

@sonukapoor sonukapoor released this 16 Oct 11:38

Fixes.

  • Reset between test files (fast mode, measured isolation): the window's navigator, location, history and screen, and their prototypes, are restored, so a test that stubs one of them (for example navigator.clipboard) no longer leaks into the next file.
  • Jest environment: Jest's helpers are loaded from the Jest that is running, which fixes projects where pnpm installs several Jest versions side by side.
  • warpdom compare: reads the --config and --project options of the project's test script, so it runs the same suite as npm test.
  • README: handsontable's speedup measured on its current development branch.

npm: warpdom@0.1.2

warpdom 0.1.1

Choose a tag to compare

@sonukapoor sonukapoor released this 16 Oct 11:37

Packaging release; warpdom's behavior is the same as in 0.1.0.

  • warpdom is publishable on npm, and the npm README names both environment packages.
  • New package jest-environment-warpdom 0.1.0: Jest finds warpdom by name (testEnvironment: 'warpdom', or a @jest-environment warpdom docblock).
  • vitest-environment-warpdom 0.1.0 requires warpdom >= 0.1.0.
  • Citation: the Zenodo DOI and release date of 0.1.0, and a DOI badge.
  • Research data: the melt-ui timing investigation, the reset benchmark and size counts, and the fast-mode results at 5942dc9.

npm: warpdom@0.1.1

warpdom 0.1.0

Choose a tag to compare

@sonukapoor sonukapoor released this 14 Oct 21:42

First public release.

warpdom is a DOM for unit and component tests, written from the WHATWG specifications, that installs as a drop-in Vitest or Jest environment in place of jsdom and follows the behavior of the jsdom version your project has installed.

Measured on GitHub Actions on the unmodified test suites of open-source projects (details, raw data and scripts in docs/research):

  • Faster than jsdom on every one of 13 tuning suites, in three independent runs: median 1.28x / 1.27x / 1.26x (per suite 1.03x to 1.89x); handsontable about 8-9x (reported separately: its core runs jsdom 16.7).
  • Same results: in 17 of 25 suites no test's status ever differed from jsdom's; the remaining differences are listed and explained in the README.
  • Fast mode (warpdom vitest run, Vitest 3.2+): shares modules between test files only where measured runs show this changes no result; up to 9.6x over jsdom's default on suites where per-file isolation dominates.
  • Web Platform Tests: 87.4% of subtests (jsdom: 80.5%).

Check it on your own suite with npx warpdom compare. Not yet published to npm.

Measurements were taken with dom-api-tracer (DOI 10.5281/zenodo.23378610).