markdownlint-cli 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -139,7 +139,7 @@ To run `markdownlint-cli` as part of a [pre-commit][pre-commit] workflow, add so
139
139
 
140
140
  ```yaml
141
141
  - repo: https://github.com/igorshubovych/markdownlint-cli
142
- rev: v0.42.0
142
+ rev: v0.43.0
143
143
  hooks:
144
144
  - id: markdownlint
145
145
  ```
package/markdownlint.js CHANGED
@@ -309,14 +309,13 @@ function lintAndPrint(stdin, files) {
309
309
  ...lintOptions,
310
310
  resultVersion: 3
311
311
  };
312
- const markdownlintRuleHelpers = require('markdownlint/helpers');
313
312
  for (const file of files) {
314
313
  fixOptions.files = [file];
315
314
  const fixResult = markdownlint.sync(fixOptions);
316
315
  const fixes = fixResult[file].filter(error => error.fixInfo);
317
316
  if (fixes.length > 0) {
318
317
  const originalText = fs.readFileSync(file, fsOptions);
319
- const fixedText = markdownlintRuleHelpers.applyFixes(originalText, fixes);
318
+ const fixedText = markdownlint.applyFixes(originalText, fixes);
320
319
  if (originalText !== fixedText) {
321
320
  fs.writeFileSync(file, fixedText, fsOptions);
322
321
  }
@@ -332,7 +331,7 @@ try {
332
331
  if (files.length > 0 && !options.stdin) {
333
332
  lintAndPrint(null, diff);
334
333
  } else if (files.length === 0 && options.stdin && !options.fix) {
335
- import('get-stdin').then(module => module.default()).then(lintAndPrint);
334
+ import('node:stream/consumers').then(module => module.text(process.stdin)).then(lintAndPrint);
336
335
  } else {
337
336
  program.help();
338
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdownlint-cli",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "MarkdownLint Command Line Interface",
5
5
  "main": "markdownlint.js",
6
6
  "bin": {
@@ -38,21 +38,20 @@
38
38
  "homepage": "https://github.com/igorshubovych/markdownlint-cli#readme",
39
39
  "dependencies": {
40
40
  "commander": "~12.1.0",
41
- "get-stdin": "~9.0.0",
42
41
  "glob": "~11.0.0",
43
42
  "ignore": "~6.0.2",
44
43
  "js-yaml": "^4.1.0",
45
44
  "jsonc-parser": "~3.3.1",
46
45
  "jsonpointer": "5.0.1",
47
- "markdownlint": "~0.35.0",
46
+ "markdownlint": "~0.36.1",
48
47
  "minimatch": "~10.0.1",
49
48
  "run-con": "~1.3.2",
50
- "smol-toml": "~1.3.0"
49
+ "smol-toml": "~1.3.1"
51
50
  },
52
51
  "devDependencies": {
53
- "ava": "^6.1.3",
52
+ "ava": "^6.2.0",
54
53
  "markdownlint-cli-local-test-rule": "./test/custom-rules/markdownlint-cli-local-test-rule",
55
- "nano-spawn": "^0.1.0",
54
+ "nano-spawn": "^0.2.0",
56
55
  "xo": "^0.59.3"
57
56
  },
58
57
  "xo": {