@markuplint/parser-utils 4.8.11 → 4.18.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.
@@ -95,7 +95,7 @@ flowchart TD
95
95
  | `ignore-block.ts` | テンプレート式のマスキングと復元 | `ignoreBlock`, `restoreNode` |
96
96
  | `ignore-front-matter.ts` | YAML フロントマター処理 | `ignoreFrontMatter` |
97
97
  | `detect-element-type.ts` | 要素の分類 | `detectElementType` |
98
- | `idl-attributes.ts` | IDL ↔ コンテンツ属性名マッピング | `searchIDLAttribute` |
98
+ | `idl-attributes.ts` | IDL ↔ コンテンツ属性名マッピング | `searchIDLAttribute` |
99
99
  | `debugger.ts` | テスト・デバッグユーティリティ | `nodeListToDebugMaps`, `attributesToDebugMaps`, `nodeTreeDebugView` |
100
100
  | `parser-error.ts` | エラークラス | `ParserError`, `TargetParserError`, `ConfigParserError` |
101
101
  | `sort-nodes.ts` | ノードの位置ソート | `sortNodes` |
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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
+ # [4.18.0](https://github.com/markuplint/markuplint/compare/v4.14.1...v4.18.0) (2026-04-22)
7
+
8
+ ### Bug Fixes
9
+
10
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
11
+
12
+ ### Reverts
13
+
14
+ - pin uuid to 13 for Node 18 support ([b2bae14](https://github.com/markuplint/markuplint/commit/b2bae1460a0810f6a17fefa2d042d44eab5f0641))
15
+
16
+ ## [4.8.12](https://github.com/markuplint/markuplint/compare/@markuplint/parser-utils@4.8.11...@markuplint/parser-utils@4.8.12) (2026-04-21)
17
+
18
+ ### Bug Fixes
19
+
20
+ - resolve additional eslint-plugin-unicorn v63 errors ([e58a72c](https://github.com/markuplint/markuplint/commit/e58a72c17c97bbec522f9513b99777fac6904d64))
21
+
22
+ ### Reverts
23
+
24
+ - pin uuid to 13 for Node 18 support ([b2bae14](https://github.com/markuplint/markuplint/commit/b2bae1460a0810f6a17fefa2d042d44eab5f0641))
25
+
6
26
  ## [4.8.11](https://github.com/markuplint/markuplint/compare/@markuplint/parser-utils@4.8.10...@markuplint/parser-utils@4.8.11) (2026-02-10)
7
27
 
8
28
  **Note:** Version bump only for package @markuplint/parser-utils
package/lib/debugger.js CHANGED
@@ -8,8 +8,7 @@
8
8
  */
9
9
  export function nodeListToDebugMaps(nodeList, withAttr = false) {
10
10
  return nodeList.flatMap(n => {
11
- const r = [];
12
- r.push(tokenDebug(n));
11
+ const r = [tokenDebug(n)];
13
12
  if (withAttr && n && n.type === 'starttag') {
14
13
  r.push(...attributesToDebugMaps(n.attributes).flat());
15
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/parser-utils",
3
- "version": "4.8.11",
3
+ "version": "4.18.0",
4
4
  "description": "Utility module for markuplint parser plugin",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -28,17 +28,17 @@
28
28
  "clean": "tsc --build --clean tsconfig.build.json"
29
29
  },
30
30
  "dependencies": {
31
- "@markuplint/ml-ast": "4.4.11",
32
- "@markuplint/ml-spec": "4.10.2",
33
- "@markuplint/types": "4.8.2",
31
+ "@markuplint/ml-ast": "4.18.0",
32
+ "@markuplint/ml-spec": "4.18.0",
33
+ "@markuplint/types": "4.18.0",
34
34
  "@types/uuid": "11.0.0",
35
35
  "debug": "4.4.3",
36
- "espree": "11.1.0",
37
- "type-fest": "4.41.0",
36
+ "espree": "11.2.0",
37
+ "type-fest": "5.6.0",
38
38
  "uuid": "13.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@typescript-eslint/typescript-estree": "8.54.0"
41
+ "@typescript-eslint/typescript-estree": "8.59.0"
42
42
  },
43
- "gitHead": "193ee7c1262bbed95424e38efdf1a8e56ff049f4"
43
+ "gitHead": "1885af6349def3f19df975b9e9c399dd47361de1"
44
44
  }
@@ -1,2 +0,0 @@
1
- import type { MLASTParentNode, NamespaceURI } from '@markuplint/ml-ast';
2
- export declare function getNamespace(currentNodeName: string | null, parentNode: MLASTParentNode | null): NamespaceURI;
@@ -1,29 +0,0 @@
1
- export function getNamespace(currentNodeName, parentNode) {
2
- const parentNS = getParentNamespace(parentNode);
3
- if (parentNS === 'http://www.w3.org/1999/xhtml' && currentNodeName?.toLowerCase() === 'svg') {
4
- return 'http://www.w3.org/2000/svg';
5
- }
6
- else if (parentNS === 'http://www.w3.org/2000/svg' && parentNode?.nodeName === 'foreignObject') {
7
- return 'http://www.w3.org/1999/xhtml';
8
- }
9
- else if (parentNS === 'http://www.w3.org/1999/xhtml' && currentNodeName?.toLowerCase() === 'math') {
10
- return 'http://www.w3.org/1998/Math/MathML';
11
- }
12
- return parentNS;
13
- }
14
- function getParentNamespace(parentNode) {
15
- if (!parentNode) {
16
- return 'http://www.w3.org/1999/xhtml';
17
- }
18
- if ('namespace' in parentNode && parentNode.namespace) {
19
- const ns = parentNode.namespace.toLowerCase().trim();
20
- return ns === 'http://www.w3.org/1999/xhtml'
21
- ? 'http://www.w3.org/1999/xhtml'
22
- : ns === 'http://www.w3.org/2000/svg'
23
- ? 'http://www.w3.org/2000/svg'
24
- : ns === 'http://www.w3.org/1998/Math/MathML'
25
- ? 'http://www.w3.org/1998/Math/MathML'
26
- : 'http://www.w3.org/1999/xhtml';
27
- }
28
- return getParentNamespace(parentNode.parentNode);
29
- }