Packages

@lwc/errors

9.5.3 · 27 Oct 2026MIT384.1k / weekRepositoryHomepagenpmAtom feed

Your version

2.1.0

20 May 2021Where it was published

2.50.0 is the newest release of 2.x.

In short

2 breaking1 removed1 deprecated3 new2 fixed12 changed

  • breaking

    Breaking changes

  • breaking

    #2269 - template-compiler: Remove unused secure option. The functionality behind this option was already removed but the option itself was not removed until now because doing so would have made it a breaking change.

  • removed

    #2229 - compiler: Remove deprecated compile() method. Consumers should instead use the transform() or transformSync() APIs for transforming LWC files, or the @lwc/rollup-plugin for bundling LWC components.

  • deprecated

    #2286 - engine: Deprecate the @lwc/engine package. The contents of this package had been refactored into the @lwc/engine-dom package and has since existed only as an alias to @lwc/engine-dom.

Release note

Breaking changes

  • removed

    #2229 - compiler: Remove deprecated compile() method. Consumers should instead use the transform() or transformSync() APIs for transforming LWC files, or the @lwc/rollup-plugin for bundling LWC components.

  • deprecated

    #2286 - engine: Deprecate the @lwc/engine package. The contents of this package had been refactored into the @lwc/engine-dom package and has since existed only as an alias to @lwc/engine-dom.

  • #2226 - synthetic-shadow: Properly filter non-composed events. This change fixes a long-standing issue where non-composed bubbling events leak to listeners on standard HTML elements.

  • breaking

    #2269 - template-compiler: Remove unused secure option. The functionality behind this option was already removed but the option itself was not removed until now because doing so would have made it a breaking change.

Improvements

  • #2301 - engine-core: Add experimental support for components that don't use shadow roots.

  • #2301 - engine-core: Add support for rendering comments to the DOM. This feature can be enabled by adding lwc:preserve-comments to the root template tag or via the new preserveHtmlComments compiler option.

  • #2271 - engine-core: Reference LightningElement instead of BaseLightningElementConstructor when invoking toString() on host elements.

Bug Fixes

  • #2284 - synthetic-shadow: Discard duplicate event listeners on shadow roots and host elements.

  • #2287 - synthetic-shadow: Fix currentTarget for event listeners added to shadow roots. currentTarget now correctly references the shadow root instead of the host element.

  • #2320 - engine-core: Preserve original ids/fragments in light DOM by disabling synthetic shadow id scoping

  • #2328 - engine-core: Avoid adding synthetic shadow token to light DOM components

Revert

  • #2330 #2331 - synthetic-shadow: Disable by default Element.prototype.innerText patching

Internal

  • #2257 - babel-plugin-component: Remove all AST sub-traversals and streamline our decorator transform to enable the updating of @babel/core.

  • #2282 - integration-karma: Refactor event propagation tests.

  • #2275: Update git2gus parameter for 234 branch.

  • #2303 - integration-karma: Clean the DOM after between test runs.

  • #2292, #2294: Improve existing snapshot tests.

  • #2305 - integration-karma: Stabilize a test that flaps in Firefox.

  • #2302: Enforce import ordering using eslint-plugin-import.

  • #2303: Disable BEST performance runs.

  • #2294 - features: Add a feature flag for Light DOM feature.

  • #2306 - integration-karma: Add context to why a focus-related test might fail when running it locally.

  • #2278, #2307, #2311: Update dependencies.