File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ rawMethods.resetStdioForTesting = function() {
290
290
// Needed by the module loader and generally needed everywhere.
291
291
require ( 'fs' ) ;
292
292
require ( 'util' ) ;
293
- require ( 'url' ) ;
293
+ require ( 'internal/ url' ) ;
294
294
295
295
require ( 'internal/modules/cjs/loader' ) ;
296
296
require ( 'internal/modules/esm/utils' ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const crypto = require('crypto');
15
15
const { ERR_DEBUGGER_ERROR } = require ( 'internal/errors' ) . codes ;
16
16
const { EventEmitter } = require ( 'events' ) ;
17
17
const http = require ( 'http' ) ;
18
- const URL = require ( 'url' ) ;
18
+ const { URL } = require ( 'internal/ url' ) ;
19
19
20
20
const debuglog = require ( 'internal/util/debuglog' ) . debuglog ( 'inspect' ) ;
21
21
@@ -297,7 +297,8 @@ class Client extends EventEmitter {
297
297
298
298
async _discoverWebsocketPath ( ) {
299
299
const { 0 : { webSocketDebuggerUrl } } = await this . _fetchJSON ( '/json' ) ;
300
- return URL . parse ( webSocketDebuggerUrl ) . path ;
300
+ const { pathname, search } = new URL ( webSocketDebuggerUrl ) ;
301
+ return `${ pathname } ${ search } ` ;
301
302
}
302
303
303
304
_connectWebsocket ( urlPath ) {
Original file line number Diff line number Diff line change @@ -95,12 +95,7 @@ const expectedModules = new Set([
95
95
'NativeModule internal/process/pre_execution' ,
96
96
] ) ;
97
97
98
- if ( common . isMainThread ) {
99
- [
100
- 'NativeModule internal/idna' ,
101
- 'NativeModule url' ,
102
- ] . forEach ( expectedModules . add . bind ( expectedModules ) ) ;
103
- } else {
98
+ if ( ! common . isMainThread ) {
104
99
[
105
100
'NativeModule diagnostics_channel' ,
106
101
'NativeModule internal/abort_controller' ,
You can’t perform that action at this time.
0 commit comments