Skip to content

Commit da909af

Browse files
committed
feat: rename
1 parent 2d3d3e4 commit da909af

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { getInterfaceToEventMap } from "./build/webref/events.js";
1414
import { getWebidls } from "./build/webref/idl.js";
1515
import jsonc from "jsonc-parser";
1616
import { generateDescriptions } from "./build/mdn-comments.js";
17-
import readKDL from "./build/patches.js";
17+
import readPatches from "./build/patches.js";
1818

1919
function mergeNamesakes(filtered: Browser.WebIdl) {
2020
const targets = [
@@ -98,7 +98,7 @@ async function emitDom() {
9898
const deprecatedInfo = await readInputJSON("deprecatedMessage.json");
9999
const documentationFromMDN = await generateDescriptions();
100100
const removedItems = await readInputJSON("removedTypes.jsonc");
101-
const addedItemsKDL = await readKDL("patches");
101+
const addedItemsKDL = await readPatches();
102102

103103
async function readInputJSON(filename: string) {
104104
const content = await fs.readFile(new URL(filename, inputFolder), "utf8");

src/build/patches.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ async function getAllKDLFileURLs(folder: URL): Promise<URL[]> {
5757
/**
5858
* Read and parse a single KDL file.
5959
*/
60-
export async function readInputKDL(fileUrl: URL): Promise<any> {
60+
export async function readPatch(fileUrl: URL): Promise<any> {
6161
const text = await readFile(fileUrl, "utf8");
6262
return parseKDL(text);
6363
}
6464

6565
/**
6666
* Read, parse, and merge all KDL files under the input folder.
6767
*/
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);
7070
const fileUrls = await getAllKDLFileURLs(inputFolder);
7171

72-
const parsedContents = await Promise.all(fileUrls.map(readInputKDL));
72+
const parsedContents = await Promise.all(fileUrls.map(readPatch));
7373

7474
return parsedContents.reduce((acc, current) => merge(acc, current), {});
7575
}

0 commit comments

Comments
 (0)