@effect/language-service 0.71.1 → 0.71.2
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/cli.js +20 -39
- package/cli.js.map +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -30214,7 +30214,7 @@ var runMain3 = runMain2;
|
|
|
30214
30214
|
// package.json
|
|
30215
30215
|
var package_default = {
|
|
30216
30216
|
name: "@effect/language-service",
|
|
30217
|
-
version: "0.71.
|
|
30217
|
+
version: "0.71.2",
|
|
30218
30218
|
packageManager: "pnpm@8.11.0",
|
|
30219
30219
|
publishConfig: {
|
|
30220
30220
|
access: "public",
|
|
@@ -41510,8 +41510,7 @@ var getPatchesForModule = fn("getPatchesForModule")(
|
|
|
41510
41510
|
let insertCheckSourceFilePosition = none2();
|
|
41511
41511
|
let insertSkipPrecedingCommentDirectivePosition = none2();
|
|
41512
41512
|
let insertAppendMetadataRelationErrorPosition = none2();
|
|
41513
|
-
let
|
|
41514
|
-
let replacedBindingExtractDiagnosticsForExitStatus = none2();
|
|
41513
|
+
let insertEmitFilesAndReportErrorsDiagnosticsRange = none2();
|
|
41515
41514
|
let nodesToCheck = [];
|
|
41516
41515
|
function findNodeAtPositionIncludingTrivia(sourceFile2, position) {
|
|
41517
41516
|
function find3(node) {
|
|
@@ -41540,7 +41539,7 @@ var getPatchesForModule = fn("getPatchesForModule")(
|
|
|
41540
41539
|
if (!pushFunctionDeclarationNode("checkSourceFileWorker")) requiresFullScan = true;
|
|
41541
41540
|
if (!pushFunctionDeclarationNode("markPrecedingCommentDirectiveLine")) requiresFullScan = true;
|
|
41542
41541
|
if (!pushFunctionDeclarationNode("reportRelationError")) requiresFullScan = true;
|
|
41543
|
-
if (!pushFunctionDeclarationNode("
|
|
41542
|
+
if (!pushFunctionDeclarationNode("emitFilesAndReportErrors")) requiresFullScan = true;
|
|
41544
41543
|
if (requiresFullScan) nodesToCheck = [sourceFile];
|
|
41545
41544
|
while (nodesToCheck.length > 0) {
|
|
41546
41545
|
const node = nodesToCheck.shift();
|
|
@@ -41575,23 +41574,18 @@ var getPatchesForModule = fn("getPatchesForModule")(
|
|
|
41575
41574
|
});
|
|
41576
41575
|
}
|
|
41577
41576
|
}
|
|
41578
|
-
} else if (ts.
|
|
41579
|
-
const
|
|
41580
|
-
if (
|
|
41581
|
-
const
|
|
41582
|
-
if (
|
|
41583
|
-
|
|
41584
|
-
|
|
41585
|
-
const
|
|
41586
|
-
|
|
41587
|
-
|
|
41588
|
-
|
|
41589
|
-
|
|
41590
|
-
position: parentVariableStatement.end
|
|
41591
|
-
});
|
|
41592
|
-
replacedBindingExtractDiagnosticsForExitStatus = some2({
|
|
41593
|
-
pos: parentVariableDeclaration.name.pos,
|
|
41594
|
-
end: parentVariableDeclaration.name.end
|
|
41577
|
+
} else if (ts.isReturnStatement(node)) {
|
|
41578
|
+
const parentBlock = node.parent;
|
|
41579
|
+
if (parentBlock && ts.isBlock(parentBlock)) {
|
|
41580
|
+
const parentFunctionDeclaration = parentBlock.parent;
|
|
41581
|
+
if (parentFunctionDeclaration && ts.isFunctionDeclaration(parentFunctionDeclaration) && parentFunctionDeclaration.name && ts.isIdentifier(parentFunctionDeclaration.name) && ts.idText(parentFunctionDeclaration.name) === "emitFilesAndReportErrors") {
|
|
41582
|
+
if (node.expression && ts.isObjectLiteralExpression(node.expression)) {
|
|
41583
|
+
const properties = node.expression.properties;
|
|
41584
|
+
for (const property of properties) {
|
|
41585
|
+
if (property && ts.isShorthandPropertyAssignment(property) && property.name && ts.isIdentifier(property.name) && ts.idText(property.name) === "diagnostics") {
|
|
41586
|
+
insertEmitFilesAndReportErrorsDiagnosticsRange = some2({
|
|
41587
|
+
pos: property.pos,
|
|
41588
|
+
end: property.end
|
|
41595
41589
|
});
|
|
41596
41590
|
}
|
|
41597
41591
|
}
|
|
@@ -41664,30 +41658,17 @@ var getPatchesForModule = fn("getPatchesForModule")(
|
|
|
41664
41658
|
version
|
|
41665
41659
|
)
|
|
41666
41660
|
);
|
|
41667
|
-
if (isNone2(
|
|
41661
|
+
if (isNone2(insertEmitFilesAndReportErrorsDiagnosticsRange)) {
|
|
41668
41662
|
return yield* new UnableToFindPositionToPatchError({ positionToFind: "extractDiagnosticsForExitStatus" });
|
|
41669
41663
|
}
|
|
41670
|
-
if (isNone2(replacedBindingExtractDiagnosticsForExitStatus)) {
|
|
41671
|
-
return yield* new UnableToFindPositionToPatchError({ positionToFind: "extractDiagnosticsForExitStatus-binding" });
|
|
41672
|
-
}
|
|
41673
|
-
patches.push(
|
|
41674
|
-
yield* makeEffectLspPatchChange(
|
|
41675
|
-
sourceFile.text,
|
|
41676
|
-
replacedBindingExtractDiagnosticsForExitStatus.value.pos,
|
|
41677
|
-
replacedBindingExtractDiagnosticsForExitStatus.value.end,
|
|
41678
|
-
` { emitResult, diagnostics: tscDiagnostics }`,
|
|
41679
|
-
" ",
|
|
41680
|
-
version
|
|
41681
|
-
)
|
|
41682
|
-
);
|
|
41683
41664
|
patches.push(
|
|
41684
41665
|
yield* makeEffectLspPatchChange(
|
|
41685
41666
|
sourceFile.text,
|
|
41686
|
-
|
|
41687
|
-
|
|
41688
|
-
`
|
|
41667
|
+
insertEmitFilesAndReportErrorsDiagnosticsRange.value.pos,
|
|
41668
|
+
insertEmitFilesAndReportErrorsDiagnosticsRange.value.end,
|
|
41669
|
+
`diagnostics: effectLspPatchUtils().extractDiagnosticsForExitStatus(${moduleName === "typescript" ? "module.exports" : "effectLspTypeScriptApis()"}, program, diagnostics, "${moduleName}")
|
|
41689
41670
|
`,
|
|
41690
|
-
"
|
|
41671
|
+
" ",
|
|
41691
41672
|
version
|
|
41692
41673
|
)
|
|
41693
41674
|
);
|