Skip to content

Commit

Permalink
fixed ECONNREFUSED on NodeJS 18
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Mar 22, 2024
1 parent 9e04407 commit b3c5965
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- fixed CLI arguments for `--` separator
- fixed sourcemap if range in a comment
- added cache for sourcemap conversion
- fixed ECONNREFUSED on NodeJS 18

* 2.7.5
- fixed special generated codes for original coverage
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/request.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const http = require('http');
const https = require('https');
const dns = require('dns');

// fixed ECONNREFUSED on NodeJS 18
dns.setDefaultResultOrder('ipv4first');

// minimal http request for get sourcemap json
// https://nodejs.org/docs/latest/api/http.html#httprequesturl-options-callback
Expand Down

0 comments on commit b3c5965

Please sign in to comment.