Skip to content

Commit f903400

Browse files
authored
refactor: remove fs-extra from deps (#58)
* refactor: remove `fs-extra` from deps * remove node prefixes
1 parent 2e2bc94 commit f903400

File tree

6 files changed

+24
-21
lines changed

6 files changed

+24
-21
lines changed

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"devDependencies": {
2222
"@electron/get": "^2.0.1",
2323
"@electron/universal": "^1.3.0",
24-
"@types/fs-extra": "^9.0.1",
2524
"@types/jest": "^29.0.3",
2625
"@types/minimist": "^1.2.1",
2726
"@types/node": "^14.11.2",
@@ -40,7 +39,6 @@
4039
},
4140
"dependencies": {
4241
"chalk": "^4.1.1",
43-
"fs-extra": "^9.0.1",
4442
"minimist": "^1.2.5"
4543
},
4644
"files": [

src/bin.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
22

3-
import * as chalk from 'chalk';
4-
import * as minimist from 'minimist';
5-
import * as path from 'path';
3+
import chalk from 'chalk';
4+
import minimist from 'minimist';
5+
import path from 'path';
66

77
import { flipFuses, getCurrentFuseWire } from '.';
88
import { FuseConfig, FuseV1Options, FuseVersion } from './config';

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as cp from 'child_process';
2-
import * as fs from 'fs-extra';
2+
import { promises as fs } from 'fs';
33
import * as path from 'path';
44
import { FuseConfig, FuseV1Config, FuseV1Options, FuseVersion } from './config';
55
import { FuseState, SENTINEL } from './constants';

test/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { downloadArtifact } from '@electron/get';
22
import * as extractZip from 'extract-zip';
3-
import * as fs from 'fs-extra';
3+
import { promises as fs } from 'fs';
44
import * as os from 'os';
55
import * as path from 'path';
66
import { FuseConfig, FuseV1Options } from '../src';

test/index.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { makeUniversalApp } from '@electron/universal';
2-
import * as fs from 'fs-extra';
2+
import { promises as fs } from 'fs';
33
import * as path from 'path';
44

55
import { FuseState } from '../src/constants';
@@ -15,7 +15,7 @@ import {
1515
describe('getCurrentFuseWire()', () => {
1616
afterEach(async () => {
1717
while (tmpPaths.length) {
18-
await fs.remove(tmpPaths.pop()!);
18+
await fs.rm(tmpPaths.pop()!, { recursive: true });
1919
}
2020
});
2121

@@ -84,7 +84,7 @@ describe('flipFuses()', () => {
8484
const electronPathX64 = await getElectronLocally('20.0.0', 'darwin', 'x64');
8585
const electronPathArm64 = await getElectronLocally('20.0.0', 'darwin', 'arm64');
8686
for (const electronPath of [electronPathArm64, electronPathX64]) {
87-
await fs.move(
87+
await fs.rename(
8888
path.resolve(electronPath, 'Contents', 'Resources', 'default_app.asar'),
8989
path.resolve(electronPath, 'Contents', 'Resources', 'app.asar'),
9090
);

yarn.lock

+16-11
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,6 @@
784784
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
785785
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
786786

787-
"@types/fs-extra@^9.0.1":
788-
version "9.0.1"
789-
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.1.tgz#91c8fc4c51f6d5dbe44c2ca9ab09310bd00c7918"
790-
integrity sha512-B42Sxuaz09MhC3DDeW5kubRcQ5by4iuVQ0cRRWM2lggLzAa/KVom0Aft/208NgMvNQQZ86s5rVcqDdn/SH0/mg==
791-
dependencies:
792-
"@types/node" "*"
793-
794787
"@types/glob@^7.1.1":
795788
version "7.2.0"
796789
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb"
@@ -855,10 +848,17 @@
855848
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
856849
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==
857850

858-
"@types/node@*", "@types/node@^14.11.2":
859-
version "14.11.2"
860-
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256"
861-
integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==
851+
"@types/node@*":
852+
version "22.10.2"
853+
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9"
854+
integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==
855+
dependencies:
856+
undici-types "~6.20.0"
857+
858+
"@types/node@^14.11.2":
859+
version "14.18.63"
860+
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b"
861+
integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==
862862

863863
"@types/parse-json@^4.0.0":
864864
version "4.0.0"
@@ -3102,6 +3102,11 @@ typescript@^4.3.3:
31023102
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88"
31033103
integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==
31043104

3105+
undici-types@~6.20.0:
3106+
version "6.20.0"
3107+
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
3108+
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
3109+
31053110
universalify@^0.1.0:
31063111
version "0.1.2"
31073112
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"

0 commit comments

Comments
 (0)