Skip to content

Commit 0f06e45

Browse files
committed
WIP on migration
1 parent 2b55e2f commit 0f06e45

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

deploy/createTypesPackages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function prependAutoImports(pkg, packagePath) {
195195
* @param {Package} pkg
196196
* @param {URL} packagePath
197197
*/
198-
function postProcessDTSFiles(pkg, packagePath) {
198+
export function postProcessDTSFiles(pkg, packagePath) {
199199
iterateThroughFiles((content) => {
200200
return content.replace(
201201
"abort(): AbortSignal;",

deploy/migrate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import { existsSync, readdirSync, readFileSync, writeFileSync } from "fs";
77
import { join } from "path";
88

9+
import { postProcessDTSFiles } from "./createTypesPackages.js";
10+
911
const maybeTSWorkingDir = [process.argv[2], "../TypeScript", "TypeScript"];
1012
const tscWD = maybeTSWorkingDir.find((wd) => existsSync(wd));
1113

@@ -18,6 +20,10 @@ const generatedFiles = readdirSync("generated");
1820
const filesToSend = generatedFiles.filter(
1921
(file) => file.includes("dom.") || file.includes("webworker.")
2022
);
23+
24+
const generatedDir = new URL("generated/", import.meta.url);
25+
postProcessDTSFiles({ files: filesToSend.map((f) => ({ to: f })) }, );
26+
2127
filesToSend.forEach((file) => {
2228
const contents = readFileSync(join("generated", file), "utf8");
2329
const newFilePath = join(tscWD, "src", "lib", file);

0 commit comments

Comments
 (0)