@marko/language-server 1.1.15 → 1.1.17
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/index.js +19 -15
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +19 -15
- package/dist/index.mjs.map +2 -2
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1451,27 +1451,31 @@ import { Project as Project3 } from "@marko/language-tools";
|
|
|
1451
1451
|
import { DiagnosticSeverity } from "vscode-languageserver";
|
|
1452
1452
|
import { DiagnosticType } from "@marko/babel-utils";
|
|
1453
1453
|
var markoErrorRegExp = /^(.+?)\.marko(?:\((\d+)(?:\s*,\s*(\d+))?\))?: (.*)$/gm;
|
|
1454
|
+
var compilerConfig = {
|
|
1455
|
+
code: false,
|
|
1456
|
+
output: "migrate",
|
|
1457
|
+
sourceMaps: false,
|
|
1458
|
+
errorRecovery: true,
|
|
1459
|
+
babelConfig: {
|
|
1460
|
+
babelrc: false,
|
|
1461
|
+
configFile: false,
|
|
1462
|
+
browserslistConfigFile: false,
|
|
1463
|
+
caller: {
|
|
1464
|
+
name: "@marko/language-server",
|
|
1465
|
+
supportsStaticESM: true,
|
|
1466
|
+
supportsDynamicImport: true,
|
|
1467
|
+
supportsTopLevelAwait: true,
|
|
1468
|
+
supportsExportNamespaceFrom: true
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1454
1472
|
var doValidate = (doc) => {
|
|
1455
1473
|
const filename = getFSPath(doc);
|
|
1456
1474
|
const diagnostics = [];
|
|
1457
1475
|
try {
|
|
1458
1476
|
const { meta } = Project3.getCompiler(
|
|
1459
1477
|
filename && path5.dirname(filename)
|
|
1460
|
-
).compileSync(doc.getText(), filename || "untitled.marko",
|
|
1461
|
-
code: false,
|
|
1462
|
-
output: "migrate",
|
|
1463
|
-
sourceMaps: false,
|
|
1464
|
-
errorRecovery: true,
|
|
1465
|
-
babelConfig: {
|
|
1466
|
-
caller: {
|
|
1467
|
-
name: "@marko/language-server",
|
|
1468
|
-
supportsStaticESM: true,
|
|
1469
|
-
supportsDynamicImport: true,
|
|
1470
|
-
supportsTopLevelAwait: true,
|
|
1471
|
-
supportsExportNamespaceFrom: true
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
});
|
|
1478
|
+
).compileSync(doc.getText(), filename || "untitled.marko", compilerConfig);
|
|
1475
1479
|
if (meta.diagnostics) {
|
|
1476
1480
|
for (const diag of meta.diagnostics) {
|
|
1477
1481
|
const range = diag.loc ? {
|