lib: use internal fileURLToPath

For internal usage, `internal/url` should be used.

Refs: https://github.com/nodejs/node/pull/49553
PR-URL: https://github.com/nodejs/node/pull/49558
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This commit is contained in:
Deokjin Kim
2023-09-10 23:57:37 +09:00
committed by GitHub
parent afea87ee14
commit b3fc9173ed
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ const {
const { setupCoverageHooks } = require('internal/util');
const { tmpdir } = require('os');
const { join, resolve } = require('path');
const { fileURLToPath } = require('url');
const { fileURLToPath } = require('internal/url');
const kCoverageFileRegex = /^coverage-(\d+)-(\d{13})-(\d+)\.json$/;
const kIgnoreRegex = /\/\* node:coverage ignore next (?<count>\d+ )?\*\//;
const kLineEndingRegex = /\r?\n$/u;

View File

@@ -14,7 +14,7 @@ const { TIMEOUT_MAX } = require('internal/timers');
const EventEmitter = require('events');
const { watch } = require('fs');
const { fileURLToPath } = require('url');
const { fileURLToPath } = require('internal/url');
const { resolve, dirname } = require('path');
const { setTimeout } = require('timers');