Skip to content

Commit

Permalink
chore: module cleanup (#5356)
Browse files Browse the repository at this point in the history
* deps: add missing `fs-extra` import for `cli`.

* deps: remove some unused dependencies

* deps: remove more unused modules
  • Loading branch information
TimBeyer authored Nov 7, 2023
1 parent 7ee19dd commit 1670327
Show file tree
Hide file tree
Showing 6 changed files with 6,579 additions and 10,674 deletions.
2 changes: 2 additions & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
},
"devDependencies": {
"@types/chai": "^4.3.4",
"@types/fs-extra": "^11.0.3",
"@types/mocha": "^10.0.1",
"@types/tar": "^6.1.7",
"@types/unzipper": "^0.10.8",
"chai": "^4.3.7",
"fs-extra": "^11.1.1",
"lodash-es": "^4.17.21",
"minimist": "^1.2.8",
"mocha": "^10.2.0",
Expand Down
6 changes: 3 additions & 3 deletions cli/src/build-pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import chalk from "chalk"
import { getAbi } from "node-abi"
import { resolve, relative, join } from "path"
import { STATIC_DIR, GARDEN_CLI_ROOT, GARDEN_CORE_ROOT } from "@garden-io/core/build/src/constants.js"
import fsExtra from "fs-extra"
const { remove, mkdirp, copy, writeFile, readFile } = fsExtra
import { readFile, writeFile } from "fs/promises"
import { remove, mkdirp, copy, pathExists } from "fs-extra/esm"
import { exec, getPackageVersion } from "@garden-io/core/build/src/util/util.js"
import { dedent } from "@garden-io/core/build/src/util/string.js"
import { pick } from "lodash-es"
Expand Down Expand Up @@ -324,7 +324,7 @@ async function buildBinaries(args: string[]) {
const nodeArchiveFilename = resolve(nodeTmpDir, `${targetName}${fileEnding}`)

let nodeArchiveChecksum: string | undefined
if (await fsExtra.pathExists(nodeArchiveFilename)) {
if (await pathExists(nodeArchiveFilename)) {
const readStream = createReadStream(nodeArchiveFilename)
const hash = readStream.pipe(createHash("sha256"))
await finished(readStream)
Expand Down
14 changes: 1 addition & 13 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@
"hasha": "^5.2.2",
"http-status-codes": "^2.2.0",
"humanize-string": "^2.1.0",
"import-lazy": "^4.0.0",
"indent-string": "^4.0.0",
"ink": "^4.4.1",
"ink-spinner": "^5.0.0",
"inquirer": "^7.3.3",
"ip": "^1.1.8",
"is-glob": "^4.0.3",
"is-url": "^1.2.4",
"isomorphic-ws": "^5.0.0",
Expand All @@ -96,9 +94,7 @@
"klaw": "^4.1.0",
"koa": "^2.14.1",
"koa-bodyparser": "^4.3.0",
"koa-mount": "^4.0.0",
"koa-router": "^10.1.1",
"koa-static": "^5.0.0",
"koa-websocket": "^6.0.0",
"linewrap": "^0.2.1",
"lodash-es": "^4.17.21",
Expand All @@ -115,7 +111,6 @@
"normalize-url": "^5.3.1",
"open": "^9.1.0",
"p-filter": "^2.1.0",
"p-limit": "^3.1.0",
"p-map": "^4.0.0",
"p-props": "^4.0.0",
"p-queue": "^7.4.1",
Expand Down Expand Up @@ -198,9 +193,7 @@
"@types/klaw": "^3.0.3",
"@types/koa": "^2.13.0",
"@types/koa-bodyparser": "^4.3.0",
"@types/koa-mount": "^4.0.2",
"@types/koa-router": "^7.4.4",
"@types/koa-static": "^4.0.2",
"@types/koa-websocket": "^5.0.7",
"@types/lodash": "^4.14.200",
"@types/lodash-es": "^4.17.9",
Expand Down Expand Up @@ -233,7 +226,6 @@
"@types/write-file-atomic": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"amplitude-js": "^6.2.0",
"chai": "^4.3.7",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
Expand All @@ -242,22 +234,18 @@
"eslint-plugin-react": "^7.32.2",
"finalhandler": "^1.2.0",
"google-auth-library": "^9.0.0",
"is-subset": "^0.1.1",
"md5": "^2.3.0",
"mocha": "^10.2.0",
"nock": "^12.0.3",
"nodemon": "^3.0.1",
"nyc": "^15.1.0",
"p-event": "^4.2.0",
"peggy": "^3.0.2",
"prettier": "3.0.0",
"ps-tree": "^1.2.0",
"replace-in-file": "^6.3.5",
"serve-static": "^1.15.0",
"shx": "^0.3.4",
"sinon": "^15.0.4",
"testdouble": "^3.17.2",
"testdouble-chai": "^0.5.0",
"timekeeper": "^2.2.0",
"type-fest": "^3.12.0",
"typescript": "^5.1.3",
Expand Down Expand Up @@ -290,4 +278,4 @@
"fsevents": "^2.3.3"
},
"gitHead": "b0647221a4d2ff06952bae58000b104215aed922"
}
}
3 changes: 2 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"minimist": "^1.2.8",
"mocha": "^10.2.0",
"prettier": "3.0.0",
"replace-in-file": "^7.0.2",
"split2": "^4.1.0",
"ts-node": "^10.8.2",
"typescript": "^5.1.3",
Expand All @@ -52,4 +53,4 @@
"fix-format": "npm run lint -- --fix --quiet",
"lint": "eslint --ignore-pattern 'projects/**' --ext .ts ."
}
}
}
Loading

0 comments on commit 1670327

Please sign in to comment.