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
5 changes: 5 additions & 0 deletions .github/workflows/karma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ jobs:
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: NODE_ENV_FOR_TEST=production yarn sauce:ci
- run: NODE_ENV_FOR_TEST=production DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: yarn hydration:sauce:ci:engine-server
- run: ENABLE_SYNTHETIC_SHADOW_IN_HYDRATION=1 yarn hydration:sauce:ci:engine-server
- run: NODE_ENV_FOR_TEST=production yarn hydration:sauce:ci:engine-server
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn hydration:sauce:ci:engine-server
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn hydration:sauce:ci:engine-server
- run: yarn hydration:sauce:ci
- run: ENABLE_SYNTHETIC_SHADOW_IN_HYDRATION=1 yarn hydration:sauce:ci
- run: NODE_ENV_FOR_TEST=production yarn hydration:sauce:ci
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lwc-monorepo",
"version": "8.13.3",
"version": "8.14.0",
"private": true,
"description": "Lightning Web Components",
"repository": {
Expand Down Expand Up @@ -38,40 +38,40 @@
"@eslint/js": "9.20.0",
"@lwc/eslint-plugin-lwc-internal": "link:./scripts/eslint-plugin",
"@lwc/test-utils-lwc-internals": "link:./scripts/test-utils",
"@nx/js": "20.4.0",
"@nx/js": "20.4.4",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-typescript": "^12.1.2",
"@swc-node/register": "~1.10.9",
"@swc/core": "~1.10.15",
"@swc/core": "~1.10.16",
"@swc/helpers": "~0.5.15",
"@types/babel__core": "^7.20.5",
"@types/node": "^22.13.1",
"@types/node": "^22.13.4",
"@vitest/coverage-v8": "^3.0.5",
"@vitest/eslint-plugin": "^1.1.27",
"@vitest/eslint-plugin": "^1.1.31",
"@vitest/ui": "^3.0.5",
"bytes": "^3.1.2",
"es-module-lexer": "^1.6.0",
"eslint": "9.20.0",
"eslint": "9.20.1",
"eslint-config-flat-gitignore": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.31.0",
"glob": "^11.0.1",
"globals": "^15.14.0",
"globals": "^15.15.0",
"husky": "^9.1.7",
"isbinaryfile": "^5.0.4",
"jsdom": "^26.0.0",
"lint-staged": "^15.4.3",
"magic-string": "^0.30.17",
"nx": "20.4.0",
"prettier": "^3.5.0",
"rollup": "^4.34.6",
"terser": "^5.38.1",
"nx": "20.4.4",
"prettier": "^3.5.1",
"rollup": "^4.34.8",
"terser": "^5.39.0",
"tslib": "^2.8.1",
"typescript": "5.7.3",
"typescript-eslint": "8.23.0",
"typescript-eslint": "8.24.0",
"vitest": "^3.0.5"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/aria-reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/aria-reflection",
"version": "8.13.3",
"version": "8.14.0",
"description": "ARIA element reflection polyfill for strings",
"keywords": [
"aom",
Expand Down
6 changes: 3 additions & 3 deletions packages/@lwc/babel-plugin-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/babel-plugin-component",
"version": "8.13.3",
"version": "8.14.0",
"description": "Babel plugin to transform a LWC module",
"keywords": [
"lwc"
Expand Down Expand Up @@ -47,8 +47,8 @@
},
"dependencies": {
"@babel/helper-module-imports": "7.25.9",
"@lwc/errors": "8.13.3",
"@lwc/shared": "8.13.3",
"@lwc/errors": "8.14.0",
"@lwc/shared": "8.14.0",
"line-column": "~1.0.2"
},
"devDependencies": {
Expand Down
16 changes: 8 additions & 8 deletions packages/@lwc/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/compiler",
"version": "8.13.3",
"version": "8.14.0",
"description": "LWC compiler",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,17 +46,17 @@
}
},
"dependencies": {
"@babel/core": "7.26.8",
"@babel/core": "7.26.9",
"@babel/plugin-transform-async-generator-functions": "7.26.8",
"@babel/plugin-transform-async-to-generator": "7.25.9",
"@babel/plugin-transform-class-properties": "7.25.9",
"@babel/plugin-transform-object-rest-spread": "7.25.9",
"@locker/babel-plugin-transform-unforgeables": "0.22.0",
"@lwc/babel-plugin-component": "8.13.3",
"@lwc/errors": "8.13.3",
"@lwc/shared": "8.13.3",
"@lwc/ssr-compiler": "8.13.3",
"@lwc/style-compiler": "8.13.3",
"@lwc/template-compiler": "8.13.3"
"@lwc/babel-plugin-component": "8.14.0",
"@lwc/errors": "8.14.0",
"@lwc/shared": "8.14.0",
"@lwc/ssr-compiler": "8.14.0",
"@lwc/style-compiler": "8.14.0",
"@lwc/template-compiler": "8.14.0"
}
}
8 changes: 4 additions & 4 deletions packages/@lwc/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/engine-core",
"version": "8.13.3",
"version": "8.14.0",
"description": "Core LWC engine APIs.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"dependencies": {
"@lwc/features": "8.13.3",
"@lwc/shared": "8.13.3",
"@lwc/signals": "8.13.3"
"@lwc/features": "8.14.0",
"@lwc/shared": "8.14.0",
"@lwc/signals": "8.14.0"
},
"devDependencies": {
"observable-membrane": "2.0.0"
Expand Down
11 changes: 7 additions & 4 deletions packages/@lwc/engine-core/src/framework/invoker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { addErrorComponentStack } from '../shared/error';
import { evaluateTemplate, setVMBeingRendered, getVMBeingRendered } from './template';
import { runWithBoundaryProtection } from './vm';
import { logOperationStart, logOperationEnd, OperationId } from './profiler';
import { LightningElement } from './base-lightning-element';
import type { LightningElement } from './base-lightning-element';
import type { Template } from './template';
import type { VM } from './vm';
import type { LightningElementConstructor } from './base-lightning-element';
Expand Down Expand Up @@ -58,9 +58,12 @@ export function invokeComponentConstructor(vm: VM, Ctor: LightningElementConstru
// the "instanceof" operator would not work here since Locker Service provides its own
// implementation of LightningElement, so we indirectly check if the base constructor is
// invoked by accessing the component on the vm.
const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
? vmBeingConstructed.component !== result
: !(result instanceof LightningElement);

// TODO [W-17769475]: Restore this fix when we can reliably detect Locker enabled
// const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
// ? vmBeingConstructed.component !== result
// : !(result instanceof LightningElement);
const isInvalidConstructor = vmBeingConstructed.component !== result;

if (isInvalidConstructor) {
throw new TypeError(
Expand Down
8 changes: 4 additions & 4 deletions packages/@lwc/engine-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/engine-dom",
"version": "8.13.3",
"version": "8.14.0",
"description": "Renders LWC components in a DOM environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.13.3",
"@lwc/shared": "8.13.3",
"@lwc/features": "8.13.3"
"@lwc/engine-core": "8.14.0",
"@lwc/shared": "8.14.0",
"@lwc/features": "8.14.0"
},
"lwc": {
"modules": [
Expand Down
10 changes: 5 additions & 5 deletions packages/@lwc/engine-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
],
"name": "@lwc/engine-server",
"version": "8.13.3",
"version": "8.14.0",
"description": "Renders LWC components in a server environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,10 +46,10 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.13.3",
"@lwc/rollup-plugin": "8.13.3",
"@lwc/shared": "8.13.3",
"@lwc/features": "8.13.3",
"@lwc/engine-core": "8.14.0",
"@lwc/rollup-plugin": "8.14.0",
"@lwc/shared": "8.14.0",
"@lwc/features": "8.14.0",
"@rollup/plugin-virtual": "^3.0.2",
"parse5": "^7.2.1"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"entry": "x/parent"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<fixture-test>
<template shadowrootmode="open">
<x-child class="connected-callback-class connected-callback-class-2 initial" data-lwc-host-mutated="class">
<template shadowrootmode="open">
</template>
</x-child>
</template>
</fixture-test>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
connectedCallback() {
// Modify a class that has already been set by the parent
this.classList.add('connected-callback-class');
this.classList.add('connected-callback-class-2');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-child class="initial"></x-child>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<template>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"entry": "x/getter-class-list",
"ssrFiles": {
"error": "error-ssr.txt",
"expected": "expected-ssr.html"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
classList.forEach is not a function
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<fixture-test class="a b c d-e f g h i" data-lwc-host-mutated="class">
<template shadowrootmode="open">
</template>
</fixture-test>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { expect } from 'vitest';
import { LightningElement } from 'lwc';

export default class GetterClassList extends LightningElement {
connectedCallback() {
const { classList } = this;

classList.add('a', 'b', 'c', 'd-e', 'f', 'g', 'h', 'i');
classList.forEach((value) => {
classList.remove(value);
});
expect(this.getAttribute('class')).toBe('');
expect(this.classList.length).toBe(0);

classList.add('a', 'b', 'c', 'd-e', 'f', 'g', 'h', 'i');
while (classList.length > 0) {
classList.remove(classList.item(0));
}
expect(this.getAttribute('class')).toBe('');
expect(this.classList.length).toBe(0);

classList.add('a', 'b', 'c', 'd-e', 'f', 'g', 'h', 'i');
expect(classList.item(3)).toBe('d-e');
}
}

This file was deleted.

Loading
Loading