Update dependency lit-element to v3 #28
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.5.1
->3.0.0
Release Notes
lit/lit
v3.0.0
Compare Source
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 subpathfolder
mapping
syntax with an explicit list of all exported files.
The
/
-suffixed syntax for subpath folder mapping originally used in thesefiles 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
renderOptions
class field now exists onLitElement
and can be set/overridden to modify the options passed tolit-html
.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}
.development
Node exports condition. See Development and production builds for more details.Patch Changes
f43b811
- Don't publish src/ to npm.css
function now maintains a cache and will use a cached value if available when the same style text is requested.static get properties
on an undefined superclass with@property
on a subclasss ([#890]Property value incorrectly if using both of static properties() and @property decorator lit/lit-element#890));Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.