astro-vscode 2.16.4 → 2.16.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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +14 -0
- package/dist/astro-ts-plugin-bundle/index.js +156 -0
- package/dist/node/client.js +22 -22
- package/dist/node/server.js +388 -435
- package/package.json +13 -12
- package/scripts/build.mjs +1 -3
- package/syntaxes/astro.tmLanguage.json +56 -5
- package/syntaxes/astro.tmLanguage.src.yaml +40 -5
- package/test/grammar/fixtures/text.astro.snap +3 -3
- package/test/grammar/fixtures/types-ending.astro +9 -0
- package/test/grammar/fixtures/types-ending.astro.snap +25 -0
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"color": "#17191E",
|
|
25
25
|
"theme": "dark"
|
|
26
26
|
},
|
|
27
|
-
"version": "2.16.
|
|
27
|
+
"version": "2.16.6",
|
|
28
28
|
"author": "withastro",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"publisher": "astro-build",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"typescriptServerPlugins": [
|
|
51
51
|
{
|
|
52
52
|
"name": "astro-ts-plugin-bundle",
|
|
53
|
+
"path": "./dist/astro-ts-plugin-bundle",
|
|
53
54
|
"enableForWorkspaceTypeScriptVersions": true
|
|
54
55
|
}
|
|
55
56
|
],
|
|
@@ -238,26 +239,26 @@
|
|
|
238
239
|
"@astrojs/language-server": "^2.16.1",
|
|
239
240
|
"@astrojs/ts-plugin": "^1.10.6",
|
|
240
241
|
"@types/glob": "^8.1.0",
|
|
241
|
-
"@types/mocha": "^10.0.
|
|
242
|
+
"@types/mocha": "^10.0.10",
|
|
242
243
|
"@types/node": "^20.9.0",
|
|
243
|
-
"@types/vscode": "^1.
|
|
244
|
-
"@volar/language-server": "~2.4.
|
|
245
|
-
"@volar/vscode": "~2.4.
|
|
244
|
+
"@types/vscode": "^1.107.0",
|
|
245
|
+
"@volar/language-server": "~2.4.27",
|
|
246
|
+
"@volar/vscode": "~2.4.27",
|
|
246
247
|
"@vscode/test-electron": "^2.5.2",
|
|
247
248
|
"@vscode/test-cli": "^0.0.12",
|
|
248
|
-
"@vscode/vsce": "2.
|
|
249
|
+
"@vscode/vsce": "2.32.0",
|
|
249
250
|
"esbuild": "^0.17.19",
|
|
250
251
|
"esbuild-plugin-copy": "^2.1.1",
|
|
251
|
-
"js-yaml": "^4.1.
|
|
252
|
+
"js-yaml": "^4.1.1",
|
|
252
253
|
"kleur": "^4.1.5",
|
|
253
|
-
"mocha": "^10.2
|
|
254
|
-
"ovsx": "^0.10.
|
|
254
|
+
"mocha": "^10.8.2",
|
|
255
|
+
"ovsx": "^0.10.7",
|
|
255
256
|
"vscode-languageclient": "^9.0.1",
|
|
256
|
-
"vscode-tmgrammar-test": "^0.1.
|
|
257
|
+
"vscode-tmgrammar-test": "^0.1.3"
|
|
257
258
|
},
|
|
258
259
|
"dependencies": {
|
|
259
|
-
"@astrojs/compiler": "^2.
|
|
260
|
-
"prettier": "^3.
|
|
260
|
+
"@astrojs/compiler": "^2.13.0",
|
|
261
|
+
"prettier": "^3.7.4",
|
|
261
262
|
"prettier-plugin-astro": "^0.14.1"
|
|
262
263
|
},
|
|
263
264
|
"scripts": {
|
package/scripts/build.mjs
CHANGED
|
@@ -18,9 +18,7 @@ export default async function build() {
|
|
|
18
18
|
entryPoints: {
|
|
19
19
|
'dist/node/client': './src/client.ts',
|
|
20
20
|
'dist/node/server': './node_modules/@astrojs/language-server/bin/nodeServer.js',
|
|
21
|
-
|
|
22
|
-
'node_modules/astro-ts-plugin-bundle/index':
|
|
23
|
-
'./node_modules/@astrojs/ts-plugin/dist/index.js',
|
|
21
|
+
'dist/astro-ts-plugin-bundle/index': './node_modules/@astrojs/ts-plugin/dist/index.js',
|
|
24
22
|
},
|
|
25
23
|
bundle: true,
|
|
26
24
|
metafile: metaFile,
|
|
@@ -20,9 +20,20 @@
|
|
|
20
20
|
},
|
|
21
21
|
"L:(meta.script.astro) (meta.lang.js | meta.lang.javascript | meta.lang.partytown | meta.lang.node) - (meta source)": {
|
|
22
22
|
"patterns": [
|
|
23
|
+
{
|
|
24
|
+
"begin": "(?<=>)(?=[^\\n]+</script[\\s>])",
|
|
25
|
+
"end": "(?=</script[\\s>])",
|
|
26
|
+
"name": "meta.embedded.block.astro",
|
|
27
|
+
"contentName": "source.js",
|
|
28
|
+
"patterns": [
|
|
29
|
+
{
|
|
30
|
+
"include": "source.js"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
23
34
|
{
|
|
24
35
|
"begin": "(?<=>)(?!</)",
|
|
25
|
-
"
|
|
36
|
+
"while": "^(?!\\s*</script[\\s>])",
|
|
26
37
|
"name": "meta.embedded.block.astro",
|
|
27
38
|
"contentName": "source.js",
|
|
28
39
|
"patterns": [
|
|
@@ -35,9 +46,20 @@
|
|
|
35
46
|
},
|
|
36
47
|
"L:(meta.script.astro) (meta.lang.ts | meta.lang.typescript) - (meta source)": {
|
|
37
48
|
"patterns": [
|
|
49
|
+
{
|
|
50
|
+
"begin": "(?<=>)(?=[^\\n]+</script[\\s>])",
|
|
51
|
+
"end": "(?=</script[\\s>])",
|
|
52
|
+
"name": "meta.embedded.block.astro",
|
|
53
|
+
"contentName": "source.ts",
|
|
54
|
+
"patterns": [
|
|
55
|
+
{
|
|
56
|
+
"include": "source.ts"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
38
60
|
{
|
|
39
61
|
"begin": "(?<=>)(?!</)",
|
|
40
|
-
"
|
|
62
|
+
"while": "^(?!\\s*</script[\\s>])",
|
|
41
63
|
"name": "meta.embedded.block.astro",
|
|
42
64
|
"contentName": "source.ts",
|
|
43
65
|
"patterns": [
|
|
@@ -50,9 +72,20 @@
|
|
|
50
72
|
},
|
|
51
73
|
"L:meta.script.astro - meta.lang - (meta source)": {
|
|
52
74
|
"patterns": [
|
|
75
|
+
{
|
|
76
|
+
"begin": "(?<=>)(?=[^\\n]+</script[\\s>])",
|
|
77
|
+
"end": "(?=</script[\\s>])",
|
|
78
|
+
"name": "meta.embedded.block.astro",
|
|
79
|
+
"contentName": "source.js",
|
|
80
|
+
"patterns": [
|
|
81
|
+
{
|
|
82
|
+
"include": "source.js"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
53
86
|
{
|
|
54
87
|
"begin": "(?<=>)(?!</)",
|
|
55
|
-
"
|
|
88
|
+
"while": "^(?!\\s*</script[\\s>])",
|
|
56
89
|
"name": "meta.embedded.block.astro",
|
|
57
90
|
"contentName": "source.js",
|
|
58
91
|
"patterns": [
|
|
@@ -194,10 +227,28 @@
|
|
|
194
227
|
"name": "comment"
|
|
195
228
|
}
|
|
196
229
|
},
|
|
197
|
-
"contentName": "source.ts",
|
|
198
230
|
"patterns": [
|
|
199
231
|
{
|
|
200
|
-
"
|
|
232
|
+
"begin": "(?<=\\n)(?=[^\\n]+^-{3})",
|
|
233
|
+
"end": "(?=^-{3})",
|
|
234
|
+
"name": "meta.embedded.block.astro",
|
|
235
|
+
"contentName": "source.ts",
|
|
236
|
+
"patterns": [
|
|
237
|
+
{
|
|
238
|
+
"include": "source.ts"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"begin": "(?<=\\n)",
|
|
244
|
+
"while": "^(?!\\s*-{3})",
|
|
245
|
+
"name": "meta.embedded.block.astro",
|
|
246
|
+
"contentName": "source.ts",
|
|
247
|
+
"patterns": [
|
|
248
|
+
{
|
|
249
|
+
"include": "source.ts"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
201
252
|
}
|
|
202
253
|
]
|
|
203
254
|
},
|
|
@@ -31,9 +31,16 @@ injections:
|
|
|
31
31
|
'L:(meta.script.astro) (meta.lang.js | meta.lang.javascript | meta.lang.partytown | meta.lang.node) - (meta source)':
|
|
32
32
|
patterns:
|
|
33
33
|
[
|
|
34
|
+
{
|
|
35
|
+
begin: '(?<=>)(?=[^\n]+</script[\s>])',
|
|
36
|
+
end: '(?=</script[\s>])',
|
|
37
|
+
name: meta.embedded.block.astro,
|
|
38
|
+
contentName: source.js,
|
|
39
|
+
patterns: [{ include: source.js }],
|
|
40
|
+
},
|
|
34
41
|
{
|
|
35
42
|
begin: '(?<=>)(?!</)',
|
|
36
|
-
|
|
43
|
+
while: '^(?!\s*</script[\s>])',
|
|
37
44
|
name: meta.embedded.block.astro,
|
|
38
45
|
contentName: source.js,
|
|
39
46
|
patterns: [{ include: source.js }],
|
|
@@ -44,9 +51,16 @@ injections:
|
|
|
44
51
|
'L:(meta.script.astro) (meta.lang.ts | meta.lang.typescript) - (meta source)':
|
|
45
52
|
patterns:
|
|
46
53
|
[
|
|
54
|
+
{
|
|
55
|
+
begin: '(?<=>)(?=[^\n]+</script[\s>])',
|
|
56
|
+
end: '(?=</script[\s>])',
|
|
57
|
+
name: meta.embedded.block.astro,
|
|
58
|
+
contentName: source.ts,
|
|
59
|
+
patterns: [{ include: source.ts }],
|
|
60
|
+
},
|
|
47
61
|
{
|
|
48
62
|
begin: '(?<=>)(?!</)',
|
|
49
|
-
|
|
63
|
+
while: '^(?!\s*</script[\s>])',
|
|
50
64
|
name: meta.embedded.block.astro,
|
|
51
65
|
contentName: source.ts,
|
|
52
66
|
patterns: [{ include: source.ts }],
|
|
@@ -58,9 +72,16 @@ injections:
|
|
|
58
72
|
'L:meta.script.astro - meta.lang - (meta source)':
|
|
59
73
|
patterns:
|
|
60
74
|
[
|
|
75
|
+
{
|
|
76
|
+
begin: '(?<=>)(?=[^\n]+</script[\s>])',
|
|
77
|
+
end: '(?=</script[\s>])',
|
|
78
|
+
name: meta.embedded.block.astro,
|
|
79
|
+
contentName: source.js,
|
|
80
|
+
patterns: [{ include: source.js }],
|
|
81
|
+
},
|
|
61
82
|
{
|
|
62
83
|
begin: '(?<=>)(?!</)',
|
|
63
|
-
|
|
84
|
+
while: '^(?!\s*</script[\s>])',
|
|
64
85
|
name: meta.embedded.block.astro,
|
|
65
86
|
contentName: source.js,
|
|
66
87
|
patterns: [{ include: source.js }],
|
|
@@ -180,9 +201,23 @@ repository:
|
|
|
180
201
|
1: { name: comment }
|
|
181
202
|
endCaptures:
|
|
182
203
|
2: { name: comment }
|
|
183
|
-
contentName: source.ts
|
|
184
204
|
patterns:
|
|
185
|
-
|
|
205
|
+
[
|
|
206
|
+
{
|
|
207
|
+
begin: '(?<=\n)(?=[^\n]+^-{3})',
|
|
208
|
+
end: '(?=^-{3})',
|
|
209
|
+
name: meta.embedded.block.astro,
|
|
210
|
+
contentName: source.ts,
|
|
211
|
+
patterns: [{ include: source.ts }],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
begin: '(?<=\n)',
|
|
215
|
+
while: '^(?!\s*-{3})',
|
|
216
|
+
name: meta.embedded.block.astro,
|
|
217
|
+
contentName: source.ts,
|
|
218
|
+
patterns: [{ include: source.ts }],
|
|
219
|
+
},
|
|
220
|
+
]
|
|
186
221
|
|
|
187
222
|
# -------
|
|
188
223
|
# SCOPE
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
>---
|
|
2
2
|
#^^^ source.astro comment
|
|
3
3
|
>const cool = "our frontmatter"
|
|
4
|
-
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro source.ts
|
|
4
|
+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.embedded.block.astro source.ts
|
|
5
5
|
>console.log("Hello, World!")
|
|
6
|
-
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro source.ts
|
|
6
|
+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.embedded.block.astro source.ts
|
|
7
7
|
>console.log(`This is ${cool}!`)
|
|
8
|
-
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro source.ts
|
|
8
|
+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.embedded.block.astro source.ts
|
|
9
9
|
>---
|
|
10
10
|
#^^^ source.astro comment
|
|
11
11
|
>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
>---
|
|
2
|
+
#^^^ source.astro comment
|
|
3
|
+
>type Something = "Hello"
|
|
4
|
+
#^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.embedded.block.astro source.ts
|
|
5
|
+
>---
|
|
6
|
+
#^^^ source.astro comment
|
|
7
|
+
>
|
|
8
|
+
><script>
|
|
9
|
+
#^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
|
|
10
|
+
# ^^^^^^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.start.astro entity.name.tag.astro
|
|
11
|
+
# ^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.start.astro punctuation.definition.tag.end.astro
|
|
12
|
+
>type Something = "Hello"
|
|
13
|
+
#^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.scope.tag.script.astro meta.script.astro meta.embedded.block.astro source.js
|
|
14
|
+
></script>
|
|
15
|
+
#^^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
|
|
16
|
+
# ^^^^^^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.end.astro entity.name.tag.astro
|
|
17
|
+
# ^ source.astro meta.scope.tag.script.astro meta.script.astro meta.tag.end.astro punctuation.definition.tag.end.astro
|
|
18
|
+
>
|
|
19
|
+
><div></div>
|
|
20
|
+
#^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
|
|
21
|
+
# ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
|
|
22
|
+
# ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
|
|
23
|
+
# ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
|
|
24
|
+
# ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
|
|
25
|
+
# ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
|