update cssom package to rrweb self-owned package 'rrweb-cssom' (#925)
* test: update cssom package to rrweb self-owned package 'rrweb-cssom' * style: remove outdated comments
This commit is contained in:
@@ -39,6 +39,6 @@
|
|||||||
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'"
|
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"**/jsdom/cssom": "^0.5.0"
|
"**/jsdom/cssom": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1210,9 +1210,7 @@ describe('diff algorithm for rrdom', () => {
|
|||||||
expect(styleEl.sheet?.cssRules[0].cssText).toEqual('div {color: black;}');
|
expect(styleEl.sheet?.cssRules[0].cssText).toEqual('div {color: black;}');
|
||||||
});
|
});
|
||||||
|
|
||||||
// JSDOM/CSSOM is currently broken for this test
|
it('should insert rule at index [0,0] and keep existing rules', () => {
|
||||||
// remove '.skip' once https://github.com/NV/CSSOM/pull/113#issue-712485075 is merged
|
|
||||||
it.skip('should insert rule at index [0,0] and keep existing rules', () => {
|
|
||||||
document.write(`
|
document.write(`
|
||||||
<style>
|
<style>
|
||||||
@media {
|
@media {
|
||||||
@@ -1229,10 +1227,6 @@ describe('diff algorithm for rrdom', () => {
|
|||||||
];
|
];
|
||||||
applyVirtualStyleRulesToNode(styleEl, virtualStyleRules);
|
applyVirtualStyleRulesToNode(styleEl, virtualStyleRules);
|
||||||
|
|
||||||
console.log(
|
|
||||||
Array.from((styleEl.sheet?.cssRules[0] as CSSMediaRule).cssRules),
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
(styleEl.sheet?.cssRules[0] as CSSMediaRule).cssRules?.length,
|
(styleEl.sheet?.cssRules[0] as CSSMediaRule).cssRules?.length,
|
||||||
).toEqual(3);
|
).toEqual(3);
|
||||||
|
|||||||
@@ -3878,7 +3878,11 @@ csso@^4.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
css-tree "^1.1.2"
|
css-tree "^1.1.2"
|
||||||
|
|
||||||
cssom@^0.4.4, cssom@^0.5.0:
|
cssom@^0.4.4, "cssom@https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz":
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1"
|
||||||
|
|
||||||
|
cssom@^0.5.0:
|
||||||
version "0.5.0"
|
version "0.5.0"
|
||||||
resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz"
|
resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz"
|
||||||
integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==
|
integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==
|
||||||
|
|||||||
Reference in New Issue
Block a user