http-party / node-portfinder

A simple tool to find an open port or domain socket on the current machine
https://github.com/http-party/node-portfinder
Other
882 stars 95 forks source link

Add test around recursively making socket directory #135

Closed MasterOdin closed 2 years ago

MasterOdin commented 2 years ago

PR adds a test case that validates the recursive mkdir behavior that currently exists within the getSocket function. This helps demonstrate the breaking change in #134 which removes mkdirp in favor of the builtin fs.mkdir where for node < 10.12, the recursive flag didn't exist, and so it would not behave the same as mkdirp. To demonstrate that, I merged this code onto the modernize branch in my fork to trigger CI, and where all node < 10.x fail: https://github.com/MasterOdin/node-portfinder/actions/runs/2782492617.