@markuplint/parser-utils 4.8.7 → 4.8.9

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,20 @@
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.8.9](https://github.com/markuplint/markuplint/compare/@markuplint/parser-utils@4.8.8...@markuplint/parser-utils@4.8.9) (2025-08-24)
7
+
8
+ **Note:** Version bump only for package @markuplint/parser-utils
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.8.8](https://github.com/markuplint/markuplint/compare/@markuplint/parser-utils@4.8.7...@markuplint/parser-utils@4.8.8) (2025-08-13)
15
+
16
+ ### Bug Fixes
17
+
18
+ - ensure that each `clean` command correctly removes build files ([110b78e](https://github.com/markuplint/markuplint/commit/110b78e85379d29a84ca68325127344a87a570b6))
19
+
6
20
  ## [4.8.7](https://github.com/markuplint/markuplint/compare/@markuplint/parser-utils@4.8.6...@markuplint/parser-utils@4.8.7) (2025-04-13)
7
21
 
8
22
  **Note:** Version bump only for package @markuplint/parser-utils
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@markuplint/parser-utils",
3
- "version": "4.8.7",
3
+ "version": "4.8.9",
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>",
7
7
  "license": "MIT",
8
- "private": false,
9
8
  "type": "module",
10
9
  "exports": {
11
10
  ".": {
@@ -26,20 +25,20 @@
26
25
  "scripts": {
27
26
  "build": "tsc --project tsconfig.build.json",
28
27
  "dev": "tsc --watch --project tsconfig.build.json",
29
- "clean": "tsc --build --clean"
28
+ "clean": "tsc --build --clean tsconfig.build.json"
30
29
  },
31
30
  "dependencies": {
32
- "@markuplint/ml-ast": "4.4.9",
33
- "@markuplint/ml-spec": "4.9.6",
34
- "@markuplint/types": "4.7.6",
31
+ "@markuplint/ml-ast": "4.4.10",
32
+ "@markuplint/ml-spec": "4.10.0",
33
+ "@markuplint/types": "4.8.0",
35
34
  "@types/uuid": "10.0.0",
36
- "debug": "4.4.0",
37
- "espree": "10.3.0",
38
- "type-fest": "4.39.1",
35
+ "debug": "4.4.1",
36
+ "espree": "10.4.0",
37
+ "type-fest": "4.41.0",
39
38
  "uuid": "11.1.0"
40
39
  },
41
40
  "devDependencies": {
42
- "@typescript-eslint/typescript-estree": "8.29.1"
41
+ "@typescript-eslint/typescript-estree": "8.40.0"
43
42
  },
44
- "gitHead": "eb36d59f7e13d4e59ff3f3c4eabb5ec06c070eb0"
43
+ "gitHead": "ae97eb2d31ecedf4f0800fbbf18588aad4ebca04"
45
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
- }