File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,7 +216,10 @@ function patcher$1(fs = fs__namespace, roots) {
216216 return str ;
217217 } ;
218218 fs . readdir = ( ...args ) => {
219- const p = path__namespace . resolve ( args [ 0 ] ) ;
219+ const p = path__namespace . resolve (
220+ // node 20.12 tightened the constraints and requires the input to be a string
221+ String ( args [ 0 ] ) ,
222+ ) ;
220223 let cb = args [ args . length - 1 ] ;
221224 if ( typeof cb !== 'function' ) {
222225 // this will likely throw callback required error.
@@ -247,7 +250,10 @@ function patcher$1(fs = fs__namespace, roots) {
247250 } ;
248251 fs . readdirSync = ( ...args ) => {
249252 const res = origReaddirSync ( ...args ) ;
250- const p = path__namespace . resolve ( args [ 0 ] ) ;
253+ const p = path__namespace . resolve (
254+ // node 20.12 tightened the constraints and requires the input to be a string
255+ String ( args [ 0 ] ) ,
256+ ) ;
251257 res . forEach ( ( v ) => {
252258 handleDirentSync ( p , v ) ;
253259 } ) ;
You can’t perform that action at this time.
0 commit comments