mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
debugger: use internal/url.URL
instead of url.parse
PR-URL: https://github.com/nodejs/node/pull/49590 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
ccf46ba0f5
commit
2a0e5de163
@ -15,7 +15,7 @@ const crypto = require('crypto');
|
||||
const { ERR_DEBUGGER_ERROR } = require('internal/errors').codes;
|
||||
const { EventEmitter } = require('events');
|
||||
const http = require('http');
|
||||
const URL = require('url');
|
||||
const { URL } = require('internal/url');
|
||||
|
||||
const debuglog = require('internal/util/debuglog').debuglog('inspect');
|
||||
|
||||
@ -297,7 +297,8 @@ class Client extends EventEmitter {
|
||||
|
||||
async _discoverWebsocketPath() {
|
||||
const { 0: { webSocketDebuggerUrl } } = await this._fetchJSON('/json');
|
||||
return URL.parse(webSocketDebuggerUrl).path;
|
||||
const { pathname, search } = new URL(webSocketDebuggerUrl);
|
||||
return `${pathname}${search}`;
|
||||
}
|
||||
|
||||
_connectWebsocket(urlPath) {
|
||||
|
Loading…
Reference in New Issue
Block a user