@effect/language-service 0.63.2 → 0.64.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
@@ -49,6 +49,7 @@ And you're done! You'll now be able to use a set of refactors and diagnostics th
49
49
  ### Diagnostics
50
50
 
51
51
  - Better error readability when you're missing errors or service types in your Effect definitions
52
+ - Better error readability when you're missing service requirements in your Layer definitions
52
53
  - Floating Effects that are not yielded or run
53
54
  - Wrong usage of yield inside `Effect.gen`
54
55
  - Multiple versions of Effect in your project
@@ -70,11 +71,13 @@ And you're done! You'll now be able to use a set of refactors and diagnostics th
70
71
  - Detect nested function calls that can be converted to pipeable style for better readability
71
72
  - Warn when using catch functions (`catchAll`, `catch`, `catchIf`, `catchSome`, `catchTag`, `catchTags`) on effects that never fail
72
73
  - Warn when catch callbacks in `Effect.tryPromise`, `Effect.tryMap`, or `Effect.tryMapPromise` return `unknown` or `any` types
74
+ - Warn when catch callbacks in `Effect.tryPromise`, `Effect.try`, `Effect.tryMap`, or `Effect.tryMapPromise` return the global `Error` type instead of typed errors
73
75
  - Warn when using `Effect.runSync`, `Effect.runPromise`, `Effect.runFork`, or `Effect.runCallback` inside an Effect
74
76
  - Warn when using `Schema.Union` with multiple `Schema.Literal` calls that can be simplified to a single `Schema.Literal` call
75
77
  - Suggest using `Schema.TaggedStruct` instead of `Schema.Struct` when a `_tag` field with `Schema.Literal` is present to make the tag optional in the constructor
76
78
  - Warn when using `yield* Effect.fail()` with yieldable error types that can be yielded directly
77
79
  - Warn when using `Effect.fail` with the global `Error` type, recommending tagged errors
80
+ - Warn when `Layer.mergeAll` contains layers with interdependencies (where one layer provides a service that another layer in the same call requires)
78
81
 
79
82
  ### Completions
80
83
 
@@ -247,6 +250,47 @@ Patches (or re-patches) your local TypeScript installation to provide Effect dia
247
250
  ### `effect-language-service unpatch`
248
251
  Revery any previously applied patch to the local TypeScript installation.
249
252
 
253
+ ### `effect-language-service overview`
254
+ This command is useful to provide an overview of Effect-related exports in your files or project, and is very useful for LLMs to grasp an overall idea of what a file/project offers. Use `--file` to analyze a specific file, or `--project` with a tsconfig file to analyze an entire project.
255
+
256
+ Example output:
257
+ ```
258
+ ✔ Processed 3 file(s)
259
+
260
+ Yieldable Errors (2)
261
+ NotFoundError
262
+ ./src/errors.ts:5:1
263
+ NotFoundError
264
+ Thrown when a resource is not found
265
+
266
+ ValidationError
267
+ ./src/errors.ts:12:1
268
+ ValidationError
269
+ Thrown when input validation fails
270
+
271
+ Services (2)
272
+ DbConnection
273
+ ./src/services/db.ts:6:1
274
+ DbConnection
275
+ Manages database connections and pooling
276
+
277
+ Cache
278
+ ./src/services/cache.ts:13:1
279
+ Cache
280
+ In-memory caching layer
281
+
282
+ Layers (2)
283
+ CacheLive
284
+ ./src/layers/cache.ts:34:14
285
+ Layer<Cache, never, never>
286
+ Provides cache with file system backing
287
+
288
+ AppLive
289
+ ./src/layers/app.ts:39:14
290
+ Layer<Cache | UserRepository, never, never>
291
+ Complete application layer
292
+ ```
293
+
250
294
  ## Configuring diagnostics
251
295
 
252
296
  You can either disable or change the severity of specific diagnostics by using comments in your code.