build: remove fs-extra devdep (#42712)

* build: remove fs-extra devdep

* 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: Charles Kerr <charles@charleskerr.com>

* empty commit to re-trigger appveyor

---------

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-07-01 18:08:09 +02:00 committed by GitHub
parent 739ef9f039
commit 5c6daa2223
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 55 additions and 80 deletions

View file

@ -3,7 +3,7 @@
const { ElectronVersions, Installer } = require('@electron/fiddle-core');
const childProcess = require('node:child_process');
const crypto = require('node:crypto');
const fs = require('fs-extra');
const fs = require('node:fs');
const { hashElement } = require('folder-hash');
const os = require('node:os');
const path = require('node:path');
@ -216,7 +216,7 @@ async function installSpecModules (dir) {
env.npm_config_nodedir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`);
}
if (fs.existsSync(path.resolve(dir, 'node_modules'))) {
await fs.remove(path.resolve(dir, 'node_modules'));
await fs.promises.rm(path.resolve(dir, 'node_modules'), { force: true, recursive: true });
}
const { status } = childProcess.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install', '--frozen-lockfile'], {
env,