@effect/tsgo 0.0.9 → 0.0.11
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/bin/effect-tsgo.js +15 -1
- package/package.json +8 -8
package/bin/effect-tsgo.js
CHANGED
|
@@ -195732,7 +195732,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
|
|
|
195732
195732
|
//#endregion
|
|
195733
195733
|
//#region package.json
|
|
195734
195734
|
var name = "@effect/tsgo";
|
|
195735
|
-
var version = "0.0.
|
|
195735
|
+
var version = "0.0.11";
|
|
195736
195736
|
|
|
195737
195737
|
//#endregion
|
|
195738
195738
|
//#region src/setup/consts.ts
|
|
@@ -195740,6 +195740,7 @@ const LSP_PACKAGE_NAME = name;
|
|
|
195740
195740
|
const LSP_PLUGIN_NAME = "@effect/language-service";
|
|
195741
195741
|
const PATCH_COMMAND = "effect-tsgo patch";
|
|
195742
195742
|
const DEFAULT_LSP_VERSION = version;
|
|
195743
|
+
const TSCONFIG_SCHEMA_URL = "https://raw.githubusercontent.com/Effect-TS/tsgo/refs/heads/main/schema.json";
|
|
195743
195744
|
|
|
195744
195745
|
//#endregion
|
|
195745
195746
|
//#region src/setup/assessment.ts
|
|
@@ -196060,8 +196061,14 @@ const computeTsConfigChanges = (current, target, lspVersion) => {
|
|
|
196060
196061
|
const compilerOptions = compilerOptionsProperty.initializer;
|
|
196061
196062
|
const ctx = createTrackerContext();
|
|
196062
196063
|
const fileChange = tsInternal.textChanges.ChangeTracker.with(ctx, (tracker) => {
|
|
196064
|
+
const schemaProperty = findPropertyInObject(rootObj, "$schema");
|
|
196063
196065
|
const pluginsProperty = findPropertyInObject(compilerOptions, "plugins");
|
|
196066
|
+
const schemaPropertyAssignment = import_typescript.factory.createPropertyAssignment(import_typescript.factory.createStringLiteral("$schema"), import_typescript.factory.createStringLiteral(TSCONFIG_SCHEMA_URL));
|
|
196064
196067
|
if (isNone(lspVersion)) {
|
|
196068
|
+
if (schemaProperty) {
|
|
196069
|
+
descriptions.push("Remove $schema from tsconfig");
|
|
196070
|
+
deleteNodeFromList(tracker, current.sourceFile, rootObj.properties, schemaProperty);
|
|
196071
|
+
}
|
|
196065
196072
|
if (pluginsProperty && import_typescript.isArrayLiteralExpression(pluginsProperty.initializer)) {
|
|
196066
196073
|
const pluginsArray = pluginsProperty.initializer;
|
|
196067
196074
|
const lspPluginElement = pluginsArray.elements.find((element) => {
|
|
@@ -196077,6 +196084,13 @@ const computeTsConfigChanges = (current, target, lspVersion) => {
|
|
|
196077
196084
|
}
|
|
196078
196085
|
}
|
|
196079
196086
|
} else {
|
|
196087
|
+
if (!schemaProperty) {
|
|
196088
|
+
descriptions.push("Add $schema to tsconfig");
|
|
196089
|
+
insertNodeAtEndOfList(tracker, current.sourceFile, rootObj.properties, schemaPropertyAssignment);
|
|
196090
|
+
} else if (!import_typescript.isStringLiteral(schemaProperty.initializer) || schemaProperty.initializer.text !== TSCONFIG_SCHEMA_URL) {
|
|
196091
|
+
descriptions.push("Update $schema in tsconfig");
|
|
196092
|
+
tracker.replaceNode(current.sourceFile, schemaProperty.initializer, schemaPropertyAssignment.initializer);
|
|
196093
|
+
}
|
|
196080
196094
|
const pluginObject = import_typescript.factory.createObjectLiteralExpression([import_typescript.factory.createPropertyAssignment(import_typescript.factory.createStringLiteral("name"), import_typescript.factory.createStringLiteral(LSP_PLUGIN_NAME))], false);
|
|
196081
196095
|
if (!pluginsProperty) {
|
|
196082
196096
|
descriptions.push(`Add plugins array with ${LSP_PLUGIN_NAME} plugin`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"bin/"
|
|
22
22
|
],
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@effect/tsgo-win32-
|
|
25
|
-
"@effect/tsgo-win32-
|
|
26
|
-
"@effect/tsgo-linux-x64": "0.0.
|
|
27
|
-
"@effect/tsgo-linux-arm64": "0.0.
|
|
28
|
-
"@effect/tsgo-
|
|
29
|
-
"@effect/tsgo-
|
|
30
|
-
"@effect/tsgo-darwin-arm64": "0.0.
|
|
24
|
+
"@effect/tsgo-win32-arm64": "0.0.11",
|
|
25
|
+
"@effect/tsgo-win32-x64": "0.0.11",
|
|
26
|
+
"@effect/tsgo-linux-x64": "0.0.11",
|
|
27
|
+
"@effect/tsgo-linux-arm64": "0.0.11",
|
|
28
|
+
"@effect/tsgo-darwin-x64": "0.0.11",
|
|
29
|
+
"@effect/tsgo-linux-arm": "0.0.11",
|
|
30
|
+
"@effect/tsgo-darwin-arm64": "0.0.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@effect/platform-node": "4.0.0-beta.11",
|