Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4789ee5
chore: bump meriyah to v7 (#5626)
jmsjtu Dec 10, 2025
63aa200
Merge branch 'master' into lwc-v9
wjhsf Dec 11, 2025
6bf6312
Merge branch 'master' into lwc-v9
wjhsf Dec 11, 2025
70e51c4
docs(engine-server): add deprecation notice to README (#5641)
wjhsf Dec 12, 2025
8544edb
feat(dist): publish packages as ESM rather than CJS @W-20496487 (#5639)
wjhsf Dec 12, 2025
4bc3c19
chore(deps): bump typescript to v6 (#5637)
wjhsf Dec 12, 2025
5f09abd
chore: enforce node v20 via `engines.node` @W-20496487 (#5636)
wjhsf Dec 15, 2025
957891d
chore(deps): bump deps
wjhsf Dec 15, 2025
8c1fa71
Merge branch 'master' into lwc-v9
wjhsf Dec 15, 2025
97f3688
chore: revert package.json `exports`
wjhsf Dec 16, 2025
c424706
test: update snapshots
wjhsf Dec 16, 2025
361d671
oops
wjhsf Dec 16, 2025
580232f
test: update snapshots
wjhsf Dec 16, 2025
d837945
test(perf): update perf-benchmarks to esm
wjhsf Dec 16, 2025
8a43896
docs: switch to ESM
wjhsf Dec 16, 2025
2a23a6f
chore: fix import
wjhsf Dec 16, 2025
0285b4d
chore(deps): revert bumps
wjhsf Dec 17, 2025
63e2331
oops
wjhsf Dec 17, 2025
f64072b
test: update TS version
wjhsf Dec 17, 2025
4d68a81
chore: prefer `node:` protocol (#5649)
wjhsf Dec 17, 2025
1719e3b
chore: replace duped issue number with open issue
wjhsf Dec 17, 2025
c31c614
chore: remove completed TODOs
wjhsf Dec 17, 2025
86d663b
feat(ts): use const to infer wire generics
wjhsf Dec 17, 2025
1af8586
test(types): fix tests broken by const inference
wjhsf Dec 17, 2025
b234b1d
Merge branch 'master' into lwc-v9
wjhsf Dec 18, 2025
d4461fe
feat(compiler): rename experimentalDynamicComponent to dynamicImports…
wjhsf Dec 18, 2025
9260671
feat: deprecate engine-server (#5654)
wjhsf Dec 18, 2025
ec61e68
Merge branch 'master' into lwc-v9
wjhsf Dec 18, 2025
3f56972
test(wtr): remove broken tests
wjhsf Dec 19, 2025
4026493
chore(deps): pin so ts version stops breaking test
wjhsf Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
module.exports = {
export default {
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default tseslint.config(
},
},
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
files: ['**/*.js', '**/*.mjs'],
...tseslint.configs.disableTypeChecked,
},

Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"type": "git",
"url": "https://github.com/salesforce/lwc.git"
},
"type": "module",
"scripts": {
"prepare": "husky && yarn build",
"lint": "eslint . --cache",
Expand All @@ -25,7 +26,7 @@
"test:ci": "vitest run --coverage",
"test:wtr": "nx test @lwc/integration-wtr",
"test:hydration": "nx test:hydration @lwc/integration-wtr",
"test:integration": "nx sauce @lwc/integration-wdio",
"test:wdio": "nx sauce @lwc/integration-wdio",
"test:performance": "nx test @lwc/perf-benchmarks",
"test:performance:best": "nx test:best @lwc/perf-benchmarks",
"test:performance:best:ci": "nx test:best:ci @lwc/perf-benchmarks",
Expand Down Expand Up @@ -72,7 +73,7 @@
"rollup": "^4.53.3",
"terser": "^5.44.1",
"tslib": "^2.8.1",
"typescript": "5.8.2",
"typescript": "6.0.0-dev.20251217",
"typescript-eslint": "8.50.0",
"vitest": "4.0.16"
},
Expand All @@ -87,9 +88,6 @@
"packages/lwc",
"playground"
],
"engines": {
"node": ">=10"
},
"volta": {
"node": "24.11.1",
"yarn": "1.22.22"
Expand Down
6 changes: 5 additions & 1 deletion packages/@lwc/aria-reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=16.6.0"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/@lwc/babel-plugin-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ This babel plugin does the following transform:
## Usage

```js
const babel = require('@babel/core');
const lwcPlugin = require('@lwc/babel-plugin-component');
import babel from '@babel/core';
import lwcPlugin from '@lwc/babel-plugin-component';

const source = `
import { LightningElement } from 'lwc';
Expand Down
6 changes: 5 additions & 1 deletion packages/@lwc/babel-plugin-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=16.6.0"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function transform(source: string, opts = {}) {
describe('fixtures', () => {
testFixtureDir<TestConfig>(
{
root: path.resolve(__dirname, 'fixtures'),
root: path.resolve(import.meta.dirname, 'fixtures'),
pattern: '**/actual.js',
ssrVersion: 2,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/babel-plugin-component/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import { basename, extname } from 'path';
import { basename, extname } from 'node:path';
import { addDefault, addNamed } from '@babel/helper-module-imports';
import { generateCustomElementTagName, getAPIVersionFromNumber } from '@lwc/shared';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const { code } = transformSync(source, filename, options);
- `name` (type: `string`, required) - name of the component, e.g. `foo` in `x/foo`.
- `namespace` (type: `string`, required) - namespace of the component, e.g. `x` in `x/foo`.
- `stylesheetConfig` (type: `object`, default: `{}`) - Deprecated. Ignored by compiler.
- `experimentalDynamicComponent` (type: `DynamicImportConfig`, default: `null`) - The configuration to pass to `@lwc/compiler`.
- `dynamicImports` (type: `DynamicImportConfig`, default: `null`) - The configuration to pass to `@lwc/compiler`.
- `experimentalDynamicDirective` (type: `boolean`, default: `false`) - The configuration to pass to `@lwc/template-compiler` to enable deprecated dynamic components.
- `enableDynamicComponents` (type: `boolean`, default: `false`) - The configuration to pass to `@lwc/template-compiler` to enable dynamic components.
- `outputConfig` (type: `object`, optional) - see below:
Expand Down
6 changes: 5 additions & 1 deletion packages/@lwc/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=16.6.0"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
11 changes: 5 additions & 6 deletions packages/@lwc/compiler/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ export interface TransformOptions {
namespace: string;
/** @deprecated Ignored by compiler. */
stylesheetConfig?: StylesheetConfig;
// TODO [#5031]: Unify dynamicImports and experimentalDynamicComponent options
/** Config applied in usage of dynamic import statements in javascript */
experimentalDynamicComponent?: DynamicImportConfig;
dynamicImports?: DynamicImportConfig;
// TODO [#3331]: deprecate and remove lwc:dynamic
/** Flag to enable usage of dynamic component(lwc:dynamic) directive in HTML template */
experimentalDynamicDirective?: boolean;
Expand Down Expand Up @@ -163,7 +162,7 @@ type OptionalTransformKeys =
| 'enableDynamicComponents'
| 'enableSyntheticElementInternals'
| 'experimentalDynamicDirective'
| 'experimentalDynamicComponent'
| 'dynamicImports'
| 'componentFeatureFlagModulePath'
| 'instrumentation';

Expand Down Expand Up @@ -246,9 +245,9 @@ function normalizeOptions(options: TransformOptions): NormalizedTransformOptions
},
};

const experimentalDynamicComponent: Required<DynamicImportConfig> = {
const dynamicImports: Required<DynamicImportConfig> = {
...DEFAULT_DYNAMIC_IMPORT_CONFIG,
...options.experimentalDynamicComponent,
...options.dynamicImports,
};

const apiVersion = getAPIVersionFromNumber(options.apiVersion);
Expand All @@ -258,7 +257,7 @@ function normalizeOptions(options: TransformOptions): NormalizedTransformOptions
...options,
stylesheetConfig,
outputConfig,
experimentalDynamicComponent,
dynamicImports,
apiVersion,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('instrumentation', () => {
`;
await transform(actual, 'foo.js', {
...BASE_TRANSFORM_OPTIONS,
experimentalDynamicComponent: {
dynamicImports: {
loader: '@custom/loader',
strictSpecifier: true,
},
Expand Down
3 changes: 1 addition & 2 deletions packages/@lwc/compiler/src/transformers/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export default function scriptTransform(
const {
isExplicitImport,
enableSyntheticElementInternals,
// TODO [#5031]: Unify dynamicImports and experimentalDynamicComponent options
experimentalDynamicComponent: dynamicImports,
dynamicImports,
outputConfig: { sourcemap },
enableLightningWebSecurityTransforms,
namespace,
Expand Down
5 changes: 2 additions & 3 deletions packages/@lwc/compiler/src/transformers/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function templateTransform(
options: NormalizedTransformOptions
): TransformResult {
const {
experimentalDynamicComponent,
dynamicImports,
// TODO [#3370]: remove experimental template expression flag
experimentalComplexExpressions,
preserveHtmlComments,
Expand All @@ -49,8 +49,7 @@ export default function templateTransform(
disableSyntheticShadowSupport,
experimentalErrorRecoveryMode,
} = options;
const experimentalDynamicDirective =
deprecatedDynamicDirective ?? Boolean(experimentalDynamicComponent);
const experimentalDynamicDirective = deprecatedDynamicDirective ?? Boolean(dynamicImports);

let result;
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/compiler/src/transformers/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import * as path from 'path';
import * as path from 'node:path';

import { isString } from '@lwc/shared';
import { TransformerErrors, generateCompilerError, invariant } from '@lwc/errors';
Expand Down
6 changes: 5 additions & 1 deletion packages/@lwc/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=16.6.0"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
18 changes: 9 additions & 9 deletions packages/@lwc/engine-core/src/framework/decorators/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const enum PropType {

interface PropCompilerDef {
config: PropType; // 0 m
type: string; // TODO [#1301]: make this an enum
type: string;
}
interface WireCompilerDef {
method?: number;
Expand Down Expand Up @@ -75,7 +75,7 @@ function validateObservedField(
const type = getClassDescriptorType(descriptor);
const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;

// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(message);
}
}
Expand All @@ -88,7 +88,7 @@ function validateFieldDecoratedWithTrack(
assertNotProd(); // this method should never leak to prod
if (!isUndefined(descriptor)) {
const type = getClassDescriptorType(descriptor);
// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(
`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`
);
Expand All @@ -103,7 +103,7 @@ function validateFieldDecoratedWithWire(
assertNotProd(); // this method should never leak to prod
if (!isUndefined(descriptor)) {
const type = getClassDescriptorType(descriptor);
// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
}
}
Expand All @@ -115,7 +115,7 @@ function validateMethodDecoratedWithWire(
) {
assertNotProd(); // this method should never leak to prod
if (isUndefined(descriptor) || !isFunction(descriptor.value) || isFalse(descriptor.writable)) {
// TODO [#3441]: This line of code does not seem possible to reach.
// TODO [#4450]: This line of code does not seem possible to reach.
logError(
`Invalid @wire ${methodName} field. The field should have a valid writable descriptor.`
);
Expand All @@ -132,7 +132,7 @@ function validateFieldDecoratedWithApi(
const type = getClassDescriptorType(descriptor);
const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;

// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(message);
}
}
Expand All @@ -145,7 +145,7 @@ function validateAccessorDecoratedWithApi(
assertNotProd(); // this method should never leak to prod
if (isFunction(descriptor.set)) {
if (!isFunction(descriptor.get)) {
// TODO [#3441]: This line of code does not seem possible to reach.
// TODO [#4450]: This line of code does not seem possible to reach.
logError(
`Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`
);
Expand Down Expand Up @@ -246,7 +246,7 @@ export function registerDecorators(
if (method === 1) {
if (process.env.NODE_ENV !== 'production') {
if (!adapter) {
// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(
`@wire on method "${fieldOrMethodName}": adapter id must be truthy.`
);
Expand All @@ -261,7 +261,7 @@ export function registerDecorators(
} else {
if (process.env.NODE_ENV !== 'production') {
if (!adapter) {
// TODO [#3408]: this should throw, not log
// TODO [#4450]: this should throw, not log
logError(
`@wire on field "${fieldOrMethodName}": adapter id must be truthy.`
);
Expand Down
8 changes: 4 additions & 4 deletions packages/@lwc/engine-core/src/framework/decorators/wire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ interface WireDecorator<Value, Class> {
* }
*/
export default function wire<
ReactiveConfig extends ConfigValue = ConfigValue,
Value = any,
Context extends ContextValue = ContextValue,
Class = LightningElement,
const ReactiveConfig extends ConfigValue = ConfigValue,
const Value = any,
const Context extends ContextValue = ContextValue,
const Class = LightningElement,
>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
adapter:
Expand Down
1 change: 0 additions & 1 deletion packages/@lwc/engine-core/src/framework/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,6 @@ function createKeyToOldIdx(
): Record<Key, number> {
const map: Record<Key, number> = {};

// TODO [#1637]: simplify this by assuming that all vnodes has keys
for (let j = beginIdx; j <= endIdx; ++j) {
const ch = children[j];
if (isVNode(ch)) {
Expand Down
6 changes: 5 additions & 1 deletion packages/@lwc/engine-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=16.6.0"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
Loading
Loading