@percy/dom
Advanced tools
Comparing version 1.0.0-beta.39 to 1.0.0-beta.40
{ | ||
"name": "@percy/dom", | ||
"version": "1.0.0-beta.39", | ||
"version": "1.0.0-beta.40", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"main": "dist/bundle.js", | ||
"browser": "dist/bundle.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production rollup --config", | ||
"build": "node ../../scripts/build", | ||
"lint": "eslint --ignore-path ../../.gitignore .", | ||
"test": "cross-env NODE_ENV=test karma start --single-run", | ||
"test:coverage": "cross-env COVERAGE=text yarn test" | ||
"test": "node ../../scripts/test", | ||
"test:coverage": "yarn test --coverage" | ||
}, | ||
@@ -21,28 +19,11 @@ "publishConfig": { | ||
}, | ||
"babel": { | ||
"extends": "../../babel.config.js", | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"targets": "last 2 version" | ||
} | ||
] | ||
] | ||
"rollup": { | ||
"output": { | ||
"name": "PercyDOM" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-babel": "^5.2.2", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.1.0", | ||
"interactor.js": "^2.0.0-beta.10", | ||
"karma": "^6.0.2", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.3", | ||
"karma-firefox-launcher": "^2.0.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-rollup-preprocessor": "^7.0.5", | ||
"rollup": "^2.38.0" | ||
"interactor.js": "^2.0.0-beta.10" | ||
}, | ||
"gitHead": "bd5cea12ca0d21ca167ce9100df2ead274428b7e" | ||
"gitHead": "1607ab0f5dbe5ab8ef3c9f7b6c2a89f66533348c" | ||
} |
@@ -5,2 +5,13 @@ # @percy/dom | ||
- [Usage](#usage) | ||
- [ES6 imports](#es6-imports) | ||
- [Browser injection](#browser-injection) | ||
- [Options](#options) | ||
- [Serialized Content](#serialize-content) | ||
- [Input elements](#input-elements) | ||
- [Frame elements](#frame-elements) | ||
- [CSSOM rules](#cssom-rules) | ||
- [Canvas elements](#canvas-elements) | ||
- [Other elements](#other-elements) | ||
## Usage | ||
@@ -14,3 +25,3 @@ | ||
// optional arguments shown with defaults | ||
const domSnapshot = serializeDOM(/* options */) | ||
const domSnapshot = serializeDOM(options) | ||
``` | ||
@@ -23,9 +34,9 @@ | ||
await page.addScriptTag({ path: require.resolve('@percy/dom') }) | ||
const domSnapshot = await page.evaluate(() => PercyDOM.serialize(/* options */)) | ||
const domSnapshot = await page.evaluate(() => PercyDOM.serialize(options)) | ||
``` | ||
### Available options | ||
### Options | ||
- `enableJavaScript` - when true, does not serialize some DOM elements | ||
- `domTransformation` - function to transform the DOM after serialization | ||
- `enableJavaScript` — When true, does not serialize some DOM elements | ||
- `domTransformation` — Function to transform the DOM after serialization | ||
@@ -32,0 +43,0 @@ ## Serialized Content |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
311
71
16695
1