Skip to content

Commit f878975

Browse files
committed
Migrate deprecated json file to KDL
1 parent 3e0771e commit f878975

File tree

3 files changed

+4
-27
lines changed

3 files changed

+4
-27
lines changed

inputfiles/deprecatedMessage.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

inputfiles/patches/deprecated.kdl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface PerformanceTiming deprecated="This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead."
2+
interface PerformanceNavigation deprecated="This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead."
3+
interface AudioProcessingEvent deprecated="As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet."
4+
interface ScriptProcessorNode deprecated="As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and was replaced by AudioWorklet (see AudioWorkletNode)."

src/build.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ async function emitDom() {
9696
const addedItems = await readInputJSON("addedTypes.jsonc");
9797
const patches = await readPatches();
9898
const comments = await readInputJSON("comments.json");
99-
const deprecatedInfo = await readInputJSON("deprecatedMessage.json");
10099
const documentationFromMDN = await generateDescriptions();
101100
const removedItems = await readInputJSON("removedTypes.jsonc");
102101

@@ -152,24 +151,6 @@ async function emitDom() {
152151
return idl;
153152
}
154153

155-
function mergeDeprecatedMessage(
156-
idl: Browser.WebIdl,
157-
descriptions: Record<string, string>,
158-
) {
159-
const namespaces = arrayToMap(
160-
idl.namespaces!,
161-
(i) => i.name,
162-
(i) => i,
163-
);
164-
for (const [key, value] of Object.entries(descriptions)) {
165-
const target = idl.interfaces!.interface[key] || namespaces[key];
166-
if (target) {
167-
target.deprecated = value;
168-
}
169-
}
170-
return idl;
171-
}
172-
173154
/// Load the input file
174155
let webidl: Browser.WebIdl = {
175156
events: await getInterfaceToEventMap(),
@@ -242,7 +223,6 @@ async function emitDom() {
242223
webidl = merge(webidl, overriddenItems);
243224
webidl = merge(webidl, patches);
244225
webidl = merge(webidl, comments);
245-
webidl = mergeDeprecatedMessage(webidl, deprecatedInfo);
246226
for (const name in webidl.interfaces!.interface) {
247227
const i = webidl.interfaces!.interface[name];
248228
if (i.overrideExposed) {

0 commit comments

Comments
 (0)