From b3fc9173ed0a562e71ea9bb2d719c27a92857c76 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sun, 10 Sep 2023 23:57:37 +0900 Subject: [PATCH] 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 Reviewed-By: Raz Luvaton Reviewed-By: Chemi Atlow Reviewed-By: LiviaMedeiros Reviewed-By: Yagiz Nizipli Reviewed-By: Minwoo Jung --- lib/internal/test_runner/coverage.js | 2 +- lib/internal/watch_mode/files_watcher.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/test_runner/coverage.js b/lib/internal/test_runner/coverage.js index 68ee42c3746353..7727ab006052ba 100644 --- a/lib/internal/test_runner/coverage.js +++ b/lib/internal/test_runner/coverage.js @@ -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 (?\d+ )?\*\//; const kLineEndingRegex = /\r?\n$/u; diff --git a/lib/internal/watch_mode/files_watcher.js b/lib/internal/watch_mode/files_watcher.js index b38f94d7cc8051..895c6ec138d131 100644 --- a/lib/internal/watch_mode/files_watcher.js +++ b/lib/internal/watch_mode/files_watcher.js @@ -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');