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

Dom update 2024-01-11 #57027

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Dom update 2024-01-11 #57027

merged 2 commits into from
Jan 16, 2024

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Jan 11, 2024

Not many breaks from this one. Two packages have their shims break and one package assigns to a property that's not there anymore (but might still be on the browser it targets?)

Performance:

  • the change makes the compiler use slightly more memory

Failures:

  • webrtc in DT (because it's a shim for WebRTC*)
  • pixijs incorrectly extends CanvasTextDrawingStyles -- because it was shimming letterSpacing, which was added non-optional.
  • tldraw assigns to now-missing FontFaceDescriptors.variant, though it's "just" an excess property error and will be ignored.

Summary of changes:

  • AuthenticationExtensionClientInputs pinLength new
  • BufferSource -> AllowSharedBufferSource in 18 places
  • NotificationAction deleted, and several properties of NotificationOptions
  • new properties in RTCEncodedAudio/VideoMetadata
  • other minor additions/removals in RTC*
  • WebTransportSendStreamOptions.sendOrder removes null from type
  • MIDIConnectionEvent.port adds null to type
  • More MDN links in jsdoc
  • minor additions in CSS*
  • CSSStyleRule now extends CSSGroupRule instead of CSSRule
  • CredentialsContainer.store no longer returns Credential, just void
  • FontFace.variant deleted
  • Gamepad.hapticActuators deleted
  • New event: beforetoggle
  • minor additions in HTML*Element
  • add Highlight/HighlightRegistry
  • midimessage now has type MIDIMessageEvent, not just Event
  • statechange now has type MIDIConnectionEvent
  • icecandidateerror now has type RTCPeerConnectionIceErrorEvent
  • minor additions in RTC*
  • RTCRtpSender.setParameters has new optional parameter
  • new property: SVGImageElement.crossOrigin
  • TextMetrics adds a few new properties
  • VideoFrame constructors now contruct from AllowSharedBufferSource instead of BufferSource
  • WEBGL_* switches from GLuint to number (also switches to AllowSharedBufferSource some places)
  • Window adds ondeviceorientationabsolute event

Copied from microsoft/typescript-dom-lib-generator
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 11, 2024
@sandersn
Copy link
Member Author

@typescript-bot test top100
@typescript-bot user test this
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Heya @sandersn, I've started to run the tarball bundle task on this PR at 3bae7b9. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Heya @sandersn, I've started to run the diff-based user code test suite on this PR at 3bae7b9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Heya @sandersn, I've started to run the regular perf test suite on this PR at 3bae7b9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at 3bae7b9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Heya @sandersn, I've started to run the diff-based top-repos suite on this PR at 3bae7b9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2024

Hey @sandersn, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/159456/artifacts?artifactName=tgz&fileId=FDAB1F1F90D9CBCDAF908301B6CD1F3B31B1E4DFC80AE9E4600D1EF04512253102&fileName=/typescript-5.4.0-insiders.20240111.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the user test suite comparing main and refs/pull/57027/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

puppeteer

packages/browsers/test/src/tsconfig.json

@typescript-bot
Copy link
Collaborator

Hey @sandersn, the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: webrtc
Error:

Error: 
/home/vsts/work/1/DefinitelyTyped/types/webrtc/RTCPeerConnection.d.ts
  393:5  error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'onicecandidateerror' must be of type '((this: RTCPeerConnection, ev: RTCPeerConnectionIceErrorEvent) => any) | null', but here has type 'PeerConnectionEventHandler<Event>'  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:166:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:125:9)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the top-repos suite comparing main and refs/pull/57027/merge:

Something interesting changed - please have a look.

Details

chakra-ui/chakra-ui

4 of 28 projects failed to build with the old tsc and were ignored

packages/components/tsconfig.build.json

  • error TS5056: Cannot write file '/mnt/ts_downloads/chakra-ui/packages/components/dist/types/menu/menu.stories.d.ts' because it would be overwritten by multiple input files.
    • Project Scope

pixijs/pixijs

tsconfig.json

tsconfig.types.json

tldraw/tldraw

1 of 5 projects failed to build with the old tsc and were ignored

apps/examples/tsconfig.json

apps/vscode/editor/tsconfig.json

apps/vscode/extension/tsconfig.json

@typescript-bot
Copy link
Collaborator

@sandersn
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,508k (± 0.01%) 295,633k (± 0.01%) +125k (+ 0.04%) 295,601k 295,703k p=0.005 n=6
Parse Time 2.65s (± 0.15%) 2.66s (± 0.31%) ~ 2.65s 2.67s p=0.527 n=6
Bind Time 0.82s (± 0.66%) 0.82s (± 0.63%) ~ 0.82s 0.83s p=0.640 n=6
Check Time 8.13s (± 0.38%) 8.12s (± 0.33%) ~ 8.08s 8.16s p=1.000 n=6
Emit Time 7.09s (± 0.36%) 7.09s (± 0.55%) ~ 7.04s 7.13s p=0.686 n=6
Total Time 18.70s (± 0.20%) 18.68s (± 0.30%) ~ 18.61s 18.76s p=0.872 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,924k (± 1.44%) 192,480k (± 1.21%) ~ 191,501k 197,247k p=0.230 n=6
Parse Time 1.35s (± 0.56%) 1.36s (± 0.60%) ~ 1.35s 1.37s p=0.383 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.36s (± 0.37%) 9.34s (± 0.18%) ~ 9.32s 9.36s p=0.333 n=6
Emit Time 2.64s (± 0.31%) 2.63s (± 0.32%) -0.01s (- 0.44%) 2.62s 2.64s p=0.045 n=6
Total Time 14.07s (± 0.22%) 14.04s (± 0.13%) ~ 14.03s 14.07s p=0.102 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,399k (± 0.01%) 347,393k (± 0.01%) ~ 347,363k 347,431k p=0.810 n=6
Parse Time 2.47s (± 0.47%) 2.46s (± 0.47%) ~ 2.44s 2.47s p=0.357 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=0.174 n=6
Check Time 6.88s (± 0.63%) 6.88s (± 0.47%) ~ 6.83s 6.91s p=0.746 n=6
Emit Time 4.05s (± 0.20%) 4.05s (± 0.72%) ~ 4.02s 4.10s p=0.411 n=6
Total Time 14.33s (± 0.26%) 14.32s (± 0.36%) ~ 14.25s 14.41s p=1.000 n=6
TFS - node (v18.15.0, x64)
Memory used 302,774k (± 0.01%) 302,787k (± 0.00%) ~ 302,774k 302,809k p=0.065 n=6
Parse Time 2.01s (± 0.98%) 2.00s (± 1.17%) ~ 1.96s 2.02s p=0.567 n=6
Bind Time 1.01s (± 1.04%) 1.01s (± 1.49%) ~ 0.99s 1.03s p=1.000 n=6
Check Time 6.31s (± 0.47%) 6.29s (± 0.31%) ~ 6.26s 6.31s p=0.360 n=6
Emit Time 3.58s (± 0.49%) 3.57s (± 0.50%) ~ 3.55s 3.59s p=0.209 n=6
Total Time 12.89s (± 0.38%) 12.88s (± 0.21%) ~ 12.83s 12.91s p=0.376 n=6
material-ui - node (v18.15.0, x64)
Memory used 508,279k (± 0.00%) 508,406k (± 0.00%) +128k (+ 0.03%) 508,385k 508,447k p=0.005 n=6
Parse Time 2.59s (± 0.40%) 2.60s (± 0.72%) ~ 2.57s 2.62s p=0.933 n=6
Bind Time 1.00s (± 1.17%) 0.99s (± 0.82%) ~ 0.98s 1.00s p=0.401 n=6
Check Time 17.07s (± 0.54%) 17.10s (± 0.61%) ~ 16.97s 17.25s p=0.688 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.66s (± 0.45%) 20.69s (± 0.56%) ~ 20.54s 20.85s p=0.521 n=6
xstate - node (v18.15.0, x64)
Memory used 512,970k (± 0.01%) 513,336k (± 0.01%) +366k (+ 0.07%) 513,286k 513,366k p=0.005 n=6
Parse Time 3.28s (± 0.23%) 3.28s (± 0.27%) ~ 3.27s 3.29s p=0.798 n=6
Bind Time 1.54s (± 0.34%) 1.54s (± 0.00%) ~ 1.54s 1.54s p=0.174 n=6
Check Time 2.82s (± 0.48%) 2.84s (± 0.82%) ~ 2.81s 2.87s p=0.460 n=6
Emit Time 0.07s (± 5.69%) 0.07s (± 0.00%) ~ 0.07s 0.07s p=0.405 n=6
Total Time 7.71s (± 0.23%) 7.73s (± 0.30%) ~ 7.70s 7.76s p=0.258 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,338ms (± 0.42%) 2,345ms (± 0.89%) ~ 2,310ms 2,369ms p=0.470 n=6
Req 2 - geterr 5,555ms (± 1.23%) 5,495ms (± 1.39%) ~ 5,405ms 5,606ms p=0.230 n=6
Req 3 - references 324ms (± 0.23%) 325ms (± 1.27%) ~ 321ms 332ms p=1.000 n=6
Req 4 - navto 271ms (± 0.60%) 275ms (± 1.33%) +5ms (+ 1.66%) 270ms 278ms p=0.026 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 93ms (± 1.26%) 86ms (± 6.65%) ~ 79ms 93ms p=0.118 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,488ms (± 0.47%) 2,482ms (± 0.67%) ~ 2,465ms 2,509ms p=0.470 n=6
Req 2 - geterr 4,184ms (± 1.89%) 4,162ms (± 1.83%) ~ 4,097ms 4,264ms p=0.936 n=6
Req 3 - references 330ms (± 0.37%) 332ms (± 1.20%) ~ 328ms 339ms p=0.871 n=6
Req 4 - navto 286ms (± 0.97%) 285ms (± 0.53%) ~ 283ms 286ms p=0.615 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 76ms (± 3.66%) 77ms (± 7.65%) ~ 74ms 89ms p=1.000 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,602ms (± 0.38%) 2,615ms (± 0.66%) ~ 2,584ms 2,630ms p=0.128 n=6
Req 2 - geterr 1,711ms (± 2.73%) 1,701ms (± 2.73%) ~ 1,650ms 1,759ms p=0.810 n=6
Req 3 - references 113ms (± 9.29%) 116ms (± 9.47%) ~ 105ms 126ms p=0.865 n=6
Req 4 - navto 366ms (± 0.62%) 366ms (± 0.68%) ~ 364ms 371ms p=0.807 n=6
Req 5 - completionInfo count 2,073 (± 0.00%) 2,078 (± 0.00%) +5 (+ 0.24%) 2,078 2,078 p=0.001 n=6
Req 5 - completionInfo 308ms (± 2.26%) 309ms (± 1.57%) ~ 303ms 316ms p=0.871 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 154.85ms (± 0.19%) 154.77ms (± 0.19%) -0.08ms (- 0.05%) 153.70ms 157.95ms p=0.012 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 230.68ms (± 0.15%) 230.57ms (± 0.17%) -0.11ms (- 0.05%) 229.30ms 235.18ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 230.97ms (± 0.20%) 231.12ms (± 0.19%) +0.15ms (+ 0.07%) 229.59ms 236.65ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 230.78ms (± 0.19%) 230.71ms (± 0.18%) ~ 229.16ms 233.54ms p=0.173 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@sandersn sandersn merged commit d69757e into microsoft:main Jan 16, 2024
19 checks passed
@sandersn sandersn deleted the dom-update-2024-01-11 branch January 16, 2024 19:32
@BickelLukas
Copy link

NotificationAction deleted, and several properties of NotificationOptions

@sandersn Any insight as to why these have been deleted? Looking at the documentation on mdn these properties should exist: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification

@sandersn
Copy link
Member Author

It was based on microsoft/TypeScript-DOM-lib-generator#1631, which updates the types to @webref/[email protected] and [email protected]

The comments on that PR says that NotificationOptions is Blink-only as of 2023-10.

Comment on lines -1003 to 1013
interface NotificationAction {
action: string;
icon?: string;
title: string;
}

interface NotificationOptions {
actions?: NotificationAction[];
badge?: string;
body?: string;
data?: any;
dir?: NotificationDirection;
icon?: string;
image?: string;
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean | null;
tag?: string;
timestamp?: EpochTimeStamp;
vibrate?: VibratePattern;
}

Choose a reason for hiding this comment

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

Why were those properties removed?

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants