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
3 changes: 0 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ jobs:
run: yarn test:types
- name: Run unit tests
run: yarn test:ci
# TODO [#4815]: enable all SSR v2 tests
- name: Run experimental SSR fixture tests
run: TEST_SSR_COMPILER=1 yarn test packages/@lwc/ssr-compiler/src/__tests__/fixtures.spec.ts
- name: Upload unit test coverage report
uses: actions/upload-artifact@v4
with:
Expand Down
9 changes: 1 addition & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ export default tseslint.config(
},

parserOptions: {
projectService: {
allowDefaultProject: [
// I'm not sure why these files aren't picked up... :\
'packages/@lwc/module-resolver/scripts/test/matchers/to-throw-error-with-code.ts',
'packages/@lwc/module-resolver/scripts/test/matchers/to-throw-error-with-type.ts',
'packages/@lwc/module-resolver/scripts/test/setup-test.ts',
],
},
projectService: {},
},
},

Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lwc-monorepo",
"version": "8.12.6",
"version": "8.12.7",
"private": true,
"description": "Lightning Web Components",
"repository": {
Expand Down Expand Up @@ -35,26 +35,26 @@
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@eslint/js": "9.18.0",
"@eslint/js": "9.19.0",
"@lwc/eslint-plugin-lwc-internal": "link:./scripts/eslint-plugin",
"@lwc/test-utils-lwc-internals": "link:./scripts/test-utils",
"@nx/js": "20.3.2",
"@nx/js": "20.3.3",
"@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.8",
"@swc/core": "~1.10.11",
"@swc/helpers": "~0.5.15",
"@types/babel__core": "^7.20.5",
"@types/node": "^22.10.7",
"@vitest/coverage-v8": "^3.0.3",
"@types/node": "^22.10.10",
"@vitest/coverage-v8": "^3.0.4",
"@vitest/eslint-plugin": "^1.1.25",
"@vitest/ui": "^3.0.3",
"@vitest/ui": "^3.0.4",
"bytes": "^3.1.2",
"es-module-lexer": "^1.6.0",
"eslint": "9.18.0",
"eslint": "9.19.0",
"eslint-config-flat-gitignore": "^1.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.31.0",
Expand All @@ -63,16 +63,16 @@
"husky": "^9.1.7",
"isbinaryfile": "^5.0.4",
"jsdom": "^26.0.0",
"lint-staged": "^15.4.1",
"lint-staged": "^15.4.3",
"magic-string": "^0.30.17",
"nx": "20.3.2",
"nx": "20.3.3",
"prettier": "^3.4.2",
"rollup": "^4.31.0",
"rollup": "^4.32.0",
"terser": "^5.37.0",
"tslib": "^2.8.1",
"typescript": "5.4.5",
"typescript-eslint": "8.20.0",
"vitest": "^3.0.3"
"typescript": "5.7.3",
"typescript-eslint": "8.21.0",
"vitest": "^3.0.4"
},
"lint-staged": {
"*.{js,mjs,ts}": "eslint --cache",
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.12.6",
"version": "8.12.7",
"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.12.6",
"version": "8.12.7",
"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.12.6",
"@lwc/shared": "8.12.6",
"@lwc/errors": "8.12.7",
"@lwc/shared": "8.12.7",
"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.12.6",
"version": "8.12.7",
"description": "LWC compiler",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,17 +46,17 @@
}
},
"dependencies": {
"@babel/core": "7.26.0",
"@babel/core": "7.26.7",
"@babel/plugin-transform-async-generator-functions": "7.25.9",
"@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.12.6",
"@lwc/errors": "8.12.6",
"@lwc/shared": "8.12.6",
"@lwc/ssr-compiler": "8.12.6",
"@lwc/style-compiler": "8.12.6",
"@lwc/template-compiler": "8.12.6"
"@lwc/babel-plugin-component": "8.12.7",
"@lwc/errors": "8.12.7",
"@lwc/shared": "8.12.7",
"@lwc/ssr-compiler": "8.12.7",
"@lwc/style-compiler": "8.12.7",
"@lwc/template-compiler": "8.12.7"
}
}
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.12.6",
"version": "8.12.7",
"description": "Core LWC engine APIs.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"dependencies": {
"@lwc/features": "8.12.6",
"@lwc/shared": "8.12.6",
"@lwc/signals": "8.12.6"
"@lwc/features": "8.12.7",
"@lwc/shared": "8.12.7",
"@lwc/signals": "8.12.7"
},
"devDependencies": {
"observable-membrane": "2.0.0"
Expand Down
10 changes: 9 additions & 1 deletion packages/@lwc/engine-core/src/framework/decorators/wire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ export default function wire<
Class = LightningElement,
>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
adapter: WireAdapterConstructor<ReplaceReactiveValues<ReactiveConfig, Class>, Value, Context>,
adapter:
| WireAdapterConstructor<ReplaceReactiveValues<ReactiveConfig, Class>, Value, Context>
| {
adapter: WireAdapterConstructor<
ReplaceReactiveValues<ReactiveConfig, Class>,
Value,
Context
>;
},
// eslint-disable-next-line @typescript-eslint/no-unused-vars
config?: ReactiveConfig
): WireDecorator<Value, Class> {
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.12.6",
"version": "8.12.7",
"description": "Renders LWC components in a DOM environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,9 +46,9 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.12.6",
"@lwc/shared": "8.12.6",
"@lwc/features": "8.12.6"
"@lwc/engine-core": "8.12.7",
"@lwc/shared": "8.12.7",
"@lwc/features": "8.12.7"
},
"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.12.6",
"version": "8.12.7",
"description": "Renders LWC components in a server environment.",
"keywords": [
"lwc"
Expand Down Expand Up @@ -46,10 +46,10 @@
}
},
"devDependencies": {
"@lwc/engine-core": "8.12.6",
"@lwc/rollup-plugin": "8.12.6",
"@lwc/shared": "8.12.6",
"@lwc/features": "8.12.6",
"@lwc/engine-core": "8.12.7",
"@lwc/rollup-plugin": "8.12.7",
"@lwc/shared": "8.12.7",
"@lwc/features": "8.12.7",
"@rollup/plugin-virtual": "^3.0.2",
"parse5": "^7.2.1"
}
Expand Down
18 changes: 10 additions & 8 deletions packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { rollup } from 'rollup';
import lwcRollupPlugin from '@lwc/rollup-plugin';
import { testFixtureDir, formatHTML } from '@lwc/test-utils-lwc-internals';
import { setFeatureFlagForTest } from '../index';
import type { FeatureFlagName } from '@lwc/features/dist/types';
import type { RollupLwcOptions } from '@lwc/rollup-plugin';
import type * as lwc from '../index';

Expand Down Expand Up @@ -128,16 +129,17 @@ function testFixtures(options?: RollupLwcOptions) {
// the LightningElement. Therefor the compiled module should also be evaluated in the
// same sandbox registry as the engine.
const lwcEngineServer = await import('../index');
const module = (await import(compiledFixturePath)) as FixtureModule;

const features = module!.features ?? [];
features.forEach((flag) => {
lwcEngineServer!.setFeatureFlagForTest(flag, true);
});

let result;
let err;
let features: FeatureFlagName[] = [];
try {
const module = (await import(compiledFixturePath)) as FixtureModule;

features = module!.features ?? [];
features.forEach((flag) => {
lwcEngineServer!.setFeatureFlagForTest(flag, true);
});
result = formatHTML(
lwcEngineServer!.renderComponent(
module!.tagName,
Expand All @@ -146,10 +148,10 @@ function testFixtures(options?: RollupLwcOptions) {
)
);
} catch (_err: any) {
if (_err.name === 'AssertionError') {
if (_err?.name === 'AssertionError') {
throw _err;
}
err = _err.message;
err = _err?.message || 'An empty error occurred?!';
}

features.forEach((flag) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<x-parent>
<template shadowrootmode="open">
<x-child>
<template shadowrootmode="open">
const setter getter api value
</template>
</x-child>
<x-child>
<template shadowrootmode="open">
setter getter api value
</template>
</x-child>
</template>
</x-parent>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-parent';
export { default } from 'x/parent';
export * from 'x/parent';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
{setterGetterApi}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { LightningElement, api } from 'lwc';

export default class Child extends LightningElement {
set setterGetterApi(value) {
this._someApi = value;
}

@api
get setterGetterApi() {
return this._someApi;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<template>
<x-child setter-getter-api="const setter getter api value"></x-child>
<x-child setter-getter-api={setterGetterApiValue}></x-child>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class Parent extends LightningElement {
setterGetterApiValue = 'setter getter api value';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LWC1112: @api get setterGetterApi and @api set setterGetterApi detected in class declaration. Only one of the two needs to be decorated with @api.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-parent';
export { default } from 'x/parent';
export * from 'x/parent';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
{setterGetterApi}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LightningElement, api } from 'lwc';

export default class Child extends LightningElement {
@api
set setterGetterApi(value) {
this._someApi = value;
}

@api
get setterGetterApi() {
return this._someApi;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<template>
<x-child setter-getter-api="const setter getter api value"></x-child>
<x-child setter-getter-api={setterGetterApiValue}></x-child>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class Parent extends LightningElement {
setterGetterApiValue = 'setter getter api value';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<x-parent>
<template shadowrootmode="open">
<x-child>
<template shadowrootmode="open">
const setter getter api value
</template>
</x-child>
<x-child>
<template shadowrootmode="open">
setter getter api value
</template>
</x-child>
</template>
</x-parent>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-parent';
export { default } from 'x/parent';
export * from 'x/parent';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
{setterGetterApi}
</template>
Loading