Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #3556

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Version Packages #3556

merged 1 commit into from
Jan 9, 2023

Conversation

lit-robot
Copy link
Member

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@lit-labs/eleventy-plugin-lit@1.0.0

Major Changes

  • #3522 72fcf0d7 - The Lit SSR global DOM shim is no longer automatically loaded when rendering Lit components from Eleventy. When paired with the latest version of Lit, the global DOM shim is no longer typically required, because Lit now automatically imports shimmed versions of needed APIs.

Patch Changes

@lit-labs/ssr@3.0.0

Major Changes

  • #3522 72fcf0d7 - ModuleLoader now provides a default VM global context object which provides basic globals that are available in both Node and browsers.

  • #3522 72fcf0d7 - The SSR dom shim will now throw if a custom element is redefined.

  • #3431 ff637f52 - The Lit SSR DOM shim no longer defines a global window variable. This was removed to improve compatibility with libraries that detect whether they are running in Node vs the browser by checking for the presence of window.

    If you have code that runs during SSR which depends on the presence of window, you can either replace window with globalThis, or use isSsr to avoid running that code on the server (see https://lit.dev/docs/ssr/authoring/#browser-only-code).

  • #3467 c77220e8 - Allow SSR renderers to produce asynchronous values. This is a BREAKING change.

    This changes the return type of render() and the ElementRenderer render methods to be a RenderResult, which is an iterable of strings or Promises and nested RenderResults.

    The iterable remains a sync iterable, not an async iterable. This is to support environments that require synchronous renders and because sync iterables are faster than async iterables. Since many server renders will not require async rendering, they should work in sync contexts and shouldn't pay the overhead of an async iterable.

    Including Promises in the sync iterable creates a kind of hybrid sync/async iteration protocol. Consumers of RenderResults must check each value to see if it is a Promise or iterable and wait or recurse as needed.

    This change introduces three new utilities to do this:

    • collectResult(result: RenderResult): Promise<string> - an async function that joins a RenderResult into a string. It waits for Promises and recurses into nested iterables.
    • collectResultSync(result: RenderResult) - a sync function that joins a RenderResult into a string. It recurses into nested iterables, but throws when it encounters a Promise.
    • RenderResultReadable - a Node Readable stream implementation that provides values from a RenderResult. This can be piped into a Writable stream, or passed to web server frameworks like Koa.

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.

  • #3522 72fcf0d7 - APIs such as attachShadow, setAttribute have been moved from the HTMLElement class shim to the Element class shim, matching the structure of the real API. This should have no effect in most cases, as HTMLElement inherits from Element.

Patch Changes

  • Updated dependencies [72fcf0d7]:
    • @lit-labs/ssr-dom-shim@1.0.0
    • @lit/reactive-element@1.6.0
    • lit-html@2.6.0
    • lit@2.6.0

@lit-labs/ssr-dom-shim@1.0.0

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

@lit-labs/testing@0.2.0

Minor Changes

  • #3522 72fcf0d7 - @lit-labs/testing no longer automatically loads the Lit SSR global DOM shim
    when performing SSR, instead relying on newer versions of Lit which automatically
    load necessary shims with minimal global pollution.

    This may cause new or different test failures, because APIs such as document
    will no longer be available on the server by default. Use isServer from the
    lit package to guard against calling such APIs during SSR (see
    https://lit.dev/docs/ssr/authoring/#browser-only-code for more information).

Patch Changes

lit@2.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-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.

Patch Changes

  • Updated dependencies [72fcf0d7]:
    • @lit/reactive-element@1.6.0
    • lit-html@2.6.0

lit-html@2.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-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.

@lit/reactive-element@1.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-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.

Patch Changes

  • Updated dependencies [72fcf0d7]:
    • @lit-labs/ssr-dom-shim@1.0.0

@lit/localize-tools@0.6.6

Patch Changes

  • #3514 78811714 - - Existing XLIFF files will be updated instead of re-generated, so additional data added by other processes (such as state="translated" attributes) will be preserved instead of deleted.
    • XLIFF <note> elements generated by Lit Localize will now have a from="lit-localize" attribute to distinguish them from other notes.
  • Updated dependencies [72fcf0d7]:
    • lit@2.6.0

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -4% - +3% (-0.91ms - +0.63ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 88.25ms - 94.65ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +5% (-1.05ms - +1.60ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -2% - +8% (-0.20ms - +1.02ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +3% (-1.04ms - +1.66ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +4% (-0.89ms - +2.50ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 875.54ms - 888.82ms
  • lit-html-kitchen-sink: unsure 🔍 -6% - +1% (-5.93ms - +0.77ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -3% - +1% (-9.40ms - +2.29ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +1% (-1.04ms - +1.95ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +0% (-9.79ms - +2.20ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 864.45ms - 872.27ms
  • reactive-element-list: unsure 🔍 -1% - +0% (-5.06ms - +3.75ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
88.25ms - 94.65ms-

update

VersionAvg timevs
875.54ms - 888.82ms-

update-reflect

VersionAvg timevs
864.45ms - 872.27ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.56ms - 34.72ms-unsure 🔍
-3% - +5%
-1.05ms - +1.60ms
unsure 🔍
-4% - +4%
-1.44ms - +1.29ms
tip-of-tree
tip-of-tree
32.60ms - 34.14msunsure 🔍
-5% - +3%
-1.60ms - +1.05ms
-unsure 🔍
-4% - +2%
-1.49ms - +0.79ms
previous-release
previous-release
32.88ms - 34.55msunsure 🔍
-4% - +4%
-1.29ms - +1.44ms
unsure 🔍
-2% - +4%
-0.79ms - +1.49ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
92.27ms - 96.53ms-unsure 🔍
-6% - +1%
-5.93ms - +0.77ms
unsure 🔍
-6% - +1%
-5.38ms - +1.37ms
tip-of-tree
tip-of-tree
94.40ms - 99.57msunsure 🔍
-1% - +6%
-0.77ms - +5.93ms
-unsure 🔍
-3% - +4%
-3.10ms - +4.26ms
previous-release
previous-release
93.78ms - 99.02msunsure 🔍
-1% - +6%
-1.37ms - +5.38ms
unsure 🔍
-4% - +3%
-4.26ms - +3.10ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
23.23ms - 24.36ms-unsure 🔍
-4% - +3%
-0.91ms - +0.63ms
unsure 🔍
-2% - +4%
-0.53ms - +0.87ms
tip-of-tree
tip-of-tree
23.41ms - 24.46msunsure 🔍
-3% - +4%
-0.63ms - +0.91ms
-unsure 🔍
-2% - +4%
-0.37ms - +0.98ms
previous-release
previous-release
23.21ms - 24.05msunsure 🔍
-4% - +2%
-0.87ms - +0.53ms
unsure 🔍
-4% - +2%
-0.98ms - +0.37ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.37ms - 13.16ms-unsure 🔍
-2% - +8%
-0.20ms - +1.02ms
unsure 🔍
-4% - +5%
-0.48ms - +0.60ms
tip-of-tree
tip-of-tree
11.89ms - 12.81msunsure 🔍
-8% - +1%
-1.02ms - +0.20ms
-unsure 🔍
-7% - +2%
-0.94ms - +0.24ms
previous-release
previous-release
12.34ms - 13.07msunsure 🔍
-5% - +4%
-0.60ms - +0.48ms
unsure 🔍
-2% - +8%
-0.24ms - +0.94ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
312.69ms - 321.18ms-unsure 🔍
-3% - +1%
-9.40ms - +2.29ms
unsure 🔍
-4% - -0%
-13.16ms - +0.04ms
tip-of-tree
tip-of-tree
316.47ms - 324.51msunsure 🔍
-1% - +3%
-2.29ms - +9.40ms
-unsure 🔍
-3% - +1%
-9.46ms - +3.45ms
previous-release
previous-release
318.44ms - 328.55msunsure 🔍
-0% - +4%
-0.04ms - +13.16ms
unsure 🔍
-1% - +3%
-3.45ms - +9.46ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
57.73ms - 59.51ms-unsure 🔍
-2% - +3%
-1.04ms - +1.66ms
unsure 🔍
-2% - +2%
-1.36ms - +1.15ms
tip-of-tree
tip-of-tree
57.30ms - 59.33msunsure 🔍
-3% - +2%
-1.66ms - +1.04ms
-unsure 🔍
-3% - +2%
-1.76ms - +0.94ms
previous-release
previous-release
57.84ms - 59.61msunsure 🔍
-2% - +2%
-1.15ms - +1.36ms
unsure 🔍
-2% - +3%
-0.94ms - +1.76ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
134.63ms - 136.99ms-unsure 🔍
-1% - +1%
-1.04ms - +1.95ms
unsure 🔍
-1% - +2%
-0.84ms - +2.13ms
tip-of-tree
tip-of-tree
134.44ms - 136.27msunsure 🔍
-1% - +1%
-1.95ms - +1.04ms
-unsure 🔍
-1% - +1%
-1.10ms - +1.47ms
previous-release
previous-release
134.27ms - 136.07msunsure 🔍
-2% - +1%
-2.13ms - +0.84ms
unsure 🔍
-1% - +1%
-1.47ms - +1.10ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
57.09ms - 59.41ms-unsure 🔍
-2% - +4%
-0.89ms - +2.50ms
unsure 🔍
-1% - +5%
-0.80ms - +2.71ms
tip-of-tree
tip-of-tree
56.22ms - 58.67msunsure 🔍
-4% - +2%
-2.50ms - +0.89ms
-unsure 🔍
-3% - +3%
-1.65ms - +1.95ms
previous-release
previous-release
55.98ms - 58.61msunsure 🔍
-5% - +1%
-2.71ms - +0.80ms
unsure 🔍
-3% - +3%
-1.95ms - +1.65ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
909.30ms - 917.99ms-unsure 🔍
-1% - +0%
-9.79ms - +2.20ms
unsure 🔍
-1% - +1%
-5.00ms - +6.10ms
tip-of-tree
tip-of-tree
913.30ms - 921.58msunsure 🔍
-0% - +1%
-2.20ms - +9.79ms
-unsure 🔍
-0% - +1%
-1.05ms - +9.74ms
previous-release
previous-release
909.64ms - 916.56msunsure 🔍
-1% - +1%
-6.10ms - +5.00ms
unsure 🔍
-1% - +0%
-9.74ms - +1.05ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
913.68ms - 919.13ms-unsure 🔍
-1% - +0%
-5.06ms - +3.75ms
unsure 🔍
-0% - +0%
-4.00ms - +3.55ms
tip-of-tree
tip-of-tree
913.60ms - 920.52msunsure 🔍
-0% - +1%
-3.75ms - +5.06ms
-unsure 🔍
-0% - +1%
-3.91ms - +4.76ms
previous-release
previous-release
914.02ms - 919.24msunsure 🔍
-0% - +0%
-3.55ms - +4.00ms
unsure 🔍
-1% - +0%
-4.76ms - +3.91ms
-

tachometer-reporter-action v2 for Benchmarks

@aomarks aomarks enabled auto-merge (squash) January 9, 2023 20:03
Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@aomarks aomarks merged commit 304e461 into main Jan 9, 2023
@aomarks aomarks deleted the changeset-release/main branch January 9, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants