@effect/tsgo 0.0.19 → 0.1.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 +17 -2
- package/dist/effect-tsgo.js +9 -5
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Effect Language Service (TypeScript-Go)
|
|
2
2
|
|
|
3
|
-
A wrapper around [TypeScript-Go](https://github.com/nicolo-ribaudo/TypeScript-Go) that builds the Effect Language Service, providing Effect-TS diagnostics and quick fixes.
|
|
3
|
+
A wrapper around [TypeScript-Go](https://github.com/nicolo-ribaudo/TypeScript-Go) that builds the Effect Language Service, providing Effect-TS diagnostics and quick fixes.
|
|
4
4
|
This project targets **Effect V4** (codename: "smol") primarily and also Effect V3.
|
|
5
5
|
|
|
6
6
|
## Currently in Alpha
|
|
@@ -21,6 +21,9 @@ This will guide you through the installation process, which includes:
|
|
|
21
21
|
3. Adjusting plugin options to your preference.
|
|
22
22
|
4. Hinting at any additional editor configuration needed to ensure the LSP is active.
|
|
23
23
|
|
|
24
|
+
> [!NOTE]
|
|
25
|
+
> At the moment, you still need the standard native TypeScript install (`@typescript/native-preview`) alongside `@effect/tsgo`.
|
|
26
|
+
|
|
24
27
|
## Diagnostic Status
|
|
25
28
|
|
|
26
29
|
Some diagnostics are off by default or have a default severity of suggestion, but you can always enable them or change their default severity in the plugin options.
|
|
@@ -58,7 +61,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
58
61
|
<tr><td><code>leakingRequirements</code></td><td>💡</td><td></td><td>Detects implementation services leaked in service methods</td><td>✓</td><td>✓</td></tr>
|
|
59
62
|
<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>
|
|
60
63
|
<tr><td><code>returnEffectInGen</code></td><td>💡</td><td>🔧</td><td>Warns when returning an Effect in a generator causes nested Effect<Effect<...>></td><td>✓</td><td>✓</td></tr>
|
|
61
|
-
<tr><td><code>runEffectInsideEffect</code></td><td>💡</td><td>🔧</td><td>Suggests using Runtime methods instead of Effect.run* inside Effect contexts</td><td>✓</td><td
|
|
64
|
+
<tr><td><code>runEffectInsideEffect</code></td><td>💡</td><td>🔧</td><td>Suggests using Runtime or Effect.run*With methods instead of Effect.run* inside Effect contexts</td><td>✓</td><td>✓</td></tr>
|
|
62
65
|
<tr><td><code>schemaSyncInEffect</code></td><td>💡</td><td></td><td>Suggests using Effect-based Schema methods instead of sync methods inside Effect generators</td><td>✓</td><td></td></tr>
|
|
63
66
|
<tr><td><code>scopeInLayerEffect</code></td><td>⚠️</td><td>🔧</td><td>Suggests using Layer.scoped instead of Layer.effect when Scope is in requirements</td><td>✓</td><td></td></tr>
|
|
64
67
|
<tr><td><code>strictEffectProvide</code></td><td>➖</td><td></td><td>Warns when using Effect.provide with layers outside of application entry points</td><td>✓</td><td>✓</td></tr>
|
|
@@ -184,10 +187,22 @@ Each release of `effect-tsgo` is built against a specific upstream `tsgo` commit
|
|
|
184
187
|
"plugins": [
|
|
185
188
|
{
|
|
186
189
|
"name": "@effect/language-service",
|
|
190
|
+
// Controls Effect refactors. (default: true)
|
|
191
|
+
"refactors": true,
|
|
192
|
+
// Controls Effect diagnostics. (default: true)
|
|
193
|
+
"diagnostics": true,
|
|
187
194
|
// Maps rule names to severity levels. Use {} to enable diagnostics with rule defaults. (default: {})
|
|
188
195
|
"diagnosticSeverity": {},
|
|
189
196
|
// When false, suggestion-level Effect diagnostics are omitted from tsc CLI output. (default: true)
|
|
190
197
|
"includeSuggestionsInTsc": true,
|
|
198
|
+
// Controls Effect quickinfo. (default: true)
|
|
199
|
+
"quickinfo": true,
|
|
200
|
+
// Controls Effect completions. (default: true)
|
|
201
|
+
"completions": true,
|
|
202
|
+
// Controls Effect goto references support. (default: true)
|
|
203
|
+
"goto": true,
|
|
204
|
+
// Controls Effect rename helpers. (default: true)
|
|
205
|
+
"renames": true,
|
|
191
206
|
// When true, suggestion diagnostics do not affect the tsc exit code. (default: true)
|
|
192
207
|
"ignoreEffectSuggestionsInTscExitCode": true,
|
|
193
208
|
// When true, warning diagnostics do not affect the tsc exit code. (default: false)
|
package/dist/effect-tsgo.js
CHANGED
|
@@ -197344,7 +197344,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
|
|
|
197344
197344
|
//#endregion
|
|
197345
197345
|
//#region package.json
|
|
197346
197346
|
var name = "@effect/tsgo";
|
|
197347
|
-
var version = "0.0
|
|
197347
|
+
var version = "0.1.0";
|
|
197348
197348
|
|
|
197349
197349
|
//#endregion
|
|
197350
197350
|
//#region src/setup/consts.ts
|
|
@@ -198594,17 +198594,21 @@ var rules = [
|
|
|
198594
198594
|
{
|
|
198595
198595
|
"name": "runEffectInsideEffect",
|
|
198596
198596
|
"group": "antipattern",
|
|
198597
|
-
"description": "Suggests using Runtime methods instead of Effect.run* inside Effect contexts",
|
|
198597
|
+
"description": "Suggests using Runtime or Effect.run*With methods instead of Effect.run* inside Effect contexts",
|
|
198598
198598
|
"defaultSeverity": "suggestion",
|
|
198599
198599
|
"fixable": true,
|
|
198600
|
-
"supportedEffect": ["v3"],
|
|
198601
|
-
"codes": [
|
|
198600
|
+
"supportedEffect": ["v3", "v4"],
|
|
198601
|
+
"codes": [
|
|
198602
|
+
377024,
|
|
198603
|
+
377025,
|
|
198604
|
+
377074
|
|
198605
|
+
],
|
|
198602
198606
|
"preview": {
|
|
198603
198607
|
"sourceText": "import { Effect } from \"effect\"\n\nexport const preview = Effect.gen(function*() {\n const run = () => Effect.runSync(Effect.succeed(1))\n return run()\n})\n",
|
|
198604
198608
|
"diagnostics": [{
|
|
198605
198609
|
"start": 101,
|
|
198606
198610
|
"end": 115,
|
|
198607
|
-
"text": "Using Effect.runSync inside an Effect is not recommended. The same
|
|
198611
|
+
"text": "Using Effect.runSync inside an Effect is not recommended. The same services should generally be used instead to run child effects.\nConsider extracting the current services by using for example Effect.services and then use Effect.runSyncWith with the extracted services instead. effect(runEffectInsideEffect)"
|
|
198608
198612
|
}]
|
|
198609
198613
|
}
|
|
198610
198614
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.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.0
|
|
26
|
-
"@effect/tsgo-win32-arm64": "0.0
|
|
27
|
-
"@effect/tsgo-linux-x64": "0.0
|
|
28
|
-
"@effect/tsgo-linux-arm64": "0.0
|
|
29
|
-
"@effect/tsgo-linux-arm": "0.0
|
|
30
|
-
"@effect/tsgo-darwin-x64": "0.0
|
|
31
|
-
"@effect/tsgo-darwin-arm64": "0.0
|
|
25
|
+
"@effect/tsgo-win32-x64": "0.1.0",
|
|
26
|
+
"@effect/tsgo-win32-arm64": "0.1.0",
|
|
27
|
+
"@effect/tsgo-linux-x64": "0.1.0",
|
|
28
|
+
"@effect/tsgo-linux-arm64": "0.1.0",
|
|
29
|
+
"@effect/tsgo-linux-arm": "0.1.0",
|
|
30
|
+
"@effect/tsgo-darwin-x64": "0.1.0",
|
|
31
|
+
"@effect/tsgo-darwin-arm64": "0.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@effect/platform-node": "^4.0.0-beta.40",
|