build: remove fs-extra devdep (#42708)

* build: remove fs-extra dependency from script/gen-filenames.ts

* build: remove fs-extra dependency from script/spec-runner.js

* build: remove fs-extra dependency from script/gn-asar.js

* build: remove fs-extra dependency from spec/api-autoupdater-darwin-spec.ts

* build: remove fs-extra dependency from spec/api-safe-storage-spec.ts

* build: remove fs-extra dependency from spec/lib/codesign-helpers.ts

* build: remove fs-extra dependency from spec/api-app-spec.ts

* build: remove fs-extra dependency from spec/esm-spec.ts

* build: remove fs-extra dependency from spec/lib/fs-helpers.ts

* build: remove fs-extra dependency from spec/lib/api-shell-spec.ts

* build: remove fs-extra dependency from spec/api-context-bridge-spec.ts

* build: remove fs-extra dependency from spec/asar-integrity-spec.ts

* build: remove fs-extra dependency from spec/node-spec.ts

* build: remove fs-extra devdiv

* fixup! build: remove fs-extra dependency from spec/api-context-bridge-spec.ts

* fix: use force: true when removing directories

* chore: reduce diffs to main

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-06-28 12:13:46 -05:00 committed by GitHub
parent 2c3a9fd3c5
commit e480e29cfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 55 additions and 80 deletions

View file

@ -1,5 +1,5 @@
import * as cp from 'node:child_process';
import * as fs from 'fs-extra';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { expect } from 'chai';
@ -37,13 +37,13 @@ export async function copyMacOSFixtureApp (newDir: string, fixture: string | nul
cp.spawnSync('cp', ['-R', appBundlePath, path.dirname(newPath)]);
if (fixture) {
const appDir = path.resolve(newPath, 'Contents/Resources/app');
await fs.mkdirp(appDir);
await fs.copy(path.resolve(fixturesPath, 'auto-update', fixture), appDir);
await fs.promises.mkdir(appDir, { recursive: true });
await fs.promises.cp(path.resolve(fixturesPath, 'auto-update', fixture), appDir, { recursive: true });
}
const plistPath = path.resolve(newPath, 'Contents', 'Info.plist');
await fs.writeFile(
await fs.promises.writeFile(
plistPath,
(await fs.readFile(plistPath, 'utf8')).replace('<key>BuildMachineOSBuild</key>', `<key>NSAppTransportSecurity</key>
(await fs.promises.readFile(plistPath, 'utf8')).replace('<key>BuildMachineOSBuild</key>', `<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>