Update electron (major) (#1968)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
renovate[bot]
2024-10-30 18:06:03 +00:00
committed by GitHub
parent 91233f283d
commit cecea312c6
53 changed files with 651 additions and 619 deletions

View File

@@ -1,13 +1,14 @@
#!/usr/bin/env -S npx ts-node
#!/usr/bin/env -S npx tsx
/*
* Checks for the presence of a webapp, inspects its version and sets the
* version metadata of the package to match.
*/
import { promises as fs } from "fs";
import { promises as fs } from "node:fs";
import * as asar from "@electron/asar";
import * as childProcess from "child_process";
import * as childProcess from "node:child_process";
import * as url from "node:url";
export async function versionFromAsar(): Promise<string> {
try {
@@ -57,13 +58,16 @@ async function main(args: string[]): Promise<number> {
return 0;
}
if (require.main === module) {
main(process.argv.slice(2))
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
if (import.meta.url.startsWith("file:")) {
const modulePath = url.fileURLToPath(import.meta.url);
if (process.argv[1] === modulePath) {
main(process.argv.slice(2))
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}
}