@effect/tsgo 0.5.1 → 0.6.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
@@ -89,6 +89,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
89
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
90
  <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
91
  <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
+ <tr><td><code>unsafeEffectTypeAssertion</code></td><td>➖</td><td>🔧</td><td>Detects unsafe type assertions that narrow Effect error or requirements channels</td><td>✓</td><td>✓</td></tr>
92
93
  <tr><td colspan="6"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
93
94
  <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>
94
95
  <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>
@@ -198666,7 +198666,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
198666
198666
  //#endregion
198667
198667
  //#region package.json
198668
198668
  var name = "@effect/tsgo";
198669
- var version = "0.5.1";
198669
+ var version = "0.6.0";
198670
198670
 
198671
198671
  //#endregion
198672
198672
  //#region src/setup/consts.ts
@@ -199515,7 +199515,8 @@ var presets$1 = [{
199515
199515
  "nodeBuiltinImport": "warning",
199516
199516
  "preferSchemaOverJson": "warning",
199517
199517
  "processEnv": "warning",
199518
- "processEnvInEffect": "warning"
199518
+ "processEnvInEffect": "warning",
199519
+ "unsafeEffectTypeAssertion": "warning"
199519
199520
  }
199520
199521
  }];
199521
199522
  var rules = [
@@ -200423,6 +200424,23 @@ var rules = [
200423
200424
  }]
200424
200425
  }
200425
200426
  },
200427
+ {
200428
+ "name": "unsafeEffectTypeAssertion",
200429
+ "group": "effectNative",
200430
+ "description": "Detects unsafe type assertions that narrow Effect error or requirements channels",
200431
+ "defaultSeverity": "off",
200432
+ "fixable": true,
200433
+ "supportedEffect": ["v3", "v4"],
200434
+ "codes": [377075],
200435
+ "preview": {
200436
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const program: Effect.Effect<string, \"boom\", \"service\">\n\nexport const preview = program as Effect.Effect<string, never, never>\n",
200437
+ "diagnostics": [{
200438
+ "start": 121,
200439
+ "end": 167,
200440
+ "text": "This type assertion unsafely narrows the Effect error or requirements channels. effect(unsafeEffectTypeAssertion)"
200441
+ }]
200442
+ }
200443
+ },
200426
200444
  {
200427
200445
  "name": "catchAllToMapError",
200428
200446
  "group": "style",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.5.1",
3
+ "version": "0.6.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.5.1",
26
- "@effect/tsgo-win32-arm64": "0.5.1",
27
- "@effect/tsgo-linux-x64": "0.5.1",
28
- "@effect/tsgo-linux-arm64": "0.5.1",
29
- "@effect/tsgo-linux-arm": "0.5.1",
30
- "@effect/tsgo-darwin-x64": "0.5.1",
31
- "@effect/tsgo-darwin-arm64": "0.5.1"
25
+ "@effect/tsgo-win32-x64": "0.6.0",
26
+ "@effect/tsgo-win32-arm64": "0.6.0",
27
+ "@effect/tsgo-linux-x64": "0.6.0",
28
+ "@effect/tsgo-linux-arm64": "0.6.0",
29
+ "@effect/tsgo-linux-arm": "0.6.0",
30
+ "@effect/tsgo-darwin-x64": "0.6.0",
31
+ "@effect/tsgo-darwin-arm64": "0.6.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@effect/platform-node": "^4.0.0-beta.46",