@astrojs/language-server 0.8.5 → 0.8.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/CHANGELOG.md +7 -0
- package/astro.d.ts +0 -10
- package/dist/plugins/typescript/languageService.js +3 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/astro.d.ts
CHANGED
|
@@ -58,14 +58,7 @@ async function createLanguageService(tsconfigPath, workspaceRoot, docContext) {
|
|
|
58
58
|
return ts.sys.readDirectory(path, [...extensions, '.vue', '.svelte', '.astro', '.js', '.jsx'], exclude, include, depth);
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
if (!configJson.extends) {
|
|
63
|
-
configJson = Object.assign({
|
|
64
|
-
exclude: getDefaultExclude(),
|
|
65
|
-
}, configJson);
|
|
66
|
-
}
|
|
67
|
-
// Delete include so that astro files don't get excluded.
|
|
68
|
-
delete configJson.include;
|
|
61
|
+
const configJson = getDefaultJsConfig();
|
|
69
62
|
const existingCompilerOptions = {
|
|
70
63
|
jsx: ts.JsxEmit.Preserve,
|
|
71
64
|
module: ts.ModuleKind.ESNext,
|
|
@@ -149,18 +142,15 @@ async function createLanguageService(tsconfigPath, workspaceRoot, docContext) {
|
|
|
149
142
|
return doc;
|
|
150
143
|
}
|
|
151
144
|
}
|
|
152
|
-
/**
|
|
153
|
-
* This should only be used when there's no jsconfig/tsconfig at all
|
|
154
|
-
*/
|
|
155
145
|
function getDefaultJsConfig() {
|
|
156
146
|
let compilerOptions = {
|
|
157
147
|
maxNodeModuleJsDepth: 2,
|
|
158
148
|
allowSyntheticDefaultImports: true,
|
|
159
|
-
allowJs: true
|
|
149
|
+
allowJs: true,
|
|
160
150
|
};
|
|
161
151
|
return {
|
|
162
152
|
compilerOptions,
|
|
163
|
-
|
|
153
|
+
exclude: getDefaultExclude(),
|
|
164
154
|
};
|
|
165
155
|
}
|
|
166
156
|
function getDefaultExclude() {
|