From afdac8378421e613ac76e5b0b2350c2b60f168a1 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 13 Sep 2021 14:50:01 +0200 Subject: [PATCH] Exclude features with `version_added: preview` See https://github.com/mdn/browser-compat-data/issues/12344 for the reasoning. --- baselines/dom.generated.d.ts | 4 ---- baselines/serviceworker.generated.d.ts | 2 -- baselines/sharedworker.generated.d.ts | 2 -- baselines/webworker.generated.d.ts | 2 -- src/build/bcd/stable.ts | 3 +++ 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 0c41a5149..3ad14848b 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -5591,7 +5591,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -8511,7 +8510,6 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; - readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -17341,7 +17339,6 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null; * @param ev The event. */ declare var onscroll: ((this: Window, ev: Event) => any) | null; -declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -17556,7 +17553,6 @@ type GamepadMappingType = "" | "standard" | "xr-standard"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; -type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type ImageSmoothingQuality = "high" | "low" | "medium"; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 7a50a4f44..b4e9df2b9 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -1899,7 +1899,6 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; - readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -5392,7 +5391,6 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; -type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 7fee85487..87a065171 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -1819,7 +1819,6 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; - readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -5413,7 +5412,6 @@ type FontFaceSetLoadStatus = "loaded" | "loading"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; -type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index aa5df8cc6..a6da52aaa 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -1951,7 +1951,6 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; - readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -5639,7 +5638,6 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; -type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; diff --git a/src/build/bcd/stable.ts b/src/build/bcd/stable.ts index 91cfab594..8a054336c 100644 --- a/src/build/bcd/stable.ts +++ b/src/build/bcd/stable.ts @@ -15,6 +15,9 @@ export function hasStableImplementation( } return ( !!latest.version_added && + // "preview" means BCD has no idea about whether it will ride the train + // https://github.com/mdn/browser-compat-data/issues/12344 + latest.version_added !== "preview" && !latest.version_removed && !latest.flags && latest.prefix === prefix &&