Skip to content

[all] Update typescript to 5.5.0#4682

Merged
justinfagnani merged 7 commits intomainfrom
update-typescript
Jun 27, 2024
Merged

[all] Update typescript to 5.5.0#4682
justinfagnani merged 7 commits intomainfrom
update-typescript

Conversation

@justinfagnani
Copy link
Copy Markdown
Collaborator

@justinfagnani justinfagnani commented Jun 23, 2024

Based on #4681

This updates TypeScript to 5.5.

The ElementInternals interface was updated in typescript's lib.dom.d.ts, which required a couple of changes to our SSR DOM shim and revealed a typo in our interface properties.

There's currently a build error due to dependencies of lit-html not finding the definition for TrustedHTML that's in lit-html's public interface. I'm not sure yet if there's a new check in TypeScript, or if a change in the .d.ts emit has caused a type import or reference to @types/trusted-types to be omitted. Adding skipLibCheck to dependents of lit-html fixes the problem, but we don't want to require that our dependents do that.

Closes #4686

@justinfagnani justinfagnani requested review from augustjk and rictic June 23, 2024 22:49
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 23, 2024

🦋 Changeset detected

Latest commit: 353f25a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@lit-labs/analyzer Minor
@lit-labs/compiler Minor
@lit/localize-tools Minor
@lit/lit-starter-ts Patch
@lit-labs/gen-wrapper-vue Minor
@lit-labs/cli Patch
eslint-plugin-lit Patch
@lit-labs/gen-manifest Patch
@lit-labs/gen-utils Patch
@lit-labs/gen-wrapper-angular Patch
@lit-labs/gen-wrapper-react Patch
@lit-labs/cli-localize Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 23, 2024

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +5% (-0.28ms - +0.55ms)
    this-change vs tip-of-tree

render

  • this-change: 44.03ms - 46.22ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +3% (-0.62ms - +0.47ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-0.63ms - +0.23ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +4% (-0.33ms - +1.08ms)
    this-change vs tip-of-tree

update

  • this-change: 455.98ms - 466.27ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -4% - +7% (-1.32ms - +2.31ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-0.79ms - +0.50ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +1% (-1.15ms - +2.88ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 453.64ms - 469.29ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +1% (-2.20ms - +5.22ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
44.03ms - 46.22ms-

update

VersionAvg timevs
455.98ms - 466.27ms-

update-reflect

VersionAvg timevs
453.64ms - 469.29ms-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
17.82ms - 18.54ms-unsure 🔍
-3% - +3%
-0.62ms - +0.47ms
unsure 🔍
-3% - +3%
-0.54ms - +0.53ms
tip-of-tree
tip-of-tree
17.85ms - 18.67msunsure 🔍
-3% - +3%
-0.47ms - +0.62ms
-unsure 🔍
-3% - +4%
-0.50ms - +0.65ms
previous-release
previous-release
17.78ms - 18.58msunsure 🔍
-3% - +3%
-0.53ms - +0.54ms
unsure 🔍
-4% - +3%
-0.65ms - +0.50ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
34.26ms - 36.87ms-unsure 🔍
-4% - +7%
-1.32ms - +2.31ms
unsure 🔍
-5% - +7%
-1.63ms - +2.35ms
tip-of-tree
tip-of-tree
33.81ms - 36.33msunsure 🔍
-6% - +4%
-2.31ms - +1.32ms
-unsure 🔍
-6% - +5%
-2.09ms - +1.82ms
previous-release
previous-release
33.71ms - 36.70msunsure 🔍
-7% - +5%
-2.35ms - +1.63ms
unsure 🔍
-5% - +6%
-1.82ms - +2.09ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.80ms - 11.38ms-unsure 🔍
-3% - +5%
-0.28ms - +0.55ms
unsure 🔍
-3% - +5%
-0.31ms - +0.58ms
tip-of-tree
tip-of-tree
10.66ms - 11.25msunsure 🔍
-5% - +3%
-0.55ms - +0.28ms
-unsure 🔍
-4% - +4%
-0.45ms - +0.45ms
previous-release
previous-release
10.62ms - 11.29msunsure 🔍
-5% - +3%
-0.58ms - +0.31ms
unsure 🔍
-4% - +4%
-0.45ms - +0.45ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.73ms - 33.34ms-unsure 🔍
-2% - +1%
-0.63ms - +0.23ms
unsure 🔍
-1% - +1%
-0.43ms - +0.49ms
tip-of-tree
tip-of-tree
32.94ms - 33.53msunsure 🔍
-1% - +2%
-0.23ms - +0.63ms
-unsure 🔍
-1% - +2%
-0.22ms - +0.69ms
previous-release
previous-release
32.66ms - 33.35msunsure 🔍
-1% - +1%
-0.49ms - +0.43ms
unsure 🔍
-2% - +1%
-0.69ms - +0.22ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
63.19ms - 64.11ms-unsure 🔍
-1% - +1%
-0.79ms - +0.50ms
unsure 🔍
-3% - +1%
-1.81ms - +0.36ms
tip-of-tree
tip-of-tree
63.34ms - 64.25msunsure 🔍
-1% - +1%
-0.50ms - +0.79ms
-unsure 🔍
-3% - +1%
-1.66ms - +0.51ms
previous-release
previous-release
63.39ms - 65.36msunsure 🔍
-1% - +3%
-0.36ms - +1.81ms
unsure 🔍
-1% - +3%
-0.51ms - +1.66ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
29.29ms - 30.53ms-unsure 🔍
-1% - +4%
-0.33ms - +1.08ms
unsure 🔍
-3% - +2%
-0.83ms - +0.63ms
tip-of-tree
tip-of-tree
29.19ms - 29.88msunsure 🔍
-4% - +1%
-1.08ms - +0.33ms
-unsure 🔍
-3% - +0%
-0.99ms - +0.04ms
previous-release
previous-release
29.63ms - 30.39msunsure 🔍
-2% - +3%
-0.63ms - +0.83ms
unsure 🔍
-0% - +3%
-0.04ms - +0.99ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
456.15ms - 459.17ms-unsure 🔍
-0% - +1%
-1.15ms - +2.88ms
unsure 🔍
-0% - +1%
-1.12ms - +2.84ms
tip-of-tree
tip-of-tree
455.46ms - 458.14msunsure 🔍
-1% - +0%
-2.88ms - +1.15ms
-unsure 🔍
-0% - +0%
-1.86ms - +1.85ms
previous-release
previous-release
455.52ms - 458.08msunsure 🔍
-1% - +0%
-2.84ms - +1.12ms
unsure 🔍
-0% - +0%
-1.85ms - +1.86ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
496.61ms - 502.42ms-unsure 🔍
-0% - +1%
-2.20ms - +5.22ms
unsure 🔍
-0% - +1%
-1.70ms - +5.54ms
tip-of-tree
tip-of-tree
495.71ms - 500.30msunsure 🔍
-1% - +0%
-5.22ms - +2.20ms
-unsure 🔍
-1% - +1%
-2.75ms - +3.56ms
previous-release
previous-release
495.44ms - 499.75msunsure 🔍
-1% - +0%
-5.54ms - +1.70ms
unsure 🔍
-1% - +1%
-3.56ms - +2.75ms
-

tachometer-reporter-action v2 for Benchmarks

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

Looks like lit-html.d.ts is now missing this line:

/// <reference types="trusted-types" />

That was automatically put there by the typescript compiler, so I'm not sure if we have to manually add it, or if there's a compiler setting that needs to be enabled now.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 24, 2024

The size of lit-html.js and lit-core.min.js are as expected.

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

Interesting that Rollup update, plus this TypeScript update, add 140 bytes to lit-core.min.js in total, meaning that this one reduces the bundle size by 91 bytes.

@rictic
Copy link
Copy Markdown
Collaborator

rictic commented Jun 24, 2024

Looks like we can now import the trusted types… types with something like:

import type {...} from '@types/trusted-types/lib';

(or maybe it's from 'trusted-types/lib'?)

@rictic
Copy link
Copy Markdown
Collaborator

rictic commented Jun 24, 2024

this one reduces the bundle size by 91 bytes.

That's pretty surprising!

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

this one reduces the bundle size by 91 bytes.

That's pretty surprising!

I know! Maybe there's a better emit for nullish coalescing or optional chaining?

@justinfagnani justinfagnani changed the base branch from main to update-rollup June 24, 2024 19:15
@justinfagnani
Copy link
Copy Markdown
Collaborator Author

this one reduces the bundle size by 91 bytes.

That's pretty surprising!

I know! Maybe there's a better emit for nullish coalescing or optional chaining?

Hmm. Somehow in a rebase against update-rollup the 91 bytes came back. Looking into it.

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

justinfagnani commented Jun 24, 2024

Oh, looking back I think this PR had accidentally reverted some of the Rollup updates.

There's now no change in bundle sizes, which makes a little more sense.

Base automatically changed from update-rollup to main June 24, 2024 22:37
@justinfagnani
Copy link
Copy Markdown
Collaborator Author

In the process of updating TypeScript, and therefore some other dependencies in our wrapper generators, I hit a snag that makes me think we need to stop renaming vue-tsc output files: #4686

It'd be ideal for that to be a separate PR, but I can just add it here to get the update done.

@justinfagnani justinfagnani changed the title WIP: [all] Update typescript [all] Update typescript to 5.5.0 Jun 27, 2024
@justinfagnani justinfagnani marked this pull request as ready for review June 27, 2024 17:23
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.

[labs/gen-vue-wrapper] Stop renaming output files

2 participants