Skip to content

Dom update 2024-01-11 - #57027

Merged
Nathan Shively-Sanders (sandersn) merged 2 commits into
microsoft:mainfrom
sandersn:dom-update-2024-01-11
Jan 16, 2024
Merged

Dom update 2024-01-11#57027
Nathan Shively-Sanders (sandersn) merged 2 commits into
microsoft:mainfrom
sandersn:dom-update-2024-01-11

Conversation

@sandersn

@sandersnNathan Shively-Sanders (sandersn) commented Jan 11, 2024

Copy link
Copy Markdown
Member

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
@sandersn

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

Heya Nathan Shively-Sanders (@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

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

Heya Nathan Shively-Sanders (@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

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

Heya Nathan Shively-Sanders (@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

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

Heya Nathan Shively-Sanders (@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

TypeScript Bot (typescript-bot) commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

Hey Nathan Shively-Sanders (@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/pr-build@5.4.0-pr-57027-6".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Nathan Shively-Sanders (@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
Copy Markdown
Contributor

Hey Nathan Shively-Sanders (@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/@definitelytyped+dtslint@0.1.3_typescript@5.4.0-dev.20240111/node_modules/@definitelytyped/dtslint/dist/index.js:166:15)
at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.1.3_typescript@5.4.0-dev.20240111/node_modules/@definitelytyped/dtslint/dist/index.js:125:9)

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Nathan Shively-Sanders (@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
Copy Markdown
Contributor

Nathan Shively-Sanders (@sandersn)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,508k (± 0.01%)295,633k (± 0.01%)+125k (+ 0.04%)295,601k295,703kp=0.005 n=6
Parse Time2.65s (± 0.15%)2.66s (± 0.31%)~2.65s2.67sp=0.527 n=6
Bind Time0.82s (± 0.66%)0.82s (± 0.63%)~0.82s0.83sp=0.640 n=6
Check Time8.13s (± 0.38%)8.12s (± 0.33%)~8.08s8.16sp=1.000 n=6
Emit Time7.09s (± 0.36%)7.09s (± 0.55%)~7.04s7.13sp=0.686 n=6
Total Time18.70s (± 0.20%)18.68s (± 0.30%)~18.61s18.76sp=0.872 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used193,924k (± 1.44%)192,480k (± 1.21%)~191,501k197,247kp=0.230 n=6
Parse Time1.35s (± 0.56%)1.36s (± 0.60%)~1.35s1.37sp=0.383 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.36s (± 0.37%)9.34s (± 0.18%)~9.32s9.36sp=0.333 n=6
Emit Time2.64s (± 0.31%)2.63s (± 0.32%)-0.01s (- 0.44%)2.62s2.64sp=0.045 n=6
Total Time14.07s (± 0.22%)14.04s (± 0.13%)~14.03s14.07sp=0.102 n=6
Monaco - node (v18.15.0, x64)
Memory used347,399k (± 0.01%)347,393k (± 0.01%)~347,363k347,431kp=0.810 n=6
Parse Time2.47s (± 0.47%)2.46s (± 0.47%)~2.44s2.47sp=0.357 n=6
Bind Time0.93s (± 0.00%)0.93s (± 0.56%)~0.92s0.93sp=0.174 n=6
Check Time6.88s (± 0.63%)6.88s (± 0.47%)~6.83s6.91sp=0.746 n=6
Emit Time4.05s (± 0.20%)4.05s (± 0.72%)~4.02s4.10sp=0.411 n=6
Total Time14.33s (± 0.26%)14.32s (± 0.36%)~14.25s14.41sp=1.000 n=6
TFS - node (v18.15.0, x64)
Memory used302,774k (± 0.01%)302,787k (± 0.00%)~302,774k302,809kp=0.065 n=6
Parse Time2.01s (± 0.98%)2.00s (± 1.17%)~1.96s2.02sp=0.567 n=6
Bind Time1.01s (± 1.04%)1.01s (± 1.49%)~0.99s1.03sp=1.000 n=6
Check Time6.31s (± 0.47%)6.29s (± 0.31%)~6.26s6.31sp=0.360 n=6
Emit Time3.58s (± 0.49%)3.57s (± 0.50%)~3.55s3.59sp=0.209 n=6
Total Time12.89s (± 0.38%)12.88s (± 0.21%)~12.83s12.91sp=0.376 n=6
material-ui - node (v18.15.0, x64)
Memory used508,279k (± 0.00%)508,406k (± 0.00%)+128k (+ 0.03%)508,385k508,447kp=0.005 n=6
Parse Time2.59s (± 0.40%)2.60s (± 0.72%)~2.57s2.62sp=0.933 n=6
Bind Time1.00s (± 1.17%)0.99s (± 0.82%)~0.98s1.00sp=0.401 n=6
Check Time17.07s (± 0.54%)17.10s (± 0.61%)~16.97s17.25sp=0.688 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.66s (± 0.45%)20.69s (± 0.56%)~20.54s20.85sp=0.521 n=6
xstate - node (v18.15.0, x64)
Memory used512,970k (± 0.01%)513,336k (± 0.01%)+366k (+ 0.07%)513,286k513,366kp=0.005 n=6
Parse Time3.28s (± 0.23%)3.28s (± 0.27%)~3.27s3.29sp=0.798 n=6
Bind Time1.54s (± 0.34%)1.54s (± 0.00%)~1.54s1.54sp=0.174 n=6
Check Time2.82s (± 0.48%)2.84s (± 0.82%)~2.81s2.87sp=0.460 n=6
Emit Time0.07s (± 5.69%)0.07s (± 0.00%)~0.07s0.07sp=0.405 n=6
Total Time7.71s (± 0.23%)7.73s (± 0.30%)~7.70s7.76sp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,338ms (± 0.42%)2,345ms (± 0.89%)~2,310ms2,369msp=0.470 n=6
Req 2 - geterr5,555ms (± 1.23%)5,495ms (± 1.39%)~5,405ms5,606msp=0.230 n=6
Req 3 - references324ms (± 0.23%)325ms (± 1.27%)~321ms332msp=1.000 n=6
Req 4 - navto271ms (± 0.60%)275ms (± 1.33%)+5ms (+ 1.66%)270ms278msp=0.026 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo93ms (± 1.26%)86ms (± 6.65%)~79ms93msp=0.118 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,488ms (± 0.47%)2,482ms (± 0.67%)~2,465ms2,509msp=0.470 n=6
Req 2 - geterr4,184ms (± 1.89%)4,162ms (± 1.83%)~4,097ms4,264msp=0.936 n=6
Req 3 - references330ms (± 0.37%)332ms (± 1.20%)~328ms339msp=0.871 n=6
Req 4 - navto286ms (± 0.97%)285ms (± 0.53%)~283ms286msp=0.615 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo76ms (± 3.66%)77ms (± 7.65%)~74ms89msp=1.000 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,602ms (± 0.38%)2,615ms (± 0.66%)~2,584ms2,630msp=0.128 n=6
Req 2 - geterr1,711ms (± 2.73%)1,701ms (± 2.73%)~1,650ms1,759msp=0.810 n=6
Req 3 - references113ms (± 9.29%)116ms (± 9.47%)~105ms126msp=0.865 n=6
Req 4 - navto366ms (± 0.62%)366ms (± 0.68%)~364ms371msp=0.807 n=6
Req 5 - completionInfo count2,073 (± 0.00%)2,078 (± 0.00%)+5 (+ 0.24%)2,0782,078p=0.001 n=6
Req 5 - completionInfo308ms (± 2.26%)309ms (± 1.57%)~303ms316msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time154.85ms (± 0.19%)154.77ms (± 0.19%)-0.08ms (- 0.05%)153.70ms157.95msp=0.012 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time230.68ms (± 0.15%)230.57ms (± 0.17%)-0.11ms (- 0.05%)229.30ms235.18msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time230.97ms (± 0.20%)231.12ms (± 0.19%)+0.15ms (+ 0.07%)229.59ms236.65msp=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time230.78ms (± 0.19%)230.71ms (± 0.18%)~229.16ms233.54msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@BickelLukas

Copy link
Copy Markdown

NotificationAction deleted, and several properties of NotificationOptions

Nathan Shively-Sanders (@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
Copy Markdown
MemberAuthor

It was based on microsoft/TypeScript-DOM-lib-generator#1631, which updates the types to @webref/idl@3.39.1 and browser-compat-data@5.3.21

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 freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@sandersn@typescript-bot@BickelLukas@RulixConception@dlarocque