Update dependency lit-html to v3
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| lit-html (source) | ^1.1.0 β ^1.1.0 || ^3.0.0 |
||
| lit-html (source) | 1.1.0 β 3.3.2 |
Release Notes
lit/lit (lit-html)
v3.3.2
Patch Changes
-
#β5044
0d0170e87b06edd8295a31893c820162d0f16a23Thanks @βava-cassiopeia! - Make ClassInfo mutable -
#β5064
bc2926eb99a97ef4efb7eefbe133d6a33f216e18Thanks @βbrysonbw! - AddSVGElementto therender()container type, allowing SVG elements to be used as render roots without type errors. -
#β5035
c36626b8018ca78a47e61abdfa5b5904bed06843- Make some of our directives generic, so that their DirectiveResult types capture everything needed to infer their render types. This is useful in template type checking.
v3.3.1
Patch Changes
-
#β4988
6792b7efThanks @β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. -
#β4975
43a3f4dc- Remove some redundant code from removePart()
v3.3.0
Minor Changes
-
#β4901
c9160405Thanks @β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.
Patch Changes
-
#β4956
0a9bc720Thanks @βlouis-bompart! - Import barrels explicitly for compatibility with modern Node resolution w/ ESM
v3.2.1
Patch Changes
-
#β4782
99703a03- Revert the Terser plugin for Rollup torollup-plugin-terserfrom@rollup/plugin-terserdue to a bug that prevented our minified name prefixing from working.
v3.2.0
Minor Changes
v3.1.4
Patch Changes
-
#β4646
abf30b3e- The value provided by theref()directive will always beundefinedwhen the element is disconnected.
v3.1.3
Patch Changes
v3.1.2
Patch Changes
-
#β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. -
#β4515
dca963f7- Fix a memory leak when patching directive constructors for SSR.
v3.1.1
Patch Changes
v3.1.0
Minor Changes
-
#β4309
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.
v3.0.2
Patch Changes
-
#β4345
02b8d620- Add a dev mode warning if a static value such asliteralorunsafeStaticis detected within the non-statichtmltag function. These should only be used with the statichtmltag function imported fromlit-html/static.jsorlit/static-html.js.
v3.0.1
Patch Changes
-
#β4240
edf998c9Thanks @βremziatay! - Improved the type inferece of thechoose()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 yourvaluemight be missing a valid case in the union. -
#β4310
8f674ab3Thanks @βmegheaiulian! - Thewhen()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.
v3.0.0
Major Changes
-
#β3765
92cedaa2- Remove experimental hydrate modules. These are available from@lit-labs/ssr-client. -
#β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
Patch Changes
v2.8.0
Minor Changes
-
#β3993
e2c50569- Fix return type ofisTemplateResulthelper to include theCompiledTemplateResultand fix thecachedirective to work correctly withCompiledTemplateResults. Also add an explicitisCompiledTemplateResulthelper.
v2.7.5
Patch Changes
-
#β3968
5bb40831- Allow undefined to be passed to the ref() directive -
#β3987
bb2560f1- Change thehfield ofCompiledTemplates to aTemplateStringsArraypreventing the spoofing ofCompiledTemplates 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.
v2.7.4
Patch Changes
-
#β3888
0f30e6fb- Fix a memory leak cause by lit-html's shared TreeWalker holding a reference to the last tree it walked.
v2.7.3
Patch Changes
-
#β3825
343187b1-static-htmlno longer adds an item toTemplateResult's value array for the last consumed static value. This fixes an error with server-side rendering of static html. -
#β3766
4431cbb8- Fix styleMap initial render of mixed-case custom props
v2.7.2
Patch Changes
v2.7.1
Patch Changes
-
#β3768
7c1191da- Fix styleMap's handling of important flags -
#β3720
575fb578-lit-html/experimental-hydrate.jsandlit-element/experimental-hydrate-support.jshave been moved to@lit-labs/ssr-client.The modules in the original location have been marked deprecated and will be removed in a future version.
v2.7.0
Minor Changes
-
#β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/ssrandlit-htmlmust be updated together.
Patch Changes
-
#β3615
4d698430- Don't throw inChildPart.parentNodeif theparentNodeis null -
#β3583
88a40177- [SSR only] Add more detail to some hydration errors
v2.6.1
Patch Changes
-
#β3526
65e56655- Disable ShadyDOM noPatch in Node dev build. This fixes the issue of throwing due to undefinedwindow.
v2.6.0
Minor Changes
-
#β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-shimpackage has been introduced, which exports anHTMLElement,CustomElementRegistry, and defaultcustomElementssingleton.The existing
@lit-labs/ssrglobal DOM shim can still be used, and is compatible with the new package, because@lit-labs/ssrimports from@lit-labs/ssr-dom-shim. Importing the global DOM shim adds more APIs to the global object, such as a globalHTMLElement,TreeWalker,fetch, and other APIs. It is recommended that users try to remove usage of the@lit-labs/ssrDOM shim, and instead rely on the more minimal, automatic shimming that@lit/reactive-elementnow provides automatically.
v2.5.0
Minor Changes
-
#β3507
b152db29-lit-htmlandreactive-elementnow include development Node builds with unminified code and dev warnings.
v2.4.0
Minor Changes
-
#β3318
21313077- Adds anisServervariable export tolitandlit-html/is-server.jswhich will betruein Node andfalsein the browser. This can be used when authoring components to change behavior based on whether or not the component is executing in an SSR context.
v2.3.1
Patch Changes
v2.3.0
Minor Changes
-
#β3156
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.
Patch Changes
-
#β3003
daddeb34- Lit'sasync-directivenow re-exports everything from thedirectivemodule. -
#β3199
0725fdb4- In DEV_MODE, render a warning instead of rendering a template's host in the template.Most commonly this would happen when rendering
${this}in a LitElement's template, which has the counterintuitive behavior of removing the element from the DOM, because when rendering the element's template we attach it into its own shadow root, which removes it from the DOM, causing it simply disappear. This is especially problematic with a fast HMR system. -
#β3186
3766ae4c-StaticValueinterface type is now exported.
v2.2.7
Patch Changes
-
#β3130
1f0567f1- Export the underlying type of thekeyeddirective. -
#β3132
2fe2053f- Added "types" entry to package exports. This tells newer versions of TypeScript where to look for typings for each module.
v2.2.6
Patch Changes
v2.2.5
Patch Changes
-
#β2952
a78cc3b7- Fix SSR hydration bug relating to and other void elements having attribute bindings.
v2.2.4
Patch Changes
-
#β2847
79d82385- Fix typo in API docs for live() directive. -
#β2828
b3b6bc33- Remove private Lit 2 migration helpers:INTERNALandclearContainerForLit2MigrationOnly. This logic is no longer depended on.
v2.2.3
Patch Changes
-
#β2732
3e181bcb- Enforce use of file extensions in imports. Fixes an issue with older TypeScript compilers.
v2.2.2
Patch Changes
-
#β2657
a6069c40- Remove readonly restriction fromStyleInfointerface as addition, deletion, and updating of styles is valid. ExpandedstyleMapdocumentation with links to lit.dev. -
#β2642
badc532c- Add an additional security brand check to StaticValues; Similar to #β2307 -
#β2691
171143bd- Fixesrefbug when auto-bound class method used as a callback could incorrectly receiveundefined. -
#β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.
v2.2.1
Patch Changes
-
#β2635
ae358703- Make the event debug logger lazier, doing even less work (with no side effects) even in dev mode unless the page has opted in.
v2.2.0
Minor Changes
-
#β2401
2c9d0008- Added a devlog events system that may be used for debugging and visualizing Lit's internals.
v2.1.3
Patch Changes
-
#β2498
2a1dc7a1- Replace 'rare' with 'invalid' in svg tag function JSDocs. -
#β2459
23df9d45- Fix bindings inside ofelements -
#β2479
89560520- Expand JSDocs for thesvgtagged template literal (TTL). The new documentation makes it more clear that thesvgtag function should only be used for SVG fragments, and not for the<svg>HTML element.
v2.1.2
Patch Changes
-
#β2399
5ac025bf- Correct typo inasync-directivemodule comment -
#β2410
b9a6962b- Correct the link path of CONTRIBUTING.md in README.md files
v2.1.1
Patch Changes
v2.1.0
Minor Changes
Patch Changes
-
#β2307
221cb0a9- Added an additional check to prevent spoofing of internal lit types in data bindings.
v2.0.2
Patch Changes
-
#β2146
8bb33c88- Work around a Chrome bug with trusted types: https://crbug.com/993268
-
#β2236
5fc3818a- PreventpolyfillSupport.noPatchSupportedfrom implicitly beingany. Deduplicate types forDevMode-suffixed polyfill support functions.
v2.0.1
Patch Changes
v2.0.0
Major Changes
-
The
templateFactoryoption ofRenderOptionshas been removed. -
TemplateProcessorhas been removed. -
Symbols are not converted to a string before mutating DOM, so passing a Symbol to an attribute or text binding will result in an exception.
-
The
shady-rendermodule has been removed and is now part ofplatform-support, and Lit's polyfill support now adds the following limitations: (1) Bindings in style elements are no longer supported. Previously these could not change and in the future they may be supported via static bindings. (2)ShadyCSS.styleElementis no longer called automatically. This must be called whenever dynamic changes that affect styling are made that involve css custom property shimming (older browsers) or changes to custom properties used via the deprecated@applyfeature. It was previously called only on first render, and it is now up to the user to decide when this should be called. See Polyfills for more details. -
render()no longer clears the container it's rendered to. It now appends to the container by default. -
Expressions in comments are no longer rendered or updated. See Valid expression locations for more details.
-
Template caching happens per callsite, not per template-tag/callsize pair. This means some rare forms of highly dynamic template tags are no longer supported.
-
Arrays and other iterables passed to attribute bindings are not specially handled. Arrays will be rendered with their default toString representation. This means that
html`<div class=${['a', 'b']}>will render<div class="a,b">instead of<div class="a b">. To get the old behavior, usearray.join(' '). -
Multiple bindings in a single attribute value don't require the attribute value is quoted, as long as there is no whitespace or other attribute-ending character in the attribute value.
html`<div id=${a}-${b}>` -
The directive and part APIs are significantly different. See Custom Directives and the Upgrade Guide for more details.
-
The
Directivebase class anddirective()factory function are now exported from thelit-html/directive.jsmodule. -
NodeParthas been renamed toChildPart, along with other methods and variables that use the "Node" naming, likePartType.Nodewhich is nowPartType.CHILD. -
The part exports (
ChildPart,AttributePart, etc) have been change to interface-only exports. The constructors are no longer exported. Directive authors should use helpers indirective-helpers.jsto construct parts. -
The
eventContextrender option has been changed tohost. -
#β2103
15a8356d- Updates theexportsfield ofpackage.jsonfiles 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. -
#β1764
0b4d6eda- Don't allow classMap to remove static classes. This keeps classMap consistent with building a string out of the classnames to be applied.
Minor Changes
- Added
renderBeforeto render options. If specified, content is rendered before the node given via render options, e.g.{renderBefore: node}. - Added development mode, which can be enabled by setting the
developmentNode exports condition. See Development and production builds for more details. - All usage of
instanceofhas been removed, making rendering more likely to work when multiple instances of the library interact. - Template processing is more robust to expressions in places other than text and attribute values.
-
rendernow returns theChildPartthat was created/updated byrender. - Added
AsyncDirective, which is aDirectivesubclass whosedisconnectedcallback will be called when the part containing the directive is cleared (or transitively cleared by a Part higher in the tree) or manually disconnected using thesetConnectedAPI, and whosereconnectedcallback will be called when manually re-connected usingsetConnected. When implementingdisconnected, thereconnectedcallback should also be implemented to return the directive to a usable state. Note thatLitElementwill disconnect directives upon element disconnection, and re-connect directives upon element re-connection. See Async directives for more details. - Added
setConnected(isConnected: boolean)toChildPart; when called withfalse, thedisconnectedcallback will be run on any directives contained within the part (directly or transitively), but without clearing or causing a re-render to the tree. When called withtrue, any such directives'reconnectedcallback will be called prior to its nextupdate/rendercallbacks. Note thatLitElementwill call this method by default on the rendered part in itsconnectedCallbackanddisconnectedCallback. - Added the
static-htmlmodule, a statichtmltag function, aliteraltag function, andunsafeStatic(), which allows template authors to add strings to the static structure of the template, before it's parsed as HTML. See Static expressions for more details. - Added
lit-html/directive-helpers.jsmodule with helpers for creating custom directives. See Custom directives for more details. - Rendering
null,undefined, or empty string in aChildPartnow has the same affect as renderingnothing: it does not produce an empty text node. When rendering into an element with Shadow DOM, this makes it harder to inadvertently prevent<slot>fallback content from rendering. - Nested directives whose parent returns
noChangeare now unchanged. This allows theguarddirective to guard directive values (#β1519). - Added optional
creationScopetoRenderOptions, which controls the node from which the template is cloned from. - Added support for running with Trusted Types enforced.
Patch Changes
-
#β1922
8189f094- BindingnoChangeinto an interpolated attribute expression now no longer removes the attribute on first render - instead it acts like an empty string. This is mostly noticable when usinguntil()without a fallback in interpolated attributes.
-
#β2070
a48f39c8- Throw instead of rendering an innocuous value into a style or script when security hooks are enabled. -
#β2044
662209c3- Improves disconnection handling for first-partyAsyncDirectives (until,asyncAppend,asyncReplace) so that the directive (and any DOM associated with it) can be garbage collected before any promises they are awaiting resolve.
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - 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 these updates again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.