Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 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
Jump to file
Failed to load files.
Loading
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
9 changes: 5 additions & 4 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,9 +73,9 @@
"rollup": "^4.53.3",
"terser": "^5.44.1",
"tslib": "^2.8.1",
"typescript": "5.8.2",
"typescript-eslint": "8.47.0",
"vitest": "4.0.14"
"typescript": "~6.0.0-0",
"typescript-eslint": "8.48.1",
"vitest": "4.0.15"
},
"lint-staged": {
"*.{js,mjs,ts,only,skip}": "eslint --cache",
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/aria-reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/babel-plugin-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
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
8 changes: 7 additions & 1 deletion packages/@lwc/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/engine-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
25 changes: 3 additions & 22 deletions packages/@lwc/engine-server/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
# @lwc/engine-server

WARNING: This is an experimental package. It is subject to change, may be removed at any time,
and should be used at your own risk!
⚠️ This package is deprecated and has been replaced by [`@lwc/ssr-compiler`](https://www.npmjs.com/package/@lwc/ssr-compiler) and [`@lwc/ssr-runtime`](https://www.npmjs.com/package/@lwc/ssr-compiler).

This package can be used to render LWC components as strings in a server environment.
## Links

## Supported APIs

This package supports the following APIs.

### renderComponent()

This function renders a string-representation of a serialized component tree, given a tag name
and an LWC constructor. The output format itself is aligned with the [current leading
proposal][explainer], but is subject to change.

```js
import { renderComponent } from '@lwc/engine-server';
import LightningHello from 'lightning/hello';

const componentProps = {};
const serialized = renderComponent('lightning-hello', LightningHello, componentProps);
```

[explainer]: https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md
- [Server-Side Rendering guide](https://lwc.dev/guide/ssr)
8 changes: 7 additions & 1 deletion packages/@lwc/engine-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function compileFixture({
enableDynamicComponents: true,
enableLwcOn: true,
experimentalDynamicComponent: {
loader: path.join(__dirname, './utils/custom-loader.js'),
loader: path.join(import.meta.dirname, './utils/custom-loader.js'),
strictSpecifier: false,
},
modules: [
Expand Down Expand Up @@ -122,7 +122,7 @@ async function compileFixture({
function testFixtures(options?: RollupLwcOptions) {
testFixtureDir<FixtureConfig>(
{
root: path.resolve(__dirname, 'fixtures'),
root: path.resolve(import.meta.dirname, 'fixtures'),
ssrVersion: 1,
pattern: '**/config.json',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[7:13]: Unexpected token: '{'
[7:12-7:13]: Unexpected token: '{'
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type { RollupLog } from 'rollup';

// Compile a component to an HTML string, using the full LWC compilation pipeline
async function compileComponent(tagName: string, componentName: string) {
const modulesDir = path.resolve(__dirname, './modules');
const modulesDir = path.resolve(import.meta.dirname, './modules');
const componentPath = path.resolve(
modulesDir,
componentName,
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/@lwc/errors/src/__tests__/errors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('error validation', () => {
);
const expectedNextErrorCode = 1 + lastErrorCode;
const errorInfo = fs.readFileSync(
path.join(__dirname, '../compiler/error-info/index.ts'),
path.join(import.meta.dirname, '../compiler/error-info/index.ts'),
'utf-8'
);
const actualNextErrorCode = parseInt(errorInfo.match(/Next error code: (\d+)/)![1], 10);
Expand Down
8 changes: 7 additions & 1 deletion packages/@lwc/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
"url": "https://github.com/salesforce/lwc/issues"
},
"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"volta": {
"extends": "../../../package.json"
},
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +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 { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
import { join } from 'node:path';
import lwc from '@lwc/rollup-plugin';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
Expand All @@ -15,14 +14,12 @@ import serve from 'rollup-plugin-serve';
// Executing the script to ensure the tsconfig paths are up to date
await import('../../scripts/update-paths.js');

const __dirname = dirname(fileURLToPath(import.meta.url));

/** @type {import('rollup').RollupOptions} */
export default {
input: join(__dirname, 'main.ts'),
input: join(import.meta.dirname, 'main.ts'),

output: {
file: join(__dirname, 'dist/main.js'),
file: join(import.meta.dirname, 'dist/main.js'),
format: 'esm',
sourcemap: true,
},
Expand All @@ -35,10 +32,10 @@ export default {
}),
lwc(),
serve({
contentBase: __dirname,
contentBase: import.meta.dirname,
open: false,
port: process.env.PORT ?? 3000,
}),
livereload(join(__dirname, 'dist')),
livereload(join(import.meta.dirname, 'dist')),
],
};
1 change: 1 addition & 0 deletions packages/@lwc/integration-wdio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@lwc/integration-wdio",
"private": true,
"version": "8.26.1",
"type": "commonjs",
"scripts": {
"build": "node scripts/build.js",
"build:dev": "MODE=dev yarn build",
Expand Down
4 changes: 2 additions & 2 deletions packages/@lwc/integration-wdio/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const templates = require('../src/shared/templates.js');
const mode = process.env.MODE || 'dev';
const isProd = /prod/.test(mode);

const engineModeFile = require.resolve('@lwc/engine-dom/dist/index.js');
const shadowModeFile = require.resolve('@lwc/synthetic-shadow/dist/index.js');
const engineModeFile = require.resolve('@lwc/engine-dom');
const shadowModeFile = require.resolve('@lwc/synthetic-shadow');

const testSufix = '.test.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { DISABLE_STATIC_CONTENT_OPTIMIZATION, ENGINE_SERVER } from '../../helper

/** Code for the LWC SSR module. */
const LWC_SSR = readFileSync(
new URL(import.meta.resolve(ENGINE_SERVER ? '@lwc/engine-server' : '@lwc/ssr-runtime')),
new URL(
'index.cjs',
import.meta.resolve(ENGINE_SERVER ? '@lwc/engine-server' : '@lwc/ssr-runtime')
),
'utf8'
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const tagAlreadyUsedErrorMessage =

/** Fetches a text resource. */
async function getModuleCode(pkg) {
const res = await fetch(resolvePathOutsideRoot(`../${pkg}/dist/index.cjs.js`));
const res = await fetch(resolvePathOutsideRoot(`../${pkg}/dist/index.cjs`));
const code = await res.text();
// CommonJS code needs to have `exports` defined, so we wrap in an IIFE
// to provide it and to encapsulate the code.
Expand Down
Loading
Loading