astro-vscode 2.16.8 → 2.16.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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Astro global available in all contexts in .astro files
3
3
  *
4
- * [Astro documentation](https://docs.astro.build/reference/api-reference/#astro-global)
4
+ * [Astro documentation](https://docs.astro.build/en/reference/api-reference/)
5
5
  */
6
6
  declare const Astro: any;
7
7
  declare const Fragment: any;
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "color": "#17191E",
25
25
  "theme": "dark"
26
26
  },
27
- "version": "2.16.8",
27
+ "version": "2.16.9",
28
28
  "author": "withastro",
29
29
  "license": "MIT",
30
30
  "publisher": "astro-build",
@@ -37,7 +37,7 @@
37
37
  "main": "./dist/node/client.js",
38
38
  "repository": {
39
39
  "type": "git",
40
- "url": "https://github.com/withastro/astro.git",
40
+ "url": "git+https://github.com/withastro/astro.git",
41
41
  "directory": "packages/language-tools/vscode"
42
42
  },
43
43
  "contributes": {
@@ -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
  ],
@@ -64,7 +65,7 @@
64
65
  },
65
66
  {
66
67
  "command": "astro.selectTypescriptVersion",
67
- "title": "Astro: Select Typescript Version..."
68
+ "title": "Astro: Select TypeScript Version..."
68
69
  },
69
70
  {
70
71
  "command": "astro.openTsConfig",
@@ -237,12 +238,11 @@
237
238
  "devDependencies": {
238
239
  "@astrojs/language-server": "^2.16.1",
239
240
  "@astrojs/ts-plugin": "^1.10.6",
240
- "@types/glob": "^8.1.0",
241
241
  "@types/mocha": "^10.0.10",
242
242
  "@types/node": "^20.9.0",
243
243
  "@types/vscode": "^1.90.0",
244
- "@volar/language-server": "~2.4.27",
245
- "@volar/vscode": "~2.4.27",
244
+ "@volar/language-server": "~2.4.28",
245
+ "@volar/vscode": "~2.4.28",
246
246
  "@vscode/test-electron": "^2.5.2",
247
247
  "@vscode/test-cli": "^0.0.12",
248
248
  "@vscode/vsce": "2.32.0",
@@ -250,14 +250,14 @@
250
250
  "esbuild-plugin-copy": "^2.1.1",
251
251
  "js-yaml": "^4.1.1",
252
252
  "kleur": "^4.1.5",
253
- "mocha": "^10.8.2",
254
- "ovsx": "^0.10.7",
253
+ "mocha": "^11.7.5",
254
+ "ovsx": "^0.10.9",
255
255
  "vscode-languageclient": "^9.0.1",
256
256
  "vscode-tmgrammar-test": "^0.1.3"
257
257
  },
258
258
  "dependencies": {
259
- "@astrojs/compiler": "^2.13.0",
260
- "prettier": "^3.7.4",
259
+ "@astrojs/compiler": "^2.13.1",
260
+ "prettier": "^3.8.1",
261
261
  "prettier-plugin-astro": "^0.14.1"
262
262
  },
263
263
  "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
- // We need to generate this inside node_modules so VS Code can resolve it
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,
@@ -750,7 +750,7 @@
750
750
  ]
751
751
  },
752
752
  "tags-lang": {
753
- "begin": "<(script|style)",
753
+ "begin": "<(script|style)(?=\\s|/?>)",
754
754
  "end": "</\\1\\s*>|/>",
755
755
  "beginCaptures": {
756
756
  "0": {
@@ -490,7 +490,7 @@ repository:
490
490
 
491
491
  # Language tags - they are handled differently for the purposes of language injection.
492
492
  tags-lang:
493
- begin: <(script|style)
493
+ begin: <(script|style)(?=\s|/?>)
494
494
  end: </\1\s*>|/>
495
495
  beginCaptures: { 0: { patterns: [include: '#tags-start-node'] } }
496
496
  endCaptures: { 0: { patterns: [include: '#tags-end-node'] } }
@@ -0,0 +1,6 @@
1
+ ---
2
+ const label = "Click Me";
3
+ ---
4
+
5
+ <styled.button>{label}</styled.button>
6
+ <div>After</div>
@@ -0,0 +1,30 @@
1
+ >---
2
+ #^^^ source.astro comment
3
+ >const label = "Click Me";
4
+ #^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro meta.embedded.block.astro source.ts
5
+ >---
6
+ #^^^ source.astro comment
7
+ >
8
+ ><styled.button>{label}</styled.button>
9
+ #^ source.astro meta.scope.tag.styled.button.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
10
+ # ^^^^^^ source.astro meta.scope.tag.styled.button.astro meta.tag.start.astro entity.name.tag.astro
11
+ # ^ source.astro meta.scope.tag.styled.button.astro meta.tag.start.astro
12
+ # ^^^^^^ source.astro meta.scope.tag.styled.button.astro meta.tag.start.astro entity.name.tag.astro
13
+ # ^ source.astro meta.scope.tag.styled.button.astro meta.tag.start.astro punctuation.definition.tag.end.astro
14
+ # ^ source.astro punctuation.section.embedded.begin.astro
15
+ # ^^^^^ source.astro meta.embedded.expression.astro source.tsx
16
+ # ^ source.astro punctuation.section.embedded.end.astro
17
+ # ^^ source.astro meta.scope.tag.styled.button.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
18
+ # ^^^^^^ source.astro meta.scope.tag.styled.button.astro meta.tag.end.astro entity.name.tag.astro
19
+ # ^ source.astro meta.scope.tag.styled.button.astro meta.tag.end.astro
20
+ # ^^^^^^ source.astro meta.scope.tag.styled.button.astro meta.tag.end.astro entity.name.tag.astro
21
+ # ^ source.astro meta.scope.tag.styled.button.astro meta.tag.end.astro punctuation.definition.tag.end.astro
22
+ ><div>After</div>
23
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
24
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
25
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
26
+ # ^^^^^ source.astro text.astro
27
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
28
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
29
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
30
+ >
@@ -42,7 +42,7 @@ async function snapShotTest() {
42
42
  '-s',
43
43
  'source.astro',
44
44
  './test/grammar/fixtures/**/*.astro',
45
- ...allGrammars.reduce((/** @type string[] */ previous, path) => [...previous, '-g', path], []),
45
+ ...allGrammars.flatMap((path) => ['-g', path]),
46
46
  ...extraArgs,
47
47
  ].map((arg) => (isWindows && arg.includes(' ') ? `"${arg}"` : arg));
48
48
 
package/tsconfig.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
- "outDir": "dist",
4
+ "rootDir": "./src",
5
+ "outDir": "./dist",
5
6
  "emitDeclarationOnly": true,
6
7
  "checkJs": true
7
8
  },
8
- "include": ["src", ".vscode-test.js"]
9
+ "include": ["src"]
9
10
  }
@@ -1,2 +0,0 @@
1
- declare const _exports: ((import("@vscode/test-cli").IConfigurationWithGlobalOptions | import("@vscode/test-cli").TestConfiguration | import("@vscode/test-cli").TestConfiguration[]) | Promise<import("@vscode/test-cli").IConfigurationWithGlobalOptions | import("@vscode/test-cli").TestConfiguration | import("@vscode/test-cli").TestConfiguration[]>) | (() => (import("@vscode/test-cli").IConfigurationWithGlobalOptions | import("@vscode/test-cli").TestConfiguration | import("@vscode/test-cli").TestConfiguration[]) | Promise<import("@vscode/test-cli").IConfigurationWithGlobalOptions | import("@vscode/test-cli").TestConfiguration | import("@vscode/test-cli").TestConfiguration[]>);
2
- export = _exports;
File without changes