@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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @astrojs/language-server
2
2
 
3
+ ## 0.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 97559b6: Removes errors with import.meta.hot
8
+ - 4c93d24: Prevent reading tsconfig in .astro files
9
+
3
10
  ## 0.8.5
4
11
 
5
12
  ### Patch Changes
package/astro.d.ts CHANGED
@@ -1,15 +1,5 @@
1
1
  export {};
2
2
 
3
- declare global {
4
- interface ImportMeta {
5
- hot: {
6
- accept: Function;
7
- dispose: Function;
8
- };
9
- env: Record<string, string>;
10
- }
11
- }
12
-
13
3
  type AstroRenderedHTML = string;
14
4
 
15
5
  type AstroElement = any;
@@ -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
- let configJson = (tsconfigPath && ts.readConfigFile(tsconfigPath, ts.sys.readFile).config) || getDefaultJsConfig();
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
- include: ['src'],
153
+ exclude: getDefaultExclude(),
164
154
  };
165
155
  }
166
156
  function getDefaultExclude() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/language-server",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "author": "Skypack",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",