Skip to content

Commit 4930b18

Browse files
committed
Review notes
1 parent 82a4aaa commit 4930b18

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/internal/modules/run_main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ function shouldUseESMLoader(mainPath) {
5050

5151
const { readPackageScope } = require('internal/modules/cjs/loader');
5252
const pkg = readPackageScope(mainPath);
53+
// No need to guard `pkg` as it can only be an object or `false`.
5354
return pkg.data?.type === 'module' || getOptionValue('--experimental-type') === 'module';
5455
}
5556

src/node_options.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class EnvironmentOptions : public Options {
116116
bool experimental_https_modules = false;
117117
bool experimental_wasm_modules = false;
118118
bool experimental_import_meta_resolve = false;
119-
std::string input_type;
120-
std::string type;
119+
std::string input_type; // Value of --input-type
120+
std::string type; // Value of --experimental-type
121121
std::string experimental_policy;
122122
std::string experimental_policy_integrity;
123123
bool has_policy_integrity_string = false;

0 commit comments

Comments
 (0)