update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
19
electron/node_modules/@electron/rebuild/lib/read-package-json.js
generated
vendored
Normal file
19
electron/node_modules/@electron/rebuild/lib/read-package-json.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function readPackageJson(dir, safe = false) {
|
||||
try {
|
||||
return JSON.parse(await fs.readFile(path.resolve(dir, 'package.json'), {
|
||||
encoding: 'utf-8',
|
||||
}));
|
||||
}
|
||||
catch (err) {
|
||||
if (safe) {
|
||||
return {};
|
||||
}
|
||||
else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=read-package-json.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue