@astrojs/language-server 2.16.1 → 2.16.3

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/dist/check.js CHANGED
@@ -32,9 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
35
  Object.defineProperty(exports, "__esModule", { value: true });
39
36
  exports.AstroCheck = exports.DiagnosticSeverity = exports.Diagnostic = void 0;
40
37
  const node_fs_1 = require("node:fs");
@@ -45,7 +42,7 @@ const kit = __importStar(require("@volar/kit"));
45
42
  const language_server_1 = require("@volar/language-server");
46
43
  Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return language_server_1.Diagnostic; } });
47
44
  Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return language_server_1.DiagnosticSeverity; } });
48
- const fast_glob_1 = __importDefault(require("fast-glob"));
45
+ const tinyglobby_1 = require("tinyglobby");
49
46
  const vscode_uri_1 = require("vscode-uri");
50
47
  const index_js_1 = require("./core/index.js");
51
48
  const svelte_js_1 = require("./core/svelte.js");
@@ -139,10 +136,12 @@ class AstroCheck {
139
136
  }
140
137
  else {
141
138
  this.linter = kit.createTypeScriptInferredChecker(languagePlugins, services, () => {
142
- return fast_glob_1.default.sync('**/*.astro', {
139
+ return (0, tinyglobby_1.globSync)('**/*.astro', {
143
140
  cwd: this.workspacePath,
144
141
  ignore: ['node_modules'],
145
142
  absolute: true,
143
+ // Required to avoid tinyglobby running eternally
144
+ expandDirectories: false,
146
145
  });
147
146
  }, undefined, ({ project }) => {
148
147
  const { languageServiceHost } = project.typescript;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.create = void 0;
7
4
  const node_path_1 = require("node:path");
8
5
  const language_server_1 = require("@volar/language-server");
9
- const fast_glob_1 = __importDefault(require("fast-glob"));
6
+ const tinyglobby_1 = require("tinyglobby");
10
7
  const vscode_uri_1 = require("vscode-uri");
11
8
  const index_js_1 = require("../core/index.js");
12
9
  const utils_js_1 = require("./utils.js");
@@ -103,9 +100,10 @@ const create = (ts) => {
103
100
  };
104
101
  exports.create = create;
105
102
  function getGlobResultAsCodeLens(globText, dir, position) {
106
- const globResult = fast_glob_1.default.sync(globText, {
103
+ const globResult = (0, tinyglobby_1.globSync)(globText, {
107
104
  cwd: dir,
108
105
  onlyFiles: true,
106
+ expandDirectories: false,
109
107
  });
110
108
  return {
111
109
  range: language_server_1.Range.create(position, position),
@@ -28,7 +28,7 @@ exports.astroElements = (0, vscode_html_languageservice_1.newHTMLDataProvider)('
28
28
  references: [
29
29
  {
30
30
  name: 'Astro reference',
31
- url: 'https://docs.astro.build/en/core-concepts/astro-components/#slots',
31
+ url: 'https://docs.astro.build/en/basics/astro-components/#slots',
32
32
  },
33
33
  ],
34
34
  attributes: [
@@ -38,7 +38,7 @@ exports.astroElements = (0, vscode_html_languageservice_1.newHTMLDataProvider)('
38
38
  references: [
39
39
  {
40
40
  name: 'Astro reference',
41
- url: 'https://docs.astro.build/en/core-concepts/astro-components/#named-slots',
41
+ url: 'https://docs.astro.build/en/basics/astro-components/#named-slots',
42
42
  },
43
43
  ],
44
44
  },
@@ -92,7 +92,7 @@ exports.astroElements = (0, vscode_html_languageservice_1.newHTMLDataProvider)('
92
92
  references: [
93
93
  {
94
94
  name: 'Astro reference',
95
- url: 'https://docs.astro.build/en/guides/view-transitions/#script-behavior',
95
+ url: 'https://docs.astro.build/en/guides/view-transitions/#data-astro-rerun',
96
96
  },
97
97
  ],
98
98
  },
@@ -35,7 +35,7 @@ function getSnippetCompletions(frontmatter) {
35
35
  value: [
36
36
  'Create a new getStaticPaths function.',
37
37
  '\n',
38
- '[Astro reference](https://docs.astro.build/en/reference/api-reference/#getstaticpaths)',
38
+ '[Astro reference](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)',
39
39
  ].join('\n'),
40
40
  },
41
41
  insertText: 'export const getStaticPaths = (() => {\n\t$1\n\treturn [];\n}) satisfies GetStaticPaths;',
@@ -52,9 +52,9 @@ function getSnippetCompletions(frontmatter) {
52
52
  documentation: {
53
53
  kind: 'markdown',
54
54
  value: [
55
- 'Add prerender export. When [using server-side rendering](https://docs.astro.build/en/guides/server-side-rendering/#enabling-ssr-in-your-project), this value will be used to determine whether to prerender the page or not.',
55
+ 'Add prerender export. When [using server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/#enabling-on-demand-rendering), this value will be used to determine whether to prerender the page or not.',
56
56
  '\n',
57
- '[Astro reference](https://docs.astro.build/en/guides/server-side-rendering/#configuring-individual-routes)',
57
+ '[Astro reference](https://docs.astro.build/en/reference/routing-reference/#prerender)',
58
58
  ].join('\n'),
59
59
  },
60
60
  insertText: 'export const prerender = ${1|true,false|}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/language-server",
3
- "version": "2.16.1",
3
+ "version": "2.16.3",
4
4
  "author": "withastro",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,33 +20,33 @@
20
20
  "astro-ls": "./bin/nodeServer.js"
21
21
  },
22
22
  "dependencies": {
23
- "@astrojs/compiler": "^2.10.3",
23
+ "@astrojs/compiler": "^2.13.0",
24
24
  "@astrojs/yaml2ts": "^0.2.2",
25
- "@jridgewell/sourcemap-codec": "^1.4.15",
26
- "@volar/kit": "~2.4.23",
27
- "@volar/language-core": "~2.4.23",
28
- "@volar/language-server": "~2.4.23",
29
- "@volar/language-service": "~2.4.23",
30
- "fast-glob": "^3.2.12",
25
+ "@jridgewell/sourcemap-codec": "^1.5.5",
26
+ "@volar/kit": "~2.4.27",
27
+ "@volar/language-core": "~2.4.27",
28
+ "@volar/language-server": "~2.4.27",
29
+ "@volar/language-service": "~2.4.27",
31
30
  "muggle-string": "^0.4.1",
32
- "volar-service-css": "0.0.66",
33
- "volar-service-emmet": "0.0.66",
34
- "volar-service-html": "0.0.66",
35
- "volar-service-prettier": "0.0.66",
36
- "volar-service-typescript": "0.0.66",
37
- "volar-service-typescript-twoslash-queries": "0.0.66",
38
- "volar-service-yaml": "0.0.66",
39
- "vscode-html-languageservice": "^5.5.2",
31
+ "tinyglobby": "^0.2.15",
32
+ "volar-service-css": "0.0.68",
33
+ "volar-service-emmet": "0.0.68",
34
+ "volar-service-html": "0.0.68",
35
+ "volar-service-prettier": "0.0.68",
36
+ "volar-service-typescript": "0.0.68",
37
+ "volar-service-typescript-twoslash-queries": "0.0.68",
38
+ "volar-service-yaml": "0.0.68",
39
+ "vscode-html-languageservice": "^5.6.1",
40
40
  "vscode-uri": "^3.1.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^20.9.0",
44
- "@volar/test-utils": "~2.4.23",
45
- "@volar/typescript": "~2.4.23",
46
- "tsx": "^4.20.6",
44
+ "@volar/test-utils": "~2.4.27",
45
+ "@volar/typescript": "~2.4.27",
46
+ "tsx": "^4.21.0",
47
47
  "typescript": "^5.9.3",
48
48
  "vscode-languageserver-protocol": "^3.17.5",
49
- "vscode-languageserver-textdocument": "^1.0.11",
49
+ "vscode-languageserver-textdocument": "^1.0.12",
50
50
  "astro-scripts": "0.0.14"
51
51
  },
52
52
  "peerDependencies": {
package/types/env.d.ts CHANGED
@@ -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;