Repository navigation
Releases: sonukapoor/warpdom
Releases · sonukapoor/warpdom
Release list
warpdom 0.1.5
- Web APIs jsdom has, now on warpdom's window (#1-#4), each exactly in the jsdom versions that have it:
crypto(getRandomValues;randomUUIDfrom jsdom 22.1),TextEncoder/TextDecoder(from jsdom 27.4; UTF-16 and the single-byte encodings from the Encoding standard's tables),Blob/File(text()/arrayBuffer()/bytes()from jsdom 28.1; used by FormData and FileReader),performance(now,timeOrigin,toJSON). - Behavior change under Jest: the globals
crypto,performanceandBlobnow have jsdom's shape. Node's extras that warpdom's Jest environment used to expose (crypto.subtle,performance.mark) are gone, as with jsdom. A check of 21 projects found no test affected. - jsdom 27-30 style reads (#36): shorthands with
var(), longhands of plain shorthands, CSS-wide keywords,gap/overflow/inset, and the 30.1.3 computedflex/background, measured on 15 releases. Fixes Ant Design's VitestcssVartests. Settingflex-flowno longer fillsflex-direction/flex-wrap, as in jsdom. require('warpdom')(#37): a CommonJS entry, so code inside Jest test files can create windows (thenew JSDOM()pattern). See docs/api.md for the jsdom-to-warpdom mapping.- TypeScript types (#38) for
createWindow,warpdom/vitest(includingenvironmentOptions.warpdomin Vitest's config types),warpdom/jest,compareandmigrate. warpdom migrate(#39): ten fixes from its first real-world run on Ant Design (Node-based presets, type-only imports,@types/jsdom, Jest transform allowlists,.gitignore, directnew JSDOM()uses, remaining transitive jsdom, versions per runner, the url option, a self-ignoring plan folder).- Vitest:
environmentOptions.warpdom.urlsets the page URL.
npm: warpdom@0.1.5
warpdom 0.1.4
warpdom migrate: switches a project's tests from jsdom or happy-dom to warpdom.npx warpdom migratemakes the changes (Vitest and Jest configs and projects, per-file@vitest-environment/@jest-environmentcomments,--environmentflags in scripts, dependencies),--dry-runonly 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,backgroundand 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 andhwb(). 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
inputandchange(Element Plus, #14). QuotaExceededErrorinstances are of their class on Node releases whoseDOMExceptionignores subclassing (Node 24.6).- The user agent names warpdom's real version.
- Fixed: the package's
binentry (npm 11.9 drops./-prefixed paths).
npm: warpdom@0.1.4
warpdom 0.1.3
- 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.
mainfield in package.json, for tools that do not read theexportsmap (eslint-plugin-import could not resolvewarpdom).- Upstream watch: a weekly workflow opens an issue when jsdom releases a version newer than the modeled one, when a fresh
jsdom@latestinstall'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
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--configand--projectoptions of the project's test script, so it runs the same suite asnpm test.- README: handsontable's speedup measured on its current development branch.
npm: warpdom@0.1.2
warpdom 0.1.1
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 warpdomdocblock). - 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
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).