From e38d0e3e759d88b43c23b59e4aa090f48143004e Mon Sep 17 00:00:00 2001 From: Pavel <19418601+rakleed@users.noreply.github.com> Date: Tue, 29 Sep 2026 02:02:23 +0300 Subject: [PATCH 01/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75607=20feat?= =?UTF-8?q?(eslint-plugin-mobx):=20remove=20types=20by=20@rakleed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 ++++ types/eslint-plugin-mobx/.npmignore | 5 ----- .../eslint-plugin-mobx-tests.ts | 3 --- types/eslint-plugin-mobx/index.d.ts | 18 ----------------- types/eslint-plugin-mobx/package.json | 20 ------------------- types/eslint-plugin-mobx/tsconfig.json | 17 ---------------- 6 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 types/eslint-plugin-mobx/.npmignore delete mode 100644 types/eslint-plugin-mobx/eslint-plugin-mobx-tests.ts delete mode 100644 types/eslint-plugin-mobx/index.d.ts delete mode 100644 types/eslint-plugin-mobx/package.json delete mode 100644 types/eslint-plugin-mobx/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 072cc368c3ffb6..1a476aef16fa3c 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2037,6 +2037,10 @@ "libraryName": "escape-string-regexp", "asOfVersion": "2.0.0" }, + "eslint-plugin-mobx": { + "libraryName": "eslint-plugin-mobx", + "asOfVersion": "0.1.0" + }, "eslint-plugin-mocha": { "libraryName": "eslint-plugin-mocha", "asOfVersion": "11.1.0" diff --git a/types/eslint-plugin-mobx/.npmignore b/types/eslint-plugin-mobx/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/eslint-plugin-mobx/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/eslint-plugin-mobx/eslint-plugin-mobx-tests.ts b/types/eslint-plugin-mobx/eslint-plugin-mobx-tests.ts deleted file mode 100644 index eea70d68ba1bca..00000000000000 --- a/types/eslint-plugin-mobx/eslint-plugin-mobx-tests.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pluginMobx = require("eslint-plugin-mobx"); -pluginMobx.configs.recommended; // $ExpectType Config || Config -pluginMobx.flatConfigs.recommended; // $ExpectType Config || Config diff --git a/types/eslint-plugin-mobx/index.d.ts b/types/eslint-plugin-mobx/index.d.ts deleted file mode 100644 index 0270ce6a1d6372..00000000000000 --- a/types/eslint-plugin-mobx/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Linter, Rule } from "eslint"; - -export const meta: { name: string; version: string }; -export const rules: { - "exhaustive-make-observable": Rule.RuleModule; - "unconditional-make-observable": Rule.RuleModule; - "missing-make-observable": Rule.RuleModule; - "missing-observer": Rule.RuleModule; - "no-anonymous-observer": Rule.RuleModule; -}; - -export const configs: { - recommended: Linter.Config; -}; - -export const flatConfigs: { - recommended: Linter.Config; -}; diff --git a/types/eslint-plugin-mobx/package.json b/types/eslint-plugin-mobx/package.json deleted file mode 100644 index 3651ce631f84e6..00000000000000 --- a/types/eslint-plugin-mobx/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "private": true, - "name": "@types/eslint-plugin-mobx", - "version": "0.0.9999", - "projects": [ - "https://mobx.js.org/" - ], - "dependencies": { - "eslint": "^9.0.0" - }, - "devDependencies": { - "@types/eslint-plugin-mobx": "workspace:." - }, - "owners": [ - { - "name": "Adam Thompson-Sharpe", - "githubUsername": "MysteryBlokHed" - } - ] -} diff --git a/types/eslint-plugin-mobx/tsconfig.json b/types/eslint-plugin-mobx/tsconfig.json deleted file mode 100644 index 019cd94dc7c035..00000000000000 --- a/types/eslint-plugin-mobx/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": ["es6"], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "eslint-plugin-mobx-tests.ts" - ] -} From e682a5470c07cb95ac64deaa9d8858985b79bbd4 Mon Sep 17 00:00:00 2001 From: Andres Rodriguez <62494922+Dosx001@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:13:11 -0700 Subject: [PATCH 02/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75501=20fix(?= =?UTF-8?q?firefox-webext-browser):=20allow=20browser.scripting.executeScr?= =?UTF-8?q?ipt=20fu=E2=80=A6=20by=20@Dosx001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../firefox-webext-browser-tests.ts | 36 +++++++++++++++++++ types/firefox-webext-browser/index.d.ts | 12 ++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/types/firefox-webext-browser/firefox-webext-browser-tests.ts b/types/firefox-webext-browser/firefox-webext-browser-tests.ts index 16240175865d71..fca8efb90998f2 100644 --- a/types/firefox-webext-browser/firefox-webext-browser-tests.ts +++ b/types/firefox-webext-browser/firefox-webext-browser-tests.ts @@ -341,6 +341,42 @@ browser.scripting.executeScript({ args: [0, "", false, [], {}], func: (_n: number, _s: string, _b: boolean, _a: [], _o: {}) => {}, }); + +browser.scripting.executeScript({ + target: { tabId: 1 }, + func: () => {}, +}).then(([resp]) => { + resp.result; // $ExpectType void | undefined +}); + +browser.scripting.executeScript({ + target: { tabId: 1 }, + func: () => true, +}).then(([resp]) => { + resp.result; // $ExpectType boolean | undefined +}); + +browser.scripting.executeScript({ + target: { tabId: 1 }, + func: () => 1, +}).then(([resp]) => { + resp.result; // $ExpectType number | undefined +}); + +browser.scripting.executeScript({ + target: { tabId: 1 }, + func: () => Math.random() > 0.5 ? true : 1, +}).then(([resp]) => { + resp.result; // $ExpectType true | 1 | undefined +}); + +browser.scripting.executeScript({ + target: { tabId: 1 }, + func: (): number | boolean => Math.random() > 0.5 ? true : 1, +}).then(([resp]) => { + resp.result; // $ExpectType number | boolean | undefined +}); + browser.scripting.executeScript({ target: { tabId: 0 }, world: "MAIN" }); browser.scripting.registerContentScripts([{ id: "scriptId", matchOriginAsFallback: true, world: "MAIN" }]); browser.scripting.updateContentScripts([{ id: "scriptId", persistAcrossSessions: true, world: "MAIN" }]); diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index 50b791a88137b1..6a95d67c64b736 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -4717,7 +4717,7 @@ declare namespace browser.runtime { declare namespace browser.scripting { /* scripting types */ /** Details of a script injection */ - interface ScriptInjection { + interface ScriptInjection { /** * The arguments to curry into a provided function. This is only valid if the `func` parameter is specified. These arguments must be JSON-serializable. */ @@ -4730,7 +4730,7 @@ declare namespace browser.scripting { * A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of `files` and `func` must be specified. */ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - func?: (...args: Args) => void | undefined; + func?: (...args: Args) => Result; /** Details specifying the target into which to inject the script. */ target: InjectionTarget; world?: ExecutionWorld | undefined; @@ -4741,11 +4741,11 @@ declare namespace browser.scripting { } /** Result of a script injection. */ - interface InjectionResult { + interface InjectionResult { /** The frame ID associated with the injection. */ frameId: number; /** The result of the script execution. */ - result?: any; + result?: Result; /** * The error property is set when the script execution failed. The value is typically an (Error) object with a message property, but could be any value (including primitives and undefined) if the script threw or rejected with such a value. */ @@ -4839,7 +4839,9 @@ declare namespace browser.scripting { * @param injection The details of the script which to inject. */ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - function executeScript(injection: ScriptInjection): Promise; + function executeScript( + injection: ScriptInjection, + ): Promise[]>; /** * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored. From dac89d50326a39bcd5d874c1ca0849082f2d2cc1 Mon Sep 17 00:00:00 2001 From: Zhang Yi Jiang Date: Mon, 28 Sep 2026 16:22:44 -0700 Subject: [PATCH 03/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75595=20[san?= =?UTF-8?q?itize-html]=20Update=20htmlparser2=20dependency=20version=20by?= =?UTF-8?q?=20@ZhangYiJiang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/sanitize-html/index.d.ts | 2 +- types/sanitize-html/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sanitize-html/index.d.ts b/types/sanitize-html/index.d.ts index 68066d27c82ea0..d61ba8dc96393c 100644 --- a/types/sanitize-html/index.d.ts +++ b/types/sanitize-html/index.d.ts @@ -1,4 +1,4 @@ -import { ParserOptions } from "htmlparser2"; +import type { ParserOptions } from "htmlparser2" with { "resolution-mode": "import" }; export = sanitize; diff --git a/types/sanitize-html/package.json b/types/sanitize-html/package.json index d949682c0f21ae..7b029bee77dc85 100644 --- a/types/sanitize-html/package.json +++ b/types/sanitize-html/package.json @@ -6,7 +6,7 @@ "https://github.com/punkave/sanitize-html" ], "dependencies": { - "htmlparser2": "^10.1" + "htmlparser2": "^12.0" }, "devDependencies": { "@types/sanitize-html": "workspace:." From 3cd766e9ebc9aa566cd9f5802394e0da849058b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Tue, 29 Sep 2026 00:26:17 +0100 Subject: [PATCH 04/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75573=20Remo?= =?UTF-8?q?ve=20remaining=20TS5.5=20iterator=20hacks=20by=20@Renegade334?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/klaw/index.d.ts | 11 +---------- types/readable-stream/index.d.ts | 19 +++++-------------- types/tar-stream/index.d.ts | 14 ++------------ 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/types/klaw/index.d.ts b/types/klaw/index.d.ts index 64928e12ce2707..9a7426e10ada5a 100644 --- a/types/klaw/index.d.ts +++ b/types/klaw/index.d.ts @@ -4,15 +4,6 @@ declare module "klaw" { import * as fs from "fs"; import { Readable, ReadableOptions } from "stream"; - // forward-compatible iterator type for TS <5.6 - global { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AsyncIteratorObject {} - } - interface StreamIterator extends AsyncIterator, AsyncIteratorObject { - [Symbol.asyncIterator](): StreamIterator; - } - function K(root: string, options?: K.Options): K.Walker; namespace K { @@ -42,7 +33,7 @@ declare module "klaw" { on(event: "readable", listener: () => void): this; on(event: "error", listener: (err: Error) => void): this; read(): Item; - [Symbol.asyncIterator](): StreamIterator; + [Symbol.asyncIterator](): AsyncIteratorObject; } } diff --git a/types/readable-stream/index.d.ts b/types/readable-stream/index.d.ts index e31db99c2f6699..d17f585822f7f2 100644 --- a/types/readable-stream/index.d.ts +++ b/types/readable-stream/index.d.ts @@ -25,15 +25,6 @@ declare var StreamToAsyncStreamable: Exclude< >; type NoToAsyncStreamable = typeof StreamToAsyncStreamable extends never ? {} : { [StreamToAsyncStreamable]: never }; -// forward-compatible iterator type for TS <5.6 -declare global { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AsyncIteratorObject {} -} -interface StreamIterator extends AsyncIterator, AsyncIteratorObject { - [Symbol.asyncIterator](): StreamIterator; -} - // @types/node's `EventEmitter.listeners()` returns true functions in >=v25, but `Function` objects // in <=v24. To maintain assignability to @types/node streams, use whichever variant is present. type EventListenerArray = ReturnType; @@ -74,7 +65,7 @@ interface _IReadable extends _IEventEmitter { unshift(chunk: any): void; wrap(oldStream: _Readable.Readable): this; push(chunk: any, encoding?: string): boolean; - iterator(options?: { destroyOnReturn?: boolean }): StreamIterator; + iterator(options?: { destroyOnReturn?: boolean }): AsyncIteratorObject; map(fn: (data: any, options?: SignalOption) => any, options?: ArrayOptions): _Readable.Readable; filter( fn: (data: any, options?: SignalOption) => boolean | Promise, @@ -239,8 +230,8 @@ declare class _Readable implements _IReadable { listenerCount(eventName: string | symbol): number; eventNames(): (string | symbol)[]; - iterator(options?: { destroyOnReturn?: boolean }): StreamIterator; - [Symbol.asyncIterator](): StreamIterator; + iterator(options?: { destroyOnReturn?: boolean }): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; // static ReadableState: _Readable.ReadableState; _readableState: _Readable.ReadableState; @@ -382,8 +373,8 @@ declare namespace _Readable { on(ev: string | symbol, fn: (...args: any[]) => void): this; _undestroy(): void; - iterator(options?: { destroyOnReturn?: boolean }): StreamIterator; - [Symbol.asyncIterator](): StreamIterator; + iterator(options?: { destroyOnReturn?: boolean }): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; // end-Readable constructor(options?: DuplexOptions); diff --git a/types/tar-stream/index.d.ts b/types/tar-stream/index.d.ts index 490a223f5f4e11..9b39ddb9844730 100644 --- a/types/tar-stream/index.d.ts +++ b/types/tar-stream/index.d.ts @@ -2,16 +2,6 @@ import stream = require("stream"); -// forward-compatible iterator type for TS <5.6 -export {}; // do not export StreamIterator -declare global { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AsyncIteratorObject {} -} -interface StreamIterator extends AsyncIterator, AsyncIteratorObject { - [Symbol.asyncIterator](): StreamIterator; -} - export type Callback = (err?: Error | null) => any; // see https://github.com/mafintosh/tar-stream/blob/master/headers.js @@ -51,12 +41,12 @@ export interface Pack extends stream.Readable { entry(headers: Headers, callback?: Callback): stream.Writable; entry(headers: Headers, buffer?: string | Buffer, callback?: Callback): stream.Writable; finalize(): void; - [Symbol.asyncIterator](): StreamIterator; + [Symbol.asyncIterator](): AsyncIteratorObject; } export interface Entry extends stream.Readable { header: Headers; - [Symbol.asyncIterator](): StreamIterator; + [Symbol.asyncIterator](): AsyncIteratorObject; } export interface Extract extends stream.Writable { From 086973c959da5a77079c98ff811878d73de97fd8 Mon Sep 17 00:00:00 2001 From: Bruce Pedro Gomes Date: Mon, 28 Sep 2026 20:31:11 -0300 Subject: [PATCH 05/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75594=20[aut?= =?UTF-8?q?o-generated]=20[google=5F=5Fearthengine]=20Add=20types=20for=20?= =?UTF-8?q?@google/earthengine=20by=20@brucePedroGomes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/google__earthengine/.npmignore | 5 + .../google__earthengine-tests.ts | 95 ++++++++++++ types/google__earthengine/index.d.ts | 144 ++++++++++++++++++ types/google__earthengine/package.json | 18 +++ types/google__earthengine/tsconfig.json | 19 +++ 5 files changed, 281 insertions(+) create mode 100644 types/google__earthengine/.npmignore create mode 100644 types/google__earthengine/google__earthengine-tests.ts create mode 100644 types/google__earthengine/index.d.ts create mode 100644 types/google__earthengine/package.json create mode 100644 types/google__earthengine/tsconfig.json diff --git a/types/google__earthengine/.npmignore b/types/google__earthengine/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/google__earthengine/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/google__earthengine/google__earthengine-tests.ts b/types/google__earthengine/google__earthengine-tests.ts new file mode 100644 index 00000000000000..12e6a214bd4ffc --- /dev/null +++ b/types/google__earthengine/google__earthengine-tests.ts @@ -0,0 +1,95 @@ +import ee = require("@google/earthengine"); +import type { + EarthEngineSdk, + EeCallback, + EeElement, + EeFeature, + EeGeometry, + EeImage, + EeServiceAccountKey, +} from "@google/earthengine"; + +const key: EeServiceAccountKey = { + client_email: "service-account@example.com", + private_key: "private-key", +}; + +ee.data.authenticateViaPrivateKey(key, () => undefined, error => error.toUpperCase()); +ee.initialize("https://earthengine.googleapis.com/api", "https://earthengine.googleapis.com"); + +const point = ee.Geometry.Point([-47.5, -23.5]); +const polygon = ee.Geometry.Polygon([ + [ + [-47.6, -23.6], + [-47.4, -23.6], + [-47.4, -23.4], + [-47.6, -23.6], + ], +]); +const region = point.buffer(2_000).union(polygon); +const collection = ee + .ImageCollection("COPERNICUS/S2_SR_HARMONIZED") + .filterDate("2026-01-01", "2026-02-01") + .filterBounds(region) + .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 30)) + .distinct("system:time_start") + .sort("CLOUDY_PIXEL_PERCENTAGE"); + +function describe(element: EeElement): EeFeature { + const image = ee.Image(element); + const reducer = ee.Reducer.mean().combine({ + reducer2: ee.Reducer.minMax(), + sharedInputs: true, + }); + const statistics = image.normalizedDifference(["B8", "B4"]).rename("NDVI").reduceRegion({ + reducer, + geometry: region, + scale: 10, + maxPixels: 1e13, + }); + statistics.getInfo(values => values?.NDVI_mean.toFixed()); + + return ee.Feature(null, { + mean: statistics.get("NDVI_mean"), + imageId: ee.String("COPERNICUS/S2_SR_HARMONIZED/").cat(image.id()), + takenOn: image.get("system:time_start"), + }); +} + +collection.map(describe).getInfo(result => result?.features[0]?.properties); + +const image = collection + .first() + .select(["B4", "B3", "B2"]) + .convolve(ee.Kernel.gaussian({ radius: 8, sigma: 4 })) + .clip(region) + .visualize({ bands: ["B4", "B3", "B2"], min: 100, max: 2_000, gamma: 1.4 }); +const painted = ee.Image().paint({ + featureCollection: ee.FeatureCollection(ee.Feature(polygon)), + color: 1, + width: 7, +}); +const mosaic = ee.ImageCollection([image, painted]).mosaic(); +const typedRegion: EeGeometry = region; +const download = { + dimensions: "1280x720", + region: typedRegion, + format: "png", + crs: "EPSG:3857", + maxPixels: 1e13, +}; + +mosaic.getDownloadURL(download); // $ExpectType string +mosaic.getDownloadURL(download, url => url?.toUpperCase()); + +const sdk: EarthEngineSdk = ee; +const callback: EeCallback = value => value?.toUpperCase(); +const typedImage: EeImage = sdk.Image("COPERNICUS/S2_SR_HARMONIZED/example"); + +callback(typedImage.getDownloadURL(download)); + +async function loadSdk(): Promise { + return (await import("@google/earthengine")).default; +} + +loadSdk(); // $ExpectType Promise diff --git a/types/google__earthengine/index.d.ts b/types/google__earthengine/index.d.ts new file mode 100644 index 00000000000000..042668533c8c94 --- /dev/null +++ b/types/google__earthengine/index.d.ts @@ -0,0 +1,144 @@ +declare const ee: ee.EarthEngineSdk; + +export = ee; +export as namespace ee; + +declare namespace ee { + type EeCallback = (value: Value | null, error?: string) => void; + + interface EeServiceAccountKey { + client_email: string; + private_key: string; + } + + interface EeString { + cat(other: string | EeString): EeString; + } + + interface EeDictionary { + get(key: string): unknown; + getInfo(callback: EeCallback>): void; + } + + interface EeGeometry { + buffer(metres: number): EeGeometry; + union(other: EeGeometry): EeGeometry; + } + + interface EeElement { + readonly __eeElement?: never; + } + + interface EeFilter { + readonly __eeFilter?: never; + } + + interface EeFeature extends EeElement { + readonly __eeFeature?: never; + } + + interface EeFeatureCollection { + readonly __eeFeatureCollection?: never; + } + + interface EeReducer { + combine(options: { reducer2: EeReducer; sharedInputs: boolean }): EeReducer; + } + + interface EeKernel { + readonly __eeKernel?: never; + } + + interface EeReduceRegionOptions { + reducer: EeReducer; + geometry: EeGeometry; + scale: number; + maxPixels: number; + } + + interface EeVisualizationOptions { + bands?: readonly string[]; + min?: number; + max?: number; + gamma?: number; + palette?: readonly string[]; + } + + interface EeDownloadOptions { + dimensions: string; + region: EeGeometry; + format: string; + crs: string; + maxPixels: number; + } + + interface EeImage extends EeElement { + normalizedDifference(bands: readonly string[]): EeImage; + rename(name: string): EeImage; + reduceRegion(options: EeReduceRegionOptions): EeDictionary; + id(): EeString; + get(property: string): unknown; + convolve(kernel: EeKernel): EeImage; + clip(geometry: EeGeometry): EeImage; + visualize(options: EeVisualizationOptions): EeImage; + paint(options: { featureCollection: EeFeatureCollection; color: number; width: number }): EeImage; + select(bands: readonly string[]): EeImage; + getDownloadURL(params: EeDownloadOptions): string; + getDownloadURL(params: EeDownloadOptions, callback: EeCallback): void; + } + + interface EeDescribedFeatures { + features: Array<{ properties: Record }>; + } + + interface EeImageCollection { + filterDate(since: string, until: string): EeImageCollection; + filterBounds(geometry: EeGeometry): EeImageCollection; + filter(criterion: EeFilter): EeImageCollection; + distinct(property: string): EeImageCollection; + sort(property: string): EeImageCollection; + first(): EeImage; + map(transform: (element: EeElement) => EeFeature): EeImageCollection; + getInfo(callback: EeCallback): void; + mosaic(): EeImage; + } + + interface EarthEngineSdk { + data: { + authenticateViaPrivateKey( + key: EeServiceAccountKey, + onSuccess?: () => void, + onError?: (error: string) => void, + extraScopes?: readonly string[], + suppressDefaultScopes?: boolean, + ): void; + }; + initialize( + apiBaseUrl?: string | null, + tileBaseUrl?: string | null, + onSuccess?: () => void, + onError?: (error: Error | null) => void, + xsrfToken?: string | null, + project?: string | null, + ): void; + Image(element?: EeElement | EeImage | string): EeImage; + ImageCollection(source: string | readonly EeImage[]): EeImageCollection; + Feature(geometry: EeGeometry | null, properties?: Record): EeFeature; + FeatureCollection(feature: EeFeature): EeFeatureCollection; + String(value: string): EeString; + Geometry: { + Polygon(coordinates: readonly (readonly (readonly number[])[])[]): EeGeometry; + Point(coordinates: readonly number[]): EeGeometry; + }; + Filter: { + lt(property: string, value: number): EeFilter; + }; + Reducer: { + mean(): EeReducer; + minMax(): EeReducer; + }; + Kernel: { + gaussian(options: { radius: number; sigma: number }): EeKernel; + }; + } +} diff --git a/types/google__earthengine/package.json b/types/google__earthengine/package.json new file mode 100644 index 00000000000000..1db46abab1d770 --- /dev/null +++ b/types/google__earthengine/package.json @@ -0,0 +1,18 @@ +{ + "private": true, + "name": "@types/google__earthengine", + "version": "1.7.9999", + "projects": [ + "https://developers.google.com/earth-engine/", + "https://github.com/google/earthengine-api" + ], + "devDependencies": { + "@types/google__earthengine": "workspace:." + }, + "owners": [ + { + "name": "Bruce Pedro Gomes", + "githubUsername": "brucePedroGomes" + } + ] +} diff --git a/types/google__earthengine/tsconfig.json b/types/google__earthengine/tsconfig.json new file mode 100644 index 00000000000000..02f72f7860583e --- /dev/null +++ b/types/google__earthengine/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google__earthengine-tests.ts" + ] +} From 040c8085da9b599ed639f7f773b298e9d1989e5c Mon Sep 17 00:00:00 2001 From: Peter Schorn Date: Mon, 28 Sep 2026 18:43:56 -0500 Subject: [PATCH 06/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75548=20[aws?= =?UTF-8?q?-lambda]=20Allow=20missing=20JWT=20authorizer=20context=20field?= =?UTF-8?q?s=20by=20@Peter-Schorn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/aws-lambda/aws-lambda-tests.ts | 3 ++- types/aws-lambda/test/api-gateway-tests.ts | 4 ++-- types/aws-lambda/trigger/api-gateway-proxy.d.ts | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index 82a4fa90a953fc..0cea97542bc1e2 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -18,6 +18,7 @@ declare let bool: boolean; declare let boolOrUndefined: boolean | undefined; declare let boolOrNumOrStr: boolean | number | string; declare let numOrUndefined: number | undefined; +declare let numOrUndefinedOrNull: number | undefined | null; declare let strArrayOrUndefined: string[] | undefined; declare let nullOrUndefined: null | undefined; declare let objectOrUndefined: {} | undefined; @@ -149,7 +150,7 @@ const untypedCallbackHandler: AWSLambda.Handler = (event, context, cb) => { /* In node8.10 runtime, handlers may return a promise for the result value, so existing async * handlers that return Promise before calling the callback will now have a `null` result. - * Be safe and make that badly typed with a major verson bump to 8.10 so users expect the breaking change, + * Be safe and make that badly typed with a major version bump to 8.10 so users expect the breaking change, * since the upgrade effort should be pretty low in most cases, and it points them at a nicer solution. */ diff --git a/types/aws-lambda/test/api-gateway-tests.ts b/types/aws-lambda/test/api-gateway-tests.ts index 0f42bb9f8e5aa0..0e62f5f739834f 100644 --- a/types/aws-lambda/test/api-gateway-tests.ts +++ b/types/aws-lambda/test/api-gateway-tests.ts @@ -358,8 +358,8 @@ const proxyHandlerv2WithJKTAuthorizer: APIGatewayProxyHandlerV2WithJWTAuthorizer } const nullableScopes: string[] | null = authorizer.jwt.scopes; // And these extra properties are added - str = authorizer.principalId; - num = authorizer.integrationLatency; + strOrUndefinedOrNull = authorizer.principalId; + numOrUndefinedOrNull = authorizer.integrationLatency; const result = createProxyResult(); diff --git a/types/aws-lambda/trigger/api-gateway-proxy.d.ts b/types/aws-lambda/trigger/api-gateway-proxy.d.ts index 39e931e4143d20..934b863b6350d4 100644 --- a/types/aws-lambda/trigger/api-gateway-proxy.d.ts +++ b/types/aws-lambda/trigger/api-gateway-proxy.d.ts @@ -254,8 +254,8 @@ export interface APIGatewayEventRequestContextLambdaAuthorizer Date: Tue, 29 Sep 2026 05:33:56 +0500 Subject: [PATCH 07/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75463=20[lux?= =?UTF-8?q?on]=20Export=20validity=20helper=20types=20from=20the=20barrel?= =?UTF-8?q?=20by=20@lazerg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/luxon/src/luxon.d.ts | 2 ++ types/luxon/test/luxon-tests.module.ts | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/types/luxon/src/luxon.d.ts b/types/luxon/src/luxon.d.ts index 289f52361d5068..95b2de2ff980f2 100644 --- a/types/luxon/src/luxon.d.ts +++ b/types/luxon/src/luxon.d.ts @@ -1,5 +1,7 @@ export const VERSION: string; +export type { CanBeInvalid, DefaultValidity, IfValid } from "./_util"; + export * from "./datetime"; export * from "./duration"; export * from "./info"; diff --git a/types/luxon/test/luxon-tests.module.ts b/types/luxon/test/luxon-tests.module.ts index 6a09fb8d544c96..5175dc15105238 100644 --- a/types/luxon/test/luxon-tests.module.ts +++ b/types/luxon/test/luxon-tests.module.ts @@ -1,8 +1,11 @@ import { + CanBeInvalid, DateTime, + DefaultValidity, Duration, FixedOffsetZone, IANAZone, + IfValid, Info, Interval, Settings, @@ -1097,3 +1100,18 @@ function Interval_isValidNarrowsFactoryResult() { interval; // $ExpectType Interval interval.toISO(); // $ExpectType "Invalid Interval" } + +function Validity_helperTypes( + canBeInvalid: CanBeInvalid, + valid: DateTime, + invalid: DateTime, + maybeValid: DateTime, +) { + const start: IfValid, null, DefaultValidity> = Interval.fromISO("2016-05-25/2016-05-27").start; + + canBeInvalid; // $ExpectType true + valid.toISO(); // $ExpectType string + invalid.toISO(); // $ExpectType null + maybeValid.toISO(); // $ExpectType string | null + start?.toISO(); // $ExpectType string | undefined +} From 117e20d07ddb034d9ed7d021dc1facb99de536ef Mon Sep 17 00:00:00 2001 From: polygonplanet Date: Tue, 29 Sep 2026 09:57:06 +0900 Subject: [PATCH 08/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75602=20feat?= =?UTF-8?q?(encoding-japanese):=20remove=20types=20by=20@polygonplanet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 + types/encoding-japanese/.npmignore | 5 - types/encoding-japanese/index.d.ts | 97 --------- types/encoding-japanese/package.json | 22 -- .../test/encoding-japanese-tests.cjs.ts | 196 ------------------ .../test/encoding-japanese-tests.global.ts | 10 - types/encoding-japanese/tsconfig.json | 21 -- 7 files changed, 4 insertions(+), 351 deletions(-) delete mode 100644 types/encoding-japanese/.npmignore delete mode 100644 types/encoding-japanese/index.d.ts delete mode 100644 types/encoding-japanese/package.json delete mode 100644 types/encoding-japanese/test/encoding-japanese-tests.cjs.ts delete mode 100644 types/encoding-japanese/test/encoding-japanese-tests.global.ts delete mode 100644 types/encoding-japanese/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 1a476aef16fa3c..0c096230a5a5a1 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1965,6 +1965,10 @@ "libraryName": "empty-trash", "asOfVersion": "3.0.0" }, + "encoding-japanese": { + "libraryName": "encoding-japanese", + "asOfVersion": "2.4.0" + }, "engine.io-client": { "libraryName": "engine.io-client", "asOfVersion": "6.0.0" diff --git a/types/encoding-japanese/.npmignore b/types/encoding-japanese/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/encoding-japanese/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/encoding-japanese/index.d.ts b/types/encoding-japanese/index.d.ts deleted file mode 100644 index 59191e80eaac13..00000000000000 --- a/types/encoding-japanese/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -export as namespace Encoding; - -export type Encoding = - | "UTF32" - | "UTF16" - | "UTF16BE" - | "UTF16LE" - | "BINARY" - | "ASCII" - | "JIS" - | "UTF8" - | "EUCJP" - | "SJIS" - | "UNICODE" - | "AUTO"; -type IntArrayType = - | readonly number[] - | Uint8Array - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array; -type EncodingDetection = Encoding | false; - -export type ConvertOptions = - | ConvertStringOptions - | ConvertArrayBufferOptions - | ConvertArrayOptions - | ConvertUnknownOptions; - -export interface ConvertStringOptions { - to: Encoding; - from?: Encoding | undefined; - type: "string"; - fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error"; - bom?: boolean | string | undefined; -} - -export interface ConvertArrayBufferOptions { - to: Encoding; - from?: Encoding | undefined; - type: "arraybuffer"; - fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error"; - bom?: boolean | string | undefined; -} - -export interface ConvertArrayOptions { - to: Encoding; - from?: Encoding | undefined; - type: "array"; - fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error"; - bom?: boolean | string | undefined; -} - -export interface ConvertUnknownOptions { - to: Encoding; - from?: Encoding | undefined; - fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error"; - bom?: boolean | string | undefined; -} - -export function detect(data: IntArrayType | string, encodings?: Encoding | Encoding[]): EncodingDetection; -export function convert(data: IntArrayType, to: Encoding, from?: Encoding): number[]; -export function convert(data: string, to: Encoding, from?: Encoding): string; -export function convert(data: IntArrayType | string, options: ConvertStringOptions): string; -export function convert(data: IntArrayType | string, options: ConvertArrayBufferOptions): Uint16Array; -export function convert(data: IntArrayType | string, options: ConvertArrayOptions): number[]; -export function convert(data: string, options: ConvertUnknownOptions): string; -export function convert(data: IntArrayType, options: ConvertUnknownOptions): number[]; -export function urlEncode(data: IntArrayType): string; -export function urlDecode(data: string): number[]; -export function base64Encode(data: IntArrayType): string; -export function base64Decode(data: string): number[]; -export function codeToString(data: IntArrayType): string; -export function stringToCode(data: string): number[]; -export function toHankakuCase(data: readonly number[]): number[]; -export function toHankakuCase(data: string): string; -export function toZenkakuCase(data: readonly number[]): number[]; -export function toZenkakuCase(data: string): string; -export function toHiraganaCase(data: readonly number[]): number[]; -export function toHiraganaCase(data: string): string; -export function toKatakanaCase(data: readonly number[]): number[]; -export function toKatakanaCase(data: string): string; -export function toHankanaCase(data: readonly number[]): number[]; -export function toHankanaCase(data: string): string; -export function toZenkanaCase(data: readonly number[]): number[]; -export function toZenkanaCase(data: string): string; -export function toHankakuSpace(data: readonly number[]): number[]; -export function toHankakuSpace(data: string): string; -export function toZenkakuSpace(data: readonly number[]): number[]; -export function toZenkakuSpace(data: string): string; - -export const version: string; -export const orders: string[]; - -export {}; diff --git a/types/encoding-japanese/package.json b/types/encoding-japanese/package.json deleted file mode 100644 index 8af227b199ab0e..00000000000000 --- a/types/encoding-japanese/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "private": true, - "name": "@types/encoding-japanese", - "version": "2.2.9999", - "projects": [ - "https://github.com/polygonplanet/encoding.js" - ], - "devDependencies": { - "@types/encoding-japanese": "workspace:.", - "@types/node": "*" - }, - "owners": [ - { - "name": "rhysd", - "githubUsername": "rhysd" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz" - } - ] -} diff --git a/types/encoding-japanese/test/encoding-japanese-tests.cjs.ts b/types/encoding-japanese/test/encoding-japanese-tests.cjs.ts deleted file mode 100644 index 06d09e73f7311a..00000000000000 --- a/types/encoding-japanese/test/encoding-japanese-tests.cjs.ts +++ /dev/null @@ -1,196 +0,0 @@ -/// -import Encoding = require("encoding-japanese"); - -// Convert character encoding to Shift_JIS from UTF-8. -const utf8Array_1 = new Uint8Array([1, 2, 3]); -const utf8Array_2 = [1, 2, 3]; -const utf8Array_3 = Buffer.from([1, 2, 3]); -const utf8Array_4 = new Uint16Array([1, 2, 3]); -const utf8Array_5 = new Uint32Array([1, 2, 3]); -const utf8Array_6 = new Int16Array([1, 2, 3]); -const utf8Array_7 = new Int32Array([1, 2, 3]); -const utf8Array_8 = new Int8Array([1, 2, 3]); -const utf8Array_9: readonly number[] = [1, 2, 3]; -Encoding.convert(utf8Array_1, "SJIS", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_2, "UTF16", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_3, "UTF16LE", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_4, "UTF16BE", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_5, "BINARY", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_6, "UTF32", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_7, "AUTO", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_8, "ASCII", "UTF8"); // $ExpectType number[] -Encoding.convert(utf8Array_9, "JIS", "UTF8"); // $ExpectType number[] -Encoding.convert("string value", "UTF16", "UTF8"); // $ExpectType string - -// Convert character encoding by automatic detection (AUTO detect). -const utf8Array = utf8Array_1; -const sjisArray1 = Encoding.convert(utf8Array, "SJIS"); // $ExpectType number[] -// or -const sjisArray2 = Encoding.convert(utf8Array, "SJIS", "AUTO"); // $ExpectType number[] - -// Detect the character encoding. -// The return value be one of the "Available Encodings" below. -const detected = Encoding.detect(utf8Array); // $ExpectType EncodingDetection -if (detected === "UTF8") { - // Encoding is UTF-8' -} - -const sjisArray3 = Encoding.convert(utf8Array, { - to: "SJIS", // to_encoding - from: "UTF8", // from_encoding -}); -sjisArray3; // $ExpectType number[] - -const sjisArray4 = Encoding.convert("🐙", { - to: "SJIS", // to_encoding - from: "UTF8", // from_encoding - type: "string", - fallback: "html-entity", -}); -sjisArray4; // $ExpectType string -// fallback: '🐙' - -const sjisArray5 = Encoding.convert("🐙", { - to: "SJIS", // to_encoding - from: "UTF8", // from_encoding - type: "string", - fallback: "ignore", -}); -sjisArray5; // $ExpectType string -// fallback: '' - -const sjisArray6 = Encoding.convert("🐙", { - to: "SJIS", // to_encoding - from: "UTF8", // from_encoding - type: "string", - fallback: "error", -}); -sjisArray6; // $ExpectType string -// throws error: `Character cannot be represented` - -const utf8String = "ã\u0081\u0093ã\u0082\u0093ã\u0081«ã\u0081¡ã\u0081¯"; -const unicodeString = Encoding.convert(utf8String, { - to: "UNICODE", - from: "UTF8", - type: "string", // Specify 'string' type. (Return as string) -}); -unicodeString; // $ExpectType string - -const unicodeString2 = Encoding.convert(utf8String, { - to: "UNICODE", - from: "UTF8", // Unspecified type. Inferred from 1st argument -}); -unicodeString2; // $ExpectType string - -const utf16Array = Encoding.convert(utf8Array, { - to: "UTF16", // to_encoding - from: "UTF8", // from_encoding - bom: true, // With BOM -}); -utf16Array; // $ExpectType number[] - -const utf16leArray = Encoding.convert(utf8Array, { - to: "UTF16", // to_encoding - from: "UTF8", // from_encoding - bom: "LE", // With BOM (little-endian) -}); -utf16leArray; // $ExpectType number[] - -const utf16beArray = Encoding.convert(utf8Array, { - to: "UTF16BE", - from: "UTF8", -}); -utf16beArray; // $ExpectType number[] - -const utf16Array2 = Encoding.convert(utf8Array, { - to: "UTF16", // to_encoding - from: "UTF8", // from_encoding - type: "array", - bom: true, // With BOM -}); -utf16Array2; // $ExpectType number[] - -const utf16Array3 = Encoding.convert(utf8Array, { - to: "UTF16", // to_encoding - from: "UTF8", // from_encoding - type: "arraybuffer", - bom: true, // With BOM -}); -utf16Array3; // $ExpectType Uint16Array || Uint16Array - -const utf16Array4 = Encoding.convert(utf8Array, { - to: "UTF16", // to_encoding - from: "UTF8", // from_encoding - type: "string", - bom: true, // With BOM -}); -utf16Array4; // $ExpectType string - -// Detect character encoding by automatic. (AUTO detect). -const detected2 = Encoding.detect(utf8Array); // $ExpectType EncodingDetection -if (detected2 === "UTF8") { - // Encoding is UTF-8' -} - -// Detect character encoding by specific encoding name. -const isSJIS = Encoding.detect(sjisArray1, "SJIS"); // $ExpectType EncodingDetection -if (isSJIS) { - // Encoding is SJIS' -} - -const sjisArray7 = [ - 130, - 177, - 130, - 241, - 130, - 201, - 130, - 191, - 130, - 205, - 129, - 65, - 130, - 217, - 130, - 176, - 129, - 153, - 130, - 210, - 130, - 230, -]; - -const encoded = Encoding.urlEncode(sjisArray7); // $ExpectType string -// encoded: '%82%B1%82%F1%82%C9%82%BF%82%CD%81A%82%D9%82%B0%81%99%82%D2%82%E6' - -const decoded = Encoding.urlDecode(encoded); // $ExpectType number[] -// decoded: [ -// 130, 177, 130, 241, 130, 201, 130, 191, 130, 205, 129, -// 65, 130, 217, 130, 176, 129, 153, 130, 210, 130, 230 -// ] - -const sjisArray8 = [130, 177, 130, 241, 130, 201, 130, 191, 130, 205]; -const encoded2 = Encoding.base64Encode(sjisArray8); // $ExpectType string -// encoded2: 'grGC8YLJgr+CzQ==' - -const decoded2 = Encoding.base64Decode(encoded2); // $ExpectType number[] -// decoded2: [130, 177, 130, 241, 130, 201, 130, 191, 130, 205] - -Encoding.version; // $ExpectType string -Encoding.orders; // $ExpectType string[] - -Encoding.toZenkakuCase([1, 2, 3]); // $ExpectType number[] -Encoding.toZenkakuCase("abcdef"); // $ExpectType string -Encoding.toHankakuCase([1, 2, 3]); // $ExpectType number[] -Encoding.toHankakuCase("ABCDEF"); // $ExpectType string -Encoding.toZenkanaCase([1, 2, 3]); // $ExpectType number[] -Encoding.toZenkanaCase("アイウエオ"); // $ExpectType string -Encoding.toHankanaCase([1, 2, 3]); // $ExpectType number[] -Encoding.toHankanaCase("アイウエオ"); // $ExpectType string -Encoding.toZenkakuSpace([1, 2, 3]); // $ExpectType number[] -Encoding.toZenkakuSpace(" "); // $ExpectType string -Encoding.toHankakuSpace([1, 2, 3]); // $ExpectType number[] -Encoding.toHankakuSpace("\u{3000}"); // $ExpectType string diff --git a/types/encoding-japanese/test/encoding-japanese-tests.global.ts b/types/encoding-japanese/test/encoding-japanese-tests.global.ts deleted file mode 100644 index 6856788bda42a3..00000000000000 --- a/types/encoding-japanese/test/encoding-japanese-tests.global.ts +++ /dev/null @@ -1,10 +0,0 @@ -// just verify we can use exported namespace - -const utf8String = "ã\u0081\u0093ã\u0082\u0093ã\u0081«ã\u0081¡ã\u0081¯"; -const unicodeString = Encoding.convert(utf8String, { - to: "UNICODE", - from: "UTF8", - type: "string", -}); -// $ExpectType string -unicodeString; // こんにちは diff --git a/types/encoding-japanese/tsconfig.json b/types/encoding-japanese/tsconfig.json deleted file mode 100644 index ac6e6630f6e963..00000000000000 --- a/types/encoding-japanese/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true - }, - "files": [ - "index.d.ts", - "test/encoding-japanese-tests.cjs.ts", - "test/encoding-japanese-tests.global.ts" - ] -} From d8614c3b2a0d8538eef697715462cf6161568fff Mon Sep 17 00:00:00 2001 From: James Tindal Date: Tue, 29 Sep 2026 03:28:27 +0200 Subject: [PATCH 09/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75580=20[d3-?= =?UTF-8?q?zoom]=20Improve=20extent=20accessor=20contextual=20typing=20by?= =?UTF-8?q?=20@james-tindal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/d3-zoom/d3-zoom-tests.ts | 5 ++++- types/d3-zoom/index.d.ts | 32 +++++++++----------------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index 4b56d259329662..a2424bf1e3cc16 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -9,7 +9,7 @@ import { interpolate, interpolateArray, interpolateZoom, ZoomInterpolator, ZoomView } from "d3-interpolate"; import { ScaleLinear, scaleLinear, ScaleTime, scaleTime } from "d3-scale"; import { ArrayLike, select, Selection } from "d3-selection"; -import { Transition } from "d3-transition"; +import "d3-transition"; import * as d3Zoom from "d3-zoom"; // -------------------------------------------------------------------------- @@ -205,6 +205,9 @@ svgZoom = svgZoom.extent(function(d) { return [[0, 0], [d.width, d.height]]; // datum type is SVGDatum }); +// chainable with parameterless accessor function +svgZoom = svgZoom.extent(() => [[0, 0], [200, 200]]); + // scaleExtent() ---------------------------------------------------------- // chainable diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index 36c083833d4cec..c8cf711781f172 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -245,36 +245,22 @@ export interface ZoomBehavior [[number, number], [number, number]]; /** - * Set the viewport extent to the specified array of points [[x0, y0], [x1, y1]], - * where [x0, y0] is the top-left corner of the viewport and [x1, y1] is the bottom-right corner of the viewport, - * and return this zoom behavior. - * - * The viewport extent affects several functions: the center of the viewport remains fixed during changes by zoom.scaleBy and zoom.scaleTo; - * the viewport center and dimensions affect the path chosen by d3.interpolateZoom; and the viewport extent is needed to enforce the optional translate extent. - * - * @param extent An extent specified as an array of two coordinates. - */ - extent(extent: [[number, number], [number, number]]): this; - /** - * Set the viewport extent to the array of points [[x0, y0], [x1, y1]] returned by the - * extent accessor function, and return this zoom behavior. - * The extent accessor function is evaluated for each element. + * Sets how the viewport extent is determined. * + * Pass either a fixed extent or a function that computes the extent for each selected element. * [x0, y0] is the top-left corner of the viewport and [x1, y1] is the bottom-right corner of the viewport. * * The viewport extent affects several functions: the center of the viewport remains fixed during changes by zoom.scaleBy and zoom.scaleTo; * the viewport center and dimensions affect the path chosen by d3.interpolateZoom; and the viewport extent is needed to enforce the optional translate extent. * - * The default is [[0, 0], [width, height]] where width is the client width of the element and height is its client height; - * for SVG elements, the nearest ancestor SVG element’s width and height is used. - * In this case, the owner SVG element must have defined width and height attributes rather than (for example) relying on CSS properties or the viewBox attribute; - * SVG provides no programmatic method for retrieving the initial viewport size. Alternatively, consider using element.getBoundingClientRect. - * (In Firefox, element.clientWidth and element.clientHeight is zero for SVG elements!) - * - * @param extent An extent accessor function which is evaluated for each selected element, being passed the current datum d, with the this context as the current DOM element. - * The function returns the extent array. + * @param extent A fixed extent or a function that computes the extent for each selected element. The function receives the current datum d, + * with the this context as the current DOM element. */ - extent(extent: (this: ZoomRefElement, datum: Datum) => [[number, number], [number, number]]): this; + extent( + extent: + | [[number, number], [number, number]] + | ((this: ZoomRefElement, datum: Datum) => [[number, number], [number, number]]), + ): this; /** * Return the current scale extent. From 73d07429df455cd4ab82035f96d70a3dd60c38a2 Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Tue, 29 Sep 2026 04:30:08 +0200 Subject: [PATCH 10/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75603=20[chr?= =?UTF-8?q?ome]=20fix=20chrome.downloads=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 24 ++++++++++++++++++++---- types/chrome/test/index.ts | 6 ++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index c4a32dc96ef00d..3eb187183acb0a 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -4060,9 +4060,25 @@ declare namespace chrome { size?: 16 | 32 | undefined; } + type DownloadSortableKey = keyof Pick< + DownloadItem, + | "url" + | "bytesReceived" + | "danger" + | "finalUrl" + | "totalBytes" + | "filename" + | "paused" + | "state" + | "mime" + | "startTime" + | "endTime" + | "exists" + >; + interface DownloadQuery { /** Set elements of this array to {@link DownloadItem} properties in order to sort search results. For example, setting `orderBy=['startTime']` sorts the {@link DownloadItem} by their start time in ascending order. To specify descending order, prefix with a hyphen: '-startTime'. */ - orderBy?: string[] | undefined; + orderBy?: Array | undefined; /** Limits results to {@link DownloadItem} whose `url` matches the given regular expression. */ urlRegex?: string | undefined; /** Limits results to {@link DownloadItem} that ended before the given ms in ISO 8601 format. */ @@ -4081,12 +4097,12 @@ declare namespace chrome { * The absolute URL that this download is being made from, after all redirects. * @since Chrome 54 */ - finalUrl?: string; + finalUrl?: string | undefined; /** * Limits results to {@link DownloadItem} whose `finalUrl` matches the given regular expression. * @since Chrome 54 */ - finalUrlRegex?: string; + finalUrlRegex?: string | undefined; /** This array of search terms limits results to {@link DownloadItem} whose `filename` or `url` or `finalUrl` contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash. */ query?: string[] | undefined; /** Limits results to {@link DownloadItem} whose `totalBytes` is less than the given integer. */ @@ -4163,7 +4179,7 @@ declare namespace chrome { function getFileIcon(downloadId: number, callback: (iconURL?: string) => void): void; function getFileIcon( downloadId: number, - options: GetFileIconOptions, + options: GetFileIconOptions | undefined, callback: (iconURL?: string) => void, ): void; diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index e5639dde9a047c..6123f71fa6356c 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -5476,10 +5476,14 @@ function testDownloads() { }; chrome.downloads.getFileIcon(downloadId); // $ExpectType Promise + chrome.downloads.getFileIcon(downloadId, undefined); // $ExpectType Promise chrome.downloads.getFileIcon(downloadId, getFileIconOptions); // $ExpectType Promise chrome.downloads.getFileIcon(downloadId, (iconURL) => { // $ExpectType void iconURL; // $ExpectType string | undefined }); + chrome.downloads.getFileIcon(downloadId, undefined, (iconURL) => { // $ExpectType void + iconURL; // $ExpectType string | undefined + }); chrome.downloads.getFileIcon(downloadId, getFileIconOptions, (iconURL) => { // $ExpectType void iconURL; // $ExpectType string | undefined }); @@ -5529,6 +5533,8 @@ function testDownloads() { result.state; // $ExpectType "complete" | "in_progress" | "interrupted" result.url; // $ExpectType string }); + // @ts-expect-error Invalid orderBy field + chrome.downloads.search({ orderBy: ["error"] }); // @ts-expect-error chrome.downloads.search(downloadQuery, () => {}).then(() => {}); From 12687cdfa7312e4f25ca6d6c87ae31489baedb8e Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Tue, 29 Sep 2026 04:30:34 +0200 Subject: [PATCH 11/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75601=20[chr?= =?UTF-8?q?ome]=20update=20chrome.privacy=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 2 ++ types/chrome/test/index.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 3eb187183acb0a..8b0e4961998e5e 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -8788,6 +8788,7 @@ declare namespace chrome { * @since Chrome 151 */ enum AutofillBlockedType { + ALL = "all", CONTACT_INFO = "contact_info", PAYMENTS = "payments", IDENTITY_DOCS = "identity_docs", @@ -8936,6 +8937,7 @@ declare namespace chrome { * The value of this preference is of type boolean, and the default value is `true`. * Extensions may only disable this API by setting the value to `false`. If you try setting this API to `true`, it will throw an error. * @since Chrome 121 + * @deprecated since Chrome 144. Will be removed around Chrome 153. */ relatedWebsiteSetsEnabled: chrome.types.ChromeSetting; diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index 6123f71fa6356c..86ebce562d30cd 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -7936,6 +7936,7 @@ function testAccessibilityFeatures() { // https://developer.chrome.com/docs/extensions/reference/api/privacy function testPrivacy() { + chrome.privacy.AutofillBlockedType.ALL === "all"; chrome.privacy.AutofillBlockedType.CONTACT_INFO === "contact_info"; chrome.privacy.AutofillBlockedType.PAYMENTS === "payments"; chrome.privacy.AutofillBlockedType.IDENTITY_DOCS === "identity_docs"; From 0077f669c8a6a4226e67bb4e26634023e450d294 Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Tue, 29 Sep 2026 04:30:47 +0200 Subject: [PATCH 12/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75599=20[chr?= =?UTF-8?q?ome]=20fix=20chrome.contextMenus.create=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 73 ++++++++++++++++++++++---------------- types/chrome/test/index.ts | 6 ++-- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 8b0e4961998e5e..2a755be031b72b 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1972,37 +1972,48 @@ declare namespace chrome { * Properties of the new context menu item. * @since Chrome 123 */ - interface CreateProperties { - /** The initial state of a checkbox or radio button: `true` for selected, `false` for unselected. Only one radio button can be selected at a time in a given group. */ - checked?: boolean; - /** List of contexts this menu item will appear in. Defaults to `['page']`. */ - contexts?: [`${ContextType}`, ...`${ContextType}`[]]; - /** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */ - documentUrlPatterns?: string[]; - /** Whether this context menu item is enabled or disabled. Defaults to `true`. */ - enabled?: boolean; - /** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */ - id?: string; - /** The ID of a parent menu item; this makes the item a child of a previously added item. */ - parentId?: number | string; - /** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */ - targetUrlPatterns?: string[]; - /** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */ - title?: string; - /** The type of menu item. Defaults to `normal`. */ - type?: `${ItemType}`; - /** Whether the item is visible in the menu. */ - visible?: boolean; - /** - * A function that is called back when the menu item is clicked. This is not available inside of a service worker; instead, you should register a listener for {@link contextMenus.onClicked}. - * @param info Information about the item clicked and the context where the click happened. - * @param tab The details of the tab where the click took place. This parameter is not present for platform apps. - */ - onclick?: ( - info: OnClickData, - tab: tabs.Tab, - ) => void; - } + type CreateProperties = + & ({ + /** The initial state of a checkbox or radio button: `true` for selected, `false` for unselected. Only one radio button can be selected at a time in a given group. */ + checked?: boolean; + /** List of contexts this menu item will appear in. Defaults to `['page']`. */ + contexts?: [`${ContextType}`, ...`${ContextType}`[]]; + /** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */ + documentUrlPatterns?: string[]; + /** Whether this context menu item is enabled or disabled. Defaults to `true`. */ + enabled?: boolean; + /** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */ + id?: string; + /** The ID of a parent menu item; this makes the item a child of a previously added item. */ + parentId?: number | string; + /** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */ + targetUrlPatterns?: string[]; + /** Whether the item is visible in the menu. */ + visible?: boolean; + /** + * A function that is called back when the menu item is clicked. This is not available inside of a service worker; instead, you should register a listener for {@link contextMenus.onClicked}. + * @param info Information about the item clicked and the context where the click happened. + * @param tab The details of the tab where the click took place. This parameter is not present for platform apps. + */ + onclick?: ( + info: OnClickData, + tab: tabs.Tab, + ) => void; + }) + & ( + | { + /** The type of menu item. Defaults to `normal`. */ + type: `${ItemType.SEPARATOR}`; + /** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */ + title?: string; + } + | { + /** The type of menu item. Defaults to `normal`. */ + type?: `${Exclude}`; + /** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */ + title: string; + } + ); /** * The type of menu item. diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index 86ebce562d30cd..84e8fcb10a5916 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -4679,8 +4679,10 @@ function testContextMenus() { }; chrome.contextMenus.create(creationOptions); // $ExpectType string | number - // @ts-expect-error Error at property 'contexts': Invalid type: expected array, found string. - chrome.contextMenus.create({ ...creationOptions, contexts: "page_action" }); + // @ts-expect-error All menu items except for separators must have a title + chrome.contextMenus.create({ id: "title-required" }); + // @ts-expect-error All menu items except for separators must have a title + chrome.contextMenus.create({ id: "title-required", type: chrome.contextMenus.ItemType.CHECKBOX }); chrome.contextMenus.remove(1); // $ExpectType Promise chrome.contextMenus.remove("1"); // $ExpectType Promise From e8d8c81294fb7cbd7d2be13e13018f1444acc721 Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Tue, 29 Sep 2026 04:30:59 +0200 Subject: [PATCH 13/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75569=20[chr?= =?UTF-8?q?ome]=20Relax=20enum=20literal=20types=20in=20printing=20and=20p?= =?UTF-8?q?rintingMetrics=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 16 ++++++++-------- types/chrome/test/index.ts | 32 +++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 2a755be031b72b..331ec31b9916ff 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -8507,7 +8507,7 @@ declare namespace chrome { /** Printer capabilities in [CDD format](https://developers.google.com/cloud-print/docs/cdd#cdd-example). The property may be missing. */ capabilities?: { [key: string]: unknown }; /** The status of the printer. */ - status: PrinterStatus; + status: `${PrinterStatus}`; } /** Status of the print job. */ @@ -8594,7 +8594,7 @@ declare namespace chrome { /** The id of created print job. This is a unique identifier among all print jobs on the device. If status is not OK, jobId will be null. */ jobId: string | null; /** The status of the request. */ - status: SubmitJobStatus; + status: `${SubmitJobStatus}`; } /** The status of submitJob request. */ @@ -8699,7 +8699,7 @@ declare namespace chrome { /** Displayed name of the printer. */ name: string; /** The source of the printer. */ - source: PrinterSource; + source: `${PrinterSource}`; /** The full path for the printer. Contains protocol, hostname, port, and queue. */ uri: string; } @@ -8727,15 +8727,15 @@ declare namespace chrome { * The status of the printer. * @since Chrome 85 */ - printer_status: chrome.printing.PrinterStatus; + printer_status: `${printing.PrinterStatus}`; /** The settings of the print job. */ settings: PrintSettings; /** Source showing who initiated the print job. */ - source: PrintJobSource; + source: `${PrintJobSource}`; /** ID of source. Null if source is PRINT_PREVIEW or ANDROID_APP. */ sourceId: string | null; /** The final status of the job. */ - status: PrintJobStatus; + status: `${PrintJobStatus}`; /** The title of the document which was printed. */ title: string; } @@ -8764,11 +8764,11 @@ declare namespace chrome { interface PrintSettings { /** The requested color mode. */ - color: ColorMode; + color: `${ColorMode}`; /** The requested number of copies. */ copies: number; /** The requested duplex mode. */ - duplex: DuplexMode; + duplex: `${DuplexMode}`; /** The requested media size. */ mediaSize: MediaSize; } diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index 84e8fcb10a5916..3c49156e0d2aca 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -7126,7 +7126,10 @@ function testPrinting() { chrome.printing.getJobStatus("", status => {}).then(status => {}); chrome.printing.getPrinterInfo(""); // $ExpectType Promise - chrome.printing.getPrinterInfo("", response => {}); // $ExpectType void + chrome.printing.getPrinterInfo("", response => { // $ExpectType void + response.capabilities; // $ExpectType { [key: string]: unknown } | undefined + response.status; // $ExpectType "DOOR_OPEN" | "TRAY_MISSING" | "OUT_OF_INK" | "OUT_OF_PAPER" | "OUTPUT_FULL" | "PAPER_JAM" | "GENERIC_ISSUE" | "STOPPED" | "UNREACHABLE" | "EXPIRED_CERTIFICATE" | "AVAILABLE" + }); // @ts-expect-error chrome.printing.getPrinterInfo("", response => {}).then(response => {}); @@ -7145,7 +7148,10 @@ function testPrinting() { }, }; chrome.printing.submitJob(submitJobRequest); // $ExpectType Promise - chrome.printing.submitJob(submitJobRequest, response => {}); // $ExpectType void + chrome.printing.submitJob(submitJobRequest, response => { // $ExpectType void + response.jobId; // $ExpectType string | null + response.status; // $ExpectType "OK" | "USER_REJECTED" + }); // @ts-expect-error chrome.printing.submitJob(submitJobRequest, response => {}).then(response => {}); @@ -7177,7 +7183,27 @@ function testPrintingMetrics() { chrome.printingMetrics.PrinterSource.USER === "USER"; chrome.printingMetrics.getPrintJobs(); // $ExpectType Promise - chrome.printingMetrics.getPrintJobs(jobs => {}); // $ExpectType void + chrome.printingMetrics.getPrintJobs(([job]) => { // $ExpectType void + job.id; // $ExpectType string + job.completionTime; // $ExpectType number + job.creationTime; // $ExpectType number + job.id; // $ExpectType string + job.numberOfPages; // $ExpectType number + job.printer.name; // $ExpectType string + job.printer.source; // $ExpectType "USER" | "POLICY" + job.printer.uri; // $ExpectType string + job.printer_status; // $ExpectType "DOOR_OPEN" | "TRAY_MISSING" | "OUT_OF_INK" | "OUT_OF_PAPER" | "OUTPUT_FULL" | "PAPER_JAM" | "GENERIC_ISSUE" | "STOPPED" | "UNREACHABLE" | "EXPIRED_CERTIFICATE" | "AVAILABLE" + job.settings.color; // $ExpectType "BLACK_AND_WHITE" | "COLOR" + job.settings.copies; // $ExpectType number + job.settings.duplex; // $ExpectType "ONE_SIDED" | "TWO_SIDED_LONG_EDGE" | "TWO_SIDED_SHORT_EDGE" + job.settings.mediaSize.height; // $ExpectType number + job.settings.mediaSize.vendorId; // $ExpectType string + job.settings.mediaSize.width; // $ExpectType number + job.source; // $ExpectType "PRINT_PREVIEW" | "ANDROID_APP" | "EXTENSION" | "ISOLATED_WEB_APP" + job.sourceId; // $ExpectType string | null + job.status; // $ExpectType "FAILED" | "CANCELED" | "PRINTED" + job.title; // $ExpectType string + }); // @ts-expect-error chrome.printingMetrics.getPrintJobs(jobs => {}).then(jobs => {}); From de8d60ecd48e81b5396a9b511624596a2644cf31 Mon Sep 17 00:00:00 2001 From: Inanc Gumus Date: Mon, 28 Sep 2026 22:34:07 -0400 Subject: [PATCH 14/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75589=20[k6]?= =?UTF-8?q?=20Add=20TLS=20certificate=20fetching=20types=20for=20v2.3=20by?= =?UTF-8?q?=20@inancgumus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/k6/options/index.d.ts | 8 ++++++++ types/k6/package.json | 2 +- types/k6/test/options.ts | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/types/k6/options/index.d.ts b/types/k6/options/index.d.ts index 14fb688b9824d9..cadf4c4bc2db83 100644 --- a/types/k6/options/index.d.ts +++ b/types/k6/options/index.d.ts @@ -119,6 +119,14 @@ export interface Options { /** Throw error on failed HTTP request. */ throw?: boolean; + /** + * Fetch missing intermediate certificates through Authority Information Access (AIA) + * when a server sends an incomplete TLS certificate chain, while keeping certificate + * and hostname verification enabled. Requires hostname targets rather than IP addresses. + * Disabled by default. Has no effect when `insecureSkipTLSVerify` is true. + */ + tlsAIAFetch?: boolean; + /** TLS client certificates. */ tlsAuth?: Certificate[]; diff --git a/types/k6/package.json b/types/k6/package.json index 1b05e70837a0c5..4ec78bca4a86de 100644 --- a/types/k6/package.json +++ b/types/k6/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/k6", - "version": "2.2.9999", + "version": "2.3.9999", "type": "module", "projects": [ "https://grafana.com/docs/k6/latest/" diff --git a/types/k6/test/options.ts b/types/k6/test/options.ts index 2026c5cacb075d..81fc5450d5ca40 100644 --- a/types/k6/test/options.ts +++ b/types/k6/test/options.ts @@ -59,6 +59,7 @@ const scenarioExample: Options = { }; const tlsOptions1: Options = { + tlsAIAFetch: true, tlsAuth: [ { domains: ["example.com"], @@ -70,6 +71,7 @@ const tlsOptions1: Options = { }; const tlsOptions2: Options = { + tlsAIAFetch: false, tlsAuth: [ { domains: ["example.com"], @@ -80,6 +82,8 @@ const tlsOptions2: Options = { }; const tlsOptions3: Options = { + // @ts-expect-error + tlsAIAFetch: "true", tlsAuth: [ // @ts-expect-error { From 4ce2ec05b0a8667adae758fd918dfe064f345c8f Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:02:56 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75620=20feat?= =?UTF-8?q?(chrome-webstore-upload):=20remove=20types=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 ++ types/chrome-webstore-upload/.npmignore | 5 -- .../chrome-webstore-upload-tests.ts | 16 ------ types/chrome-webstore-upload/index.d.ts | 53 ------------------- types/chrome-webstore-upload/package.json | 21 -------- types/chrome-webstore-upload/tsconfig.json | 19 ------- 6 files changed, 4 insertions(+), 114 deletions(-) delete mode 100644 types/chrome-webstore-upload/.npmignore delete mode 100644 types/chrome-webstore-upload/chrome-webstore-upload-tests.ts delete mode 100644 types/chrome-webstore-upload/index.d.ts delete mode 100644 types/chrome-webstore-upload/package.json delete mode 100644 types/chrome-webstore-upload/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 0c096230a5a5a1..3047e93236ed09 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -792,6 +792,10 @@ "libraryName": "chownr", "asOfVersion": "3.0.0" }, + "chrome-webstore-upload": { + "libraryName": "chrome-webstore-upload", + "asOfVersion": "3.1.1" + }, "chunked-dc": { "libraryName": "chunked-dc", "asOfVersion": "0.2.2" diff --git a/types/chrome-webstore-upload/.npmignore b/types/chrome-webstore-upload/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/chrome-webstore-upload/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/chrome-webstore-upload/chrome-webstore-upload-tests.ts b/types/chrome-webstore-upload/chrome-webstore-upload-tests.ts deleted file mode 100644 index 8439ac29d0961a..00000000000000 --- a/types/chrome-webstore-upload/chrome-webstore-upload-tests.ts +++ /dev/null @@ -1,16 +0,0 @@ -import chromeWebstoreUpload from "chrome-webstore-upload"; -import { createReadStream } from "node:fs"; - -const store = chromeWebstoreUpload({ - extensionId: "ecnglinljpjkbgmdpeiglonddahpbkeb", - clientId: "xxxxxxxxxx", - clientSecret: "xxxxxxxxxx", - refreshToken: "xxxxxxxxxx", -}); - -(async () => { - const extZip = createReadStream("ext.zip"); - const uploadResponse = await store.uploadExisting(extZip); - const publishResponse = await store.publish("trustedTesters"); - const item = await store.get(); -})(); diff --git a/types/chrome-webstore-upload/index.d.ts b/types/chrome-webstore-upload/index.d.ts deleted file mode 100644 index 552eb156e5dfef..00000000000000 --- a/types/chrome-webstore-upload/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/// - -export interface Options { - extensionId: string; - clientId: string; - clientSecret?: string; - refreshToken: string; -} - -export interface Item { - kind: string; - id: string; - publicKey: string; - uploadState: "FAILURE" | "IN_PROGRESS" | "NOT_FOUND" | "SUCCESS"; - itemError: { - error_code: string; - error_detail: string; - }; -} - -export type PublishStatus = - | "OK" - | "NOT_AUTHORIZED" - | "INVALID_DEVELOPER" - | "DEVELOPER_NO_OWNERSHIP" - | "DEVELOPER_SUSPENDED" - | "ITEM_NOT_FOUND" - | "ITEM_PENDING_REVIEW" - | "ITEM_TAKEN_DOWN" - | "PUBLISHER_SUSPENDED"; - -export interface PublishResponse { - kind: string; - item_id: string; - status: PublishStatus[]; - statusDetail: string[]; -} - -export interface APIClient { - /** @async */ - uploadExisting(readStream: NodeJS.ReadableStream, token?: string): Promise; - - /** @async */ - publish(target?: string, token?: string): Promise; - - /** @async */ - get(projection?: string, token?: string): Promise; - - /** @async */ - fetchToken(): Promise; -} - -export default function chromeWebstoreUpload(options: Options): APIClient; diff --git a/types/chrome-webstore-upload/package.json b/types/chrome-webstore-upload/package.json deleted file mode 100644 index d73928c55edf9a..00000000000000 --- a/types/chrome-webstore-upload/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "private": true, - "name": "@types/chrome-webstore-upload", - "version": "1.0.9999", - "projects": [ - "https://github.com/fregante/chrome-webstore-upload" - ], - "type": "module", - "dependencies": { - "@types/node": "*" - }, - "devDependencies": { - "@types/chrome-webstore-upload": "workspace:." - }, - "owners": [ - { - "name": "Granga", - "githubUsername": "Granga" - } - ] -} diff --git a/types/chrome-webstore-upload/tsconfig.json b/types/chrome-webstore-upload/tsconfig.json deleted file mode 100644 index 5c0cdc39ba0c39..00000000000000 --- a/types/chrome-webstore-upload/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "chrome-webstore-upload-tests.ts" - ] -} From 972097ec949ff9942316697586af497b7163fd42 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:03:15 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75598=20feat?= =?UTF-8?q?(mailparser):=20update=20to=203.9.x=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/mailparser/index.d.ts | 81 +++++-- types/mailparser/mailparser-tests.ts | 349 ++++++++++++++++++++++----- types/mailparser/package.json | 2 +- 3 files changed, 349 insertions(+), 83 deletions(-) diff --git a/types/mailparser/index.d.ts b/types/mailparser/index.d.ts index 631f6fc5595e24..58a38d64d68ad7 100644 --- a/types/mailparser/index.d.ts +++ b/types/mailparser/index.d.ts @@ -98,9 +98,9 @@ export interface AttachmentCommon { contentType: string; /** * Content disposition type for the attachment, - * most probably `'attachment'`. + * usually `"attachment"` or `"inline"`. */ - contentDisposition: string; + contentDisposition?: string | undefined; /** * File name of the attachment. */ @@ -114,26 +114,29 @@ export interface AttachmentCommon { */ headerLines: HeaderLines; /** - * A MD5 hash of the message content. + * MD5 hash of the attachment content (configurable via `checksumAlgo`) */ checksum: string; /** - * Message size in bytes. + * Size in bytes. */ size: number; /** - * The header value from `Content-ID`. + * Content-ID header value (with angle brackets). */ contentId?: string | undefined; /** - * `contentId` without `<` and `>`. + * Content-ID without angle brackets, for matching `cid:` URLs. */ - cid?: string | undefined; // e.g. '5.1321281380971@localhost' + cid?: string | undefined; /** - * If true then this attachment should not be offered for download - * (at least not in the main attachments list). + * `true` if the attachment is inline content (e.g., embedded image referenced in HTML). */ related?: boolean | undefined; + /** + * Undocumented. + */ + partId?: string | undefined; } /** @@ -145,8 +148,7 @@ export interface Attachment extends AttachmentCommon { */ content: Buffer; /** - * If true then this attachment should not be offered for download - * (at least not in the main attachments list). + * `true` if the attachment is inline content (e.g., embedded image referenced in HTML). */ related: boolean; } @@ -156,7 +158,7 @@ export interface Attachment extends AttachmentCommon { */ export interface AttachmentStream extends AttachmentCommon { /** - * A Buffer that contains the attachment contents. + * A Readable Stream that contains the attachment contents. */ content: Stream; /** @@ -170,11 +172,11 @@ export interface AttachmentStream extends AttachmentCommon { */ export interface ParsedMail { /** - * An array of attachments. + * An array of attachments (buffered in memory). */ attachments: Attachment[]; /** - * A Map object with lowercase header keys. + * A `Map` of lowercase header keys to their parsed values * * - All address headers are converted into address objects. * - `references` is a string if only a single reference-id exists or an @@ -204,7 +206,7 @@ export interface ParsedMail { */ textAsHtml?: string | undefined; /** - * The subject line. + * The subject line (shorthand for `headers.get('subject')`). */ subject?: string | undefined; /** @@ -289,7 +291,14 @@ export interface MessageText { export class MailParser extends StreamModule.Transform { constructor(options?: MailParserOptions); on(event: string, callback: (any: any) => void): this; + /** + * Emits a `Map` of parsed header keys to their values. Fired once when headers are fully parsed. + */ on(event: "headers", callback: (headers: Headers) => void): this; + /** + * Emits an `Array` of objects with `key` and `line` properties containing the raw header data. + */ + on(event: "headerLines", callback: (headerLines: HeaderLines) => void): this; on(event: "data" | "readable", callback: (data: AttachmentStream | MessageText) => void): this; } @@ -302,14 +311,56 @@ export type Source = Buffer | Stream | string; * Options object for MailParser. */ export interface MailParserOptions extends StreamModule.TransformOptions { + /** + * Do not generate `text` from HTML when no plain text part exists. + * @default false + */ skipHtmlToText?: boolean | undefined; + /** + * Maximum HTML length (in characters of the decoded body) to convert to text. + * If exceeded, an `'error'` event is emitted (rejecting `simpleParser`) and the HTML part is dropped from the output. + * @default Infinity + */ maxHtmlLengthToParse?: number | undefined; + /** + * Custom function to format Date objects as strings. + * @default undefined + */ formatDateString?: ((d: Date) => string) | undefined; + /** + * Keep `cid:` image URLs as-is instead of converting to data URIs. + * @default false + */ skipImageLinks?: boolean | undefined; + /** + * Do not generate `textAsHtml` from plain text. + * @default false + */ skipTextToHtml?: boolean | undefined; + /** + * Do not auto-detect and linkify URLs in plain text. + * @default false + */ skipTextLinks?: boolean | undefined; + /** + * Treat `message/delivery-status` parts as attachments instead of text. + * @default false + */ + keepDeliveryStatus?: boolean | undefined; + /** + * Alternative iconv implementation for character set conversion. + * @default iconv-lite + */ Iconv?: DecoderStream | undefined; + /** + * Hash algorithm for attachment checksums. + * @default 'md5' + */ checksumAlgo?: string | undefined; + /** + * **simpleParser only** - Keep `cid:` URLs instead of converting them to data URIs (same as `skipImageLinks: true`). + * @default false + */ keepCidLinks?: boolean | undefined; } diff --git a/types/mailparser/mailparser-tests.ts b/types/mailparser/mailparser-tests.ts index acba82c8b141a3..a510526d3f4568 100644 --- a/types/mailparser/mailparser-tests.ts +++ b/types/mailparser/mailparser-tests.ts @@ -1,87 +1,302 @@ +import fs = require("fs"); import { getDecoder } from "iconv-lite"; -import { MailParser, simpleParser } from "mailparser"; +import { + AttachmentStream, + HeaderLines, + Headers, + HeaderValue, + MailParser, + MailParserOptions, + MessageText, + ParsedMail, + simpleParser, + Source, +} from "mailparser"; -const mailparser = new MailParser(); +const sourceString = ""; +const sourceBuffer = Buffer.from(""); +const sourceStream = fs.createReadStream("foo.eml"); +const source: Source = sourceString; -mailparser.on("headers", (headers) => { - console.log("Subject:", headers.get("subject")); +const parser = new MailParser(); + +// $ExpectType MailParser +parser.on("headers", (headers) => { + // $ExpectType HeaderValue | undefined + headers.get("subject"); + // $ExpectType HeaderValue | undefined + headers.get("from"); }); -// Attachments -mailparser.on("data", data => { - if (data.type === "attachment") { - console.log(data.filename); - data.content.pipe(process.stdout); - data.content.on("end", () => data.release()); - } +// $ExpectType MailParser +parser.on("headerLines", (headerLines) => { + // $ExpectType HeaderLines + headerLines; + // $ExpectType string + headerLines[0].key; + // $ExpectType string + headerLines[0].line; }); -mailparser.on("data", data => { - if (data.type === "text") { - console.log(data.html); +// $ExpectType MailParser +parser.on("data", (data) => { + if ((data as AttachmentStream).type === "attachment") { + const attachment = data as AttachmentStream; + + // $ExpectType AttachmentStream + attachment; + // $ExpectType string | undefined + attachment.filename; + // $ExpectType void + attachment.release(); + // $ExpectType Stream + attachment.content; + } else { + const message = data as MessageText; + + // $ExpectType MessageText + message; + // $ExpectType string | boolean | undefined + message.html; + // $ExpectType string | undefined + message.text; + // $ExpectType string | undefined + message.textAsHtml; } }); -// Validate options -const mailparser2 = new MailParser( - { - skipHtmlToText: true, - maxHtmlLengthToParse: 88, - formatDateString: (d: Date) => d.toDateString(), - skipImageLinks: true, - skipTextToHtml: true, - skipTextLinks: true, - Iconv: getDecoder("ascii"), - checksumAlgo: "md5", - keepCidLinks: true, - }, -); - -// Pipe file to MailParser -// This example pipes a readableStream file to MailParser -import fs = require("fs"); -fs.createReadStream("email.eml").pipe(mailparser); +// $ExpectType MailParser +parser.on("readable", (data) => { + const readableData = data as AttachmentStream | MessageText; -// check different sources and promise/callback api for simpleParser -const sourceString = ""; -const sourceBuffer = new Buffer(""); -const sourceStream = fs.createReadStream("foo.eml"); + // $ExpectType AttachmentStream | MessageText + readableData; +}); + +const options: MailParserOptions = { + skipHtmlToText: true, + maxHtmlLengthToParse: 88, + formatDateString: (d: Date) => d.toDateString(), + skipImageLinks: true, + skipTextToHtml: true, + skipTextLinks: true, + keepDeliveryStatus: true, + Iconv: getDecoder("ascii"), + checksumAlgo: "md5", + keepCidLinks: true, +}; -simpleParser(sourceString, (err, mail) => err ? err : mail.html); -simpleParser(sourceBuffer, (err, mail) => err ? err : mail.html); -simpleParser(sourceStream, (err, mail) => err ? err : mail.html); -simpleParser(sourceString, { keepCidLinks: true }, (err, mail) => err ? err : mail.html); -simpleParser(sourceBuffer, { keepCidLinks: true }, (err, mail) => err ? err : mail.html); -simpleParser(sourceStream, { keepCidLinks: true }, (err, mail) => err ? err : mail.html); +// $ExpectType MailParserOptions +options; -simpleParser(sourceString).then(mail => mail.html).catch(err => err); -simpleParser(sourceBuffer).then(mail => mail.html).catch(err => err); -simpleParser(sourceStream).then(mail => mail.html).catch(err => err); -simpleParser(sourceString, { keepCidLinks: true }).then(mail => mail.html).catch(err => err); -simpleParser(sourceBuffer, { keepCidLinks: true }).then(mail => mail.html).catch(err => err); -simpleParser(sourceStream, { keepCidLinks: true }).then(mail => mail.html).catch(err => err); +const configuredParser = new MailParser(options); +// $ExpectType MailParser +configuredParser; +// $ExpectType void simpleParser(sourceString, (err, mail) => { - console.log(mail.headers.get("subject")); - console.log(mail.subject); + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType HeaderValue | undefined + mail.headers.get("subject"); + // $ExpectType string | undefined + mail.subject; + // $ExpectType string | false + mail.html; + // $ExpectType string | undefined + mail.text; + // $ExpectType string | undefined + mail.textAsHtml; + // $ExpectType string[] | string | undefined + mail.references; + // $ExpectType AddressObject | AddressObject[] | undefined + mail.to; + // $ExpectType string | undefined + mail.messageId; + // $ExpectType Date | undefined + mail.date; + // $ExpectType Attachment[] + mail.attachments; + // $ExpectType string | undefined + mail.attachments[0]?.filename; + // $ExpectType Buffer || Buffer + mail.attachments[0].content; +}); - // Attachments - mail.attachments.forEach(attachment => console.log(attachment.filename)); +// $ExpectType void +simpleParser(sourceBuffer, (err, mail) => { + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; +}); - // TO Recipieints - if (Array.isArray(mail.to)) { - mail.to.forEach(recipient => console.log(recipient)); - } else { - console.log(mail.to); - } +// $ExpectType void +simpleParser(sourceStream, (err, mail) => { + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; +}); + +// $ExpectType void +simpleParser(sourceString, { keepCidLinks: true }, (err, mail) => { + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; +}); - // Texte - console.log(mail.text); - console.log(mail.html); - console.log(mail.textAsHtml); +// $ExpectType void +simpleParser(sourceBuffer, { keepCidLinks: true }, (err, mail) => { + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; +}); - // References are either arrays or strings - if (mail.references && !Array.isArray(mail.references)) { - mail.references.toLowerCase(); - } +// $ExpectType void +simpleParser(sourceStream, { keepCidLinks: true }, (err, mail) => { + // $ExpectType any + err; + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; }); + +// $ExpectType Promise +simpleParser(sourceString); + +// $ExpectType Promise +simpleParser(sourceBuffer); + +// $ExpectType Promise +simpleParser(sourceStream); + +// $ExpectType Promise +simpleParser(sourceString, { keepCidLinks: true }); + +// $ExpectType Promise +simpleParser(sourceBuffer, { keepCidLinks: true }); + +// $ExpectType Promise +simpleParser(sourceStream, { keepCidLinks: true }); + +simpleParser(sourceString).then((mail) => { + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; + // $ExpectType string[] | string | undefined + mail.references; +}); + +simpleParser(sourceString, { keepCidLinks: true }).then((mail) => { + // $ExpectType ParsedMail + mail; + // $ExpectType string | false + mail.html; + // $ExpectType string[] | string | undefined + mail.references; +}); + +const headerMap: Headers = new Map(); +// $ExpectType Headers +headerMap; +// $ExpectType HeaderValue | undefined +headerMap.get("subject"); + +const rawHeaderLines: HeaderLines = [{ key: "subject", line: "Subject: test" }]; +// $ExpectType HeaderLines +rawHeaderLines; +// $ExpectType string +rawHeaderLines[0].key; +// $ExpectType string +rawHeaderLines[0].line; + +const messageText: MessageText = { + type: "text", + text: "hello", + html: "

hello

", + textAsHtml: "

hello

", +}; +// $ExpectType MessageText +messageText; +// $ExpectType "text" +messageText.type; + +const streamData: AttachmentStream = { + type: "attachment", + content: sourceStream, + contentType: "text/plain", + headers: new Map(), + headerLines: rawHeaderLines, + checksum: "abc123", + size: 3, + filename: "test.txt", + partId: "1", + release: () => undefined, +}; +// $ExpectType AttachmentStream +streamData; +// $ExpectType void +streamData.release(); +// $ExpectType Stream +streamData.content; + +const parsedMail: ParsedMail = { + attachments: [{ + type: "attachment", + content: Buffer.from("x"), + contentType: "text/plain", + headers: new Map(), + headerLines: rawHeaderLines, + checksum: "abc123", + size: 1, + filename: "test.txt", + partId: "1", + related: false, + }], + headers: new Map(), + headerLines: rawHeaderLines, + html: "

hello

", + text: "hello", + textAsHtml: "

hello

", + subject: "Hello", + references: "abc", + date: new Date(), + to: [{ value: [], html: "", text: "" }], + from: { value: [], html: "", text: "" }, + cc: [{ value: [], html: "", text: "" }], + bcc: [{ value: [], html: "", text: "" }], + replyTo: { value: [], html: "", text: "" }, + messageId: "", + inReplyTo: "", + priority: "normal", +}; +// $ExpectType ParsedMail +parsedMail; +// $ExpectType string | false +parsedMail.html; +// $ExpectType string[] | string | undefined +parsedMail.references; +// $ExpectType AddressObject | AddressObject[] | undefined +parsedMail.to; +// $ExpectType "normal" | "low" | "high" | undefined +parsedMail.priority; +// $ExpectType Buffer[] || Buffer[] +parsedMail.attachments.map((attachment) => attachment.content); + +source; +fs.createReadStream("email.eml").pipe(parser); diff --git a/types/mailparser/package.json b/types/mailparser/package.json index 334bd220a7957a..b60389c8b07a98 100644 --- a/types/mailparser/package.json +++ b/types/mailparser/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/mailparser", - "version": "3.4.9999", + "version": "3.9.9999", "projects": [ "https://github.com/nodemailer/mailparser" ], From 4d04590639d3b638f2a6516913948155bb729c74 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:03:28 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75579=20feat?= =?UTF-8?q?(get-value):=20remove=20types=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 +++ types/get-value/.npmignore | 5 ---- types/get-value/get-value-tests.ts | 25 ---------------- types/get-value/index.d.ts | 47 ------------------------------ types/get-value/package.json | 17 ----------- types/get-value/tsconfig.json | 19 ------------ 6 files changed, 4 insertions(+), 113 deletions(-) delete mode 100644 types/get-value/.npmignore delete mode 100644 types/get-value/get-value-tests.ts delete mode 100644 types/get-value/index.d.ts delete mode 100644 types/get-value/package.json delete mode 100644 types/get-value/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 3047e93236ed09..5c1fde3b4ad0b7 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2661,6 +2661,10 @@ "libraryName": "get-urls", "asOfVersion": "9.1.0" }, + "get-value": { + "libraryName": "get-value", + "asOfVersion": "4.0.1" + }, "getopts": { "libraryName": "getopts", "asOfVersion": "2.1.0" diff --git a/types/get-value/.npmignore b/types/get-value/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/get-value/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/get-value/get-value-tests.ts b/types/get-value/get-value-tests.ts deleted file mode 100644 index 478cd69160837a..00000000000000 --- a/types/get-value/get-value-tests.ts +++ /dev/null @@ -1,25 +0,0 @@ -import get = require("get-value"); -const obj = { a: { b: { c: { d: "foo" } } } }; - -get(obj); -get(obj, "a"); -get(obj, "a.b"); -get(obj, "a.b.c"); -get(obj, "a.b.c.d"); -get(obj, ["a"]); -get(obj, ["a", "b", "c"]); -get(obj, ["a", "b", "c", "d"]); - -{ - const isEnumerable = Object.prototype.propertyIsEnumerable; - const options: get.Options = { - isValid: (key, obj) => isEnumerable.call(obj, key) || typeof obj[key] === "string", - }; - - const obj = {}; - Object.defineProperty(obj, "foo", { value: "bar", enumerable: false }); - - get(obj, "foo", options); - get({}, "hasOwnProperty", options); - get({}, "constructor", options); -} diff --git a/types/get-value/index.d.ts b/types/get-value/index.d.ts deleted file mode 100644 index 9bb9e93e88cc72..00000000000000 --- a/types/get-value/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -export = get; - -declare function get(obj: T): T; -declare function get(obj: object, key: string | string[], options?: get.Options): any; - -declare namespace get { - interface Options { - /** - * The default value to return when get-value cannot result a value from the given object. - * - * default: `undefined` - */ - default?: any; - /** - * If defined, this function is called on each resolved value. - * Useful if you want to do `.hasOwnProperty` or `Object.prototype.propertyIsEnumerable`. - */ - isValid?: ((key: K, object: Record) => boolean) | undefined; - /** - * Custom function to use for splitting the string into object path segments. - * - * default: `String.split` - */ - split?: ((s: string) => string[]) | undefined; - /** - * The separator to use for spliting the string. - * (this is probably not needed when `options.split` is used). - * - * default: `"."` - */ - separator?: string | RegExp | undefined; - /** - * Customize how the object path is created when iterating over path segments. - * - * default: `Array.join` - */ - join?: ((segs: string[]) => string) | undefined; - /** - * The character to use when re-joining the string to check for keys - * with dots in them (this is probably not needed when `options.join` is used). - * This can be a different value than the separator, since the separator can be a string or regex. - * - * default: `"."` - */ - joinChar?: string | undefined; - } -} diff --git a/types/get-value/package.json b/types/get-value/package.json deleted file mode 100644 index 85aee4e46e7818..00000000000000 --- a/types/get-value/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/get-value", - "version": "3.0.9999", - "projects": [ - "https://github.com/jonschlinkert/get-value" - ], - "devDependencies": { - "@types/get-value": "workspace:." - }, - "owners": [ - { - "name": "Daniel Rosenwasser", - "githubUsername": "DanielRosenwasser" - } - ] -} diff --git a/types/get-value/tsconfig.json b/types/get-value/tsconfig.json deleted file mode 100644 index aa125ed031a511..00000000000000 --- a/types/get-value/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "get-value-tests.ts" - ] -} From b6c31520521c98787e2b0d9d7e1d61ada5f53576 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:03:44 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75578=20feat?= =?UTF-8?q?(is-html):=20remove=20types=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 ++++ types/is-html/.npmignore | 5 ----- types/is-html/index.d.ts | 6 ------ types/is-html/is-html-tests.ts | 3 --- types/is-html/package.json | 17 ----------------- types/is-html/tsconfig.json | 19 ------------------- 6 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 types/is-html/.npmignore delete mode 100644 types/is-html/index.d.ts delete mode 100644 types/is-html/is-html-tests.ts delete mode 100644 types/is-html/package.json delete mode 100644 types/is-html/tsconfig.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 5c1fde3b4ad0b7..24346d3becd229 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -3381,6 +3381,10 @@ "libraryName": "is-generator-function", "asOfVersion": "1.1.0" }, + "is-html": { + "libraryName": "is-html", + "asOfVersion": "3.1.0" + }, "is-image": { "libraryName": "is-image", "asOfVersion": "3.0.0" diff --git a/types/is-html/.npmignore b/types/is-html/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/is-html/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/is-html/index.d.ts b/types/is-html/index.d.ts deleted file mode 100644 index 07d6d10cfbb14b..00000000000000 --- a/types/is-html/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Check if given input string is HTML - * @param input The input string - */ -declare function isHTML(input: string): boolean; -export = isHTML; diff --git a/types/is-html/is-html-tests.ts b/types/is-html/is-html-tests.ts deleted file mode 100644 index ccb48cafebd8ac..00000000000000 --- a/types/is-html/is-html-tests.ts +++ /dev/null @@ -1,3 +0,0 @@ -import isHtml = require("is-html"); - -isHtml("hello world"); // $ExpectType boolean diff --git a/types/is-html/package.json b/types/is-html/package.json deleted file mode 100644 index 21fe0d29b77a32..00000000000000 --- a/types/is-html/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/is-html", - "version": "2.0.9999", - "projects": [ - "https://github.com/sindresorhus/is-html" - ], - "devDependencies": { - "@types/is-html": "workspace:." - }, - "owners": [ - { - "name": "Samuel Menigat", - "githubUsername": "smenigat" - } - ] -} diff --git a/types/is-html/tsconfig.json b/types/is-html/tsconfig.json deleted file mode 100644 index fa7d04a51b4db2..00000000000000 --- a/types/is-html/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "is-html-tests.ts" - ] -} From 487df66887bbbc6884fe80791649854fa8252853 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:03:47 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75577=20feat?= =?UTF-8?q?(vimeo=5F=5Fplayer):=20remove=20types=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notNeededPackages.json | 4 + types/vimeo__player/.npmignore | 5 - types/vimeo__player/index.d.ts | 364 --------- types/vimeo__player/package.json | 41 - types/vimeo__player/tsconfig.json | 20 - types/vimeo__player/vimeo__player-tests.ts | 886 --------------------- 6 files changed, 4 insertions(+), 1316 deletions(-) delete mode 100644 types/vimeo__player/.npmignore delete mode 100755 types/vimeo__player/index.d.ts delete mode 100644 types/vimeo__player/package.json delete mode 100644 types/vimeo__player/tsconfig.json delete mode 100644 types/vimeo__player/vimeo__player-tests.ts diff --git a/notNeededPackages.json b/notNeededPackages.json index 24346d3becd229..6f4c23b97d9904 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -8251,6 +8251,10 @@ "libraryName": "viewport-mercator-project", "asOfVersion": "7.0.2" }, + "vimeo__player": { + "libraryName": "@vimeo/player", + "asOfVersion": "2.29.4" + }, "vinyl-file": { "libraryName": "vinyl-file", "asOfVersion": "4.1.0" diff --git a/types/vimeo__player/.npmignore b/types/vimeo__player/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/vimeo__player/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/vimeo__player/index.d.ts b/types/vimeo__player/index.d.ts deleted file mode 100755 index cc4898cc7cb1d2..00000000000000 --- a/types/vimeo__player/index.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -declare namespace Vimeo { - namespace Player { - export type TrackKind = "captions" | "subtitles"; - - export interface Error { - name: string; - message: string; - method: string; - } - - export interface TimeEvent { - duration: number; - percent: number; - seconds: number; - } - - export interface TextTrackChangeEvent { - kind: TrackKind | null; - label: string | null; - language: string | null; - } - - export interface VimeoChapter { - startTime: number; - title: string; - - /** - * The `index` property of each chapter is the place it holds in the order of all the chapters. It starts at 1. - */ - index: number; - } - - export interface Cue { - /** - * The `html` property contains the HTML that the Player renders for that cue. - */ - html: string; - - /** - * The `text` property of each cue is the raw value parsed from the caption or subtitle file. - */ - text: string; - } - - export interface CueChangeEvent { - cues: Cue[]; - kind: TrackKind; - label: string; - language: string; - } - - export interface CuePointEvent { - time: number; - - /** - * The `data` property will be the custom data provided in the `addCuePoint()` call, or an empty object if none was provided. - */ - data: VimeoCuePointData; - id: string; - } - - export interface VolumeChangeEvent { - volume: number; - } - - export interface PlaybackRateEvent { - playbackRate: number; - } - - export interface LoadedEvent { - id: number; - } - - export interface DurationChangeEvent { - duration: number; - } - - export interface FullScreenChangeEvent { - fullscreen: boolean; - } - - export interface VimeoVideoQualityObject { - label: string; - id: string; - active: boolean; - } - - export interface QualityChangeEvent { - quality: VimeoVideoQuality; - } - - export interface VimeoCameraProps { - yaw: number; - pitch: number; - roll: number; - fov: number; - } - - export interface ResizeEvent { - videoWidth: number; - videoHeight: number; - } - - export interface EventMap { - /** - * Triggered when video playback is initiated. - */ - play: TimeEvent; - - /** - * Triggered when the video starts playing. - */ - playing: TimeEvent; - - /** - * Triggered when the video pauses. - */ - pause: TimeEvent; - - /** - * Triggered any time the video playback reaches the end. _Note_: when loop is turned on, the ended `event` will not fire. - */ - ended: TimeEvent; - - /** - * Triggered as the `currentTime` of the video updates. It generally fires every 250ms, but it may vary depending on the browser. - */ - timeupdate: TimeEvent; - - /** - * Triggered as the video is loaded. Reports back the amount of the video that has been buffered. - */ - progress: TimeEvent; - - /** - * Triggered when the player starts seeking to a specific time. A `timeupdate` event will also be fired at the same time. - */ - seeking: TimeEvent; - - /** - * Triggered when the player seeks to a specific time. A `timeupdate` event will also be fired at the same time. - */ - seeked: TimeEvent; - - /** - * Triggered when the active text track (captions/subtitles) changes. The values will be null if text tracks are turned off. - */ - texttrackchange: TextTrackChangeEvent; - - /** - * Triggered when the current chapter changes. - */ - chapterchange: VimeoChapter; - - /** - * Triggered when the active cue for the current text track changes. It also fires when the active text track changes. There may be multiple cues active. - */ - cuechange: CueChangeEvent; - - /** - * Triggered when the current time hits a registered cue point. - */ - cuepoint: CuePointEvent; - - /** - * Triggered when the volume in the player changes. Some devices do not support setting the volume of the video independently from the system volume, so this event will never fire on those - * devices. - */ - volumechange: VolumeChangeEvent; - - /** - * Triggered when the playback rate of the video in the player changes. The ability to change rate can be disabled by the creator and the event will not fire for those videos. The new - * playback rate is returned with the event. - */ - playbackratechange: PlaybackRateEvent; - - /** - * Triggered when buffering starts in the player. This is also triggered during preload and while seeking. There is no associated data with this event. - */ - bufferstart: never; - - /** - * Triggered when buffering ends in the player. This is also triggered at the end of preload and seeking. There is no associated data with this event. - */ - bufferend: never; - - /** - * Triggered when some kind of error is generated in the player. In general if you are using this API library, you should use `.catch()` on each method call instead of globally listening - * for error events. - * - * If the error was generated from a method call, the name of that method will be included. - */ - error: Error; - - /** - * Triggered when a new video is loaded in the player. - */ - loaded: LoadedEvent; - - /** - * Triggered when the duration attribute has been updated. - */ - durationchange: DurationChangeEvent; - - /** - * Triggered when the player enters or exits fullscreen. - */ - fullscreenchange: FullScreenChangeEvent; - - /** - * Triggered when the set quality changes. - */ - qualitychange: QualityChangeEvent; - - /** - * Triggered when any of the camera properties change for 360° videos. - */ - camerachange: VimeoCameraProps; - - /** - * Triggered when the intrinsic size of the media changes. - */ - resize: ResizeEvent; - - /** - * Triggered when the player enters picture-in-picture. - */ - enterpictureinpicture: never; - - /** - * Triggered when the player leaves picture-in-picture. - */ - leavepictureinpicture: never; - } - - export type EventCallback = (data: Data) => any; - - export type VimeoTimeRange = [number, number]; - export type VimeoVideoQuality = "auto" | "4K" | "2K" | "1080p" | "720p" | "540p" | "360p" | "240p"; - - export interface VimeoCuePoint { - time: number; - data: VimeoCuePointData; - id: string; - } - - export interface VimeoCuePointData { - [key: string]: any; - } - - export interface VimeoTextTrack { - language: string; - kind: TrackKind; - label: string; - mode?: string | undefined; - } - - export interface Options { - id?: number | undefined; - url?: string | undefined; - autopause?: boolean | undefined; - autoplay?: boolean | undefined; - background?: boolean | undefined; - byline?: boolean | undefined; - color?: string | undefined; - controls?: boolean | undefined; - dnt?: boolean | undefined; - height?: number | undefined; - interactive_params?: string | undefined; - keyboard?: boolean | undefined; - loop?: boolean | undefined; - maxheight?: number | undefined; - maxwidth?: number | undefined; - muted?: boolean | undefined; - pip?: boolean | undefined; - playsinline?: boolean | undefined; - portrait?: boolean | undefined; - responsive?: boolean | undefined; - speed?: boolean | undefined; - quality?: VimeoVideoQuality | undefined; - texttrack?: string | undefined; - title?: boolean | undefined; - transparent?: boolean | undefined; - width?: number | undefined; - } - - // This property doesn’t actually exist. - // It’s defined for backwards compatibility with older versions of the type definitions. - export { Player as default }; - } - - class Player { - constructor(element: HTMLIFrameElement | HTMLElement | string, options?: Player.Options); - - on( - event: EventName, - callback: Player.EventCallback, - ): void; - on(event: string, callback: Player.EventCallback): void; - off( - event: EventName, - callback: Player.EventCallback, - ): void; - off(event: string, callback?: Player.EventCallback): void; - loadVideo(id: number): Promise; - loadVideo(url: string): Promise; - loadVideo(options: Player.Options): Promise<{ [prop: string]: any }>; - ready(): Promise; - enableTextTrack(language: string, kind?: Player.TrackKind): Promise; - disableTextTrack(): Promise; - pause(): Promise; - play(): Promise; - unload(): Promise; - requestFullscreen(): Promise; - exitFullscreen(): Promise; - getFullscreen(): Promise; - requestPictureInPicture(): Promise; - exitPictureInPicture(): Promise; - getPictureInPicture(): Promise; - getAutopause(): Promise; - setAutopause(autopause: boolean): Promise; - getColor(): Promise; - setColor(color: string): Promise; - getChapters(): Promise; - getCurrentChapter(): Promise; - addCuePoint(time: number, data: Player.VimeoCuePointData): Promise; - removeCuePoint(id: string): Promise; - getCuePoints(): Promise; - getBuffered(): Promise; - getCurrentTime(): Promise; - setCurrentTime(seconds: number): Promise; - getDuration(): Promise; - getEnded(): Promise; - getLoop(): Promise; - setLoop(loop: boolean): Promise; - getMuted(): Promise; - setMuted(muted: boolean): Promise; - getPaused(): Promise; - getPlayed(): Promise; - getSeekable(): Promise; - getSeeking(): Promise; - getPlaybackRate(): Promise; - setPlaybackRate(playbackRate: number): Promise; - getTextTracks(): Promise; - getVideoEmbedCode(): Promise; - getVideoId(): Promise; - getVideoTitle(): Promise; - getVideoWidth(): Promise; - getVideoHeight(): Promise; - getVideoUrl(): Promise; - getVolume(): Promise; - setVolume(volume: number): Promise; - getQualities(): Promise; - getQuality(): Promise; - setQuality(quality: Player.VimeoVideoQuality): Promise; - getCameraProps(): Promise; - setCameraProps(cameraProps: Player.VimeoCameraProps): Promise; - destroy(): Promise; - } -} - -export as namespace Vimeo; - -export = Vimeo.Player; diff --git a/types/vimeo__player/package.json b/types/vimeo__player/package.json deleted file mode 100644 index 636da4282dbb7f..00000000000000 --- a/types/vimeo__player/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "private": true, - "name": "@types/vimeo__player", - "version": "2.18.9999", - "projects": [ - "https://github.com/vimeo/player.js" - ], - "devDependencies": { - "@types/vimeo__player": "workspace:." - }, - "owners": [ - { - "name": "Denis Yılmaz", - "githubUsername": "denisyilmaz" - }, - { - "name": "Felix Albert", - "url": "f.albert.work@icloud.com" - }, - { - "name": "Tim Chen", - "githubUsername": "timc13" - }, - { - "name": "Terry Mun", - "githubUsername": "terrymun" - }, - { - "name": "Coskun Deniz", - "url": "deniz@tassomai.com" - }, - { - "name": "Kohei Watanabe", - "githubUsername": "kou029w" - }, - { - "name": "Michael Markey", - "githubUsername": "mikeamarkey" - } - ] -} diff --git a/types/vimeo__player/tsconfig.json b/types/vimeo__player/tsconfig.json deleted file mode 100644 index 9322c68c77a2cc..00000000000000 --- a/types/vimeo__player/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "vimeo__player-tests.ts" - ] -} diff --git a/types/vimeo__player/vimeo__player-tests.ts b/types/vimeo__player/vimeo__player-tests.ts deleted file mode 100644 index 358713b69dbac4..00000000000000 --- a/types/vimeo__player/vimeo__player-tests.ts +++ /dev/null @@ -1,886 +0,0 @@ -import Player = require("@vimeo/player"); - -// based on README.md of @vimeo/player >> https://github.com/vimeo/player.js - -let player: Player; -let defaultPlayer: Player.default; - -player = new Player("handstick", { - id: 19231868, - width: 640, - - // Use default values for settings, to test typings - autopause: true, - autoplay: false, - background: false, - byline: true, - color: "#00adef", - controls: true, - dnt: false, - interactive_params: "key1=value1,key2=value2", - keyboard: true, - loop: false, - muted: false, - pip: false, - playsinline: true, - portrait: true, - quality: "auto", - responsive: false, - speed: false, - title: true, - transparent: true, -}); - -player = new Player.default("handstick"); -defaultPlayer = new Player("handstick"); -defaultPlayer = new Player.default("handstick"); - -const onPlay = (data: any) => { - // data is an object containing properties specific to that event -}; - -player.on("play", onPlay); - -// If later on you decide that you don’t need to listen for play anymore. -player.off("play", onPlay); - -// Alternatively, `off` can be called with just the event name to remove all -// listeners. -player.off("play"); - -player - .loadVideo(76979871) - .then(id => { - // the video successfully loaded - }) - .catch(error => { - switch (error.name) { - case "TypeError": - // the id was not a number - break; - - case "PasswordError": - // the video is password-protected and the viewer needs to enter the - // password first - break; - - case "PrivacyError": - // the video is password-protected or private - break; - - default: - // some other error occurred - break; - } - }); - -player - .loadVideo("http://vimeo.com/video/76979871") - .then(url => { - // the video successfully loaded - }) - .catch(error => { - switch (error.name) { - case "TypeError": - // the id was not a number - break; - - case "PasswordError": - // the video is password-protected and the viewer needs to enter the - // password first - break; - - case "PrivacyError": - // the video is password-protected or private - break; - - default: - // some other error occurred - break; - } - }); - -player - .loadVideo({ - id: 76979871, - }) - .then(options => { - // the video successfully loaded - }) - .catch(error => { - switch (error.name) { - case "TypeError": - // the id was not a number - break; - - case "PasswordError": - // the video is password-protected and the viewer needs to enter the - // password first - break; - - case "PrivacyError": - // the video is password-protected or private - break; - - default: - // some other error occurred - break; - } - }); - -player.ready().then(() => { - // the player is ready -}); - -player - .enableTextTrack("en") - .then(track => { - console.log(track.label); - console.log(track.kind); - console.log(track.language); - // track.language = the iso code for the language - // track.kind = 'captions' or 'subtitles' - // track.label = the human-readable label - }) - .catch(error => { - switch (error.name) { - case "InvalidTrackLanguageError": - // no track was available with the specified language - break; - - case "InvalidTrackError": - // no track was available with the specified language and kind - break; - - default: - // some other error occurred - break; - } - }); - -player - .disableTextTrack() - .then(() => { - // the track was disabled - }) - .catch(error => { - // an error occurred - }); - -player - .pause() - .then(() => { - // the video was paused - }) - .catch(error => { - switch (error.name) { - case "PasswordError": - // the video is password-protected and the viewer needs to enter the - // password first - break; - - case "PrivacyError": - // the video is private - break; - - default: - // some other error occurred - break; - } - }); - -player - .play() - .then(() => { - // the video was played - }) - .catch(error => { - switch (error.name) { - case "PasswordError": - // the video is password-protected and the viewer needs to enter the - // password first - break; - - case "PrivacyError": - // the video is private - break; - - default: - // some other error occurred - break; - } - }); - -player - .unload() - .then(() => { - // the video was unloaded - }) - .catch(error => { - // an error occurred - }); - -player - .requestFullscreen() - .then(() => { - // the player entered fullscreen - }) - .catch(error => { - // an error occurred - }); - -player - .exitFullscreen() - .then(() => { - // the player exits fullscreen - }) - .catch(error => { - // an error occurred - }); - -player - .getFullscreen() - .then(() => { - // fullscreen = whether fullscreen is turned on or off - }) - .catch(error => { - // an error occurred - }); - -player - .requestPictureInPicture() - .then(() => { - // the player entered picture-in-picture - }) - .catch(error => { - // an error occurred - }); - -player - .exitPictureInPicture() - .then(() => { - // the player exits picture-in-picture - }) - .catch(error => { - // an error occurred - }); - -player - .getPictureInPicture() - .then(() => { - // pip = whether picture-in-picture is turned on or off - }) - .catch(() => { - // an error occurred - }); - -player - .getAutopause() - .then(autopause => { - // autopause = whether autopause is turned on or off - }) - .catch(error => { - switch (error.name) { - case "UnsupportedError": - // Autopause is not supported with the current player or browser - break; - - default: - // some other error occurred - break; - } - }); - -player - .setAutopause(false) - .then(autopause => { - // autopause was turned off - }) - .catch(error => { - switch (error.name) { - case "UnsupportedError": - // Autopause is not supported with the current player or browser - break; - - default: - // some other error occurred - break; - } - }); - -player - .getColor() - .then(color => { - // color = the hex color of the player - }) - .catch(error => { - // an error occurred - }); - -player - .setColor("#00adef") - .then(color => { - // color was successfully set - }) - .catch(error => { - switch (error.name) { - case "ContrastError": - // the color was set, but the contrast is outside of the acceptable - // range - break; - - case "TypeError": - // the string was not a valid hex or rgb color - break; - - case "EmbedSettingsError": - // the owner of the video has chosen to use a specific color - break; - - default: - // some other error occurred - break; - } - }); - -player - .getChapters() - .then(chapters => { - // chapters = an array of chapters objects - }) - .catch(error => { - // an error occurred - }); - -player - .getCurrentChapter() - .then(chapter => { - // chapter = a chapter object - }) - .catch(error => { - // an error occurred - }); - -player - .addCuePoint(15, { - customKey: "customValue", - }) - .then(id => { - // cue point was added successfully - }) - .catch(error => { - switch (error.name) { - case "UnsupportedError": - // cue points are not supported with the current player or browser - break; - - case "RangeError": - // the time was less than 0 or greater than the video’s duration - break; - - default: - // some other error occurred - break; - } - }); - -player - .removeCuePoint("09ecf4e4-b587-42cf-ad9f-e666b679c9ab") - .then(id => { - // cue point was removed successfully - }) - .catch(error => { - switch (error.name) { - case "UnsupportedError": - // cue points are not supported with the current player or browser - break; - - case "InvalidCuePoint": - // a cue point with the id passed wasn’t found - break; - - default: - // some other error occurred - break; - } - }); - -player - .getCuePoints() - .then(cuePoints => { - // cuePoints = an array of cue point objects - }) - .catch(error => { - switch (error.name) { - case "UnsupportedError": - // cue points are not supported with the current player or browser - break; - - default: - // some other error occurred - break; - } - }); - -player - .getCurrentTime() - .then(seconds => { - // seconds = the current playback position - }) - .catch(error => { - // an error occurred - }); - -player - .setCurrentTime(30.456) - .then(seconds => { - // seconds = the actual time that the player seeked to - }) - .catch(error => { - switch (error.name) { - case "RangeError": - // the time was less than 0 or greater than the video’s duration - break; - - default: - // some other error occurred - break; - } - }); - -player - .getDuration() - .then(duration => { - // duration = the duration of the video in seconds - }) - .catch(error => { - // an error occurred - }); - -player - .getEnded() - .then(ended => { - // ended = whether or not the video has ended - }) - .catch(error => { - // an error occurred - }); - -player - .getLoop() - .then(loop => { - // loop = whether loop is turned on or not - }) - .catch(error => { - // an error occurred - }); - -player - .setLoop(true) - .then(loop => { - // loop was turned on - }) - .catch(error => { - // an error occurred - }); - -player - .getMuted() - .then(muted => { - // muted = whether muted is turned on or not - }) - .catch(error => { - // an error occurred - }); - -player - .setMuted(true) - .then(muted => { - // muted was turned on - }) - .catch(error => { - // an error occurred - }); - -player - .getPaused() - .then(paused => { - // paused = whether or not the player is paused - }) - .catch(error => { - // an error occurred - }); - -player - .getPlaybackRate() - .then(playbackRate => { - // playbackRate = a numeric value of the current playback rate - }) - .catch(error => { - // an error occurred - }); - -player - .setPlaybackRate(0.5) - .then(playbackRate => { - // playback rate was set - }) - .catch(error => { - switch (error.name) { - case "RangeError": - // the playback rate was less than 0.5 or greater than 2 - break; - - default: - // some other error occurred - break; - } - }); - -player - .getTextTracks() - .then(tracks => { - // tracks = an array of track objects - tracks.forEach(track => { - console.log(track.label); - console.log(track.kind); - console.log(track.language); - console.log(track.mode); - }); - }) - .catch(error => { - // an error occurred - error.name; - }); - -player - .getVideoEmbedCode() - .then(embedCode => { - // embedCode =