File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { getInterfaceToEventMap } from "./build/webref/events.js";
14
14
import { getWebidls } from "./build/webref/idl.js" ;
15
15
import jsonc from "jsonc-parser" ;
16
16
import { generateDescriptions } from "./build/mdn-comments.js" ;
17
- import readKDL from "./build/patches.js" ;
17
+ import readPatches from "./build/patches.js" ;
18
18
19
19
function mergeNamesakes ( filtered : Browser . WebIdl ) {
20
20
const targets = [
@@ -98,7 +98,7 @@ async function emitDom() {
98
98
const deprecatedInfo = await readInputJSON ( "deprecatedMessage.json" ) ;
99
99
const documentationFromMDN = await generateDescriptions ( ) ;
100
100
const removedItems = await readInputJSON ( "removedTypes.jsonc" ) ;
101
- const addedItemsKDL = await readKDL ( "patches" ) ;
101
+ const addedItemsKDL = await readPatches ( ) ;
102
102
103
103
async function readInputJSON ( filename : string ) {
104
104
const content = await fs . readFile ( new URL ( filename , inputFolder ) , "utf8" ) ;
Original file line number Diff line number Diff line change @@ -57,19 +57,19 @@ async function getAllKDLFileURLs(folder: URL): Promise<URL[]> {
57
57
/**
58
58
* Read and parse a single KDL file.
59
59
*/
60
- export async function readInputKDL ( fileUrl : URL ) : Promise < any > {
60
+ export async function readPatch ( fileUrl : URL ) : Promise < any > {
61
61
const text = await readFile ( fileUrl , "utf8" ) ;
62
62
return parseKDL ( text ) ;
63
63
}
64
64
65
65
/**
66
66
* Read, parse, and merge all KDL files under the input folder.
67
67
*/
68
- export default async function readKDL ( folder : string ) : Promise < any > {
69
- const inputFolder = new URL ( ` ../../inputfiles/${ folder } /` , import . meta. url ) ;
68
+ export default async function readPatches ( ) : Promise < any > {
69
+ const inputFolder = new URL ( " ../../inputfiles/patches/" , import . meta. url ) ;
70
70
const fileUrls = await getAllKDLFileURLs ( inputFolder ) ;
71
71
72
- const parsedContents = await Promise . all ( fileUrls . map ( readInputKDL ) ) ;
72
+ const parsedContents = await Promise . all ( fileUrls . map ( readPatch ) ) ;
73
73
74
74
return parsedContents . reduce ( ( acc , current ) => merge ( acc , current ) , { } ) ;
75
75
}
You can’t perform that action at this time.
0 commit comments