Skip to content

Releases: salesforce/lwc

v1.6.0

19 May 01:59
Compare
Choose a tag to compare

Improvements

  • #1857 - engine: Remove the focus-event-composed polyfill. This issue is specific to the focus event. Firefox was fixed 2 years ago in version 61.

v1.5.4

19 May 01:59
Compare
Choose a tag to compare

Bug Fixes

  • #1856 - engine: Revert the click-event-composed polyfill. This issue is specific to Safari and was fixed in Safari 12.1 (released in March 2019). Based on user data, we're not ready to drop support for Safari 12.0.x.

v1.5.3

07 May 14:38
Compare
Choose a tag to compare

Improvements

  • #1838 - engine: Adds hasAttribute() on LightningElement. Fixes issue #1810.

Bug Fixes

  • #1789 - module-resolver: Fixes an issue in the module resolution where the symbolic links for NPM packages are automatically resolved.
  • #1852 - module-resolver: Validate ModuleRecord data type.
    With the new module-resolver, configuration passed to module-resolver and @lwc/rollup-plugin are expected to have an ModuleRecords object type. Prior configs where the ModuleRecord was a string throw an unhandled exception.

Internal

  • #1849 - module-resolver: Fix typo in README.
  • #1851: Update weekly dependencies.
  • #1853 - lwc-integration: Update dependencies.

v1.5.2

07 May 14:38
Compare
Choose a tag to compare

Improvements

  • #1838 - engine: Avoid multiple getComponentInternalDef lookups.
    Optimizes the createVM method by removing the need to look up the component definition for each invocation. All the invokers of createVM already have a handle for the component definition under construction. By passing the definition, each of the constructors to this method avoids an extra lookup to the def registry.

Bug Fixes

  • #1839 - wire-service: Fixes an issue in which when a wired field is modified from the component code, it doesn't trigger rehydration on the component.
  • #1842 - engine: Fixes cache definition for a constructor with a circular dependency.
    For a component constructor with a circular dependency, the definition gathered is being cached with the resolved constructor as the key. This becomes an issue when the unresolved constructor is reused the second time. The component def is recalculated unnecessarily.

Internal

  • #1837: Weekly dependencies update
  • #1830 - docs: Create README for lwc package

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.