@@ -59,7 +59,11 @@ function resolve (specifier, context) {
5959 specifier = fileURLToPath ( specifier )
6060 }
6161
62- const resolved = require . resolve ( specifier , { conditions, paths : [ fileURLToPath ( context . parentURL ) ] } )
62+ const resolved = require . resolve ( specifier , {
63+ paths : [ fileURLToPath ( context . parentURL ) ] ,
64+ // @ts -expect-error - Node.js 22+ unofficially supports a conditions option
65+ conditions,
66+ } )
6367
6468 return {
6569 url : pathToFileURL ( resolved ) ,
@@ -79,12 +83,12 @@ function getSource (url, { format }) {
7983 *
8084 * @param {object } moduleData
8185 * @param {string } moduleData.path
82- * @param {boolean } moduleData.internal
86+ * @param {boolean } [ moduleData.internal = false]
8387 * @param {object } moduleData.context
84- * @param {boolean } moduleData.excludeDefault
88+ * @param {boolean } [ moduleData.excludeDefault = false]
8589 * @returns {Promise<Map> }
8690 */
87- async function processModule ( { path, internal, context, excludeDefault } ) {
91+ async function processModule ( { path, internal = false , context, excludeDefault = false } ) {
8892 let exportNames , srcUrl
8993 if ( internal ) {
9094 // we can not read and parse of internal modules
0 commit comments