mirror of
https://github.com/chenasraf/DefinitelyTyped-tools.git
synced 2026-05-18 01:49:03 +00:00
Format
This commit is contained in:
@@ -23,7 +23,7 @@ export const getAllowedPackageJsonDependencies = withCache(60 * 60 * 1000, () =>
|
||||
if (process.env.NODE_ENV !== "test") {
|
||||
try {
|
||||
raw = await getUrlContentsAsString(allowedPackageJsonDependenciesUrl);
|
||||
} catch (err: any) {
|
||||
} catch (err) {
|
||||
console.error(
|
||||
"Getting the latest allowedPackageJsonDependencies.txt from GitHub failed. Falling back to local copy.\n" +
|
||||
err.message
|
||||
|
||||
@@ -41,7 +41,7 @@ if (!module.parent) {
|
||||
false /*dry*/,
|
||||
log
|
||||
);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
// log and continue
|
||||
log("publishing to github failed: " + e.toString());
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export default async function publishPackages(
|
||||
|
||||
try {
|
||||
await publishTypingsPackage(ghClient, cp, dry, log, Registry.Github);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
// log and continue
|
||||
log("publishing to github failed: " + e.toString());
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export default async function publishPackages(
|
||||
const target = skipBadPublishes(n, infoClient, log);
|
||||
try {
|
||||
await publishNotNeededPackage(ghClient, target, dry, log, Registry.Github);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
// log and continue
|
||||
log("publishing to github failed: " + e.toString());
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export default async function publishRegistry(
|
||||
|
||||
try {
|
||||
await publishToRegistry(RegistryName.Github);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
// log and continue
|
||||
log("publishing to github failed: " + e.toString());
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
nextTask();
|
||||
}
|
||||
}
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -217,7 +217,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
default:
|
||||
assert.fail(`${processIndex}> Unexpected crashRecoveryState: ${crashRecoveryState}`);
|
||||
}
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -232,7 +232,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
try {
|
||||
child = fork(workerFile, commandLineArgs, { cwd, execArgv: await getChildProcessExecArgv(i, execArgv) });
|
||||
runningChildren.add(child);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
fail(e);
|
||||
return;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
child.on("exit", onChildDisconnectedOrExited);
|
||||
child.on("error", onError);
|
||||
taskAction();
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -278,7 +278,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
runningChildren.delete(child);
|
||||
child.removeAllListeners();
|
||||
child.kill();
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -289,7 +289,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
console.log(`${processIndex}> Restarting...`);
|
||||
stopChild(/*done*/ false);
|
||||
await startChild(taskAction, execArgv);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -298,7 +298,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
try {
|
||||
assert(runningChildren.has(child), `${processIndex}> Child not running`);
|
||||
child.send(currentInput);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
@@ -312,7 +312,7 @@ export function runWithListeningChildProcesses<In extends Serializable>({
|
||||
handleStart(currentInput, processIndex);
|
||||
}
|
||||
child.send(currentInput);
|
||||
} catch (e: any) {
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user