* create rrdom package * test(rrdom): add unit tests for polyfill.ts * fix(rrweb snapshot): type check errors Errors are caused by the declaration similarity of @types/mocha and @types/jest if we install both of them in the whole project. * Set tagNames to upper case by default This mirrors the `Element.tagName` implementation: ``` For DOM trees which represent HTML documents, the returned tag name is always in the canonical upper-case form. For example, tagName called on a <div> element returns "DIV". ``` https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName * Add workspace file * VSCode settings for rrdom tests * Add basic test for RRDocument * Only setup jest tests for rrdom * mock Node type and Event type for nodejs environment * test(rrdom): add snapshot for document.test.ts * fix issue of nwsapi import and add unit tests for rrdom * fix: querySelectorAll returns nothing when querying elements with ids and classNames * fix: error of unit test for Event polyfill Since Event class is built in nodejs after v15.0.0 * add a dummy implementation of canvas * add style element support * add unit test for style element Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
45 lines
967 B
JSON
45 lines
967 B
JSON
{
|
|
"name": "rrdom",
|
|
"version": "0.0.0",
|
|
"scripts": {
|
|
"dev": "rollup -c -w",
|
|
"bundle": "rollup --config",
|
|
"bundle:es-only": "cross-env ES_ONLY=true rollup --config",
|
|
"test": "jest",
|
|
"prepublish": "npm run bundle"
|
|
},
|
|
"keywords": [
|
|
"rrweb",
|
|
"rrdom"
|
|
],
|
|
"license": "MIT",
|
|
"main": "lib/rrdom.js",
|
|
"module": "es/rrdom.js",
|
|
"typings": "es",
|
|
"unpkg": "dist/rrdom.js",
|
|
"files": [
|
|
"dist",
|
|
"lib",
|
|
"es",
|
|
"typings"
|
|
],
|
|
"devDependencies": {
|
|
"@rollup/plugin-commonjs": "^20.0.0",
|
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
"@types/cssom": "^0.4.1",
|
|
"@types/jest": "^27.0.1",
|
|
"@types/nwsapi": "^2.2.2",
|
|
"jest": "^27.1.1",
|
|
"rollup": "^2.56.3",
|
|
"rollup-plugin-terser": "^7.0.2",
|
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
"rrweb-snapshot": "^1.1.8",
|
|
"ts-jest": "^27.0.5",
|
|
"typescript": "^3.9.5"
|
|
},
|
|
"dependencies": {
|
|
"cssom": "^0.5.0",
|
|
"nwsapi": "^2.2.0"
|
|
}
|
|
}
|