Releases: salesforce/lwc
Releases · salesforce/lwc
v1.6.0
v1.5.4
v1.5.3
Improvements
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 anModuleRecords
object type. Prior configs where theModuleRecord
was a string throw an unhandled exception.
Internal
v1.5.2
Improvements
- #1838 - engine: Avoid multiple
getComponentInternalDef
lookups.
Optimizes thecreateVM
method by removing the need to look up the component definition for each invocation. All the invokers ofcreateVM
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
v1.5.1
v1.5.0
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
adapterId
s defined asSymbol
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 returningfalse
. - #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
- #1804: Fixed security advisory CVE-2020-7598.
v1.4.0
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
v1.3.12
v1.3.11
v1.3.10
Improvements
- #1754 - synthetic-shadow: Remove polyfill that ensures the
focusin
andfocusout
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.