Releases: wildpeaks/package-snapshot-dom
Releases · wildpeaks/package-snapshot-dom
2.0.0
This release adds two transform functions: one for removing empty values, one for sorting values of space-separated attributes. The published package is also minified from now on.
Breaking changes:
- the second parameter of
toJSON
(for skipping empty values) was removed, use the new functionremoveEmptyAttributes
from now on. - the browser function was renamed
window.snapshotToJSON
(instead ofwindow.snapshotToJson
) for consistency.
More information at:
https://github.com/wildpeaks/package-snapshot-dom/tree/master/packages/snapshot-dom
2.0.0-rc1
1.6.0
Adds an IIFE version (in lib/browser.js
) that can be used in headless tests, for example:
const puppeteer = require("puppeteer");
const script = require.resolve("@wildpeaks/snapshot-dom/lib/browser.js");
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto("http://localhost:8000/", {waitUntil: "load"});
await page.addScriptTag({path: script});
const snapshot = await page.evaluate(() => window.snapshotToJson(document.body));
console.log(snapshot);
} finally {
await browser.close();
}
1.6.0-alpha1
Merge pull request #27 from wildpeaks/features/browser 1.6.0
1.5.0
No API change: just updated devDependencies and added Github Actions, Prettier, Wallaby.
1.4.0
Added option to skip empty values.
Updated devDependencies.
Added Eslint config & lint test for the CI.
1.3.0
- added Azure Pipelines config
- updated Travis CI config
- pinned devDependencies to specific versions
- updated tests to the newer jsDOM API
1.2.1
v1.2.1 Fixed a variable name
1.2.0
Merge pull request #1 from wildpeaks/more-attributes Text fragments and attributes
1.1.0
The package is now named @wildpeaks/snapshot-dom
.