http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.42k stars 1.48k forks source link

Updates details.family check for Node v18 #816

Closed dmalan closed 2 years ago

dmalan commented 2 years ago
Relevant issues

Fixes #815.

Whereas os.networkinterfaces used to return a String value for family like 'IPv4' in Node v17 and prior, per https://nodejs.org/docs/latest-v17.x/api/os.html#osnetworkinterfaces, it seems to have changed to a Number like 4 in Node v18, per https://nodejs.org/docs/latest-v18.x/api/os.html#osnetworkinterfaces.

Contributor checklist

(No existing tests to update.)

Maintainer checklist
zbynek commented 2 years ago

The issue is duplicate of #810 and there is another proposed fix already in #811

thornjad commented 2 years ago

Correct, duplicate of #811, and I very marginally like #811's implementation better