@effect/tsgo 0.9.0 → 0.11.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
@@ -101,7 +101,9 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
101
101
  <tr><td><code>effectSucceedWithVoid</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td><td>✓</td><td>✓</td></tr>
102
102
  <tr><td><code>missedPipeableOpportunity</code></td><td>➖</td><td>🔧</td><td>Suggests using .pipe() for nested function calls</td><td>✓</td><td>✓</td></tr>
103
103
  <tr><td><code>missingEffectServiceDependency</code></td><td>➖</td><td></td><td>Checks that Effect.Service dependencies satisfy all required layer inputs</td><td>✓</td><td></td></tr>
104
+ <tr><td><code>multipleCatchTag</code></td><td>💡</td><td></td><td>Suggests collapsing consecutive Effect.catchTag transformations into a single Effect.catchTags call when semantics stay equivalent</td><td></td><td>✓</td></tr>
104
105
  <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
+ <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>
105
107
  <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>
106
108
  <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>
107
109
  <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>
@@ -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.9.0";
199262
+ var version = "0.11.0";
199263
199263
 
199264
199264
  //#endregion
199265
199265
  //#region src/setup/consts.ts
@@ -200516,7 +200516,7 @@ var rules = [
200516
200516
  "diagnostics": [{
200517
200517
  "start": 69,
200518
200518
  "end": 76,
200519
- "text": "Interface 'PreviewService' member 'preview' returns a lazy Effect or Stream. Effect and Stream are already lazy, so wrapping them in a zero-argument function adds unnecessary indirection. effect(lazyEffect)"
200519
+ "text": "Interface 'PreviewService' member 'preview' returns a lazy Effect. Effect is already lazy, so wrapping it in a zero-argument function adds unnecessary indirection. effect(lazyEffect)"
200520
200520
  }]
200521
200521
  }
200522
200522
  },
@@ -201204,6 +201204,23 @@ var rules = [
201204
201204
  }]
201205
201205
  }
201206
201206
  },
201207
+ {
201208
+ "name": "multipleCatchTag",
201209
+ "group": "style",
201210
+ "description": "Suggests collapsing consecutive Effect.catchTag transformations into a single Effect.catchTags call when semantics stay equivalent",
201211
+ "defaultSeverity": "suggestion",
201212
+ "fixable": false,
201213
+ "supportedEffect": ["v4"],
201214
+ "codes": [377092],
201215
+ "preview": {
201216
+ "sourceText": "import { Data, Effect, pipe } from \"effect\"\n\nclass NotFound extends Data.TaggedError(\"NotFound\")<{}> {}\nclass Unauthorized extends Data.TaggedError(\"Unauthorized\")<{}> {}\n\ndeclare const program: Effect.Effect<string, NotFound | Unauthorized>\n\nexport const preview = pipe(\n program,\n Effect.catchTag(\"NotFound\", () => Effect.succeed(\"missing\")),\n Effect.catchTag(\"Unauthorized\", () => Effect.succeed(\"denied\"))\n)\n",
201217
+ "diagnostics": [{
201218
+ "start": 285,
201219
+ "end": 300,
201220
+ "text": "These 2 consecutive `catchTag` transformations can be collapsed into a single `catchTags` call. effect(multipleCatchTag)"
201221
+ }]
201222
+ }
201223
+ },
201207
201224
  {
201208
201225
  "name": "nestedEffectGenYield",
201209
201226
  "group": "style",
@@ -201221,6 +201238,23 @@ var rules = [
201221
201238
  }]
201222
201239
  }
201223
201240
  },
201241
+ {
201242
+ "name": "newSchemaClass",
201243
+ "group": "style",
201244
+ "description": "Suggests using Schema make instead of new for Schema classes",
201245
+ "defaultSeverity": "off",
201246
+ "fixable": true,
201247
+ "supportedEffect": ["v4"],
201248
+ "codes": [377094],
201249
+ "preview": {
201250
+ "sourceText": "import { Schema } from \"effect\"\n\nclass User extends Schema.Class<User>(\"User\")({ name: Schema.String }) {}\n\nexport const preview = new User({ name: \"John\" })\n",
201251
+ "diagnostics": [{
201252
+ "start": 135,
201253
+ "end": 139,
201254
+ "text": "This Schema class is constructed with `new`. `User.make(...)` can be used to construct the Schema class instance. effect(newSchemaClass)"
201255
+ }]
201256
+ }
201257
+ },
201224
201258
  {
201225
201259
  "name": "redundantMapError",
201226
201260
  "group": "style",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.9.0",
3
+ "version": "0.11.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.9.0",
26
- "@effect/tsgo-win32-arm64": "0.9.0",
27
- "@effect/tsgo-linux-x64": "0.9.0",
28
- "@effect/tsgo-linux-arm64": "0.9.0",
29
- "@effect/tsgo-linux-arm": "0.9.0",
30
- "@effect/tsgo-darwin-x64": "0.9.0",
31
- "@effect/tsgo-darwin-arm64": "0.9.0"
25
+ "@effect/tsgo-win32-x64": "0.11.0",
26
+ "@effect/tsgo-win32-arm64": "0.11.0",
27
+ "@effect/tsgo-linux-x64": "0.11.0",
28
+ "@effect/tsgo-linux-arm64": "0.11.0",
29
+ "@effect/tsgo-linux-arm": "0.11.0",
30
+ "@effect/tsgo-darwin-arm64": "0.11.0",
31
+ "@effect/tsgo-darwin-x64": "0.11.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@effect/platform-node": "^4.0.0-beta.66",