unzip-stream icon indicating copy to clipboard operation
unzip-stream copied to clipboard

Replace `mkdirp` with `fs.mkdirSync(path, { recursive: true })`

Open trivikr opened this issue 6 months ago • 0 comments

Is your feature request related to a problem? Please describe.

The mkdirp utility is used in unzip-stream https://github.com/search?q=repo%3Amhr3%2Funzip-stream%20mkdirp&type=code

It can be replaced with Node.js native fs.mkdirSync added recursive option in Node.js v10.12.0 published on Oct 10, 2018.

Describe the solution you'd like

Replace mkdirp with fs.mkdirSync(path, { recursive: true })

Additional context

The mkdirp currently uses these native APIs:

  • https://github.com/isaacs/node-mkdirp/blob/fdf6005432c2506ce31f8cae237039dda2f8479d/src/opts-arg.ts#L4-L8
  • https://github.com/isaacs/node-mkdirp/blob/fdf6005432c2506ce31f8cae237039dda2f8479d/src/mkdirp-native.ts#L13-L19

trivikr avatar Aug 18 '24 03:08 trivikr