* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)
* Backwards compatibility: Bug fix and regression test for #112
- this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
- new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
- original 0efe23f04a fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
- during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>
* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
- I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out
* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------
Authored-by: eoghanmurray <eoghan@getthere.ie>
64 lines
1.7 KiB
JSON
64 lines
1.7 KiB
JSON
{
|
|
"name": "rrweb-snapshot",
|
|
"version": "2.0.0-alpha.11",
|
|
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
|
"scripts": {
|
|
"prepare": "npm run prepack",
|
|
"prepack": "npm run bundle && npm run typings",
|
|
"retest": "jest",
|
|
"test": "yarn bundle && yarn retest",
|
|
"test:watch": "jest --watch",
|
|
"test:update": "jest --updateSnapshot",
|
|
"bundle": "rollup --config",
|
|
"bundle:es-only": "cross-env ES_ONLY=true rollup --config",
|
|
"dev": "yarn bundle:es-only --watch",
|
|
"typings": "tsc -d --declarationDir typings",
|
|
"prepublish": "yarn typings && yarn bundle",
|
|
"lint": "yarn eslint src"
|
|
},
|
|
"type": "module",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/rrweb-io/rrweb.git"
|
|
},
|
|
"keywords": [
|
|
"rrweb",
|
|
"snapshot",
|
|
"DOM"
|
|
],
|
|
"main": "lib/rrweb-snapshot.cjs",
|
|
"module": "es/rrweb-snapshot.js",
|
|
"unpkg": "dist/rrweb-snapshot.js",
|
|
"typings": "typings/index.d.ts",
|
|
"files": [
|
|
"dist",
|
|
"lib",
|
|
"es",
|
|
"typings"
|
|
],
|
|
"author": "yanzhen@smartx.com",
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/rrweb-io/rrweb/issues"
|
|
},
|
|
"homepage": "https://github.com/rrweb-io/rrweb/tree/master/packages/rrweb-snapshot#readme",
|
|
"devDependencies": {
|
|
"@types/chai": "^4.1.4",
|
|
"@types/jest": "^27.0.2",
|
|
"@types/jsdom": "^20.0.0",
|
|
"@types/node": "^18.15.11",
|
|
"@types/puppeteer": "^1.12.4",
|
|
"cross-env": "^5.2.0",
|
|
"jest": "^27.2.4",
|
|
"jest-snapshot": "^23.6.0",
|
|
"jsdom": "^16.4.0",
|
|
"puppeteer": "^17.1.3",
|
|
"rollup": "^2.45.2",
|
|
"rollup-plugin-terser": "^7.0.2",
|
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
"ts-jest": "^27.0.5",
|
|
"ts-node": "^7.0.1",
|
|
"tslib": "^1.9.3"
|
|
}
|
|
}
|