Skip to content

Commit 4c06184

Browse files
wjhsfjmsjtudependabot[bot]
authored
chore: release LWC v9 (#5635)
* chore: bump meriyah to v7 (#5626) * build(deps): bump meriyah from 5.0.0 to 7.0.0 Bumps [meriyah](https://github.com/meriyah/meriyah) from 5.0.0 to 7.0.0. - [Release notes](https://github.com/meriyah/meriyah/releases) - [Changelog](https://github.com/meriyah/meriyah/blob/main/CHANGELOG.md) - [Commits](meriyah/meriyah@v5.0.0...v7.0.0) --- updated-dependencies: - dependency-name: meriyah dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix version bump errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(dist): publish packages as ESM rather than CJS @W-20496487 (#5639) * feat: change packages to type: module * chore: don't lint .cjs files we don't use them * chore: convert `module.exports` to `export default` * chore: replace `__dirname` with `import.meta.dirname` * chore: use .cjs extension * chore: rename test command to match package * revert(wdio): change back to commonjs * chore: convert script to esm * chore: change `main` entrypoint from CJS to ESM * fix(esm): misc changes to support ESM-first * fix: still use CJS for bundling * feat: add package.json `exports` * chore(deps): bump typescript to v6 (#5637) * chore: enforce node v20 via `engines.node` @W-20496487 (#5636) * chore(scripts): add engines.node to package.json validation * chore(package.json): add engines.node to packages * chore(engines): downgrade node to lowest version that works * chore(engines): downgrade node to lowest version that works * chore(engines): remove useless engines from root package.json * chore(deps): bump deps * chore: revert package.json `exports` breaks vitest and I don't want to spend any more time on this * test: update snapshots * oops * test: update snapshots * test(perf): update perf-benchmarks to esm * docs: switch to ESM * chore: fix import * chore(deps): revert bumps * oops * test: update TS version * chore: prefer `node:` protocol (#5649) * chore: replace duped issue number with open issue * chore: remove completed TODOs * feat(ts): use const to infer wire generics * test(types): fix tests broken by const inference * feat(compiler): rename experimentalDynamicComponent to dynamicImports (#5651) * feat: deprecate engine-server (#5654) * feat: remove engine-server from `lwc` barrel * chore: mark engine-server as private * test(ssr): move fixtures from engine-server to ssr-compiler * chore: fix deps again hopefully * test(wtr): remove broken tests feature was never implemented * chore(deps): pin so ts version stops breaking test * chore: bump version to v8.27.0 * chore: minor TS adjustments @W-20496487 (#5647) * chore(types): fiddle with types I enabled `isolatedDeclarations` and fixed everything that made sense. Fully enabling the flag requires creating explicit types for the error info objects in `@lwc/errors`, which would be tedious, so I skipped that and disabled the flag. I enabled `isolatedModules` and fixed everything that made sense. We can't use `const enum` with isolated modules, but we like them because they minify cleanly, so I skipped that and disabled the flag. I enabled `erasableSyntaxOnly` and fixed everything that made sense. We can't use `const enum` with isolated modules, but we like them because they minify cleanly, so I skipped that and disabled the flag. (I did replace our regular `enum` with objects.) * test: fix TS version assertion * chore: fix import * feat(babel-plugin-component): remove import dedupe (#5650) * feat: remove import dedupe it gets done at the rollup level * test(babel-plugin-component): update fixtures for no dedupe * feat(playground): allow arbitrary port * test(rollup): validate preserved import dedupe * Apply suggestion from @wjhsf * test(compiler): add import non-dedupe test * chore: oops a comma * Revert "feat: deprecate engine-server (#5654)" This reverts commit 9260671. * chore: revert change so file stays tree-shakeable * chore: remove CJS hack bundlers should be able to handle it by now and if not, we're ESM-first! * test(lwc): remove remnant of jest * chore(deps): dependency treadmill * Reapply "feat: deprecate engine-server (#5654)" This reverts commit 4d9ba66. * feat(wire): update type definition to make invalid config more obvious (#5660) * feat(wire): make type def more helpful but less complete Previously, `@wire(adapter,{config:value})` with an invalid `value` resulted in a confusing error reported on `adapter`, because the function inferred the config type and derived the adapter type. Now the function infers the adapter type and derives the config type. As a result, an invalid `value` correctly reports an error on `value`. It does so by augmenting the config with the $reactive prop strings that are available. However, due to recursive types, this list is potentially infinite. To provide utility but mitigate this, only top-level props are validated. Any chained property access (`$nested.prop`) validates that the top-level prop is an object, but allows any nested props, even if they are actually invalid. * feat(decorators): always throw helpful error * feat(wire): handle quirky edge case * test(wire): split wire types test into multiple files * test(types): update tests for @wire on methods * test(types): update tests for @wire on getters * test(types): update tests for @wire on setters * feat(wire): omit LightningElement methods from config type * fix(types): exclude `constructor` from wire reactive config expansions * fix(types): exclude functions from nested property chain unless they have props * test(decorators): message is thrown in prod, too * chore(wire): update jsdoc with caveats * chore(wire): update jsdoc with caveats and examples * docs(wire): doc feedback * chore: v8.28.0 * chore(deps): dependency treadmill --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: James Tu <jmsjtu@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 578de56 commit 4c06184

File tree

261 files changed

+1342
-1389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+1342
-1389
lines changed

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
7-
module.exports = {
7+
export default {
88
rules: {
99
'body-leading-blank': [1, 'always'],
1010
'footer-leading-blank': [1, 'always'],

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default tseslint.config(
189189
},
190190
},
191191
{
192-
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
192+
files: ['**/*.js', '**/*.mjs'],
193193
...tseslint.configs.disableTypeChecked,
194194
},
195195

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"type": "git",
88
"url": "https://github.com/salesforce/lwc.git"
99
},
10+
"type": "module",
1011
"scripts": {
1112
"prepare": "husky && yarn build",
1213
"lint": "eslint . --cache",
@@ -25,7 +26,7 @@
2526
"test:ci": "vitest run --coverage",
2627
"test:wtr": "nx test @lwc/integration-wtr",
2728
"test:hydration": "nx test:hydration @lwc/integration-wtr",
28-
"test:integration": "nx sauce @lwc/integration-wdio",
29+
"test:wdio": "nx sauce @lwc/integration-wdio",
2930
"test:performance": "nx test @lwc/perf-benchmarks",
3031
"test:performance:best": "nx test:best @lwc/perf-benchmarks",
3132
"test:performance:best:ci": "nx test:best:ci @lwc/perf-benchmarks",
@@ -49,7 +50,7 @@
4950
"@swc/core": "~1.15.10",
5051
"@swc/helpers": "~0.5.18",
5152
"@types/babel__core": "^7.20.5",
52-
"@types/node": "^22.19.1",
53+
"@types/node": "^22.19.5",
5354
"@vitest/coverage-v8": "4.0.17",
5455
"@vitest/eslint-plugin": "1.6.6",
5556
"@vitest/spy": "4.0.17",
@@ -72,7 +73,7 @@
7273
"rollup": "^4.55.2",
7374
"terser": "^5.46.0",
7475
"tslib": "^2.8.1",
75-
"typescript": "5.8.2",
76+
"typescript": "6.0.0-dev.20260112",
7677
"typescript-eslint": "8.53.1",
7778
"vitest": "4.0.17"
7879
},
@@ -87,9 +88,6 @@
8788
"packages/lwc",
8889
"playground"
8990
],
90-
"engines": {
91-
"node": ">=10"
92-
},
9391
"volta": {
9492
"node": "24.11.1",
9593
"yarn": "1.22.22"

packages/@lwc/aria-reflection/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@
2323
"url": "https://github.com/salesforce/lwc/issues"
2424
},
2525
"license": "MIT",
26+
"type": "module",
2627
"publishConfig": {
2728
"access": "public"
2829
},
30+
"engines": {
31+
"node": ">=16.6.0"
32+
},
2933
"volta": {
3034
"extends": "../../../package.json"
3135
},
32-
"main": "dist/index.cjs.js",
36+
"main": "dist/index.js",
3337
"module": "dist/index.js",
3438
"types": "dist/index.d.ts",
3539
"files": [

packages/@lwc/aria-reflection/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const ARIA_PROPERTIES = [
5757
'ariaValueNow',
5858
'ariaValueText',
5959
'role',
60-
];
60+
] as const;
6161

6262
for (const prop of ARIA_PROPERTIES) {
6363
const attribute = prop.replace(/^aria/, 'aria-').toLowerCase(); // e.g. ariaPosInSet => aria-posinset

packages/@lwc/babel-plugin-component/README.md

Lines changed: 2 additions & 2 deletions

packages/@lwc/babel-plugin-component/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919
"url": "https://github.com/salesforce/lwc/issues"
2020
},
2121
"license": "MIT",
22+
"type": "module",
2223
"publishConfig": {
2324
"access": "public"
2425
},
26+
"engines": {
27+
"node": ">=16.6.0"
28+
},
2529
"volta": {
2630
"extends": "../../../package.json"
2731
},
28-
"main": "dist/index.cjs.js",
32+
"main": "dist/index.js",
2933
"module": "dist/index.js",
3034
"types": "dist/index.d.ts",
3135
"files": [

packages/@lwc/babel-plugin-component/src/__tests__/fixtures/api-decorator/@api-setter-on-one-class-member-should-not-conflict-with-@api-getter-on-another/expected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { registerDecorators as _registerDecorators, LightningElement, registerComponent as _registerComponent } from "lwc";
1+
import { registerDecorators as _registerDecorators } from "lwc";
22
import _tmpl from "./test.html";
3+
import { LightningElement, registerComponent as _registerComponent } from 'lwc';
34
class Test extends LightningElement {
45
set first(value) {}
56
get first() {}

packages/@lwc/babel-plugin-component/src/__tests__/fixtures/api-decorator/does-not-throw-error-if-property-name-is-data/expected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { registerDecorators as _registerDecorators, LightningElement, registerComponent as _registerComponent } from "lwc";
1+
import { registerDecorators as _registerDecorators } from "lwc";
22
import _tmpl from "./test.html";
3+
import { LightningElement, registerComponent as _registerComponent } from "lwc";
34
class Test extends LightningElement {
45
data;
56
/*LWC compiler vX.X.X*/

packages/@lwc/babel-plugin-component/src/__tests__/fixtures/api-decorator/does-not-throw-if-property-name-prefixed-with-aria/expected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { registerDecorators as _registerDecorators, LightningElement, registerComponent as _registerComponent } from "lwc";
1+
import { registerDecorators as _registerDecorators } from "lwc";
22
import _tmpl from "./test.html";
3+
import { LightningElement, registerComponent as _registerComponent } from "lwc";
34
class Test extends LightningElement {
45
ariaDescribedBy;
56
/*LWC compiler vX.X.X*/

0 commit comments

Comments
 (0)