| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4a22647 commit d8f1dea
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,6 +30,10 @@ const noRestrictedSyntax = [ | |||
| 30 | 30 | selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']", | |
| 31 | 31 | message: "Use 'hideStackFrames' from 'internal/errors' instead.", | |
| 32 | 32 | }, | |
| 33 | + { | ||
| 34 | + selector: "CallExpression[callee.object.name='URL'][callee.property.name='parse']", | ||
| 35 | + message: "Use 'URLParse' from 'internal/url' instead.", | ||
| 36 | + }, | ||
| 33 | 37 | { | |
| 34 | 38 | selector: "AssignmentExpression:matches([left.object.name='Error']):matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])", | |
| 35 | 39 | message: "Use 'overrideStackTrace' from 'internal/errors' instead.", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,7 +37,7 @@ const { | |||
| 37 | 37 | kDeserialize, | |
| 38 | 38 | } = require('internal/worker/js_transferable'); | |
| 39 | 39 | ||
| 40 | - const { URL } = require('internal/url'); | ||
| 40 | + const { URLParse } = require('internal/url'); | ||
| 41 | 41 | ||
| 42 | 42 | const kHandle = Symbol('kHandle'); | |
| 43 | 43 | const kDetail = Symbol('kDetail'); | |
@@ -156,7 +156,7 @@ class SocketAddress { | |||
| 156 | 156 | const { | |
| 157 | 157 | hostname: address, | |
| 158 | 158 | port, | |
| 159 | - } = URL.parse(`http://${input}`); | ||
| 159 | + } = URLParse(`http://${input}`); | ||
| 160 | 160 | if (address.startsWith('[') && address.endsWith(']')) { | |
| 161 | 161 | return new SocketAddress({ | |
| 162 | 162 | address: address.slice(1, -1), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ const { | |||
| 30 | 30 | fileURLToPath, | |
| 31 | 31 | isURL, | |
| 32 | 32 | pathToFileURL, | |
| 33 | - URL, | ||
| 33 | + URLParse, | ||
| 34 | 34 | } = require('internal/url'); | |
| 35 | 35 | const { | |
| 36 | 36 | emitExperimentalWarning, | |
@@ -652,7 +652,7 @@ class MockTracker { | |||
| 652 | 652 | if (format) { // Format is not yet known for ambiguous files when detection is enabled. | |
| 653 | 653 | validateOneOf(format, 'format', kSupportedFormats); | |
| 654 | 654 | } | |
| 655 | - const baseURL = URL.parse(url); | ||
| 655 | + const baseURL = URLParse(url); | ||
| 656 | 656 | ||
| 657 | 657 | if (!baseURL) { | |
| 658 | 658 | throw new ERR_INVALID_ARG_VALUE( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments