@markuplint/svelte-parser 4.6.4 → 4.6.6
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 +10 -3
- package/lib/parse-block.d.ts +0 -1
- package/lib/parser.d.ts +5 -6
- package/lib/parser.js +1 -1
- package/lib/svelte-parser/index.d.ts +0 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,16 +3,23 @@
|
|
|
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.6.
|
|
6
|
+
## [4.6.6](https://github.com/markuplint/markuplint/compare/@markuplint/svelte-parser@4.6.5...@markuplint/svelte-parser@4.6.6) (2024-09-02)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @markuplint/svelte-parser
|
|
8
9
|
|
|
9
|
-
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
* fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
|
|
14
|
+
## [4.6.5](https://github.com/markuplint/markuplint/compare/@markuplint/svelte-parser@4.6.4...@markuplint/svelte-parser@4.6.5) (2024-06-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @markuplint/svelte-parser
|
|
17
|
+
|
|
18
|
+
## [4.6.4](https://github.com/markuplint/markuplint/compare/@markuplint/svelte-parser@4.6.3...@markuplint/svelte-parser@4.6.4) (2024-06-09)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
15
21
|
|
|
22
|
+
- fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
|
|
16
23
|
|
|
17
24
|
## [4.6.3](https://github.com/markuplint/markuplint/compare/@markuplint/svelte-parser@4.6.2...@markuplint/svelte-parser@4.6.3) (2024-05-28)
|
|
18
25
|
|
package/lib/parse-block.d.ts
CHANGED
package/lib/parser.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="svelte" />
|
|
2
1
|
import type { SvelteNode } from './svelte-parser/index.js';
|
|
3
2
|
import type { MLASTParentNode, MLASTPreprocessorSpecificBlock, MLASTPreprocessorSpecificBlockConditionalType } from '@markuplint/ml-ast';
|
|
4
3
|
import type { ChildToken, ParseOptions, Token } from '@markuplint/parser-utils';
|
|
@@ -20,7 +19,7 @@ declare class SvelteParser extends Parser<SvelteNode> {
|
|
|
20
19
|
}, childNodes?: readonly SvelteNode[], conditionalType?: MLASTPreprocessorSpecificBlockConditionalType): readonly [MLASTPreprocessorSpecificBlock];
|
|
21
20
|
visitChildren(children: readonly SvelteNode[], parentNode: MLASTParentNode | null): never[];
|
|
22
21
|
visitAttr(token: Token): (import("@markuplint/ml-ast").MLASTSpreadAttr & {
|
|
23
|
-
__rightText?: string
|
|
22
|
+
__rightText?: string;
|
|
24
23
|
}) | {
|
|
25
24
|
isDynamicValue: true | undefined;
|
|
26
25
|
isDirective: true | undefined;
|
|
@@ -36,9 +35,9 @@ declare class SvelteParser extends Parser<SvelteNode> {
|
|
|
36
35
|
startQuote: import("@markuplint/ml-ast").MLASTToken;
|
|
37
36
|
value: import("@markuplint/ml-ast").MLASTToken;
|
|
38
37
|
endQuote: import("@markuplint/ml-ast").MLASTToken;
|
|
39
|
-
potentialValue?: string
|
|
40
|
-
valueType?: "string" | "number" | "boolean" | "code"
|
|
41
|
-
candidate?: string
|
|
38
|
+
potentialValue?: string;
|
|
39
|
+
valueType?: "string" | "number" | "boolean" | "code";
|
|
40
|
+
candidate?: string;
|
|
42
41
|
uuid: string;
|
|
43
42
|
raw: string;
|
|
44
43
|
startOffset: number;
|
|
@@ -47,7 +46,7 @@ declare class SvelteParser extends Parser<SvelteNode> {
|
|
|
47
46
|
endLine: number;
|
|
48
47
|
startCol: number;
|
|
49
48
|
endCol: number;
|
|
50
|
-
__rightText?: string
|
|
49
|
+
__rightText?: string;
|
|
51
50
|
};
|
|
52
51
|
/**
|
|
53
52
|
* > A lowercase tag, like `<div>`, denotes a regular HTML element.
|
package/lib/parser.js
CHANGED
|
@@ -83,7 +83,7 @@ class SvelteParser extends Parser {
|
|
|
83
83
|
const children = originNode.children ?? [];
|
|
84
84
|
const reEndTag = new RegExp(`</${originNode.name}\\s*>$`, 'i');
|
|
85
85
|
const startTagEndOffset = children.length > 0
|
|
86
|
-
? children[0]?.start ?? 0
|
|
86
|
+
? (children[0]?.start ?? 0)
|
|
87
87
|
: token.raw.replace(reEndTag, '').length + token.startOffset;
|
|
88
88
|
const startTagLocation = this.sliceFragment(token.startOffset, startTagEndOffset);
|
|
89
89
|
return this.visitElement({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/svelte-parser",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.6",
|
|
4
4
|
"description": "Svelte parser for markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"clean": "tsc --build --clean"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@markuplint/html-parser": "4.6.
|
|
29
|
-
"@markuplint/ml-ast": "4.4.
|
|
30
|
-
"@markuplint/parser-utils": "4.6.
|
|
31
|
-
"svelte": "4.2.
|
|
28
|
+
"@markuplint/html-parser": "4.6.6",
|
|
29
|
+
"@markuplint/ml-ast": "4.4.3",
|
|
30
|
+
"@markuplint/parser-utils": "4.6.6",
|
|
31
|
+
"svelte": "4.2.19"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0"
|
|
34
34
|
}
|