From 9af792810a3396008d1fca6bd9bbb4334baa11f7 Mon Sep 17 00:00:00 2001 From: Ali Monemian Date: Wed, 30 Apr 2025 04:47:03 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#72653=20Fix=20?= =?UTF-8?q?constructor=20parameters=20for=20m3u8-parser=20by=20@cubicme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/m3u8-parser/index.d.ts | 2 +- types/m3u8-parser/m3u8-parser-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/m3u8-parser/index.d.ts b/types/m3u8-parser/index.d.ts index 803dc5f0e1680d..a460acc3c64b23 100644 --- a/types/m3u8-parser/index.d.ts +++ b/types/m3u8-parser/index.d.ts @@ -124,7 +124,7 @@ export interface Manifest { export class Parser extends Stream { constructor(options?: { - url?: string; + uri?: string; mainDefinitions?: Record; }); lineStream: LineStream; diff --git a/types/m3u8-parser/m3u8-parser-tests.ts b/types/m3u8-parser/m3u8-parser-tests.ts index 97897cd071064b..f4aeb25721e40e 100644 --- a/types/m3u8-parser/m3u8-parser-tests.ts +++ b/types/m3u8-parser/m3u8-parser-tests.ts @@ -10,7 +10,7 @@ parser.end(); const parsedManifest = parser.manifest.playlists?.[0].contentProtection?.["com.apple.fps.1_0"]?.attributes.resoltion; const parser2 = new Parser({ - url: "https://exmaple.com/video.m3u8?param_a=34¶m_b=abc", + uri: "https://exmaple.com/video.m3u8?param_a=34¶m_b=abc", mainDefinitions: { param_c: "def", }, From 05036f1fa6b81eb4b1a65ae6f2f3674ce09f9f71 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 29 Apr 2025 18:05:18 -0700 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#72414=20fix(te?= =?UTF-8?q?xtarea-caret):=20Fix=20global=20name=20attached=20to=20window?= =?UTF-8?q?=20by=20@joeyparrish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/textarea-caret/index.d.ts | 6 ++++-- types/textarea-caret/textarea-caret-tests.ts | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/types/textarea-caret/index.d.ts b/types/textarea-caret/index.d.ts index e8fb1d0b84b9a2..1f748dfe3e1e8c 100644 --- a/types/textarea-caret/index.d.ts +++ b/types/textarea-caret/index.d.ts @@ -1,4 +1,4 @@ -export = textarea_caret; +export = getCaretCoordinates; interface Caret { top: number; @@ -10,4 +10,6 @@ interface Options { debug?: boolean | undefined; } -declare function textarea_caret(element: HTMLElement, position: number, options?: Options): Caret; +declare function getCaretCoordinates(element: HTMLElement, position: number, options?: Options): Caret; + +export as namespace getCaretCoordinates; diff --git a/types/textarea-caret/textarea-caret-tests.ts b/types/textarea-caret/textarea-caret-tests.ts index 09707ac2005734..967341d68781e9 100644 --- a/types/textarea-caret/textarea-caret-tests.ts +++ b/types/textarea-caret/textarea-caret-tests.ts @@ -1,8 +1,17 @@ -import getCaretCoordinates = require("textarea-caret"); +import anyNameYouLike = require("textarea-caret"); const element = document.querySelector("textarea"); -element!.addEventListener("input", function() { - const caret = getCaretCoordinates(this, this.selectionEnd); - console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height); -}); +function testImportedLibrary() { + element!.addEventListener("input", function() { + const caret = anyNameYouLike(this, this.selectionEnd); + console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height); + }); +} + +function testGlobalName() { + element!.addEventListener("input", function() { + const caret = window.getCaretCoordinates(this, this.selectionEnd); + console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height); + }); +} From 82e6af86e4ffb41168802566ddeb9b0332af80cb Mon Sep 17 00:00:00 2001 From: Huynh Duc Duy Date: Wed, 30 Apr 2025 17:23:32 +0700 Subject: [PATCH 3/3] [react-dom] add "media" attribute for "preload" (#72655) --- types/react-dom/index.d.ts | 1 + types/react-dom/test/react-dom-tests.tsx | 1 + types/react-dom/v18/canary.d.ts | 1 + types/react-dom/v18/test/canary-tests.tsx | 1 + 4 files changed, 4 insertions(+) diff --git a/types/react-dom/index.d.ts b/types/react-dom/index.d.ts index 43fa2d9e872c5a..76efddd2215455 100644 --- a/types/react-dom/index.d.ts +++ b/types/react-dom/index.d.ts @@ -84,6 +84,7 @@ export interface PreloadOptions { type?: string | undefined; nonce?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; + media?: string | undefined; } export function preload(href: string, options?: PreloadOptions): void; diff --git a/types/react-dom/test/react-dom-tests.tsx b/types/react-dom/test/react-dom-tests.tsx index e214de87f8542f..d446672998a88e 100644 --- a/types/react-dom/test/react-dom-tests.tsx +++ b/types/react-dom/test/react-dom-tests.tsx @@ -528,6 +528,7 @@ function preloadTest() { imageSrcSet: "fooset", imageSizes: "foosizes", referrerPolicy: "no-referrer", + media: "(max-width: 600px)", }); ReactDOM.preload("foo", { as: "image", diff --git a/types/react-dom/v18/canary.d.ts b/types/react-dom/v18/canary.d.ts index 827928da6156c7..e3ab63fb3b62f3 100644 --- a/types/react-dom/v18/canary.d.ts +++ b/types/react-dom/v18/canary.d.ts @@ -70,6 +70,7 @@ declare module "." { type?: string | undefined; nonce?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; + media?: string | undefined; } function preload(href: string, options?: PreloadOptions): void; diff --git a/types/react-dom/v18/test/canary-tests.tsx b/types/react-dom/v18/test/canary-tests.tsx index d19073b69a238e..3771fd58414484 100644 --- a/types/react-dom/v18/test/canary-tests.tsx +++ b/types/react-dom/v18/test/canary-tests.tsx @@ -26,6 +26,7 @@ function preloadTest() { imageSrcSet: "fooset", imageSizes: "foosizes", referrerPolicy: "no-referrer", + media: "(max-width: 600px)", }); ReactDOM.preload("foo", { as: "image",