Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Conversation

@renovate
Copy link

@renovate renovate bot commented Oct 18, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
lit-html (source) 0.10.2 -> 2.7.5 age adoption passing confidence

Release Notes

lit/lit (lit-html)

v2.7.5

Compare Source

Patch Changes
  • #​3968 5bb40831 - Allow undefined to be passed to the ref() directive

  • #​3969 7d8d4a15 - Make RefOrCallback generic like Ref

  • #​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.

v2.7.4

Compare Source

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

Compare Source

Patch Changes
  • #​3825 343187b1 - static-html no longer adds an item to TemplateResult'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

Compare Source

Patch Changes

v2.7.1

Compare Source

Patch Changes
  • #​3768 7c1191da - Fix styleMap's handling of important flags

  • #​3720 575fb578 - lit-html/experimental-hydrate.js and lit-element/experimental-hydrate-support.js have 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

Compare Source

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/ssr and lit-html must be updated together.

Patch Changes

v2.6.1

Compare Source

Patch Changes
  • #​3526 65e56655 - Disable ShadyDOM noPatch in Node dev build. This fixes the issue of throwing due to undefined window.

v2.6.0

Compare Source

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-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.

v2.5.0

Compare Source

Minor Changes
  • #​3507 b152db29 - lit-html and reactive-element now include development Node builds with unminified code and dev warnings.

v2.4.0

Compare Source

Minor Changes
  • #​3318 21313077 - Adds an isServer variable export to lit and lit-html/is-server.js which will be true in Node and false in 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

Compare Source

Patch Changes

v2.3.0

Compare Source

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's async-directive now re-exports everything from the directive module.

  • #​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 - StaticValue interface type is now exported.

v2.2.7

Compare Source

Patch Changes
  • #​3130 1f0567f1 - Export the underlying type of the keyed directive.

  • #​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

Compare Source

Patch Changes

v2.2.5

Compare Source

Patch Changes
  • #​2952 a78cc3b7 - Fix SSR hydration bug relating to and other void elements having attribute bindings.

v2.2.4

Compare Source

Patch Changes
  • #​2847 79d82385 - Fix typo in API docs for live() directive.

  • #​2828 b3b6bc33 - Remove private Lit 2 migration helpers: INTERNAL and clearContainerForLit2MigrationOnly. This logic is no longer depended on.

v2.2.3

Compare Source

Patch Changes
  • #​2732 3e181bcb - Enforce use of file extensions in imports. Fixes an issue with older TypeScript compilers.

v2.2.2

Compare Source

Patch Changes
  • #​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.

v2.2.1

Compare Source

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

Compare Source

Minor Changes
  • #​2401 2c9d0008 - Added a devlog events system that may be used for debugging and visualizing Lit's internals.

v2.1.3

Compare Source

Patch Changes
  • #​2498 2a1dc7a1 - Replace 'rare' with 'invalid' in svg tag function JSDocs.

  • #​2459 23df9d45 - Fix bindings inside of <title> elements

  • #​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.

v2.1.2

Compare Source

Patch Changes

v2.1.1

Compare Source

Patch Changes

v2.1.0

Compare Source

Minor Changes
  • #​2337 fcc2b3d0 - Add a keyed(key, value) directive that clears a part if the key changes.
Patch Changes
  • #​2307 221cb0a9 - Added an additional check to prevent spoofing of internal lit types in data bindings.

v2.0.2

Compare Source

Patch Changes
  • #​2236 5fc3818a - Prevent polyfillSupport.noPatchSupported from implicitly being any.
    Deduplicate types for DevMode-suffixed polyfill support functions.

v2.0.1

Compare Source

Patch Changes
  • #​2152 ba5e1391 - Replace dynamic name lookups for polyfill support functions with static names.

v2.0.0

Compare Source

Major Changes
  • The templateFactory option of RenderOptions has been removed.

  • TemplateProcessor has 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-render module has been removed and is now part of platform-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.styleElement is 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 @apply feature. 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, use array.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 Directive base class and directive() factory function are
    now exported from the lit-html/directive.js module.

  • NodePart has been renamed to ChildPart,
    along with other methods and variables that use the "Node" naming, like
    PartType.Node which is now PartType.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 in directive-helpers.js to construct parts.

  • The eventContext render option has been changed to host.

  • #​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.

  • #​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 renderBefore to 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 development Node exports condition. See Development and production builds for more details.
  • All usage of instanceof has 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.
  • render now returns the ChildPart that was created/updated by render.
  • Added AsyncDirective, which is a Directive subclass whose
    disconnected callback 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 the setConnected API, and whose reconnected callback
    will be called when manually re-connected using setConnected. When
    implementing disconnected, the reconnected callback should also be
    implemented to return the directive to a usable state. Note that LitElement
    will disconnect directives upon element disconnection, and re-connect
    directives upon element re-connection. See Async directives for more details.
  • Added setConnected(isConnected: boolean) to ChildPart; when called with
    false, the disconnected callback 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 with true, any such directives'
    reconnected callback will be called prior to its next update/render
    callbacks. Note that LitElement will call this method by default on the
    rendered part in its connectedCallback and disconnectedCallback.
  • Added the static-html module, a static html tag function, a literal tag function, and unsafeStatic(), 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.js module with helpers for creating custom directives. See Custom directives for more details.
  • Rendering null, undefined, or empty string in a ChildPart now has the same affect as rendering nothing: 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 noChange are now unchanged. This
    allows the guard directive to guard directive values (#​1519).
  • Added optional creationScope to RenderOptions, which controls the node from which the template is cloned from.
  • Added support for running with Trusted Types enforced.
Patch Changes
  • #​1922 8189f094 - Binding noChange into 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 using until() without a fallback in interpolated attributes.

  • #​1964 f43b811 - Don't publish src/ to npm.

  • #​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-party AsyncDirectives (until, asyncAppend, asyncReplace) so that the directive (and any DOM associated with it) can be garbage collected before any promises they are awaiting resolve.

v1.4.1

Compare Source

v1.4.0

Compare Source

v1.3.0

Compare Source

Changed
  • Set the "type" field in package.json to "module. (#​1146)
Added
  • Added support for Trusted Types. This support uses a policy named 'lit-html' for parsing the static parts of html literals, and ensures that we pass trusted type values through to the DOM when used in bindings. (#​1153)
  • Export the shadyTemplateFactory from lib/shady-render.js (#​1135)

v1.2.1

Compare Source

Fixed
  • Added TypeScript type declarations for older versions of TypeScript. We're currently testing back to TS 3.4. We can't commit to never breaking TypeScript builds, but we'll be supporting older versions as best we can.

v1.2.0

Compare Source

Added
  • Added unsafeSVG directive to bind SVG source inside SVGs. (#​304)
  • Added templateContent() directive for stamping out the contents of an HTML template into a text binding. (#​1058)
  • Added the live() directive. (#​877)
Fixed
  • Fixed a bug where classMap and styleMap directives wouldn't render mutated objects. (#​972)
  • Fixed a bug where ifDefined() would set an attribute even when the value didn't change. (#​890)
  • Change classMap directive to set classes correctly on SVGs (#​1070).

v1.1.2

Compare Source

Fixed
  • Fixed a bug where bindings in comments could be written as text in some cases. (#​926)

v1.1.1

Compare Source

Changed
  • render and shady-render now both accept any value that is renderable by NodePart. (#​910)

v1.1.0

Compare Source

Changed
  • Many small performance enhancements.
  • Private names are now named with a __ prefix (#​859).
Added
  • Setup continuous benchmarking with Tachometer (#​887).
Fixed
  • Prevent empty styles from causing exceptions or breaking rendering when using shady-render (#​760).
  • Primitive values in attributes are now always simply stringified, regardless of whether they are iterable. (#​830)
  • Adopt and upgrade template fragments after processing for parts (#​831).
  • Fixed bindings with attribute-like expressions preceeding them (#​855).
  • Fixed errors with bindings in HTML comments (#​882).

v1.0.0

Compare Source

Changed
Added
  • Global version of lit-html on window (#​790).
Fixed
  • Removed use of any outside of test code (#​741).

v0.14.0

Compare Source

Changed
  • until() can now take any number of sync or async arguments. (#​555)
  • guard() supports multiple dependencies. If the first argument to guard() is an array, the array items are checked for equality to previous values. (#​666)
  • Renamed classMap.js and styleMap.js files to kebab-case. (#​644)
Added
  • Added cache() directive. (#​646)
  • Removed Promise as a supposed node-position value type. (#​555)
  • Added a minimal <template> polyfill.
Removed
  • Removed the when() directive. Users may achieve similar behavior by wrapping a ternary with the cache() directive.
Fixed
  • Bound attribute names are rewritten to avoid IE/Edge removing SVG and style attributes. (#​640)
  • Ensure shady-render prepares styling for a scope before attaching child elements. (#​664)
  • Handle CSS Custom Variables in the styleMap directive. #​642)

v0.13.0

Compare Source

Changed
  • Directives are now defined by passing the entire directive factory function to directive(). (#​562)
Fixed
  • Fix issue on obscure browsers that do not accept event listener objects by using callback as event part listener (#​581)
  • Fix KeyFn and ItemTemplate types (#​570)
  • Don't use export * to workaround rollup bug (#​556)
  • eventContext is no longer used as the this value for event listener objects (object with a handleEvent method), as the object itself is supposed to be the this value. (#​576)

v0.12.0

Compare Source

Changed
  • Re-implemented repeat directive for better performance (#​501)
  • Updated TypeScript dependency to 3.1
  • render() now takes an options object as the third argument. (#​523)
Added
  • Event listeners are called with a configurable this reference, which is set via the eventContext option to render(). (#​523)
  • Support for event listener options, by passing the listener itself as both the second and third arguments to add/removeEventListener().

v0.11.4

Compare Source

Fixed
  • Fixed issues with shady-render introduced in 0.11.3 (#​504 and #​505).

v0.11.3

Compare Source

Changed
  • Moved upgrading of custom elements in template fragments to a common location in TemplateInstance (#​489)
  • Rewrite render() to reuse the logic in NodePart. render() now supports all the data types that NodeParts do. (#​491)
Fixed
  • Fixed bug when using the ShadyCSS @​apply` shim. (#​502)

v0.11.2

Compare Source

Added
  • Added classMap and styleMap directives (#​486)
Fixed
  • Fixed bug in asyncReplace when rerendering the same iterable (#​485)
  • Update properties before upgrading custom elements (#​455)
  • Cache the ShadyCSS version lookup (#​477)

v0.11.1

Compare Source

Changed
  • Eliminated a cycle in the module import graph (#​472)
  • Remove the default value for the templateProcessor parameter in TemplateResult#constuctor, making it a required parameter (#​472)

v0.11.0

Compare Source

Added
  • Added support for property, event, and boolean bindings to default syntax (#​398)
  • Added guard directive (#​438)
  • Added when directive (#​439)
Changed
  • Split implementation into multiple small modules and merged lit-html.js and core.js (#​436)
  • Moved directives into top-level directives/ directory (#​436)
  • Replaced PartCallback with TemplateProcessor (#​405)
  • Unified NodePart and AttributePart interfaces (#​400)
    • AttributePart#setValue() takes a single value
    • Part has separate setValue() and commit() phases
    • Added AttributeCommitter to commit attribute values once for multiple AttributeParts
Removed
  • Removed lit-extended.js (#​436)
Fixed
  • Render initial undefined values in attributes (#​377)
  • Handle case-sensitive attributes like viewBox correctly (#​376)
  • Support bindings in <template> elements (#​343)
  • Don’t break templates when HTML comments have bindings in them (#​446)
  • IE: Don't use Set() constructor arguments (#​401)
  • Handle forms as Node instead of iterable (#​404)
  • Update values after upgrading custom elements (#​385)
  • Dirty check primitive values passed to unsafeHTML() (#​384)
  • Handle forms as Node instead of iterable (#​404)
  • Upgrade disconnected custom elements before setting properties on them. (#​442)
  • Fix style attribute bindings in IE (#​448)

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 this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from e843e89 to 8006623 Compare March 7, 2022 14:59
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 8006623 to cbeadf6 Compare March 26, 2022 14:01
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from cbeadf6 to 39fd64d Compare April 6, 2022 18:51
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 39fd64d to 77afad3 Compare April 29, 2022 02:54
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 77afad3 to eb6b9bf Compare May 17, 2022 21:26
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from eb6b9bf to bfd9b83 Compare May 25, 2022 23:17
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from bfd9b83 to d5e467f Compare June 18, 2022 21:18
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from d5e467f to 60ec609 Compare September 25, 2022 11:47
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 60ec609 to dc48f4b Compare November 20, 2022 18:25
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from dc48f4b to 0820932 Compare March 16, 2023 10:05
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 0820932 to a15de36 Compare March 24, 2023 20:25
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from a15de36 to e3579d4 Compare April 17, 2023 12:22
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from e3579d4 to 5bb9b4e Compare May 28, 2023 10:29
@renovate renovate bot force-pushed the renovate/lit-html-2.x branch from 5bb9b4e to 7734fcb Compare July 6, 2023 01:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant