@effect/tsgo 0.21.0 → 0.23.0

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/README.md CHANGED
@@ -49,6 +49,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
49
49
  <tr><td><code>nonObjectEffectServiceType</code></td><td>❌</td><td></td><td>Ensures Effect.Service types are objects, not primitives</td><td>✓</td><td></td></tr>
50
50
  <tr><td><code>outdatedApi</code></td><td>⚠️</td><td></td><td>Detects usage of APIs that have been removed or renamed in Effect v4</td><td></td><td>✓</td></tr>
51
51
  <tr><td><code>overriddenSchemaConstructor</code></td><td>❌</td><td>🔧</td><td>Prevents overriding constructors in Schema classes which breaks decoding behavior</td><td>✓</td><td>✓</td></tr>
52
+ <tr><td><code>schemaOpaqueInstanceMember</code></td><td>❌</td><td></td><td>Disallows instance members in classes extending Schema.Opaque</td><td></td><td>✓</td></tr>
52
53
  <tr><td colspan="6"><strong>Anti-pattern</strong> <em>Discouraged patterns that often lead to bugs or confusing behavior.</em></td></tr>
53
54
  <tr><td><code>catchUnfailableEffect</code></td><td>💡</td><td></td><td>Warns when using error handling on Effects that never fail</td><td>✓</td><td>✓</td></tr>
54
55
  <tr><td><code>effectFnIife</code></td><td>⚠️</td><td>🔧</td><td>Effect.fn or Effect.fnUntraced is called as an IIFE; use Effect.gen instead</td><td>✓</td><td>✓</td></tr>
@@ -116,6 +117,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
116
117
  <tr><td><code>schemaUnionOfLiterals</code></td><td>➖</td><td>🔧</td><td>Suggests combining multiple Schema.Literal calls in Schema.Union into a single Schema.Literal</td><td>✓</td><td></td></tr>
117
118
  <tr><td><code>serviceNotAsClass</code></td><td>➖</td><td>🔧</td><td>Warns when Context.Service is used as a variable instead of a class declaration</td><td></td><td>✓</td></tr>
118
119
  <tr><td><code>strictBooleanExpressions</code></td><td>➖</td><td></td><td>Enforces boolean types in conditional expressions for type safety</td><td>✓</td><td>✓</td></tr>
120
+ <tr><td><code>syncToSucceed</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value</td><td>✓</td><td>✓</td></tr>
119
121
  <tr><td><code>unnecessaryArrowBlock</code></td><td>➖</td><td>🔧</td><td>Suggests using a concise arrow body when the block only returns an expression</td><td>✓</td><td>✓</td></tr>
120
122
  <tr><td><code>unnecessaryEffectGen</code></td><td>💡</td><td>🔧</td><td>Suggests removing Effect.gen when it contains only a single return statement</td><td>✓</td><td>✓</td></tr>
121
123
  <tr><td><code>unnecessaryFailYieldableError</code></td><td>💡</td><td>🔧</td><td>Suggests yielding yieldable errors directly instead of wrapping with Effect.fail</td><td>✓</td><td>✓</td></tr>
@@ -204851,7 +204851,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
204851
204851
  //#endregion
204852
204852
  //#region package.json
204853
204853
  var name = "@effect/tsgo";
204854
- var version = "0.21.0";
204854
+ var version = "0.23.0";
204855
204855
 
204856
204856
  //#endregion
204857
204857
  //#region src/setup/consts.ts
@@ -205975,6 +205975,27 @@ var rules = [
205975
205975
  }]
205976
205976
  }
205977
205977
  },
205978
+ {
205979
+ "name": "schemaOpaqueInstanceMember",
205980
+ "group": "correctness",
205981
+ "description": "Disallows instance members in classes extending Schema.Opaque",
205982
+ "defaultSeverity": "error",
205983
+ "fixable": false,
205984
+ "supportedEffect": ["v4"],
205985
+ "codes": [377102],
205986
+ "preview": {
205987
+ "sourceText": "import { Schema } from \"effect\"\n\nclass User extends Schema.Opaque<User>()(Schema.Struct({ name: Schema.String })) {\n displayName = \"User\"\n greet() {\n return `Hello, ${this.displayName}`\n }\n}\n",
205988
+ "diagnostics": [{
205989
+ "start": 118,
205990
+ "end": 129,
205991
+ "text": "Classes extending `Schema.Opaque` must not declare instance members. effect(schemaOpaqueInstanceMember)"
205992
+ }, {
205993
+ "start": 141,
205994
+ "end": 146,
205995
+ "text": "Classes extending `Schema.Opaque` must not declare instance members. effect(schemaOpaqueInstanceMember)"
205996
+ }]
205997
+ }
205998
+ },
205978
205999
  {
205979
206000
  "name": "catchUnfailableEffect",
205980
206001
  "group": "antipattern",
@@ -207079,6 +207100,23 @@ var rules = [
207079
207100
  }]
207080
207101
  }
207081
207102
  },
207103
+ {
207104
+ "name": "syncToSucceed",
207105
+ "group": "style",
207106
+ "description": "Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value",
207107
+ "defaultSeverity": "suggestion",
207108
+ "fixable": true,
207109
+ "supportedEffect": ["v3", "v4"],
207110
+ "codes": [377103],
207111
+ "preview": {
207112
+ "sourceText": "import { Effect } from \"effect\"\n\nexport const preview = Effect.sync(() => \"constant\")\n",
207113
+ "diagnostics": [{
207114
+ "start": 56,
207115
+ "end": 67,
207116
+ "text": "`Effect.succeed` expresses this constant value more directly than `Effect.sync`. effect(syncToSucceed)"
207117
+ }]
207118
+ }
207119
+ },
207082
207120
  {
207083
207121
  "name": "unnecessaryArrowBlock",
207084
207122
  "group": "style",
@@ -207859,7 +207897,7 @@ const gatherTargetState = (assessment, context) => gen(function* () {
207859
207897
 
207860
207898
  //#endregion
207861
207899
  //#region upstream.json
207862
- var tsVersion = "7.1.0-dev.20260713.1";
207900
+ var tsVersion = "7.1.0-dev.20260715.1";
207863
207901
 
207864
207902
  //#endregion
207865
207903
  //#region src/setup/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,13 +23,13 @@
23
23
  "schema.json"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@effect/tsgo-win32-x64": "0.21.0",
27
- "@effect/tsgo-win32-arm64": "0.21.0",
28
- "@effect/tsgo-linux-x64": "0.21.0",
29
- "@effect/tsgo-linux-arm64": "0.21.0",
30
- "@effect/tsgo-linux-arm": "0.21.0",
31
- "@effect/tsgo-darwin-x64": "0.21.0",
32
- "@effect/tsgo-darwin-arm64": "0.21.0"
26
+ "@effect/tsgo-win32-x64": "0.23.0",
27
+ "@effect/tsgo-win32-arm64": "0.23.0",
28
+ "@effect/tsgo-linux-x64": "0.23.0",
29
+ "@effect/tsgo-linux-arm64": "0.23.0",
30
+ "@effect/tsgo-linux-arm": "0.23.0",
31
+ "@effect/tsgo-darwin-arm64": "0.23.0",
32
+ "@effect/tsgo-darwin-x64": "0.23.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@effect/platform-node": "^4.0.0-beta.83",
package/schema.json CHANGED
@@ -2004,6 +2004,11 @@
2004
2004
  "default": "suggestion",
2005
2005
  "description": "Suggests Schema.Finite and Schema.FiniteFromString instead of Schema.Number APIs when describing domain numbers"
2006
2006
  },
2007
+ "schemaOpaqueInstanceMember": {
2008
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2009
+ "default": "error",
2010
+ "description": "Disallows instance members in classes extending Schema.Opaque"
2011
+ },
2007
2012
  "schemaStructWithTag": {
2008
2013
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2009
2014
  "default": "suggestion",
@@ -2039,6 +2044,11 @@
2039
2044
  "default": "off",
2040
2045
  "description": "Warns when using Effect.provide with layers outside of application entry points"
2041
2046
  },
2047
+ "syncToSucceed": {
2048
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2049
+ "default": "suggestion",
2050
+ "description": "Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value"
2051
+ },
2042
2052
  "tryCatchInEffectGen": {
2043
2053
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2044
2054
  "default": "suggestion",