Skip to content

v9.0.0

Choose a tag to compare

@github-actions github-actions released this 03 Feb 17:56
· 98 commits to master since this release

Deprecations

  • @lwc/engine-server is deprecated and won't receive further updates. Consumers should update their code to use the replacement, @lwc/ssr-runtime.

Breaking Changes

  • The main export of each package is now ESM, rather than CommonJS.
    • Beginning with v9.0.3, for compatibility purposes a CJS bundle is published for each package in dist/index.cjs.
  • The experimentalDynamicComponent option in @lwc/compiler is renamed to dynamicImports, and is no longer experimental.
  • @lwc/babel-plugin-component no longer performs import deduplication, as rollup provides the same functionality.
    • This is not a breaking change for consumers of @lwc/rollup-plugin or components on the Salesforce platform. It only impacts direct consumers of @lwc/babel-plugin-component or @lwc/compiler.
  • The type definition for wire decorators is updated. The wire function now has three type parameters, rather than four. The Context parameter was not necessary, and has been removed. Additionally, invalid @wire usage now reports errors in the correct location. Some edge cases can result in false positive errors or false negatives.
    • Reactive properties in configs are type checked, but reactive property chains are not. For example, {id: "$bookId"} will be type checked, but {id: "$book.id"} will not (it will always be permitted).
    • Config values typed as string cannot provide type checking for reactive properties. For example, {str: "$notString"} will be permitted, even if notString is not a string property on the component.
    • To avoid unnecessarily large type unions, only objects can be used at the top level of a property chain. This excludes valid edge cases, like "$myString.length".
    • To avoid unnecessarily large type unions, properties from LightningElement are excluded. This excludes valid edge cases, like "$hostElement.childElementCount".
    • To avoid false positive errors, use a getter prop or a type assertion, such as "$myObj.myProp" as Component["myObj"]["myProp"].
    • For full details, view the pull request that introduced the change.

Other Changes

  • Packages now leverage engines.node to warn when using old versions of Node.js. The officially supported Node.js versions remain the LTS releases, currently v22 and v24.
  • Type definitions are now published using TypeScript v6.
  • All imports from Node's built-in modules now use the node: protocol.

Commits

  • test(wtr): refine exception cases to match updated behavior by @wjhsf in #5694
  • build(deps-dev): bump prettier from 3.8.0 to 3.8.1 in the lint group by @dependabot[bot] in #5690
  • build(deps): bump fast-xml-parser from 5.3.1 to 5.3.4 by @dependabot[bot] in #5693
  • chore: release LWC v9 by @wjhsf in #5635

Full Changelog: v8.28.2...v9.0.0