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: nodejs#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 Ceres6 committed Aug 14, 2023
1 parent 53f33f6 commit 888fcac
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/internal/main/check_syntax.js
Original file line number Diff line number Diff line change
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 888fcac

Please sign in to comment.