Skip to content

Commit 52e2a6e

Browse files
devzomzkochan
andauthored
chore: remove fs-extra dependency from benchmarks, use native Node fs func (#759)
replace fs-extra copySync with native fs/promises cpSync, remove fs-extra from package.json dependencies Co-authored-by: Zoltan Kochan <z@kochan.io>
1 parent 875e947 commit 52e2a6e

File tree

3 files changed

+2
-32
lines changed

3 files changed

+2
-32
lines changed

benchmarks/benchmarkFixture.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import path from 'path'
33
import pathKey from 'path-key'
44
import spawn from "cross-spawn"
5-
import fsx from 'fs-extra'
6-
import { promises as fs } from 'fs'
5+
import { promises as fs, cpSync } from 'fs/promises'
76
import getFolderSize from 'get-folder-size'
87
import rimraf from 'rimraf'
98
import { fileURLToPath } from 'url'
@@ -103,7 +102,7 @@ async function updateDependenciesInPackageJson (cwd) {
103102
export default async function benchmark (pm, fixture, opts) {
104103
const env = createEnv(opts.managersDir)
105104
const cwd = path.join(TMP, pm.scenario, fixture)
106-
fsx.copySync(path.join(FIXTURES_DIR, fixture), cwd)
105+
cpSync(path.join(FIXTURES_DIR, fixture), cwd)
107106
const modules = opts.hasNodeModules ? path.join(cwd, 'node_modules') : null
108107

109108
cleanLockfile(pm, cwd, env)

benchmarks/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"dependencies": {
77
"common-tags": "^1.8.2",
88
"cross-spawn": "^7.0.3",
9-
"fs-extra": "^11.0.0",
109
"get-folder-size": "^3.1.0",
1110
"load-json-file": "^7.0.1",
1211
"load-yaml-file": "^1.0.0",

benchmarks/pnpm-lock.yaml

Lines changed: 0 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)