@@ -10,7 +10,7 @@ const path = require('path');
1010
1111/**
1212 * Get the absolute path to the main entry point.
13- * @param {string} main Entry point path
13+ * @param {string} main - Entry point path
1414 */
1515function resolveMainPath(main) {
1616 // Note extension resolution for the main entry point can be deprecated in a
@@ -31,7 +31,7 @@ function resolveMainPath(main) {
3131
3232/**
3333 * Determine whether the main entry point should be loaded through the ESM Loader.
34- * @param {string} mainPath Absolute path to the main entry point
34+ * @param {string} mainPath - Absolute path to the main entry point
3535 */
3636function shouldUseESMLoader(mainPath) {
3737 /**
@@ -63,7 +63,7 @@ function shouldUseESMLoader(mainPath) {
6363
6464/**
6565 * Run the main entry point through the ESM Loader.
66- * @param {string} mainPath Absolute path to the main entry point
66+ * @param {string} mainPath - Absolute path for the main entry point
6767 */
6868function runMainESM(mainPath) {
6969 const { loadESM } = require('internal/process/esm_loader');
@@ -78,7 +78,7 @@ function runMainESM(mainPath) {
7878
7979/**
8080 * Handle process exit events around the main entry point promise.
81- * @param {Promise} promise Main entry point promise
81+ * @param {Promise} promise - Main entry point promise
8282 */
8383async function handleMainPromise(promise) {
8484 const {
@@ -96,7 +96,8 @@ async function handleMainPromise(promise) {
9696 * Parse the CLI main entry point string and run it.
9797 * For backwards compatibility, we have to run a bunch of monkey-patchable code that belongs to the CJS loader (exposed
9898 * by `require('module')`) even when the entry point is ESM.
99- * @param {string} main CLI main entry point string
99+ * Because of backwards compatibility, this function is exposed publicly via `import { runMain } from 'node:module'`.
100+ * @param {string} main - Resolved absolute path for the main entry point, if found
100101 */
101102function executeUserEntryPoint(main = process.argv[1]) {
102103 const resolvedMain = resolveMainPath(main);
0 commit comments