1- import { F_OK } from 'node:constants' ;
2-
31export type ProcessorInput = string | Buffer | ArrayBuffer | Uint8Array ;
42
53export type BinaryOutput = Buffer | Uint8Array ;
@@ -185,10 +183,12 @@ async function readTextFromInput(
185183
186184async function writeBinaryToPath ( outputPath : string , data : BinaryOutput ) : Promise < void > {
187185 getFs ( ) . writeFileSync ( outputPath , data ) ;
186+ await Promise . resolve ( ) ;
188187}
189188
190189async function writeTextToPath ( outputPath : string , text : string ) : Promise < void > {
191190 getFs ( ) . writeFileSync ( outputPath , text , 'utf8' ) ;
191+ await Promise . resolve ( ) ;
192192}
193193
194194async function pathExists ( path : string ) : Promise < boolean > {
@@ -205,6 +205,7 @@ async function getFileSize(path: string): Promise<number> {
205205
206206async function mkDir ( path : string , options ?: { recursive ?: boolean } ) : Promise < void > {
207207 getFs ( ) . mkdirSync ( path , options ) ;
208+ await Promise . resolve ( ) ;
208209}
209210
210211async function listDir ( path : string ) : Promise < string [ ] > {
@@ -216,6 +217,7 @@ async function removePath(
216217 options ?: { recursive ?: boolean ; force ?: boolean }
217218) : Promise < void > {
218219 getFs ( ) . rmSync ( path , options ) ;
220+ await Promise . resolve ( ) ;
219221}
220222
221223async function mkTempDir ( prefix : string ) : Promise < string > {
0 commit comments