Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/eslint.config_partial.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const noRestrictedSyntax = [
selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']",
message: "Use 'hideStackFrames' from 'internal/errors' instead.",
},
{
selector: "CallExpression[callee.object.name='URL'][callee.property.name='parse']",
message: "Use 'URLParse' from 'internal/url' instead.",
},
{
selector: "AssignmentExpression:matches([left.object.name='Error']):matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])",
message: "Use 'overrideStackTrace' from 'internal/errors' instead.",
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/socketaddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const {
kDeserialize,
} = require('internal/worker/js_transferable');

const { URL } = require('internal/url');
const { URLParse } = require('internal/url');

const kHandle = Symbol('kHandle');
const kDetail = Symbol('kDetail');
Expand Down Expand Up @@ -156,7 +156,7 @@ class SocketAddress {
const {
hostname: address,
port,
} = URL.parse(`http://${input}`);
} = URLParse(`http://${input}`);
if (address.startsWith('[') && address.endsWith(']')) {
return new SocketAddress({
address: address.slice(1, -1),
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/test_runner/mock/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const {
fileURLToPath,
isURL,
pathToFileURL,
URL,
URLParse,
} = require('internal/url');
const {
emitExperimentalWarning,
Expand Down Expand Up @@ -652,7 +652,7 @@ class MockTracker {
if (format) { // Format is not yet known for ambiguous files when detection is enabled.
validateOneOf(format, 'format', kSupportedFormats);
}
const baseURL = URL.parse(url);
const baseURL = URLParse(url);

if (!baseURL) {
throw new ERR_INVALID_ARG_VALUE(
Expand Down
Loading