@astrojs/ts-plugin
Advanced tools
Comparing version 1.0.5 to 1.0.6
# @astrojs/ts-plugin | ||
## 1.0.6 | ||
### Patch Changes | ||
- 3fcbc1a: Fix TypeScript plugin crashing at start in certain circumstances | ||
## 1.0.5 | ||
@@ -4,0 +10,0 @@ |
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -20,6 +18,2 @@ var __export = (target, all) => { | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -31,17 +25,16 @@ var astro_sys_exports = {}; | ||
module.exports = __toCommonJS(astro_sys_exports); | ||
var import_typescript = __toESM(require("typescript")); | ||
var import_utils = require("./utils.js"); | ||
function createAstroSys(logger) { | ||
function createAstroSys(logger, typescript) { | ||
const astroSys = { | ||
...import_typescript.default.sys, | ||
...typescript.sys, | ||
fileExists(path) { | ||
return import_typescript.default.sys.fileExists((0, import_utils.ensureRealAstroFilePath)(path)); | ||
return typescript.sys.fileExists((0, import_utils.ensureRealAstroFilePath)(path)); | ||
}, | ||
readDirectory(path, extensions, exclude, include, depth) { | ||
const extensionsWithAstro = (extensions != null ? extensions : []).concat(".astro"); | ||
return import_typescript.default.sys.readDirectory(path, extensionsWithAstro, exclude, include, depth); | ||
return typescript.sys.readDirectory(path, extensionsWithAstro, exclude, include, depth); | ||
} | ||
}; | ||
if (import_typescript.default.sys.realpath) { | ||
const realpath = import_typescript.default.sys.realpath; | ||
if (typescript.sys.realpath) { | ||
const realpath = typescript.sys.realpath; | ||
astroSys.realpath = function(path) { | ||
@@ -60,2 +53,2 @@ if ((0, import_utils.isVirtualAstroFilePath)(path)) { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FzdHJvLXN5cy50cyJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSx3QkFBZTtBQUVmLG1CQUFxRjtBQUs5RSxTQUFTLGVBQWUsUUFBZ0I7QUFDOUMsUUFBTSxXQUFzQjtBQUFBLElBQzNCLEdBQUcsa0JBQUFBLFFBQUc7QUFBQSxJQUNOLFdBQVcsTUFBYztBQUN4QixhQUFPLGtCQUFBQSxRQUFHLElBQUksZUFBVyxzQ0FBd0IsSUFBSSxDQUFDO0FBQUEsSUFDdkQ7QUFBQSxJQUNBLGNBQWMsTUFBTSxZQUFZLFNBQVMsU0FBUyxPQUFPO0FBQ3hELFlBQU0sdUJBQXVCLGtDQUFjLENBQUMsR0FBRyxPQUFPLFFBQVE7QUFFOUQsYUFBTyxrQkFBQUEsUUFBRyxJQUFJLGNBQWMsTUFBTSxxQkFBcUIsU0FBUyxTQUFTLEtBQUs7QUFBQSxJQUMvRTtBQUFBLEVBQ0Q7QUFFQSxNQUFJLGtCQUFBQSxRQUFHLElBQUksVUFBVTtBQUNwQixVQUFNLFdBQVcsa0JBQUFBLFFBQUcsSUFBSTtBQUN4QixhQUFTLFdBQVcsU0FBVSxNQUFNO0FBQ25DLGNBQUkscUNBQXVCLElBQUksR0FBRztBQUNqQyxlQUFPLGFBQVMsa0NBQW9CLElBQUksQ0FBQyxJQUFJO0FBQUEsTUFDOUM7QUFDQSxhQUFPLFNBQVMsSUFBSTtBQUFBLElBQ3JCO0FBQUEsRUFDRDtBQUVBLFNBQU87QUFDUjsiLAogICJuYW1lcyI6IFsidHMiXQp9Cg== | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FzdHJvLXN5cy50cyJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFFQSxtQkFBcUY7QUFLOUUsU0FBUyxlQUFlLFFBQWdCLFlBQTZEO0FBQzNHLFFBQU0sV0FBc0I7QUFBQSxJQUMzQixHQUFHLFdBQVc7QUFBQSxJQUNkLFdBQVcsTUFBYztBQUN4QixhQUFPLFdBQVcsSUFBSSxlQUFXLHNDQUF3QixJQUFJLENBQUM7QUFBQSxJQUMvRDtBQUFBLElBQ0EsY0FBYyxNQUFNLFlBQVksU0FBUyxTQUFTLE9BQU87QUFDeEQsWUFBTSx1QkFBdUIsa0NBQWMsQ0FBQyxHQUFHLE9BQU8sUUFBUTtBQUU5RCxhQUFPLFdBQVcsSUFBSSxjQUFjLE1BQU0scUJBQXFCLFNBQVMsU0FBUyxLQUFLO0FBQUEsSUFDdkY7QUFBQSxFQUNEO0FBRUEsTUFBSSxXQUFXLElBQUksVUFBVTtBQUM1QixVQUFNLFdBQVcsV0FBVyxJQUFJO0FBQ2hDLGFBQVMsV0FBVyxTQUFVLE1BQU07QUFDbkMsY0FBSSxxQ0FBdUIsSUFBSSxHQUFHO0FBQ2pDLGVBQU8sYUFBUyxrQ0FBb0IsSUFBSSxDQUFDLElBQUk7QUFBQSxNQUM5QztBQUNBLGFBQU8sU0FBUyxJQUFJO0FBQUEsSUFDckI7QUFBQSxFQUNEO0FBRUEsU0FBTztBQUNSOyIsCiAgIm5hbWVzIjogW10KfQo= |
@@ -33,3 +33,3 @@ "use strict"; | ||
(0, import_module_loader.patchModuleLoader)(logger, snapshotManager, modules.typescript, info.languageServiceHost, info.project); | ||
return (0, import_language_service.decorateLanguageService)(info.languageService, snapshotManager, logger); | ||
return (0, import_language_service.decorateLanguageService)(info.languageService, snapshotManager, ts, logger); | ||
} | ||
@@ -58,2 +58,2 @@ function getExternalFiles(project) { | ||
module.exports = init; | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIl0sCiAgIm1hcHBpbmdzIjogIjtBQUNBLDZCQUFxQztBQUNyQyw4QkFBbUQ7QUFDbkQsb0JBQXVCO0FBQ3ZCLDJCQUFrQztBQUNsQyxpQ0FBeUM7QUFDekMsbUJBQXFFO0FBRXJFLFNBQVMsS0FBSyxTQUEwRTtBQUN2RixRQUFNLEtBQUssUUFBUTtBQUVuQixXQUFTLE9BQU8sTUFBc0Q7QUFYdkU7QUFZRSxVQUFNLFNBQVMsSUFBSSxxQkFBTyxLQUFLLFFBQVEsZUFBZSxNQUFNO0FBQzVELFVBQU0scUJBQW9CLGdCQUFLLHFCQUFvQix5QkFBekIsZ0NBQWdELHNDQUF3QixLQUFLLE9BQU87QUFFOUcsUUFBSSxDQUFDLGVBQWUsS0FBSyxTQUFTLGlCQUFpQixHQUFHO0FBQ3JELGFBQU8sSUFBSSx1RUFBdUU7QUFDbEYsYUFBTyxLQUFLO0FBQUEsSUFDYjtBQUVBLFlBQUksbUNBQVUsS0FBSyxlQUFlLEdBQUc7QUFDcEMsYUFBTyxLQUFLO0FBQUEsSUFDYjtBQUVBLFdBQU8sSUFBSSx1QkFBdUI7QUFFbEMsVUFBTSxrQkFBa0IsSUFBSSw0Q0FBcUIsUUFBUSxZQUFZLEtBQUssUUFBUSxnQkFBZ0IsTUFBTTtBQUN4RyxRQUFJLG1CQUFtQjtBQUN0QixVQUFJO0FBQUEsUUFDSCxRQUFRO0FBQUEsUUFDUixLQUFLO0FBQUEsUUFDTCxLQUFLO0FBQUEsUUFDTDtBQUFBLFFBQ0E7QUFBQSxNQUNEO0FBQUEsSUFDRDtBQUVBLGdEQUFrQixRQUFRLGlCQUFpQixRQUFRLFlBQVksS0FBSyxxQkFBcUIsS0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BQTRCLElBQUksU0FBUyxpQkFBaUI7QUFFN0UsVUFBSSxXQUFXLFNBQVM7QUFBRyxlQUFPO0FBQUEsSUFDbkM7QUFFQSxRQUFJO0FBQ0gsWUFBTSxrQkFBa0IsUUFBUSxtQkFBbUI7QUFDbkQsWUFBTSxvQkFDTCxPQUFPLGdCQUFnQixtQkFBbUIsWUFDMUMsUUFBUSxRQUFRLFNBQVMsRUFBRSxPQUFPLENBQUMsZ0JBQWdCLGNBQWMsRUFBRSxDQUFDO0FBRXJFLGFBQU87QUFBQSxJQUNSLFNBQVMsR0FBUDtBQUNELGNBQVEsZUFBZSxPQUFPLEtBQUssQ0FBVztBQUM5QyxhQUFPO0FBQUEsSUFDUjtBQUFBLEVBQ0Q7QUFFQSxTQUFPLEVBQUUsUUFBUSxpQkFBaUI7QUFDbkM7QUFFQSxpQkFBUzsiLAogICJuYW1lcyI6IFtdCn0K |
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -20,6 +18,2 @@ var __export = (target, all) => { | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -32,3 +26,2 @@ var diagnostics_exports = {}; | ||
module.exports = __toCommonJS(diagnostics_exports); | ||
var import_tsserverlibrary = __toESM(require("typescript/lib/tsserverlibrary")); | ||
var import_utils = require("../utils.js"); | ||
@@ -39,5 +32,5 @@ var DiagnosticCodes = /* @__PURE__ */ ((DiagnosticCodes2) => { | ||
})(DiagnosticCodes || {}); | ||
function decorateDiagnostics(ls) { | ||
function decorateDiagnostics(ls, typescript) { | ||
decorateSyntacticDiagnostics(ls); | ||
decorateSemanticDiagnostics(ls); | ||
decorateSemanticDiagnostics(ls, typescript); | ||
decorateSuggestionDiagnostics(ls); | ||
@@ -54,3 +47,3 @@ } | ||
} | ||
function decorateSemanticDiagnostics(ls) { | ||
function decorateSemanticDiagnostics(ls, typescript) { | ||
const getSemanticDiagnostics = ls.getSemanticDiagnostics; | ||
@@ -63,5 +56,5 @@ ls.getSemanticDiagnostics = (fileName) => { | ||
diagnostics = diagnostics.map((diag) => { | ||
const message = import_tsserverlibrary.default.flattenDiagnosticMessageText(diag.messageText, import_tsserverlibrary.default.sys.newLine); | ||
const message = typescript.flattenDiagnosticMessageText(diag.messageText, typescript.sys.newLine); | ||
if (diag.code === 2307 /* CANNOT_FIND_MODULE */ && message.includes("astro:content") && !message.includes("content collections")) { | ||
diag.messageText = message + `${import_tsserverlibrary.default.sys.newLine}${import_tsserverlibrary.default.sys.newLine}If you're using content collections, make sure to run \`astro dev\`, \`astro build\` or \`astro sync\` to first generate the types so you can import from them. If you already ran one of those commands, restarting the TS Server might be necessary in order for the change to take effect`; | ||
diag.messageText = message + `${typescript.sys.newLine}${typescript.sys.newLine}If you're using content collections, make sure to run \`astro dev\`, \`astro build\` or \`astro sync\` to first generate the types so you can import from them. If you already ran one of those commands, restarting the TS Server might be necessary in order for the change to take effect.`; | ||
} | ||
@@ -87,2 +80,2 @@ return diag; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL2xhbmd1YWdlLXNlcnZpY2UvZGlhZ25vc3RpY3MudHMiXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSw2QkFBZTtBQUNmLG1CQUFnQztBQUV6QixJQUFL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BQUcseUJBQXlCLENBQUMsYUFBcUI7QUFHakQsWUFBSSw4QkFBZ0IsUUFBUSxHQUFHO0FBQzlCLGFBQU8sQ0FBQztBQUFBLElBQ1Q7QUFFQSxRQUFJLGNBQWMsdUJBQXVCLFFBQVE7QUFDakQsa0JBQWMsWUFBWSxJQUFJLENBQUMsU0FBUztBQUN2QyxZQUFNLFVBQVUsV0FBVyw2QkFBNkIsS0FBSyxhQUFhLFdBQVcsSUFBSSxPQUFPO0FBQ2hHLFVBQ0MsS0FBSyxTQUFTLGlDQUNkLFFBQVEsU0FBUyxlQUFlLEtBR2hDLENBQUMsUUFBUSxTQUFTLHFCQUFxQixHQUN0QztBQUNELGFBQUssY0FDSixVQUNBLEdBQUcsV0FBVyxJQUFJLFVBQVUsV0FBVyxJQUFJO0FBQUEsTUFFN0M7QUFFQSxhQUFPO0FBQUEsSUFDUixDQUFDO0FBRUQsV0FBTztBQUFBLEVBQ1I7QUFDRDtBQUVBLFNBQVMsOEJBQThCLElBQThCO0FBQ3BFLFFBQU0sMkJBQTJCLEdBQUc7QUFDcEMsS0FBRywyQkFBMkIsQ0FBQyxhQUFxQjtBQUduRCxZQUFJLDhCQUFnQixRQUFRLEdBQUc7QUFDOUIsYUFBTyxDQUFDO0FBQUEsSUFDVDtBQUNBLFdBQU8seUJBQXlCLFFBQVE7QUFBQSxFQUN6QztBQUNEOyIsCiAgIm5hbWVzIjogWyJEaWFnbm9zdGljQ29kZXMiXQp9Cg== |
@@ -37,7 +37,7 @@ "use strict"; | ||
} | ||
function decorateLanguageService(ls, snapshotManager, logger) { | ||
function decorateLanguageService(ls, snapshotManager, ts, logger) { | ||
const proxy = new Proxy(ls, createProxyHandler()); | ||
(0, import_line_column_offset.decorateLineColumnOffset)(proxy, snapshotManager); | ||
(0, import_rename.decorateRename)(proxy, snapshotManager, logger); | ||
(0, import_diagnostics.decorateDiagnostics)(proxy); | ||
(0, import_diagnostics.decorateDiagnostics)(proxy, ts); | ||
(0, import_find_references.decorateFindReferences)(proxy, snapshotManager, logger); | ||
@@ -71,2 +71,2 @@ (0, import_completions.decorateCompletions)(proxy, logger); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL2xhbmd1YWdlLXNlcnZpY2UvaW5kZXgudHMiXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFHQSx5QkFBb0M7QUFDcEMsd0JBQXNDO0FBQ3RDLHlCQUFvQztBQUNwQyw2QkFBMEM7QUFDMUMsNkJBQXVDO0FBQ3ZDLDRCQUEwQztBQUMxQyxnQ0FBeUM7QUFDekMsb0JBQStCO0FBRS9CLE1BQU0seUJBQXlCLE9BQU8sd0JBQXdCO0FBRXZELFNBQVMsVUFBVSxJQUF3QjtBQUNqRCxTQUFRLEdBQVcsNEJBQTRCO0FBQ2hEO0FBRU8sU0FBUyx3QkFDZixJQUNBLGlCQUNBLFFBQ3FCO0FBQ3JCLFFBQU0sUUFBUSxJQUFJLE1BQU0sSUFBSSxtQkFBbUIsQ0FBQztBQUVoRCwwREFBeUIsT0FBTyxlQUFlO0FBQy9DLG9DQUFlLE9BQU8saUJBQWlCLE1BQU07QUFDN0MsOENBQW9CLEtBQUs7QUFDekIscURBQXVCLE9BQU8saUJBQWlCLE1BQU07QUFDckQsOENBQW9CLE9BQU8sTUFBTTtBQUNqQywrQ0FBc0IsT0FBTyxlQUFlO0FBQzVDLHVEQUEwQixPQUFPLGVBQWU7QUFDaEQsd0RBQTBCLE9BQU8sZUFBZTtBQUVoRCxTQUFPO0FBQ1I7QUFFQSxTQUFTLHFCQUF1RDtBQUMvRCxRQUFNLFlBQXlDLENBQUM7QUFFaEQsU0FBTztBQUFBLElBQ04sSUFBSSxRQUFRLEdBQUc7QUF6Q2pCO0FBMENHLFVBQUksTUFBTSx3QkFBd0I7QUFDak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EQsU0FBTztBQUNSO0FBRUEsU0FBUyxxQkFBdUQ7QUFDL0QsUUFBTSxZQUF5QyxDQUFDO0FBRWhELFNBQU87QUFBQSxJQUNOLElBQUksUUFBUSxHQUFHO0FBMUNqQjtBQTJDRyxVQUFJLE1BQU0sd0JBQXdCO0FBQ2pDLGVBQU87QUFBQSxNQUNSO0FBRUEsY0FBTyxlQUFVLE9BQVYsWUFBNEMsT0FBTztBQUFBLElBQzNEO0FBQUEsSUFDQSxJQUFJLEdBQUcsR0FBRyxPQUFPO0FBQ2hCLGdCQUFVLEtBQWlDO0FBRTNDLGFBQU87QUFBQSxJQUNSO0FBQUEsRUFDRDtBQUNEOyIsCiAgIm5hbWVzIjogW10KfQo= |
@@ -52,3 +52,3 @@ "use strict"; | ||
var _a, _b; | ||
const astroSys = (0, import_astro_sys.createAstroSys)(logger); | ||
const astroSys = (0, import_astro_sys.createAstroSys)(logger, typescript); | ||
const moduleCache = new ModuleResolutionCache(); | ||
@@ -152,2 +152,2 @@ const origResolveModuleNames = (_a = lsHost.resolveModuleNames) == null ? void 0 : _a.bind(lsHost); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL21vZHVsZS1sb2FkZXIudHMiXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBRUEsdUJBQStCO0FBRS9CLG1CQUFnRTtBQUtoRSxNQUFNLHNCQUFzQjtBQUFBLEVBQTVCO0FBQ0MsU0FBUSxRQUFRLG9CQUFJLElBQW1DO0FBQUE7QUFBQSxFQUt2RCxJQUFJLFlBQW9CLGdCQUEyRDtBQUNsRixXQUFPLEtBQUssTUFBTSxJQUFJLEtBQUssT0FBTyxZQUFZLGNBQWMsQ0FBQztBQUFBLEVBQzlEO0FBQUEsRUFLQSxJQUFJLFlBQW9CLGdCQUF3QixnQkFBb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FBTztBQUM1RSxnQkFBWSxJQUFJLFlBQVksZ0JBQWdCLGNBQWM7QUFDMUQsV0FBTztBQUFBLE1BQ047QUFBQSxJQUNEO0FBQUEsRUFDRDtBQUNEOyIsCiAgIm5hbWVzIjogWyJfYSJdCn0K |
{ | ||
"name": "@astrojs/ts-plugin", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A TypeScript Plugin providing Astro intellisense", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,2 @@ | ||
import ts from 'typescript'; | ||
import type ts from 'typescript/lib/tsserverlibrary'; | ||
import type { Logger } from './logger.js'; | ||
@@ -8,7 +8,7 @@ import { ensureRealAstroFilePath, isVirtualAstroFilePath, toRealAstroFilePath } from './utils.js'; | ||
*/ | ||
export function createAstroSys(logger: Logger) { | ||
export function createAstroSys(logger: Logger, typescript: typeof import('typescript/lib/tsserverlibrary')) { | ||
const astroSys: ts.System = { | ||
...ts.sys, | ||
...typescript.sys, | ||
fileExists(path: string) { | ||
return ts.sys.fileExists(ensureRealAstroFilePath(path)); | ||
return typescript.sys.fileExists(ensureRealAstroFilePath(path)); | ||
}, | ||
@@ -18,8 +18,8 @@ readDirectory(path, extensions, exclude, include, depth) { | ||
return ts.sys.readDirectory(path, extensionsWithAstro, exclude, include, depth); | ||
return typescript.sys.readDirectory(path, extensionsWithAstro, exclude, include, depth); | ||
}, | ||
}; | ||
if (ts.sys.realpath) { | ||
const realpath = ts.sys.realpath; | ||
if (typescript.sys.realpath) { | ||
const realpath = typescript.sys.realpath; | ||
astroSys.realpath = function (path) { | ||
@@ -26,0 +26,0 @@ if (isVirtualAstroFilePath(path)) { |
@@ -39,3 +39,3 @@ import type ts from 'typescript/lib/tsserverlibrary'; | ||
patchModuleLoader(logger, snapshotManager, modules.typescript, info.languageServiceHost, info.project); | ||
return decorateLanguageService(info.languageService, snapshotManager, logger); | ||
return decorateLanguageService(info.languageService, snapshotManager, ts, logger); | ||
} | ||
@@ -42,0 +42,0 @@ |
@@ -1,4 +0,6 @@ | ||
import ts from 'typescript/lib/tsserverlibrary'; | ||
import type ts from 'typescript/lib/tsserverlibrary'; | ||
import { isAstroFilePath } from '../utils.js'; | ||
type _ts = typeof ts; | ||
export enum DiagnosticCodes { | ||
@@ -8,5 +10,5 @@ CANNOT_FIND_MODULE = 2307, // Cannot find module '{0}' or its corresponding type declarations. | ||
export function decorateDiagnostics(ls: ts.LanguageService): void { | ||
export function decorateDiagnostics(ls: ts.LanguageService, typescript: _ts): void { | ||
decorateSyntacticDiagnostics(ls); | ||
decorateSemanticDiagnostics(ls); | ||
decorateSemanticDiagnostics(ls, typescript); | ||
decorateSuggestionDiagnostics(ls); | ||
@@ -27,3 +29,3 @@ } | ||
function decorateSemanticDiagnostics(ls: ts.LanguageService): void { | ||
function decorateSemanticDiagnostics(ls: ts.LanguageService, typescript: _ts): void { | ||
const getSemanticDiagnostics = ls.getSemanticDiagnostics; | ||
@@ -39,3 +41,3 @@ ls.getSemanticDiagnostics = (fileName: string) => { | ||
diagnostics = diagnostics.map((diag) => { | ||
const message = ts.flattenDiagnosticMessageText(diag.messageText, ts.sys.newLine); | ||
const message = typescript.flattenDiagnosticMessageText(diag.messageText, typescript.sys.newLine); | ||
if ( | ||
@@ -50,4 +52,4 @@ diag.code === DiagnosticCodes.CANNOT_FIND_MODULE && | ||
message + | ||
`${ts.sys.newLine}${ts.sys.newLine}` + | ||
"If you're using content collections, make sure to run `astro dev`, `astro build` or `astro sync` to first generate the types so you can import from them. If you already ran one of those commands, restarting the TS Server might be necessary in order for the change to take effect"; | ||
`${typescript.sys.newLine}${typescript.sys.newLine}` + | ||
"If you're using content collections, make sure to run `astro dev`, `astro build` or `astro sync` to first generate the types so you can import from them. If you already ran one of those commands, restarting the TS Server might be necessary in order for the change to take effect."; | ||
} | ||
@@ -54,0 +56,0 @@ |
@@ -22,2 +22,3 @@ import type ts from 'typescript/lib/tsserverlibrary'; | ||
snapshotManager: AstroSnapshotManager, | ||
ts: typeof import('typescript/lib/tsserverlibrary'), | ||
logger: Logger | ||
@@ -29,3 +30,3 @@ ): ts.LanguageService { | ||
decorateRename(proxy, snapshotManager, logger); | ||
decorateDiagnostics(proxy); | ||
decorateDiagnostics(proxy, ts); | ||
decorateFindReferences(proxy, snapshotManager, logger); | ||
@@ -32,0 +33,0 @@ decorateCompletions(proxy, logger); |
@@ -63,3 +63,3 @@ import type ts from 'typescript/lib/tsserverlibrary'; | ||
): void { | ||
const astroSys = createAstroSys(logger); | ||
const astroSys = createAstroSys(logger, typescript); | ||
const moduleCache = new ModuleResolutionCache(); | ||
@@ -66,0 +66,0 @@ const origResolveModuleNames = lsHost.resolveModuleNames?.bind(lsHost); |
@@ -8,2 +8,3 @@ { | ||
"module": "CommonJS", | ||
"ignoreDeprecations": "5.0", | ||
"importsNotUsedAsValues": "error" | ||
@@ -10,0 +11,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135253
2824