@@ -19,9 +19,8 @@ import * as Arborist from '@npmcli/arborist';
1919import * as packlist from 'npm-packlist' ;
2020import * as path from 'path' ;
2121import * as tar from 'tar' ;
22- import { writeFile } from 'fs/promises' ;
22+ import * as fs from 'fs/promises' ;
2323import * as tmp from 'tmp' ;
24- import { rimraf } from 'rimraf' ;
2524
2625// The way the user defines what type of input they're using for their code
2726// block is via a property name that reflects either the file extension or
@@ -118,7 +117,7 @@ export async function packNTest(options: TestOptions) {
118117 console . error ( err ) ;
119118 throw err ;
120119 } finally {
121- await rimraf ( installDir ) ;
120+ await fs . rm ( installDir , { recursive : true } ) ;
122121 }
123122 return ;
124123
@@ -156,7 +155,7 @@ export async function packNTest(options: TestOptions) {
156155
157156 // Populate test code.
158157 const { code, filename} = getSample ( sample ) ;
159- await writeFile ( path . join ( installDir , filename ) , code , 'utf-8' ) ;
158+ await fs . writeFile ( path . join ( installDir , filename ) , code , 'utf-8' ) ;
160159
161160 if ( sample . ts ) {
162161 const testConfig = {
@@ -170,7 +169,7 @@ export async function packNTest(options: TestOptions) {
170169 } ;
171170
172171 // this is the config `tsc` will use for compilation locally.
173- await writeFile (
172+ await fs . writeFile (
174173 path . join ( installDir , 'tsconfig.json' ) ,
175174 JSON . stringify ( testConfig ) ,
176175 ) ;
0 commit comments