Skip to content

Commit b28d83f

Browse files
committed
Freshen generated index.js file.
1 parent d556c91 commit b28d83f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

dist/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50498,7 +50498,7 @@ const resolveAndRequire = __nccwpck_require__(2034);
5049850498

5049950499
// Variables
5050050500
const packageName = "markdownlint-cli2";
50501-
const packageVersion = "0.15.0";
50501+
const packageVersion = "0.16.0";
5050250502
const libraryName = "markdownlint";
5050350503
const libraryVersion = getLibraryVersion();
5050450504
const bannerMessage = `${packageName} v${packageVersion} (${libraryName} v${libraryVersion})`;
@@ -50565,11 +50565,18 @@ const importOrRequireResolve = async (dirOrDirs, id, noRequire) => {
5056550565
const dirs = Array.isArray(dirOrDirs) ? dirOrDirs : [ dirOrDirs ];
5056650566
const expandId = expandTildePath(id);
5056750567
const errors = [];
50568+
// Try to load via require(...)
5056850569
try {
50569-
return resolveAndRequire(dynamicRequire, expandId, dirs);
50570+
const isModule = /\.mjs$/iu.test(expandId);
50571+
if (!isModule) {
50572+
// Try not to use require for modules due to breaking change in Node 22.12:
50573+
// https://github.com/nodejs/node/releases/tag/v22.12.0
50574+
return resolveAndRequire(dynamicRequire, expandId, dirs);
50575+
}
5057050576
} catch (error) {
5057150577
errors.push(error);
5057250578
}
50579+
// Try to load via import(...)
5057350580
try {
5057450581
// eslint-disable-next-line n/no-unsupported-features/node-builtins
5057550582
const isURL = !pathDefault.isAbsolute(expandId) && URL.canParse(expandId);
@@ -50582,6 +50589,7 @@ const importOrRequireResolve = async (dirOrDirs, id, noRequire) => {
5058250589
} catch (error) {
5058350590
errors.push(error);
5058450591
}
50592+
// Give up
5058550593
throw new AggregateError(
5058650594
errors,
5058750595
`Unable to require or import module '${id}'.`

0 commit comments

Comments
 (0)