markuplint 5.0.0-alpha.0 → 5.0.0-alpha.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-alpha.2](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.1...v5.0.0-alpha.2) (2026-02-23)
7
+
8
+ ### Features
9
+
10
+ - **markuplint:** integrate autofix results into MLEngine ([1558a5c](https://github.com/markuplint/markuplint/commit/1558a5cbdddda6845cf2570252920f5c489a6acc))
11
+
12
+ # [5.0.0-alpha.1](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.0...v5.0.0-alpha.1) (2026-02-22)
13
+
14
+ **Note:** Version bump only for package markuplint
15
+
6
16
  # [5.0.0-alpha.0](https://github.com/markuplint/markuplint/compare/v4.14.1...v5.0.0-alpha.0) (2026-02-20)
7
17
 
8
18
  ### Bug Fixes
@@ -95,17 +95,16 @@ export class MLEngine extends Emitter {
95
95
  log('exec: cancel (unsetuped yet)');
96
96
  return null;
97
97
  }
98
- const violations = await core.verify(this.#options?.fix).catch(error => {
98
+ const verifyResult = await core.verify(this.#options?.fix).catch(error => {
99
99
  if (error instanceof Error) {
100
100
  return error;
101
101
  }
102
102
  throw error;
103
103
  });
104
104
  const sourceCode = await this.#file.getCode();
105
- const fixedCode = core.document.toString(true);
106
- if (violations instanceof Error) {
107
- this.emit('lint-error', this.#file.path, sourceCode, violations);
108
- const errMessage = violations.stack ?? violations.message;
105
+ if (verifyResult instanceof Error) {
106
+ this.emit('lint-error', this.#file.path, sourceCode, verifyResult);
107
+ const errMessage = verifyResult.stack ?? verifyResult.message;
109
108
  log('exec: error %O', errMessage);
110
109
  return {
111
110
  violations: [
@@ -120,18 +119,20 @@ export class MLEngine extends Emitter {
120
119
  ],
121
120
  filePath: this.#file.path,
122
121
  sourceCode,
123
- fixedCode,
122
+ fixedCode: sourceCode,
124
123
  status: 'processed',
125
124
  };
126
125
  }
126
+ const { violations, fixedCode } = verifyResult;
127
127
  const debugMap = 'debugMap' in core.document ? core.document.debugMap() : null;
128
- this.emit('lint', this.#file.path, sourceCode, violations, fixedCode, debugMap);
128
+ const resolvedFixedCode = fixedCode ?? sourceCode;
129
+ this.emit('lint', this.#file.path, sourceCode, violations, resolvedFixedCode, debugMap);
129
130
  log('exec: end');
130
131
  return {
131
- violations,
132
+ violations: [...violations],
132
133
  filePath: this.#file.path,
133
134
  sourceCode,
134
- fixedCode,
135
+ fixedCode: resolvedFixedCode,
135
136
  status: 'processed',
136
137
  };
137
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markuplint",
3
- "version": "5.0.0-alpha.0",
3
+ "version": "5.0.0-alpha.2",
4
4
  "description": "An HTML linter for all markup developers",
5
5
  "author": "Yusuke Hirao",
6
6
  "license": "MIT",
@@ -26,17 +26,17 @@
26
26
  "clean": "tsc --build --clean tsconfig.build.json"
27
27
  },
28
28
  "dependencies": {
29
- "@markuplint/cli-utils": "5.0.0-alpha.0",
30
- "@markuplint/file-resolver": "5.0.0-alpha.0",
31
- "@markuplint/html-parser": "5.0.0-alpha.0",
32
- "@markuplint/html-spec": "5.0.0-alpha.0",
33
- "@markuplint/i18n": "5.0.0-alpha.0",
34
- "@markuplint/ml-ast": "5.0.0-alpha.0",
35
- "@markuplint/ml-config": "5.0.0-alpha.0",
36
- "@markuplint/ml-core": "5.0.0-alpha.0",
37
- "@markuplint/ml-spec": "5.0.0-alpha.0",
38
- "@markuplint/rules": "5.0.0-alpha.0",
39
- "@markuplint/shared": "5.0.0-alpha.0",
29
+ "@markuplint/cli-utils": "5.0.0-alpha.2",
30
+ "@markuplint/file-resolver": "5.0.0-alpha.2",
31
+ "@markuplint/html-parser": "5.0.0-alpha.2",
32
+ "@markuplint/html-spec": "5.0.0-alpha.2",
33
+ "@markuplint/i18n": "5.0.0-alpha.2",
34
+ "@markuplint/ml-ast": "5.0.0-alpha.2",
35
+ "@markuplint/ml-config": "5.0.0-alpha.2",
36
+ "@markuplint/ml-core": "5.0.0-alpha.2",
37
+ "@markuplint/ml-spec": "5.0.0-alpha.2",
38
+ "@markuplint/rules": "5.0.0-alpha.2",
39
+ "@markuplint/shared": "5.0.0-alpha.2",
40
40
  "@types/debug": "4.1.12",
41
41
  "chokidar": "5.0.0",
42
42
  "debug": "4.4.3",
@@ -46,5 +46,5 @@
46
46
  "strip-ansi": "7.1.2",
47
47
  "type-fest": "5.4.4"
48
48
  },
49
- "gitHead": "13dcfc84ec83d87360c720e253383b60767e1b56"
49
+ "gitHead": "31ccf1e81443ea3f93597d287595211f1823ddcf"
50
50
  }