Skip to content

Commit

Permalink
Merge branch 'main' into renovate/vite-5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts authored Nov 11, 2024
2 parents f430c8c + fc5e7af commit 423bebe
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 91 deletions.
2 changes: 1 addition & 1 deletion chromeless/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async function waitUntilNetworkIdle(page: playwright.Page) {
await page.waitForLoadState("networkidle");
try {
await (await getPreviewIframe(page)).waitForLoadState("networkidle");
} catch (e) {
} catch {
// It's OK for the iframe to be replaced by another one, in which case wait again.
await (await getPreviewIframe(page)).waitForLoadState("networkidle");
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/crawl-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function crawlFiles(
existingCache = JSON.parse(
fs.readFileSync(cacheFilePath, "utf8")
) as CachedPreviewables;
} catch (e) {
} catch {
logger.warn(`Unable to parse JSON from cache at ${cacheFilePath}`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/vite/vite-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ export class ViteManager {
}
const source = typeof loaded === "object" ? loaded.code : loaded;
await viteServer.pluginContainer.transform(source, module.id);
} catch (e) {
} catch {
// We know it will fail.
return;
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function createClient(baseUrl: string): Client {
try {
const response = JSON.parse(responseData);
resolve(response);
} catch (e) {
} catch {
reject(
new Error(`Request to ${path} failed:\n${responseData}`)
);
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export async function startDaemon({
try {
process.kill(parentProcessId, 0);
// Parent process is still alive, see https://stackoverflow.com/a/21296291.
} catch (e) {
} catch {
process.stdout.write(
`[exit] Parent process with PID ${parentProcessId} exited. Daemon exiting.\n`
);
Expand Down
2 changes: 1 addition & 1 deletion framework-plugins/vue2/src/vue-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ type PJS_Slots = ${pjsSlotsType};
const slotNameDoubleQuoted = element.slotName || '"default"';
try {
return [JSON.parse(slotNameDoubleQuoted)];
} catch (e) {
} catch {
this.logger.warn(`Invalid slot name string: ${slotNameDoubleQuoted}`);
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion integrations/vscode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function activate({ subscriptions }: vscode.ExtensionContext) {
}

// Note: ESlint warning isn't relevant because we're correctly inferring arguments types.
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
function catchErrors<F extends Function>(f: F) {
return async (...args: F extends (...args: infer A) => any ? A : never) => {
try {
Expand Down
4 changes: 2 additions & 2 deletions integrations/vscode/src/start-daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function streamDaemonLogs(
try {
const time = Date.now();
utimesSync(logsPath, time, time);
} catch (e) {
} catch {
let fd = openSync(logsPath, "a");
closeSync(fd);
}
Expand Down Expand Up @@ -175,7 +175,7 @@ function streamDaemonLogs(
resolve(watcher);
resolved = true;
}
} catch (e: any) {
} catch {
// Fine, ignore. It just means log streaming is broken.
}
};
Expand Down
2 changes: 1 addition & 1 deletion loader/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ setInterval(() => {
try {
process.kill(parentProcessId, 0);
// Parent process is still alive, see https://stackoverflow.com/a/21296291.
} catch (e) {
} catch {
process.exit(0);
}
}, 1000);
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@types/inquirer": "^9.0.7",
"@types/license-checker": "^25.0.6",
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"assert-never": "^1.3.0",
"depcheck": "^1.4.7",
"eslint": "^9.14.0",
Expand Down
Loading

0 comments on commit 423bebe

Please sign in to comment.