@effect/tsgo 0.11.5 → 0.13.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
@@ -93,6 +93,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
93
93
  <tr><td><code>unsafeEffectTypeAssertion</code></td><td>➖</td><td>🔧</td><td>Detects unsafe type assertions that narrow Effect, Stream, or Layer error or requirements channels</td><td>✓</td><td>✓</td></tr>
94
94
  <tr><td colspan="6"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
95
95
  <tr><td><code>catchAllToMapError</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.mapError instead of Effect.catch + Effect.fail</td><td>✓</td><td>✓</td></tr>
96
+ <tr><td><code>catchToOrElseSucceed</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.orElseSucceed instead of Effect.catch + Effect.succeed</td><td>✓</td><td>✓</td></tr>
96
97
  <tr><td><code>deterministicKeys</code></td><td>➖</td><td>🔧</td><td>Enforces deterministic naming for service/tag/error identifiers based on class names</td><td>✓</td><td>✓</td></tr>
97
98
  <tr><td><code>effectDoNotation</code></td><td>➖</td><td></td><td>Suggests using Effect.gen or Effect.fn instead of the Effect.Do notation helpers</td><td>✓</td><td>✓</td></tr>
98
99
  <tr><td><code>effectFnOpportunity</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.fn for functions that return an Effect</td><td>✓</td><td>✓</td></tr>
@@ -105,6 +106,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
105
106
  <tr><td><code>nestedEffectGenYield</code></td><td>➖</td><td></td><td>Warns when yielding a nested bare Effect.gen inside an existing Effect generator context</td><td>✓</td><td>✓</td></tr>
106
107
  <tr><td><code>newSchemaClass</code></td><td>➖</td><td>🔧</td><td>Suggests using Schema make instead of new for Schema classes</td><td></td><td>✓</td></tr>
107
108
  <tr><td><code>redundantMapError</code></td><td>💡</td><td></td><td>Suggests hoisting a repeated trailing Effect.mapError from every yield in an Effect generator</td><td>✓</td><td>✓</td></tr>
109
+ <tr><td><code>redundantOrDie</code></td><td>💡</td><td></td><td>Suggests hoisting a repeated trailing Effect.orDie from every yield in an Effect generator</td><td>✓</td><td>✓</td></tr>
108
110
  <tr><td><code>redundantSchemaTagIdentifier</code></td><td>💡</td><td>🔧</td><td>Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest</td><td>✓</td><td>✓</td></tr>
109
111
  <tr><td><code>schemaStructWithTag</code></td><td>💡</td><td>🔧</td><td>Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field</td><td>✓</td><td>✓</td></tr>
110
112
  <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>
@@ -199259,7 +199259,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
199259
199259
  //#endregion
199260
199260
  //#region package.json
199261
199261
  var name = "@effect/tsgo";
199262
- var version = "0.11.5";
199262
+ var version = "0.13.0";
199263
199263
 
199264
199264
  //#endregion
199265
199265
  //#region src/setup/consts.ts
@@ -201068,6 +201068,23 @@ var rules = [
201068
201068
  }]
201069
201069
  }
201070
201070
  },
201071
+ {
201072
+ "name": "catchToOrElseSucceed",
201073
+ "group": "style",
201074
+ "description": "Suggests using Effect.orElseSucceed instead of Effect.catch + Effect.succeed",
201075
+ "defaultSeverity": "suggestion",
201076
+ "fixable": true,
201077
+ "supportedEffect": ["v3", "v4"],
201078
+ "codes": [377095],
201079
+ "preview": {
201080
+ "sourceText": "import { Effect } from \"effect\"\n\nexport const program = Effect.fail(\"error\").pipe(\n Effect.catch(() => Effect.succeed(42))\n)\n",
201081
+ "diagnostics": [{
201082
+ "start": 85,
201083
+ "end": 97,
201084
+ "text": "`Effect.orElseSucceed` expresses the same recovery more directly than `Effect.catch` followed by `Effect.succeed`. effect(catchToOrElseSucceed)"
201085
+ }]
201086
+ }
201087
+ },
201071
201088
  {
201072
201089
  "name": "deterministicKeys",
201073
201090
  "group": "style",
@@ -201272,6 +201289,23 @@ var rules = [
201272
201289
  }]
201273
201290
  }
201274
201291
  },
201292
+ {
201293
+ "name": "redundantOrDie",
201294
+ "group": "style",
201295
+ "description": "Suggests hoisting a repeated trailing Effect.orDie from every yield in an Effect generator",
201296
+ "defaultSeverity": "suggestion",
201297
+ "fixable": false,
201298
+ "supportedEffect": ["v3", "v4"],
201299
+ "codes": [377096, 377097],
201300
+ "preview": {
201301
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const first: Effect.Effect<number, unknown>\ndeclare const second: Effect.Effect<string, unknown>\n\nexport const program = Effect.gen(function*() {\n yield* first.pipe(Effect.orDie)\n\n return yield* second.pipe(Effect.orDie)\n})\n",
201302
+ "diagnostics": [{
201303
+ "start": 173,
201304
+ "end": 182,
201305
+ "text": "This generator applies `Effect.orDie` to every yielded effect. Hoist it once to the generator result: `Effect.gen(...).pipe(Effect.orDie)`, or `Effect.fn(function*(){ ... }, Effect.orDie)`. effect(redundantOrDie)"
201306
+ }]
201307
+ }
201308
+ },
201275
201309
  {
201276
201310
  "name": "redundantSchemaTagIdentifier",
201277
201311
  "group": "style",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.11.5",
3
+ "version": "0.13.0",
4
4
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,13 +22,13 @@
22
22
  "README.md"
23
23
  ],
24
24
  "optionalDependencies": {
25
- "@effect/tsgo-win32-x64": "0.11.5",
26
- "@effect/tsgo-win32-arm64": "0.11.5",
27
- "@effect/tsgo-linux-x64": "0.11.5",
28
- "@effect/tsgo-linux-arm64": "0.11.5",
29
- "@effect/tsgo-linux-arm": "0.11.5",
30
- "@effect/tsgo-darwin-x64": "0.11.5",
31
- "@effect/tsgo-darwin-arm64": "0.11.5"
25
+ "@effect/tsgo-win32-x64": "0.13.0",
26
+ "@effect/tsgo-win32-arm64": "0.13.0",
27
+ "@effect/tsgo-linux-x64": "0.13.0",
28
+ "@effect/tsgo-linux-arm64": "0.13.0",
29
+ "@effect/tsgo-linux-arm": "0.13.0",
30
+ "@effect/tsgo-darwin-x64": "0.13.0",
31
+ "@effect/tsgo-darwin-arm64": "0.13.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@effect/platform-node": "^4.0.0-beta.66",