@effect/tsgo 0.8.0 → 0.9.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
@@ -58,6 +58,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
58
58
  <tr><td><code>globalErrorInEffectCatch</code></td><td>⚠️</td><td></td><td>Warns when catch callbacks return global Error type instead of typed errors</td><td>✓</td><td>✓</td></tr>
59
59
  <tr><td><code>globalErrorInEffectFailure</code></td><td>⚠️</td><td></td><td>Warns when the global Error type is used in an Effect failure channel</td><td>✓</td><td>✓</td></tr>
60
60
  <tr><td><code>layerMergeAllWithDependencies</code></td><td>⚠️</td><td>🔧</td><td>Detects interdependencies in Layer.mergeAll calls where one layer provides a service that another layer requires</td><td>✓</td><td>✓</td></tr>
61
+ <tr><td><code>lazyEffect</code></td><td>💡</td><td></td><td>Suggests avoiding exported zero-argument functions and service members that lazily return Effect or Stream values</td><td></td><td>✓</td></tr>
61
62
  <tr><td><code>lazyPromiseInEffectSync</code></td><td>⚠️</td><td></td><td>Warns when Effect.sync lazily returns a Promise instead of using an async Effect constructor</td><td>✓</td><td>✓</td></tr>
62
63
  <tr><td><code>leakingRequirements</code></td><td>💡</td><td></td><td>Detects implementation services leaked in service methods</td><td>✓</td><td>✓</td></tr>
63
64
  <tr><td><code>multipleEffectProvide</code></td><td>⚠️</td><td>🔧</td><td>Warns against chaining Effect.provide calls which can cause service lifecycle issues</td><td>✓</td><td>✓</td></tr>
@@ -86,7 +87,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
86
87
  <tr><td><code>instanceOfSchema</code></td><td>➖</td><td>🔧</td><td>Suggests using Schema.is instead of instanceof for Effect Schema types</td><td>✓</td><td>✓</td></tr>
87
88
  <tr><td><code>newPromise</code></td><td>➖</td><td></td><td>Warns when constructing promises with new Promise instead of using Effect APIs</td><td>✓</td><td>✓</td></tr>
88
89
  <tr><td><code>nodeBuiltinImport</code></td><td>➖</td><td></td><td>Warns when importing Node.js built-in modules that have Effect-native counterparts</td><td>✓</td><td>✓</td></tr>
89
- <tr><td><code>preferSchemaOverJson</code></td><td>💡</td><td></td><td>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td><td>✓</td><td>✓</td></tr>
90
+ <tr><td><code>preferSchemaOverJson</code></td><td>➖</td><td></td><td>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td><td>✓</td><td>✓</td></tr>
90
91
  <tr><td><code>processEnv</code></td><td>➖</td><td></td><td>Warns when reading process.env outside Effect generators instead of using Effect Config</td><td>✓</td><td>✓</td></tr>
91
92
  <tr><td><code>processEnvInEffect</code></td><td>➖</td><td></td><td>Warns when reading process.env inside Effect generators instead of using Effect Config</td><td>✓</td><td>✓</td></tr>
92
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>
@@ -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.8.0";
199262
+ var version = "0.9.0";
199263
199263
 
199264
199264
  //#endregion
199265
199265
  //#region src/setup/consts.ts
@@ -200503,6 +200503,23 @@ var rules = [
200503
200503
  }]
200504
200504
  }
200505
200505
  },
200506
+ {
200507
+ "name": "lazyEffect",
200508
+ "group": "antipattern",
200509
+ "description": "Suggests avoiding exported zero-argument functions and service members that lazily return Effect or Stream values",
200510
+ "defaultSeverity": "suggestion",
200511
+ "fixable": false,
200512
+ "supportedEffect": ["v4"],
200513
+ "codes": [377091],
200514
+ "preview": {
200515
+ "sourceText": "import { Effect } from \"effect\"\n\nexport interface PreviewService {\n preview: () => Effect.Effect<void>\n}\n",
200516
+ "diagnostics": [{
200517
+ "start": 69,
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)"
200520
+ }]
200521
+ }
200522
+ },
200506
200523
  {
200507
200524
  "name": "lazyPromiseInEffectSync",
200508
200525
  "group": "antipattern",
@@ -200970,7 +200987,7 @@ var rules = [
200970
200987
  "name": "preferSchemaOverJson",
200971
200988
  "group": "effectNative",
200972
200989
  "description": "Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify",
200973
- "defaultSeverity": "suggestion",
200990
+ "defaultSeverity": "off",
200974
200991
  "fixable": false,
200975
200992
  "supportedEffect": ["v3", "v4"],
200976
200993
  "codes": [377026],
@@ -200979,7 +200996,7 @@ var rules = [
200979
200996
  "diagnostics": [{
200980
200997
  "start": 142,
200981
200998
  "end": 158,
200982
- "text": "This code uses `JSON.parse` or `JSON.stringify`. Effect Schema provides Effect-aware APIs for JSON parsing and stringifying. effect(preferSchemaOverJson)"
200999
+ "text": "This code uses `JSON.parse` or `JSON.stringify`. Use `Schema.UnknownFromJsonString` for unknown shapes, `Schema.fromJsonString(schema)` for known ones, or `Schema.toCodecJson(schema)` when working with JSON values instead of strings. effect(preferSchemaOverJson)"
200983
201000
  }]
200984
201001
  }
200985
201002
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.8.0",
3
+ "version": "0.9.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.8.0",
26
- "@effect/tsgo-win32-arm64": "0.8.0",
27
- "@effect/tsgo-linux-x64": "0.8.0",
28
- "@effect/tsgo-linux-arm64": "0.8.0",
29
- "@effect/tsgo-linux-arm": "0.8.0",
30
- "@effect/tsgo-darwin-x64": "0.8.0",
31
- "@effect/tsgo-darwin-arm64": "0.8.0"
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"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@effect/platform-node": "^4.0.0-beta.66",