@astrojs/language-server 2.16.1-alpha.0 → 2.16.1-beta.1
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 +4 -5
- package/dist/core/astro2tsx.js +2 -2
- package/dist/core/parseAstro.js +2 -2
- package/package.json +20 -20
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
|
|
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
|
|
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;
|
package/dist/core/astro2tsx.js
CHANGED
|
@@ -18,7 +18,7 @@ function safeConvertToTSX(content, options) {
|
|
|
18
18
|
return tsx;
|
|
19
19
|
}
|
|
20
20
|
catch (e) {
|
|
21
|
-
console.error(`There was an error transforming ${options.filename} to TSX. An empty file will be returned instead. Please create an issue: https://github.com/withastro/
|
|
21
|
+
console.error(`There was an error transforming ${options.filename} to TSX. An empty file will be returned instead. Please create an issue: https://github.com/withastro/astro/issues\nError: ${e}.`);
|
|
22
22
|
return {
|
|
23
23
|
code: '',
|
|
24
24
|
map: {
|
|
@@ -34,7 +34,7 @@ function safeConvertToTSX(content, options) {
|
|
|
34
34
|
code: 1000,
|
|
35
35
|
location: { file: options.filename, line: 1, column: 1, length: content.length },
|
|
36
36
|
severity: 1,
|
|
37
|
-
text: `The Astro compiler encountered an unknown error while transform this file to TSX. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/
|
|
37
|
+
text: `The Astro compiler encountered an unknown error while transform this file to TSX. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/astro/issues`,
|
|
38
38
|
},
|
|
39
39
|
],
|
|
40
40
|
metaRanges: {
|
package/dist/core/parseAstro.js
CHANGED
|
@@ -15,7 +15,7 @@ function safeParseAst(fileName, input, parseOptions) {
|
|
|
15
15
|
return parseResult;
|
|
16
16
|
}
|
|
17
17
|
catch (e) {
|
|
18
|
-
console.error(`There was an error parsing ${fileName}'s AST. An empty AST will be returned instead to avoid breaking the server. Please create an issue: https://github.com/withastro/
|
|
18
|
+
console.error(`There was an error parsing ${fileName}'s AST. An empty AST will be returned instead to avoid breaking the server. Please create an issue: https://github.com/withastro/astro/issues\nError: ${e}.`);
|
|
19
19
|
return {
|
|
20
20
|
ast: {
|
|
21
21
|
type: 'root',
|
|
@@ -31,7 +31,7 @@ function safeParseAst(fileName, input, parseOptions) {
|
|
|
31
31
|
length: input.length,
|
|
32
32
|
},
|
|
33
33
|
severity: 1,
|
|
34
|
-
text: `The Astro compiler encountered an unknown error while parsing this file's AST. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/
|
|
34
|
+
text: `The Astro compiler encountered an unknown error while parsing this file's AST. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/astro/issues`,
|
|
35
35
|
},
|
|
36
36
|
],
|
|
37
37
|
};
|
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.1-beta.1",
|
|
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.
|
|
23
|
+
"@astrojs/compiler": "^2.13.0",
|
|
24
24
|
"@astrojs/yaml2ts": "^0.2.2",
|
|
25
|
-
"@jridgewell/sourcemap-codec": "^1.
|
|
26
|
-
"@volar/kit": "~2.4.
|
|
27
|
-
"@volar/language-core": "~2.4.
|
|
28
|
-
"@volar/language-server": "~2.4.
|
|
29
|
-
"@volar/language-service": "~2.4.
|
|
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
|
-
"
|
|
33
|
-
"volar-service-
|
|
34
|
-
"volar-service-
|
|
35
|
-
"volar-service-
|
|
36
|
-
"volar-service-
|
|
37
|
-
"volar-service-typescript
|
|
38
|
-
"volar-service-
|
|
39
|
-
"
|
|
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.
|
|
45
|
-
"@volar/typescript": "~2.4.
|
|
46
|
-
"tsx": "^4.
|
|
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.
|
|
49
|
+
"vscode-languageserver-textdocument": "^1.0.12",
|
|
50
50
|
"astro-scripts": "0.0.14"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|