diff --git a/package.json b/package.json index 0e66c67..335b45a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "devDependencies": { "@electron/get": "^2.0.1", "@electron/universal": "^1.3.0", - "@types/fs-extra": "^9.0.1", "@types/jest": "^29.0.3", "@types/minimist": "^1.2.1", "@types/node": "^14.11.2", @@ -40,7 +39,6 @@ }, "dependencies": { "chalk": "^4.1.1", - "fs-extra": "^9.0.1", "minimist": "^1.2.5" }, "files": [ diff --git a/src/bin.ts b/src/bin.ts index f25e214..be304b9 100755 --- a/src/bin.ts +++ b/src/bin.ts @@ -1,8 +1,8 @@ #!/usr/bin/env node -import * as chalk from 'chalk'; -import * as minimist from 'minimist'; -import * as path from 'path'; +import chalk from 'chalk'; +import minimist from 'minimist'; +import path from 'path'; import { flipFuses, getCurrentFuseWire } from '.'; import { FuseConfig, FuseV1Options, FuseVersion } from './config'; diff --git a/src/index.ts b/src/index.ts index 1762f33..1c5cab5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import * as cp from 'child_process'; -import * as fs from 'fs-extra'; +import { promises as fs } from 'fs'; import * as path from 'path'; import { FuseConfig, FuseV1Config, FuseV1Options, FuseVersion } from './config'; import { FuseState, SENTINEL } from './constants'; diff --git a/test/helpers.ts b/test/helpers.ts index 8e385a8..d851728 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -1,6 +1,6 @@ import { downloadArtifact } from '@electron/get'; import * as extractZip from 'extract-zip'; -import * as fs from 'fs-extra'; +import { promises as fs } from 'fs'; import * as os from 'os'; import * as path from 'path'; import { FuseConfig, FuseV1Options } from '../src'; diff --git a/test/index.spec.ts b/test/index.spec.ts index b9b45c0..b3fed38 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -1,5 +1,5 @@ import { makeUniversalApp } from '@electron/universal'; -import * as fs from 'fs-extra'; +import { promises as fs } from 'fs'; import * as path from 'path'; import { FuseState } from '../src/constants'; @@ -15,7 +15,7 @@ import { describe('getCurrentFuseWire()', () => { afterEach(async () => { while (tmpPaths.length) { - await fs.remove(tmpPaths.pop()!); + await fs.rm(tmpPaths.pop()!, { recursive: true }); } }); @@ -84,7 +84,7 @@ describe('flipFuses()', () => { const electronPathX64 = await getElectronLocally('20.0.0', 'darwin', 'x64'); const electronPathArm64 = await getElectronLocally('20.0.0', 'darwin', 'arm64'); for (const electronPath of [electronPathArm64, electronPathX64]) { - await fs.move( + await fs.rename( path.resolve(electronPath, 'Contents', 'Resources', 'default_app.asar'), path.resolve(electronPath, 'Contents', 'Resources', 'app.asar'), ); diff --git a/yarn.lock b/yarn.lock index f97418b..46c637e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -784,13 +784,6 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/fs-extra@^9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.1.tgz#91c8fc4c51f6d5dbe44c2ca9ab09310bd00c7918" - integrity sha512-B42Sxuaz09MhC3DDeW5kubRcQ5by4iuVQ0cRRWM2lggLzAa/KVom0Aft/208NgMvNQQZ86s5rVcqDdn/SH0/mg== - dependencies: - "@types/node" "*" - "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -855,10 +848,17 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== -"@types/node@*", "@types/node@^14.11.2": - version "14.11.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" - integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== +"@types/node@*": + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== + dependencies: + undici-types "~6.20.0" + +"@types/node@^14.11.2": + version "14.18.63" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b" + integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== "@types/parse-json@^4.0.0": version "4.0.0" @@ -3102,6 +3102,11 @@ typescript@^4.3.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"