Skip to content

Commit

Permalink
refactor: remove fs-extra from deps (#58)
Browse files Browse the repository at this point in the history
* refactor: remove `fs-extra` from deps

* remove node prefixes
  • Loading branch information
erickzhao authored Dec 14, 2024
1 parent 2e2bc94 commit f903400
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -40,7 +39,6 @@
},
"dependencies": {
"chalk": "^4.1.1",
"fs-extra": "^9.0.1",
"minimist": "^1.2.5"
},
"files": [
Expand Down
6 changes: 3 additions & 3 deletions src/bin.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion test/helpers.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 3 additions & 3 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -15,7 +15,7 @@ import {
describe('getCurrentFuseWire()', () => {
afterEach(async () => {
while (tmpPaths.length) {
await fs.remove(tmpPaths.pop()!);
await fs.rm(tmpPaths.pop()!, { recursive: true });
}
});

Expand Down Expand Up @@ -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'),
);
Expand Down
27 changes: 16 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit f903400

Please sign in to comment.