🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

markdownlint-cli2

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint-cli2 - npm Package Compare versions

Comparing version

to
0.16.0

5

CHANGELOG.md
# Changelog
## 0.16.0
- Try not to use require for modules (due to Node 22.12)
- Update dependencies (EXcluding `markdownlint`)
## 0.15.0

@@ -4,0 +9,0 @@

12

markdownlint-cli2.js

@@ -33,3 +33,3 @@ #!/usr/bin/env node

const packageName = "markdownlint-cli2";
const packageVersion = "0.15.0";
const packageVersion = "0.16.0";
const libraryName = "markdownlint";

@@ -101,7 +101,14 @@ const libraryVersion = getLibraryVersion();

const errors = [];
// Try to load via require(...)
try {
return resolveAndRequire(dynamicRequire, expandId, dirs);
const isModule = /\.mjs$/iu.test(expandId);
if (!isModule) {
// Try not to use require for modules due to breaking change in Node 22.12:
// https://github.com/nodejs/node/releases/tag/v22.12.0
return resolveAndRequire(dynamicRequire, expandId, dirs);
}
} catch (error) {
errors.push(error);
}
// Try to load via import(...)
try {

@@ -119,2 +126,3 @@ // eslint-disable-next-line n/no-unsupported-features/node-builtins

}
// Give up
throw new AggregateError(

@@ -121,0 +129,0 @@ errors,

20

package.json
{
"name": "markdownlint-cli2",
"version": "0.15.0",
"version": "0.16.0",
"description": "A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the `markdownlint` library",

@@ -38,5 +38,5 @@ "author": {

"playwright-install-bare": "npm run playwright-install-npm && playwright install",
"playwright-install-npm": "npm install --no-save playwright@1.48.2",
"playwright-install-npm": "npm install --no-save playwright@1.49.0",
"playwright-test": "playwright test --config ./webworker/playwright.config.mjs",
"playwright-test-docker": "docker run --rm --volume $PWD:/home/workdir --workdir /home/workdir --ipc=host mcr.microsoft.com/playwright:v1.48.2 npm run playwright-test",
"playwright-test-docker": "docker run --rm --volume $PWD:/home/workdir --workdir /home/workdir --ipc=host mcr.microsoft.com/playwright:v1.49.0 npm run playwright-test",
"schema": "cpy ./node_modules/markdownlint/schema/markdownlint-config-schema.json ./schema --flat",

@@ -84,6 +84,6 @@ "test": "ava --timeout=1m test/append-to-array-test.js test/fs-mock-test.js test/fs-virtual-test.js test/markdownlint-cli2-test.js test/markdownlint-cli2-test-exec.js test/markdownlint-cli2-test-exports.js test/markdownlint-cli2-test-fs.js test/markdownlint-cli2-test-main.js test/merge-options-test.js test/resolve-and-require-test.js",

"devDependencies": {
"@eslint/js": "9.14.0",
"@eslint/js": "9.16.0",
"@iktakahiro/markdown-it-katex": "4.0.1",
"@playwright/test": "1.48.2",
"@stylistic/eslint-plugin": "2.10.1",
"@playwright/test": "1.49.0",
"@stylistic/eslint-plugin": "2.11.0",
"ajv": "8.17.1",

@@ -95,6 +95,6 @@ "ava": "6.2.0",

"del": "8.0.0",
"eslint": "9.14.0",
"eslint-plugin-jsdoc": "50.4.3",
"eslint-plugin-n": "17.13.1",
"eslint-plugin-unicorn": "56.0.0",
"eslint": "9.16.0",
"eslint-plugin-jsdoc": "50.6.0",
"eslint-plugin-n": "17.14.0",
"eslint-plugin-unicorn": "56.0.1",
"nano-spawn": "0.2.0",

@@ -101,0 +101,0 @@ "markdown-it-emoji": "3.0.0",

@@ -152,3 +152,3 @@ # markdownlint-cli2

```bash
docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.15.0 "**/*.md" "#node_modules"
docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.16.0 "**/*.md" "#node_modules"
```

@@ -170,3 +170,3 @@

```bash
docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.15.0 "**/*.md" "#node_modules"
docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.16.0 "**/*.md" "#node_modules"
```

@@ -418,3 +418,3 @@

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.15.0
rev: v0.16.0
hooks:

@@ -421,0 +421,0 @@ - id: markdownlint-cli2

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.15.0/schema/markdownlint-cli2-config-schema.json",
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.16.0/schema/markdownlint-cli2-config-schema.json",
"title": "markdownlint-cli2 configuration schema",

@@ -10,3 +10,3 @@ "type": "object",

"type": "string",
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.15.0/schema/markdownlint-cli2-config-schema.json"
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.16.0/schema/markdownlint-cli2-config-schema.json"
},

@@ -19,3 +19,3 @@ "config": {

"customRules": {
"description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -30,3 +30,3 @@ "default": [],

"fix": {
"description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "boolean",

@@ -36,3 +36,3 @@ "default": false

"frontMatter": {
"description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "string",

@@ -43,3 +43,3 @@ "minLength": 1,

"gitignore": {
"description": "Whether to ignore files referenced by .gitignore (or glob expression) (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to ignore files referenced by .gitignore (or glob expression) (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": [

@@ -52,3 +52,3 @@ "boolean",

"globs": {
"description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -63,3 +63,3 @@ "default": [],

"ignores": {
"description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -74,3 +74,3 @@ "default": [],

"markdownItPlugins": {
"description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -95,3 +95,3 @@ "default": [],

"modulePaths": {
"description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -106,3 +106,3 @@ "default": [],

"noBanner": {
"description": "Whether to disable the display of the banner message and version numbers on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to disable the display of the banner message and version numbers on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "boolean",

@@ -112,3 +112,3 @@ "default": false

"noInlineConfig": {
"description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "boolean",

@@ -118,3 +118,3 @@ "default": false

"noProgress": {
"description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "boolean",

@@ -124,3 +124,3 @@ "default": false

"outputFormatters": {
"description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "array",

@@ -145,3 +145,3 @@ "default": [],

"showFound": {
"description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.15.0/README.md#markdownlint-cli2jsonc",
"description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.16.0/README.md#markdownlint-cli2jsonc",
"type": "boolean",

@@ -148,0 +148,0 @@ "default": false