Update dependency lit-element to v3 - autoclosed
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
lit-element (source) | dependencies | major | ^2.3.1 -> ^3.0.0 |
Release Notes
lit/lit
v3.0.2
Patch Changes
-
#2236
5fc3818a
- PreventpolyfillSupport.noPatchSupported
from implicitly beingany
. Deduplicate types forDevMode
-suffixed polyfill support functions.
v3.0.1
Patch Changes
v3.0.0
Major Changes
-
Most users should no longer import directly from
lit-element
, and instead prefer importingLitElement
from thelit
packages. The default entry point forlit-element
remains backward-compatible and includes all decorators. However, it's recommended to useimport {LitElement} from 'lit';
and import decorators fromlit/decorators
as necessary. See the Upgrade Guide for more details. -
UpdatingElement
has been moved from thelit-element
package to the@lit/reactive-element
package and renamed toReactiveElement
. See the ReactiveElement API documentation for more details. In addition, the source forcss-tag
, and alldecorators
have been moved to@lit/reactive-element
. However, all symbols are re-exported from bothlit
andlit-element
packages. -
The
@internalProperty
decorator has been renamed to@state
. -
Errors that occur during the update cycle were previously squelched to allow subsequent updates to proceed normally. Now errors are re-fired asynchronously so they can be detected. Errors can be observed via an
unhandledrejection
event handler on window. -
The
lib
folder has been removed. -
Rendering of
renderRoot
/shadowRoot
) viacreateRenderRoot
and support forstatic styles
has moved fromLitElement
toReactiveElement
. -
The
createRenderRoot
method is now called just before the first update rather than in the constructor. Element code can not assume therenderRoot
exists before the elementhasUpdated
. This change was made for compatibility with SSR. -
ReactiveElement
'sinitialize
method has been removed. This work is now done in the element constructor. -
The static
render
has been removed. -
For consistency, renamed
_getUpdateComplete
togetUpdateComplete
. -
When a property declaration is
reflect: true
and itstoAttribute
function returnsundefined
the attribute is now removed where previously it was left unchanged (#872). -
The dirty check in
attributeChangedCallback
has been removed. While technically breaking, in practice it should very rarely be (#699). -
LitElement's
adoptStyles
method has been removed. Styling is now adopted increateRenderRoot
. This method may be overridden to customize this behavior. -
LitElement's
static getStyles
method has been renamed tostatic finalizeStyles
and now takes a list of styles the user provided and returns the styles which should be used in the element. If this method is overridden to integrate into a style management system, typically thesuper
implementation should be called. -
Removed build support for TypeScript 3.4.
-
Decorators are no longer exported from the
lit-element
module. Instead, import any decorators you use fromlit/decorators/*
. -
lit-html
has been updated to 2.x. -
Support for running in older browsers has been removed from the default configuration. Import the
polyfill-support
module to support Shady DOM. Note also that Lit parts inside<style>
elements are no longer supported. See Polyfills for more details. -
For simplicity,
requestUpdate
no longer returns a Promise. Instead await theupdateComplete
Promise. -
Removed
requestUpdateInternal
. TherequestUpdate
method is now identical to this method and should be used instead. -
#2103
15a8356d
- Updates theexports
field ofpackage.json
files to replace the subpath folder mapping syntax with an explicit list of all exported files.The
/
-suffixed syntax for subpath folder mapping originally used in these files is deprecated. Rather than update to the new syntax, this change replaces these mappings with individual entries for all exported files so that (a) users must import using extensions and (b) bundlers or other tools that don't resolve subpath folder mapping exactly as Node.js does won't break these packages' expectations around how they're imported.
Minor Changes
- A public
renderOptions
class field now exists onLitElement
and can be set/overridden to modify the options passed tolit-html
. - Adds
static shadowRootOptions
for customizing shadowRoot options. Rather than implementingcreateRenderRoot
, this property can be set. For example, to create a closed shadowRoot using delegates focus:static shadowRootOptions = {mode: 'closed', delegatesFocus: true}
. - Adds development mode, which can be enabled by setting the
development
Node exports condition. See Development and production builds for more details.
Patch Changes
-
#1964
f43b811
- Don't publish src/ to npm. - For efficiency, the
css
function now maintains a cache and will use a cached value if available when the same style text is requested. - Fixed reflecting a property when it is set in a setter of another property that is called because its attribute changed (#965).
- Fixed exceptions when parsing attributes from JSON (#722).
- Fixed issue with combining
static get properties
on an undefined superclass with@property
on a subclasss ([#890]https://github.com/Polymer/lit-element/issues/890));
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.