From 049052e083ced3224d328c59e204b026315f6b0c Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Fri, 23 Jun 2023 11:17:26 -0400 Subject: [PATCH] lib: remove duplicated requires in check_syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/48508 Reviewed-By: Juan José Arboleda Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca --- lib/internal/main/check_syntax.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/internal/main/check_syntax.js b/lib/internal/main/check_syntax.js index 9355f7b7e4d9be..50e0b7d6de67c4 100644 --- a/lib/internal/main/check_syntax.js +++ b/lib/internal/main/check_syntax.js @@ -4,7 +4,7 @@ // instead of actually running the file. const { getOptionValue } = require('internal/options'); -const { URL } = require('internal/url'); +const { URL, pathToFileURL } = require('internal/url'); const { prepareMainThreadExecution, markBootstrapComplete, @@ -14,8 +14,6 @@ const { readStdin, } = require('internal/process/execution'); -const { pathToFileURL } = require('url'); - const { Module: { _resolveFilename: resolveCJSModuleName, @@ -49,7 +47,6 @@ if (process.argv[1] && process.argv[1] !== '-') { } function loadESMIfNeeded(cb) { - const { getOptionValue } = require('internal/options'); const hasModulePreImport = getOptionValue('--import').length > 0; if (hasModulePreImport) {