Skip to content

Commit

Permalink
lib: remove duplicated requires in check_syntax
Browse files Browse the repository at this point in the history
PR-URL: #48508
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
anonrig authored and RafaelGSS committed Jul 3, 2023
1 parent 2b141c4 commit 0da03f0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/internal/main/check_syntax.js
Expand Up @@ -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,
Expand All @@ -14,8 +14,6 @@ const {
readStdin,
} = require('internal/process/execution');

const { pathToFileURL } = require('url');

const {
Module: {
_resolveFilename: resolveCJSModuleName,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0da03f0

Please sign in to comment.