Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: replace node builtin rmSync with rimraf #412

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"mutate-fs": "^2.1.1",
"nock": "^13.2.4",
"npm-registry-mock": "^1.3.2",
"rimraf": "^6.0.1",
"tap": "^16.0.1"
},
"files": [
Expand Down
5 changes: 3 additions & 2 deletions test/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ const fs = require('node:fs')
const http = require('node:http')
const { dirname, basename, resolve } = require('node:path')
const { mkdir } = require('node:fs/promises')
const { rmSync } = require('node:fs')
const { spawn } = require('node:child_process')
const Arborist = require('@npmcli/arborist')
const HostedGit = require('hosted-git-info')
const npa = require('npm-package-arg')
const spawnGit = require('@npmcli/git').spawn
const rimraf = require('rimraf')
const tar = require('tar')
const spawnNpm = require('../lib/util/npm.js')
const GitFetcher = require('../lib/git.js')
Expand Down Expand Up @@ -221,7 +221,8 @@ t.test('setup', { bail: true }, t => {
}
daemon.stderr.on('data', onDaemonData)
// only clean up the dir once the daemon is banished
daemon.on('close', () => rmSync(me, { recursive: true, force: true }))
// do NOT replace this with node's internal rmSync. It generates EBUSY errors in windows.
daemon.on('close', () => rimraf.sync(me))
mbtools marked this conversation as resolved.
Show resolved Hide resolved
})

t.test('create a repo with a submodule', () => {
Expand Down
Loading