@@ -9,7 +9,7 @@ const path = require('path');
99
1010/**
1111 * Get the absolute path to the main entry point.
12- * @param {string} main Entry point path
12+ * @param {string} main - Entry point path
1313 */
1414function resolveMainPath(main) {
1515 // Note extension resolution for the main entry point can be deprecated in a
@@ -30,7 +30,7 @@ function resolveMainPath(main) {
3030
3131/**
3232 * Determine whether the main entry point should be loaded through the ESM Loader.
33- * @param {string} mainPath Absolute path to the main entry point
33+ * @param {string} mainPath - Absolute path to the main entry point
3434 */
3535function shouldUseESMLoader(mainPath) {
3636 /**
@@ -57,7 +57,7 @@ function shouldUseESMLoader(mainPath) {
5757
5858/**
5959 * Run the main entry point through the ESM Loader.
60- * @param {string} mainPath Absolute path to the main entry point
60+ * @param {string} mainPath - Absolute path for the main entry point
6161 */
6262function runMainESM(mainPath) {
6363 const { loadESM } = require('internal/process/esm_loader');
@@ -72,7 +72,7 @@ function runMainESM(mainPath) {
7272
7373/**
7474 * Handle process exit events around the main entry point promise.
75- * @param {Promise} promise Main entry point promise
75+ * @param {Promise} promise - Main entry point promise
7676 */
7777async function handleMainPromise(promise) {
7878 const {
@@ -90,7 +90,8 @@ async function handleMainPromise(promise) {
9090 * Parse the CLI main entry point string and run it.
9191 * For backwards compatibility, we have to run a bunch of monkey-patchable code that belongs to the CJS loader (exposed
9292 * by `require('module')`) even when the entry point is ESM.
93- * @param {string} main CLI main entry point string
93+ * Because of backwards compatibility, this function is exposed publicly via `import { runMain } from 'node:module'`.
94+ * @param {string} main - Resolved absolute path for the main entry point, if found
9495 */
9596function executeUserEntryPoint(main = process.argv[1]) {
9697 const resolvedMain = resolveMainPath(main);
0 commit comments