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 — esm: remove unnecessary toNamespacedPath calls · nodejs/node@262f2cb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/modules/esm
    • resolve.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/modules/esm/resolve.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/resolve.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const { BuiltinModule } = require('internal/bootstrap/realm');
2727
const { realpathSync } = require('fs');
2828
const { getOptionValue } = require('internal/options');
2929
// Do not eagerly grab .manifest, it may be in TDZ
30-
const { sep, posix: { relative: relativePosixPath }, toNamespacedPath, resolve } = require('path');
30+
const { sep, posix: { relative: relativePosixPath }, resolve } = require('path');
3131
const preserveSymlinks = getOptionValue('--preserve-symlinks');
3232
const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main');
3333
const experimentalNetworkImports =
@@ -246,8 +246,8 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
246246
throw err;
247247
}
248248

249-
const stats = internalFsBinding.internalModuleStat(toNamespacedPath(StringPrototypeEndsWith(path, '/') ?
250-
StringPrototypeSlice(path, -1) : path));
249+
const stats = internalFsBinding.internalModuleStat(StringPrototypeEndsWith(path, '/') ?
250+
StringPrototypeSlice(path, -1) : path);
251251

252252
// Check for stats.isDirectory()
253253
if (stats === 1) {
@@ -807,7 +807,7 @@ function packageResolve(specifier, base, conditions) {
807807
let lastPath;
808808
do {
809809
const stat = internalFsBinding.internalModuleStat(
810-
toNamespacedPath(StringPrototypeSlice(packageJSONPath, 0, packageJSONPath.length - 13)),
810+
StringPrototypeSlice(packageJSONPath, 0, packageJSONPath.length - 13),
811811
);
812812
// Check for !stat.isDirectory()
813813
if (stat !== 1) {

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.