File tree Expand file tree Collapse file tree 6 files changed +26
-155
lines changed
Expand file tree Collapse file tree 6 files changed +26
-155
lines changed Original file line number Diff line number Diff line change 122122 "commondir" : " 1.0.1" ,
123123 "conf" : " 11.0.2" ,
124124 "deepmerge" : " 4.3.1" ,
125- "del" : " 6.1.1" ,
126125 "dotenv" : " 16.4.7" ,
127126 "env-paths" : " 3.0.0" ,
128127 "execa" : " 7.2.0" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import {
4848 access as fsAccess ,
4949 rename as fsRename ,
5050 unlink as fsUnlink ,
51+ rm as fsRm ,
5152 readdir as fsReaddir ,
5253 symlink as fsSymlink ,
5354} from 'fs/promises'
@@ -312,9 +313,8 @@ interface RmDirOptions {
312313 * @param options - Options to remove the directory with.
313314 */
314315export async function rmdir ( path : string , options : RmDirOptions = { } ) : Promise < void > {
315- const { default : del } = await import ( 'del' )
316316 outputDebug ( outputContent `Removing directory at ${ outputToken . path ( path ) } ...` )
317- await del ( path , { force : options . force } )
317+ await fsRm ( path , { recursive : true , force : options . force ?? false } )
318318}
319319
320320/**
Original file line number Diff line number Diff line change 5353 "dependencies" : {
5454 "@ast-grep/napi" : " 0.33.0" ,
5555 "esbuild" : " 0.27.2" ,
56- "global-agent" : " 3.0.0 "
56+ "global-agent" : " 4.1.2 "
5757 },
5858 "devDependencies" : {
5959 "@oclif/core" : " 4.5.3" ,
Original file line number Diff line number Diff line change 3232 "@cucumber/pretty-formatter" : " 2.4.1" ,
3333 "@types/fs-extra" : " ^9.0.13" ,
3434 "fs-extra" : " ^9.1.0" ,
35- "tempy" : " ^1.0.1 "
35+ "tempy" : " ^3. 1.0"
3636 },
3737 "engines" : {
3838 "node" : " >=20.10.0"
Original file line number Diff line number Diff line change 11import { writeFile } from '../lib/fs.js'
22import { Given , After , setDefaultTimeout } from '@cucumber/cucumber'
3- import tempy from 'tempy'
3+ import { temporaryDirectory } from 'tempy'
44import { rimrafSync } from 'rimraf'
55import * as path from 'pathe'
66
@@ -12,7 +12,7 @@ if (process.env.DEBUG === '1') {
1212}
1313
1414Given ( 'I have a working directory' , async function ( ) {
15- this . temporaryDirectory = tempy . directory ( )
15+ this . temporaryDirectory = temporaryDirectory ( )
1616 const dataHomeDirectory = path . join ( this . temporaryDirectory , 'XDG_DATA_HOME' )
1717 const configHomeDirectory = path . join ( this . temporaryDirectory , 'XDG_CONFIG_HOME' )
1818 const stateHomeDirectory = path . join ( this . temporaryDirectory , 'XDG_STATE_HOME' )
You can’t perform that action at this time.
0 commit comments