GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: restrict internal code from using public `url` module · nodejs/node@08ffc63

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • .eslintrc.yaml
    • internal/bootstrap/switches
      • is_main_thread.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ rules:
175175
message: Use `const { structuredClone } = require('internal/structured_clone');` instead of the global.
176176
- name: SubtleCrypto
177177
message: Use `const { SubtleCrypto } = require('internal/crypto/webcrypto');` instead of the global.
178+
no-restricted-modules:
179+
- error
180+
- name: url
181+
message: Require `internal/url` instead of `url`.
178182
# Custom rules in tools/eslint-rules
179183
node-core/avoid-prototype-pollution: error
180184
node-core/lowercase-name-for-primitive: error
Collapse file

‎lib/internal/bootstrap/switches/is_main_thread.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/switches/is_main_thread.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ rawMethods.resetStdioForTesting = function() {
290290
// Needed by the module loader and generally needed everywhere.
291291
require('fs');
292292
require('util');
293-
require('url');
293+
require('url'); // eslint-disable-line no-restricted-modules
294294

295295
require('internal/modules/cjs/loader');
296296
require('internal/modules/esm/utils');

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.