@astrojs/language-server 2.7.5 → 2.7.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/dist/check.js +6 -3
- package/package.json +1 -1
package/dist/check.js
CHANGED
|
@@ -28,6 +28,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.AstroCheck = exports.DiagnosticSeverity = exports.Diagnostic = void 0;
|
|
30
30
|
const node_fs_1 = require("node:fs");
|
|
31
|
+
const node_os_1 = require("node:os");
|
|
32
|
+
const node_path_1 = require("node:path");
|
|
31
33
|
const node_url_1 = require("node:url");
|
|
32
34
|
const kit = __importStar(require("@volar/kit"));
|
|
33
35
|
const language_server_1 = require("@volar/language-server");
|
|
@@ -132,10 +134,11 @@ class AstroCheck {
|
|
|
132
134
|
}
|
|
133
135
|
getTsconfig() {
|
|
134
136
|
if (this.tsconfigPath) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
const tsconfig = (0, node_path_1.resolve)(this.workspacePath, this.tsconfigPath.replace(/^~/, (0, node_os_1.homedir)()));
|
|
138
|
+
if (!(0, node_fs_1.existsSync)(tsconfig)) {
|
|
139
|
+
throw new Error(`Specified tsconfig file \`${tsconfig}\` does not exist.`);
|
|
137
140
|
}
|
|
138
|
-
return
|
|
141
|
+
return tsconfig;
|
|
139
142
|
}
|
|
140
143
|
const searchPath = this.workspacePath;
|
|
141
144
|
const tsconfig = this.ts.findConfigFile(searchPath, this.ts.sys.fileExists) ||
|