NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3725 most downloaded on npm
A library for building fast, lightweight web components
Last release 4 months ago
14 May 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 48 of 48 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
58 releases · first in 2012
### Patch Changes - #5218 `be6b275035079db3239be4019c4f93c2b1f32428` Thanks @louis-bompart! - Ensure the ref directive disconnect gracefuly when its i
be6b275035079db3239be4019c4f93c2b1f32428 Thanks @louis-bompart! - Ensure the ref directive disconnect gracefuly when its internal ref is undefined.### Patch Changes - #5044 `0d0170e87b06edd8295a31893c820162d0f16a23` Thanks @ava-cassiopeia! - Make ClassInfo mutable - #4999 `6c174c8d0ed0230ba765d69
#5044 0d0170e87b06edd8295a31893c820162d0f16a23 Thanks @ava-cassiopeia! - Make ClassInfo mutable
#4999 6c174c8d0ed0230ba765d699591d933d7ab5d4bb - Fix a bug in change detection with decorated standard private accessors.
One column per quarter.
### Patch Changes - #4997 `aea85e24` - Update README - #4988 `6792b7ef` Thanks @ADNolan! - Adjusted the comparison to use the name property of the \_$
#4988 6792b7ef Thanks @ADNolan! - Adjusted the comparison to use the name property of the _$resolve function and the resolveOverrideFn in private ssr support to prevent duplicated patching of the directive class.
#4976 a126d8df - Fix minor regression in property converters. fromAttribute may return either null or undefined.
Updated dependencies \[`c9160405`, `3e2f87f6`, `4824c4ce`, `0a9bc720`]:
#4901 c9160405 Thanks @maxpatiiuk! - Dev mode warnings are now emitted on the next microtask after package import, allowing for a wider opportunity to suppress the warnings by consumers.
#4934 4824c4ce - Adds property option for useDefault. When set, the initial default value is not considered a change and does not reflect when reflect is set. In addition, when the attribute is removed, the default value is restored.
#4949 3e2f87f6 - fixes inconsistent initial changed properties values
#4956 0a9bc720 Thanks @louis-bompart! - Import barrels explicitly for compatibility with modern Node resolution w/ ESM
Updated dependencies [c9160405, 3e2f87f6, 4824c4ce, 0a9bc720]:
25962bf5 Thanks @kyubisation! - Implement SSR event handling and an optional flag globalThis.litSsrCallConnectedCallback to call connectedCallback during SSR, if set to true.25962bf5]:
### Patch Changes - #4782 `99703a03` - Revert the Terser plugin for Rollup to rollup-plugin-terser from @rollup/plugin-terser due to a bug that preven
Updated dependencies \[`feccc1ba`]:
011b762d - Add a server-only html function, to define templates that will only be rendered on the server.### Patch Changes - #4646 `abf30b3e` - The value provided by the ref() directive will always be undefined when the element is disconnected.
### Patch Changes - #4570 `bd881370` - Fix the lit-html marker length to be consistently 9 characters.
Updated dependencies \[`1a32b61e`, `57b00630`, `dca963f7`]:
#4523 1a32b61e - Add a DEV_MODE error to catch duplicate attribute bindings that otherwise create silent errors.
#4485 57b00630 - Add "browser" export condition entrypoints to any package.json files with "node"
export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the
"node" entrypoints instead of the browser code.
Updated dependencies [1a32b61e, 57b00630, dca963f7]:
### Patch Changes - #4409 `1af7991c` - asyncReplace correctly re-renders when value is unchanged (#4408) - #4473 `9a4d569f` - Add a warning in dev mod
Updated dependencies \[`949a5467`]:
949a5467 - Adds two new types: UncompiledTemplateResult and MaybeCompiledTemplateResult. Currently UncompiledTemplateResult is the same as TemplateResult, and MaybeCompiledTemplateResult is the union of the compiled and uncompiled types.#4387 bf551b5b - Ensure renderRoot exists before first update (#4268)
#4282 c7922a0c Thanks @MaxArt2501! - Fix a bug where accessing a @query decorated field with the cache flag set before the first update would result in null being cached permanently. null will no longer be cached before the first update and in DEV_MODE now raises a warning.
#4388 839ca0f8 - Fixes bug where adding or removing controllers during a reactive controller lifecycle would affect the execution of other controllers (#4266). Controllers can now be added/removed during lifecycle without affecting others.
Updated dependencies [949a5467]:
04c8d65a - Graduate @lit-labs/task to @lit/task, its permanent location. @lit-labs/task is now just a proxy for @lit/task, so code need not be duplicated in projects that depend on both.### Patch Changes - #4345 `02b8d620` - Add a dev mode warning if a static value such as literal or unsafeStatic is detected within the non-static html
### Patch Changes - #4240 `edf998c9` Thanks @remziatay! - Improved the type inferece of the choose() directive to properly restrict the case type infe
#4240 edf998c9 Thanks @remziatay! - Improved the type inferece of the choose() directive to properly restrict the case type inferred from provided value. Note: If this change creates a type error in your code, there must have been an unreachable case that can be removed, or the type of your value might be missing a valid case in the union.
#4310 8f674ab3 Thanks @megheaiulian! - The when() directive now calls the case functions with the provided condition value as an argument. This allows the narrowing of types for the condition value based on its truthiness when used as a parameter for the case function.
#4284 89a5b088 - Allow null to be in the type of @query() decorated fields
3be62b07 Thanks @mlcui-google! - Fix Task.render()'s return type always being undefinedMigrate deprecated usage with a selector argument to use @queryAssignedElements. E.g.: @queryAssignedNodes('list', true, '.item') to @queryAssignedEle…
#4146 0f6878dc - Generated accessor for reactive properties now wrap user accessors and automatically call this.requestUpdate() in the setter. As in previous versions, users can still specify noAccessor: true, in which case they should call this.requestUpdate() themselves in the setter if they want to trigger a reactive update.
#3765 92cedaa2 - Remove experimental hydrate modules. These are available from @lit-labs/ssr-client.
#3850 7e8491d4 - Delete deprecated queryAssignedNodes behavior and arguments.
Migrate deprecated usage with a selector argument to use
@queryAssignedElements. E.g.: @queryAssignedNodes('list', true, '.item') to
@queryAssignedElements({slot: '', flatten: false, selector: '.item'}).
#4254 1040f758 - Change the type of ReactiveElement.renderRoot and return type of ReactiveElement.createRenderRoot() to be HTMLElement | DocumentFragment to match each other and lit-html's render() method.
#3751 dfd747cf - Simplify lit-html attribute handling for standards-compliant browsers that iterate attributes in source order
#3750 c3e473b4 - Use toggleAttribute() to simplify boolean attribute parts
#4004 5beb5f9a - Adds the 'afterUpdate' option for autoRun to Task, and runs tasks by default in hostUpdate() instead of hostUpdated(). 'afterUpdate' is needed to run tasks dependent on DOM updates, but will cause multiple renders of the host element.
#4013 a5bf2507 - Add pluggable task args equality functions and deepArrayEquals. Breaking: this removes performTask() and shouldRun() protected methods.
Most users should no longer import directly from lit-element, and instead prefer importing LitElement from the lit packages. The default entry point for lit-element remains backward-compatible and includes all decorators. However, it's recommended to use import {LitElement} from 'lit'; and import decorators from lit/decorators as necessary. See the Upgrade Guide for more details.
UpdatingElement has been moved from the lit-element package to the @lit/reactive-element package and renamed to ReactiveElement. See the ReactiveElement API documentation for more details. In addition, the source for css-tag, and all decorators have been moved to @lit/reactive-element. However, all symbols are re-exported from both lit and lit-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) via createRenderRoot and support for static styles has moved from LitElement to ReactiveElement.
The createRenderRoot method is now called just before the first update rather than in the constructor. Element code can not assume the renderRoot exists before the element hasUpdated. This change was made for compatibility with SSR.
ReactiveElement's initialize method has been removed. This work is now done in the element constructor.
The static render has been removed.
For consistency, renamed _getUpdateComplete to getUpdateComplete.
When a property declaration is reflect: true and its toAttribute function returns undefined 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 in createRenderRoot. This method may be overridden to customize this behavior.
LitElement's static getStyles method has been renamed to static 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 the super 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 from lit/decorators/*.
lit-html has been updated to 2.x.
Support for running in older browsers has been removed from the default configuration. Import the platform-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 the updateComplete Promise.
Removed requestUpdateInternal. The requestUpdate method is now identical to this method and should be used instead.
#2103 15a8356d - Updates the exports field of package.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.
renderOptions class field now exists on LitElement and can be set/overridden to modify the options passed to lit-html.static shadowRootOptions for customizing shadowRoot options. Rather than implementing createRenderRoot, 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.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 subclass ([#890]https://github.com/Polymer/lit-element/issues/890));Updated dependencies \[`6b515e43`, `0f6878dc`, `2a01471a`, `2eba6997`, `d27a77ec`, `6470807f`, `09949234`]:
#4146 0f6878dc - Generated accessor for reactive properties now wrap user accessors and automatically call this.requestUpdate() in the setter. As in previous versions, users can still specify noAccessor: true, in which case they should call this.requestUpdate() themselves in the setter if they want to trigger a reactive update.
#4183 6470807f - Make the decorators work with the accessor keyword when experimentalDecorators is true.
Updated dependencies \[`be72f66b`, `dfd747cf`, `23c404fd`, `76795a18`, `1db01376`, `6f2833fd`, `c3e473b4`, `92cedaa2`, `7e8491d4`, `23326c6b`, `f06f79
#3751 dfd747cf - Simplify lit-html attribute handling for standards-compliant browsers that iterate attributes in source order
#3750 c3e473b4 - Use toggleAttribute() to simplify boolean attribute parts
#3765 92cedaa2 - Remove experimental hydrate modules. These are available from @lit-labs/ssr-client.
Updated dependencies \[`e2c50569`]:
### Patch Changes - #3968 `5bb40831` - Allow undefined to be passed to the ref() directive - #3969 `7d8d4a15` - Make RefOrCallback generic like Ref -
#3968 5bb40831 - Allow undefined to be passed to the ref() directive
#3987 bb2560f1 - Change the h field of CompiledTemplates to a TemplateStringsArray preventing the spoofing of CompiledTemplates by JSON injection attacks. This should not be a breaking change for most users unless you're using CompiledTemplates. This is a necessary security fix, similar to #2307.
### Patch Changes - #3917 `f6387e35` - Allow decorators to accept ReactiveElement class from a different source.
### Patch Changes - #3871 `308280eb` - remove test directory from npm publication
### Patch Changes - #3825 `343187b1` - static-html no longer adds an item to TemplateResult's value array for the last consumed static value. This fix
### Patch Changes - #3788 `88fe0390` - Allow numbers to be used as values in styleMap()
The modules in the original location have been marked deprecated and will be removed in a future version.
Note: @lit-labs/ssr and lit-html must be updated together.
#3677 b95c86e5 - [SSR only] Reflect ARIA attributes onto server rendered Lit elements with attached internals during SSR and remove them upon hydration.
#3667 e00f6f52 - [SSR only] Improved how nodes with attribute/property/event/element bindings are rendered in SSR, to avoid adding comments inside of "raw text elements" like <textarea>. Fixes #3663.
Note: @lit-labs/ssr and lit-html must be updated together.
### Patch Changes - #3526 `65e56655` - Disable ShadyDOM noPatch in Node dev build. This fixes the issue of throwing due to undefined window. - #3561 `
The new @lit-labs/ssr-dom-shim package has been introduced, which exports an HTMLElement, CustomElementRegistry, and default customElements singleton.
#3522 72fcf0d7 - When running in Node, Lit now automatically includes minimal DOM shims which are
sufficient for most SSR (Server Side Rendering) use-cases, removing the need to
import the global DOM shim from @lit-labs/ssr.
The new @lit-labs/ssr-dom-shim package has been introduced, which exports an HTMLElement, CustomElementRegistry, and default customElements singleton.
The existing @lit-labs/ssr global DOM shim can still be used, and is compatible with the new package, because @lit-labs/ssr imports from @lit-labs/ssr-dom-shim. Importing the global DOM shim adds more APIs to the global object, such as a global HTMLElement, TreeWalker, fetch, and other APIs. It is recommended that users try to remove usage of the @lit-labs/ssr DOM shim, and instead rely on the more minimal, automatic shimming that @lit/reactive-element now provides automatically.
72fcf0d7]:
Updated dependencies [`b152db29`]:
### Patch Changes - #3374 `bb098950` - Initializers added to subclasses are no longer improperly added to superclass.
Updated dependencies [`21313077`]:
### Patch Changes - #3222 `486739ec` - Fix CSSStyleSheet is not defined error that would occur when importing a Lit component in Node when both static
Updated dependencies [`daddeb34`, `0725fdb4`, `3766ae4c`, `6361a4b4`, `ae6f6808`]:
ae6f6808 - Lit and its underlying libraries can now be imported directly from Node without crashing, without the need to load the @lit-labs/ssr dom-shim library. Note that actually rendering from a Node context still requires the @lit-labs/ssr dom-shim, and the appropriate integration between @lit-labs/ssr and your framework/tool.Nothing published for this version
Nothing published for this version
### Patch Changes - #3130 `1f0567f1` - Export the underlying type of the keyed directive. - #3132 `2fe2053f` - Added "types" entry to package exports.
### Patch Changes - #2978 `634d4560` - Changed the caching behavior of the css`` template literal tag so that same-text styles do not share a CSSStyle
### Patch Changes - #2849 `b12e8d93` - Expand documentation for render and TemplateResult.
### Patch Changes - #2952 `a78cc3b7` - Fix SSR hydration bug relating to and other void elements having attribute bindings.
### Patch Changes - #2847 `79d82385` - Fix typo in API docs for live() directive. - #2828 `b3b6bc33` - Remove private Lit 2 migration helpers: INTERNA
### Patch Changes - #2732 `3e181bcb` - Enforce use of file extensions in imports. Fixes an issue with older TypeScript compilers. - #2688 `ef178ef6` -
### Patch Changes - #2657 `a6069c40` - Remove readonly restriction from StyleInfo interface as addition, deletion, and updating of styles is valid. Ex
#2657 a6069c40 - Remove readonly restriction from StyleInfo interface as addition, deletion, and updating of styles is valid. Expanded styleMap documentation with links to lit.dev.
#2642 badc532c - Add an additional security brand check to StaticValues; Similar to #2307
#2691 171143bd - Fixes ref bug when auto-bound class method used as a callback could incorrectly receive undefined.
#2661 9a3a38cd - Give a clearer error message when rendering into null/undefined
#2646 365cd09a - Clarify that hacking around the template strings array brand error can create security vulnerabilities.
### Patch Changes - #2635 `ae358703` - Make the event debug logger lazier, doing even less work (with no side effects) even in dev mode unless the pag
Updated dependencies [`2c9d0008`]:
### Patch Changes - #2518 `bbbf21d4` - Fix breaking change in the PropertyValues type. Make PropertyValues compatible with Map and other Map types. -
#2518 bbbf21d4 - Fix breaking change in the PropertyValues type. Make PropertyValues<any> compatible with Map<string, string> and other Map types.
#2526 a50d188a - Export PropertyValueMap such that JavaScript generated by Google Closure Compiler can reference this type. Do not directly import the PropertyValueMap interface.
Updated dependencies \[`57b00630`]:
57b00630 - Add "browser" export condition entrypoints to any package.json files with "node"
export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the
"node" entrypoints instead of the browser code.57b00630]:
#2498 2a1dc7a1 - Replace 'rare' with 'invalid' in svg tag function JSDocs.
#2482 6ea3d6c4 - Update the definition of the PropertyValues type to give better types to .get(k). .get(k) is now defined to return the correct type when using PropertyValues<this> and a parameter that's a key of the element class.
#2464 df4e1a46 - Fix type signature in queryAssignedNodes JSDoc code example.
#2479 89560520 - Expand JSDocs for the svg tagged template literal (TTL). The new documentation makes it more clear that the svg tag function should only be used for SVG fragments, and not for the <svg> HTML element.
#2457 48d69184 - Add JSDoc to the willUpdate lifecycle callback. Expand the docs for firstUpdated, and attributeChangedCallback. Minor code sample fixes.
### Patch Changes - #4340 `18305b43` - Update dependency version range on graduated package to ^1.0.0 so this package can receive updates.
#2399 5ac025bf - Correct typo in async-directive module comment
#2370 7453e365 - Replace square bracket links with the linkcode JSDoc tag.
Editors will create a jump to definition hyperlink for the linkcode tag if the identifier is in scope.
#2410 b9a6962b - Correct the link path of CONTRIBUTING.md in README.md files
Updated dependencies \[`3ac01aee`]:
### Minor Changes - #4901 `c9160405` Thanks @maxpatiiuk! - Dev mode warnings are now emitted on the next microtask after package import, allowing for
#4901 c9160405 Thanks @maxpatiiuk! - Dev mode warnings are now emitted on the next microtask after package import, allowing for a wider opportunity to suppress the warnings by consumers.
#4934 4824c4ce - Adds property option for useDefault. When set, the initial default value is not considered a change and does not reflect when reflect is set. In addition, when the attribute is removed, the default value is restored.
5a60fbc6 Thanks @rivajunior! - export Options interface49ecf623 - Add queryAssignedElements decorator for a declarative API that calls HTMLSlotElement.assignedElements() on a specified slot. selector option allows filtering returned elements with a CSS selector.### Patch Changes - #4299 `fffa4406` - Update version range for lit dependency to include v2 (and/or @lit/reactive-element v1). This allows projects s
#4387 bf551b5b - Ensure renderRoot exists before first update (#4268)
#4282 c7922a0c Thanks @MaxArt2501! - Fix a bug where accessing a @query decorated field with the cache flag set before the first update would result in null being cached permanently. null will no longer be cached before the first update and in DEV_MODE now raises a warning.
#4388 839ca0f8 - Fixes bug where adding or removing controllers during a reactive controller lifecycle would affect the execution of other controllers (#4266). Controllers can now be added/removed during lifecycle without affecting others.
### Patch Changes - #4520 `89c5bdfb` - Update typescript dependency
### Major Changes - #3850 `7e8491d4` - Remove transform for deprecated usage of queryAssignedNodes. - #4141 `6b515e43` - Update TypeScript to ~5.2.0,
#4146 0f6878dc - Generated accessor for reactive properties now wrap user accessors and automatically call this.requestUpdate() in the setter. As in previous versions, users can still specify noAccessor: true, in which case they should call this.requestUpdate() themselves in the setter if they want to trigger a reactive update.
#4254 1040f758 - Change the type of ReactiveElement.renderRoot and return type of ReactiveElement.createRenderRoot() to be HTMLElement | DocumentFragment to match each other and lit-html's render() method.
#3850 7e8491d4 - Delete deprecated queryAssignedNodes behavior and arguments.
Migrate deprecated usage with a selector argument to use
@queryAssignedElements. E.g.: @queryAssignedNodes('list', true, '.item') to
@queryAssignedElements({slot: '', flatten: false, selector: '.item'}).
#4027 c28cb6ed - - [BREAKING] Removed deprecated call signature for createComponent() taking multiple arguments. A single option object must be passed in instead.
Example:
- createComponent(React, 'my-element', MyElement, {onfoo: 'foo'})
+ createComponent({
+ react: React,
+ tagName: 'my-element',
+ elementClass: MyElement,
+ events: {onfoo: 'foo'},
+ })
forwardRef rather than creating a class component. This removes an extra React component of the same name showing up in the component tree.LitElement, ReactiveElement, and lit-html). See the Migration Guide for more details.The /-suffixed syntax for subpath folder mapping originally used in these files is deprecated. Rather than update to the new syntax, this change repla…
#2103 15a8356d - Updates the exports field of package.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.
Updated dependencies [`ff0d1556`, `5768cc60`, `69389958`, `5fabe2b5`, `52a47c7e`, `5fabe2b5`, `5fabe2b5`, `5fabe2b5`, `f05be301`, `5fabe2b5`, `56e8efd
c8fe1d4 - For minified class fields on classes in lit libraries, added prefix to stable properties to avoid collisions with user properties.6938995 - Changed prefix used for minifying class field names on lit libraries to stay within ASCII subset, to avoid needing to explicitly set the charset for scripts in some browsers.Updated dependencies [ff0d1556, 5768cc60, 69389958, 5fabe2b5, 52a47c7e, 5fabe2b5, 5fabe2b5, 5fabe2b5, f05be301, 5fabe2b5, 56e8efd3, 662209c3, a791514b, 5fabe2b5]:
Changes below were based on the Keep a Changelog format. All changes above are generated automatically by Changesets.
<!-- PRs should document their user-visible changes (if any) in the Unreleased section, uncommenting the header as necessary. -->
<!-- ## [x.y.z] - YYYY-MM-DD --> <!-- ## Unreleased --> <!-- ### Changed --> <!-- ### Added --> <!-- ### Removed --> <!-- ### Fixed -->
### Changed - Updated dependencies
Experimental modules may undergo breaking changes within otherwise non-major releases.
hydrate and hydrate-support modules to experimental-hydrate and experimental-hydrate-support, respectively, to reflect their experimental nature. Experimental modules may undergo breaking changes within otherwise non-major releases.### Changed - Updated dependencies
### Major Changes - #4141 `6b515e43` - Update TypeScript to ~5.2.0
#4146 0f6878dc - Generated accessor for reactive properties now wrap user accessors and automatically call this.requestUpdate() in the setter. As in previous versions, users can still specify noAccessor: true, in which case they should call this.requestUpdate() themselves in the setter if they want to trigger a reactive update.
#4183 6470807f - Make the decorators work with the accessor keyword when experimentalDecorators is true.
So far status was writable which allowed for setting status of task form outside. Doing so did cause rendering of expected template but the task was b
#4552 4050cac6 Thanks @jrencz! - Make status of Task a readonly property
So far status was writable which allowed for setting status of task form outside. Doing so did cause rendering of
expected template but the task was becoming internally incoherent.
Now attempt to assign status will end up in throwing a TypeError.
7fc72f7b Thanks @stefanpearson! - When passing a ref callback to the Component, createComponent was previously intercepting it and wrapping it in an unbound function. This change memoizes the consumer ref with useCallback, to keep the reference stable and ensure it isn't invoked repeatedly on subsequent renders.#4329 df1980fe - Remove dependency on lit package. All implementation code only uses @lit/reactive-element. lit is moved to dev dependencies as it is still used for tests.
#4286 1fb7a108 - Fix erroneous description for the JSDoc on the @provide() decorator.
#4287 4edf9bc8 - Broaden the host type of context controllers and decorators to be compatible with Lit 2
### Major Changes - #4170 `04c8d65a` - Graduate @lit-labs/task to @lit/task, its permanent location. @lit-labs/task is now just a proxy for @lit/task,
@lit/reactive-element is a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes to LitElement (what was previously called UpdatingElement) into a separate package. LitElement now extends ReactiveElement to add lit-html rendering via the render() callback. See ReactiveElement API for more details.UpdatingElement has been renamed to ReactiveElement.updating-element package has been renamed to @lit/reactive-element.@internalProperty decorator has been renamed to @state._getUpdateComplete to getUpdateComplete.reflect: true and its toAttribute function returns undefined the attribute is now removed where previously it was left unchanged (#872).unhandledrejection event handler on window.renderRoot is now created when the element's connectedCallback is initially run.requestUpdateInternal. The requestUpdate method is now identical to this method and should be used instead.initialize method has been removed. This work is now done in the element constructor.static addInitializer for adding a function which is called with the element instance when is created. This can be used, for example, to create decorators which hook into element lifecycle by creating a reactive controller (#1663).connectedCallback, disconnectedCallback, willUpdate, update, and updated. To ensure it has access to the element lifecycle, a controller should be added in the element's constructor. To add a controller to the element, call addController(controller).removeController(controller) which can be used to remove a controller from a ReactiveElement.willUpdate(changedProperties) lifecycle method to UpdatingElement. This is called before the update method and can be used to compute derived state needed for updating. This method is intended to be called during server side rendering and should not manipulate element DOM.Your coding agent can read these notes before it upgrades. Set up the MCP server →