Skip to content

Releases: salesforce/lwc

v1.5.1

07 May 14:38
Compare
Choose a tag to compare

Internal

  • #1782: - build: Update to prettier@2.
  • #1797 - compiler: Revert "fix(compiler): force rollup to use named exports". Reverts #1752

v1.5.0

22 Apr 22:40
Compare
Choose a tag to compare

Improvements

  • #1395 - engine: A Lightning web component class can be used to register a custom element in the registry. This change introduces a new way to access the class constructor. This change also soft deprecates the previous method of creating the constructor.
class MyComponent extends LightningElement {
}

customElements.define('my-component', MyComponent.CustomElementConstructor);
  • #1459, #1823 - wire-service: Decouples the wire service from the LWC engine and implements the underlying reactive tracking for wired configuration and wired methods using the same reactivity system as LWC. See all the details in the wire reform decorator RFC.

Breaking changes

  • Current wire adapterIds defined as Symbol will be broken with this update.
    Upgrade path to LWC v1.5.0:
export const adapterId = Symbol('AdapterId');

// should change to:

export const adapterId = () => {
    throw new Error("Imperative use is not supported. Use @wire(adapterId)");
}; 

Bug Fixes

  • #1793 - synthetic-shadow: Fixed an issue where invoking Node.prototype.contains() on the same node was returning false.
  • #1794 - engine: Fixed an issue where slotted content became invisible during a subsequent re-rendering of the slot receiver.
  • #1819 - integration-karma: Disabled two test cases related to AOM property reflection due to browser bugs.

Internal

  • #1785: Various documentation typo fixes.
  • #1786 - (synthetic-shadow): Reverts #1754
  • #1796, #1825 : Routine dependency updates.
  • #1828 - engine: When a component class has been marked to have a circular reference, use the constructor after resolving the circular reference.

Security

v1.4.0

21 Apr 20:55
Compare
Choose a tag to compare

New Feature

  • #1602 - module-resolver: Synchronously resolve an LWC module from its specifier. The API is available via the @lwc/module-resolver package. The resolver algorithm and design can be found in this RFC.

API

resolveModule(specifier, importer, options)

Example

import { resolveModule } from '@lwc/module-resolver';

const result = resolveModule('x-foo', './index.js');
console.log(result);

Improvements

  • #1752 - compiler: With this change, bundled output of the @lwc/compiler uses named exports. (This change was reverted in v1.5.1.)

Internal

  • #1777 - chore: Routine dependency updates.
  • #1779 - chore: Remove unused files.
  • #1783 - integration-karma: Increases test coverage threshold.

v1.3.12

17 Apr 18:25
Compare
Choose a tag to compare

Internal

  • #1486 - engine: Remove platform-specific instrumentation infrastructure in favor of a future implementation that doesn't live in LWC.
  • #1774, #1775: Update dependencies to resolve Github security alerts.

v1.3.11

17 Apr 18:24
Compare
Choose a tag to compare

Internal
#1751 - engine: Decouple createElement from engine internals in preparation for the server-side rendering code split.

v1.3.10

17 Apr 18:24
Compare
Choose a tag to compare

Improvements

  • #1754 - synthetic-shadow: Remove polyfill that ensures the focusin and focusout events are composed, now that all supported browsers implement the correct behavior.
  • #1755 - synthetic-shadow: Remove polyfill that ensures the click event is composed, now that all supported browsers implement the correct behavior. Note that this change was reverted in v1.5.0 (#1786) since it was discovered that the issue still exists in an early version of Safari 12.

Internal

  • #1770: Enable lint rules for Jest and Jasmine tests.

v1.3.9

17 Apr 18:24
Compare
Choose a tag to compare

Bug fixes

  • #1756 - synthetic-shadow: Add polyfills for the copy, cut, and paste clipboard events to ensure that they are composed across all supported browsers. These events are currently non-composed in Firefox.

v1.3.8

17 Apr 18:23
Compare
Choose a tag to compare

Improvements

  • #1764 - style-compiler: This change modifies the way the compiler concatenates strings when producing the stylesheet by using Array.prototype.join('') instead of the + operator to avoid a RangeError: Maximum call stack size exceeded error thrown by Rollup. This processing is done to inject the tokens used for the shadow DOM emulation at runtime.

Internal

  • #1720 - wire-service: Perform stricter typescript checks by enabling the noImplicitAny compiler option.
  • #1753 - integration-karma: Migrate skipped tests from integration-tests to integration-karma.
  • #1765 - integration-karma: Clean up error boundary tests.

v1.3.7

11 Mar 00:52
Compare
Choose a tag to compare

Bug Fixes

  • #1762 - compiler: Use an updated version(1.32.1) of Rollup. This upgrade of Rollup safeguards the bundled component code while using dependencies with null prototype. More details on the Rollup issue can be found here.

Internal

  • #1760, #1759, #1758, #1757: Enforce strict typescript checks for theengine, template-compiler, module-resolver, and style-compiler packages.

v1.3.6

05 Mar 23:08
Compare
Choose a tag to compare

Bug Fixes

  • #1750 - compiler: This change disables the wrap_func_args terser output. This option breaks the regular expression used for module namespace mapping. On top of this, the latest JavaScript VMs already optimize for such a pattern and the function expression wrapping might actually hurt performance.

  • #1728 - wire-service: This change fixes an issue in which a wire adapter receives an incomplete config when the wire instance has 2 or more reactive parameters with the same head: { p1: '${head}.foo', p2: ${head}.bar }.

Internal