Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
],
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.23.3",
"@lwc/compiler": "^5.0.2",
"@lwc/engine-dom": "^5.0.2",
"@lwc/engine-server": "^5.0.2",
"@lwc/synthetic-shadow": "^5.0.2",
"@lwc/wire-service": "^5.0.2",
"@types/jest": "^29.5.8",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.53.0",
"husky": "^8.0.3",
"@babel/core": "^7.23.9",
"@lwc/compiler": "^6.0.0",
"@lwc/engine-dom": "^6.0.0",
"@lwc/engine-server": "^6.0.0",
"@lwc/synthetic-shadow": "^6.0.0",
"@lwc/wire-service": "^6.0.0",
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"eslint": "^8.56.0",
"husky": "^9.0.7",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^7.4.2",
"lint-staged": "^13.2.3",
"prettier": "^3.1.0",
"lerna": "^8.0.2",
"lint-staged": "^15.2.1",
"prettier": "^3.2.4",
"semver": "^7.5.4"
},
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions packages/@lwc/jest-serializer/src/clean-style-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { getKnownScopeTokensRegex } = require('@lwc/jest-shared');

function cleanStyleElement(elm) {
elm.textContent = elm.textContent.replace(getKnownScopeTokensRegex(), '__lwc_scope_token__');
elm.removeAttribute('data-rendered-by-lwc'); // irrelevant for the snapshot, added by the framework
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An accidental breaking change to snapshots snuck in via salesforce/lwc#3894. Luckily we can trivially remove it from the snapshots; it's not important for component authors anyway.

}

module.exports = cleanStyleElement;
4 changes: 2 additions & 2 deletions packages/@lwc/jest-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"/src/transforms/*.js"
],
"dependencies": {
"@babel/core": "^7.23.3",
"@babel/core": "^7.23.9",
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-decorators": "^7.23.3",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@lwc/jest-shared": "14.3.1",
"babel-preset-jest": "^29.6.3",
"magic-string": "^0.30.5",
"magic-string": "^0.30.6",
"semver": "^7.5.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`renders a basic component and saves formatted snapshot 1`] = `
<x-basic>
<template shadowroot="open">
<template shadowrootmode="open">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<style type="text/css">
h1 {color: red;}
</style>
Expand Down
2 changes: 1 addition & 1 deletion test/src/modules/ssr/basic/__tests__/basic.ssr-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ it('renders a basic component and saves inline formatted snapshot', () => {

expect(renderedComponent).toMatchInlineSnapshot(`
<x-basic>
<template shadowroot="open">
<template shadowrootmode="open">
<style type="text/css">
h1 {color: red;}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`renders a basic component with an empty text expression 1`] = `
<ssr-empty-text-expression>
<template shadowroot="open">
<template shadowrootmode="open">
<div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ it('renders a basic component with scoped styles', () => {

expect(renderedComponent).toMatchInlineSnapshot(`
<x-scoped-style class="__lwc_scope_token__">
<template shadowroot="open">
<template shadowrootmode="open">
<style class="__lwc_scope_token__" type="text/css">
h1.__lwc_scope_token__ {color: red;}
</style>
Expand Down
Loading