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 #3554

Closed
wants to merge 1 commit into from
Closed

Version Packages #3554

wants to merge 1 commit into from

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 🔍 -2% - +4% (-0.62ms - +1.12ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 108.87ms - 113.72ms
  • lit-html-kitchen-sink: unsure 🔍 -4% - +6% (-1.87ms - +2.51ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -4% - +8% (-0.58ms - +1.07ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +6% (-1.53ms - +4.47ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +2% (-0.99ms - +1.49ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 999.22ms - 1016.93ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +5% (-3.24ms - +5.79ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -4% - +0% (-13.76ms - +1.76ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -4% - +3% (-6.16ms - +4.63ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +1% (-9.50ms - +12.59ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 1017.03ms - 1033.75ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-13.42ms - +12.03ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
108.87ms - 113.72ms-

update

VersionAvg timevs
999.22ms - 1016.93ms-

update-reflect

VersionAvg timevs
1017.03ms - 1033.75ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
43.39ms - 46.57ms-unsure 🔍
-4% - +6%
-1.87ms - +2.51ms
unsure 🔍
-4% - +5%
-1.76ms - +2.13ms
tip-of-tree
tip-of-tree
43.16ms - 46.16msunsure 🔍
-6% - +4%
-2.51ms - +1.87ms
-unsure 🔍
-4% - +4%
-2.01ms - +1.74ms
previous-release
previous-release
43.68ms - 45.92msunsure 🔍
-5% - +4%
-2.13ms - +1.76ms
unsure 🔍
-4% - +5%
-1.74ms - +2.01ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
117.52ms - 123.95ms-unsure 🔍
-3% - +5%
-3.24ms - +5.79ms
unsure 🔍
-3% - +6%
-3.50ms - +7.26ms
tip-of-tree
tip-of-tree
116.29ms - 122.63msunsure 🔍
-5% - +3%
-5.79ms - +3.24ms
-unsure 🔍
-4% - +5%
-4.75ms - +5.95ms
previous-release
previous-release
114.55ms - 123.17msunsure 🔍
-6% - +3%
-7.26ms - +3.50ms
unsure 🔍
-5% - +4%
-5.95ms - +4.75ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
27.08ms - 28.19ms-unsure 🔍
-2% - +4%
-0.62ms - +1.12ms
unsure 🔍
-3% - +3%
-0.79ms - +0.91ms
tip-of-tree
tip-of-tree
26.72ms - 28.05msunsure 🔍
-4% - +2%
-1.12ms - +0.62ms
-unsure 🔍
-4% - +3%
-1.12ms - +0.74ms
previous-release
previous-release
26.93ms - 28.22msunsure 🔍
-3% - +3%
-0.91ms - +0.79ms
unsure 🔍
-3% - +4%
-0.74ms - +1.12ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
13.86ms - 15.24ms-unsure 🔍
-4% - +8%
-0.58ms - +1.07ms
unsure 🔍
-5% - +6%
-0.80ms - +0.82ms
tip-of-tree
tip-of-tree
13.85ms - 14.76msunsure 🔍
-7% - +4%
-1.07ms - +0.58ms
-unsure 🔍
-6% - +3%
-0.85ms - +0.38ms
previous-release
previous-release
14.13ms - 14.95msunsure 🔍
-6% - +5%
-0.82ms - +0.80ms
unsure 🔍
-3% - +6%
-0.38ms - +0.85ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
328.41ms - 338.23ms-unsure 🔍
-4% - +0%
-13.76ms - +1.76ms
unsure 🔍
-4% - +1%
-14.40ms - +2.86ms
tip-of-tree
tip-of-tree
333.32ms - 345.33msunsure 🔍
-1% - +4%
-1.76ms - +13.76ms
-unsure 🔍
-3% - +3%
-9.07ms - +9.53ms
previous-release
previous-release
331.99ms - 346.19msunsure 🔍
-1% - +4%
-2.86ms - +14.40ms
unsure 🔍
-3% - +3%
-9.53ms - +9.07ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
70.00ms - 74.90ms-unsure 🔍
-2% - +6%
-1.53ms - +4.47ms
unsure 🔍
-4% - +5%
-2.85ms - +3.87ms
tip-of-tree
tip-of-tree
69.25ms - 72.71msunsure 🔍
-6% - +2%
-4.47ms - +1.53ms
-unsure 🔍
-5% - +3%
-3.83ms - +1.91ms
previous-release
previous-release
69.65ms - 74.23msunsure 🔍
-5% - +4%
-3.87ms - +2.85ms
unsure 🔍
-3% - +5%
-1.91ms - +3.83ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
143.79ms - 151.61ms-unsure 🔍
-4% - +3%
-6.16ms - +4.63ms
unsure 🔍
-4% - +4%
-5.20ms - +5.57ms
tip-of-tree
tip-of-tree
144.75ms - 152.18msunsure 🔍
-3% - +4%
-4.63ms - +6.16ms
-unsure 🔍
-3% - +4%
-4.29ms - +6.20ms
previous-release
previous-release
143.81ms - 151.21msunsure 🔍
-4% - +4%
-5.57ms - +5.20ms
unsure 🔍
-4% - +3%
-6.20ms - +4.29ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
73.85ms - 75.54ms-unsure 🔍
-1% - +2%
-0.99ms - +1.49ms
unsure 🔍
-5% - +0%
-3.50ms - +0.06ms
tip-of-tree
tip-of-tree
73.53ms - 75.36msunsure 🔍
-2% - +1%
-1.49ms - +0.99ms
-faster ✔
0% - 5%
0.16ms - 3.79ms
previous-release
previous-release
74.85ms - 77.99msunsure 🔍
-0% - +5%
-0.06ms - +3.50ms
slower ❌
0% - 5%
0.16ms - 3.79ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1007.10ms - 1022.98ms-unsure 🔍
-1% - +1%
-9.50ms - +12.59ms
unsure 🔍
-1% - +1%
-10.92ms - +11.96ms
tip-of-tree
tip-of-tree
1005.81ms - 1021.18msunsure 🔍
-1% - +1%
-12.59ms - +9.50ms
-unsure 🔍
-1% - +1%
-12.29ms - +10.24ms
previous-release
previous-release
1006.28ms - 1022.76msunsure 🔍
-1% - +1%
-11.96ms - +10.92ms
unsure 🔍
-1% - +1%
-10.24ms - +12.29ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1061.78ms - 1080.04ms-unsure 🔍
-1% - +1%
-13.42ms - +12.03ms
unsure 🔍
-0% - +2%
-3.39ms - +19.59ms
tip-of-tree
tip-of-tree
1062.74ms - 1080.47msunsure 🔍
-1% - +1%
-12.03ms - +13.42ms
-unsure 🔍
-0% - +2%
-2.49ms - +20.08ms
previous-release
previous-release
1055.83ms - 1069.79msunsure 🔍
-2% - +0%
-19.59ms - +3.39ms
unsure 🔍
-2% - +0%
-20.08ms - +2.49ms
-

tachometer-reporter-action v2 for Benchmarks

@aomarks aomarks requested a review from augustjk January 9, 2023 17:59
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.

Woohoo!

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

aomarks commented Jan 9, 2023

Test failures fixed by #3555

@aomarks
Copy link
Member

aomarks commented Jan 9, 2023

The tests aren't running for some reason..I guess I'll delete this and try again.

@aomarks aomarks closed this Jan 9, 2023
auto-merge was automatically disabled January 9, 2023 19:58

Pull request was closed

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