All checks were successful
Lint / lint (push) Successful in 11s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.49.0` -> `^0.54.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.49.0/0.54.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Effect-TS/language-service (@​effect/language-service)</summary> ### [`v0.54.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0540) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.53.3...v0.54.0) ##### Minor Changes - [#​476](https://github.com/Effect-TS/language-service/pull/476) [`9d5028c`](9d5028c92c) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `unknownInEffectCatch` diagnostic to warn when catch callbacks in `Effect.tryPromise`, `Effect.tryMap`, or `Effect.tryMapPromise` return `unknown` or `any` types. This helps ensure proper error typing by encouraging developers to wrap unknown errors into Effect's `Data.TaggedError` or narrow down the type to the specific error being raised. Example: ```typescript // ❌ Will trigger diagnostic const program = Effect.tryPromise({ try: () => fetch("http://something"), catch: (e) => e, // returns unknown }); // ✅ Proper typed error class MyError extends Data.TaggedError("MyError")<{ cause: unknown }> {} const program = Effect.tryPromise({ try: () => fetch("http://something"), catch: (e) => new MyError({ cause: e }), }); ``` ##### Patch Changes - [#​475](https://github.com/Effect-TS/language-service/pull/475) [`9f2425e`](9f2425e65e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix TSC patching mode to properly filter diagnostics by module name. The `reportSuggestionsAsWarningsInTsc` option now only affects the TSC module and not the TypeScript module, preventing suggestions from being incorrectly reported in non-TSC contexts. ### [`v0.53.3`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0533) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.53.2...v0.53.3) ##### Patch Changes - [#​473](https://github.com/Effect-TS/language-service/pull/473) [`b29eca5`](b29eca54ae) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix memory leak in CLI diagnostics by properly disposing language services when they change between batches. The CLI diagnostics command now tracks the language service instance and disposes of it when a new instance is created, preventing memory accumulation during batch processing of large codebases. - [#​474](https://github.com/Effect-TS/language-service/pull/474) [`06b9ac1`](06b9ac1439) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix TSC patching mode to properly enable diagnosticsName option and simplify suggestion handling. When using the language service in TSC patching mode, the `diagnosticsName` option is now automatically enabled to ensure diagnostic rule names are included in the output. Additionally, the handling of suggestion-level diagnostics has been simplified - when `reportSuggestionsAsWarningsInTsc` is enabled, suggestions are now converted to Message category instead of Warning category with a prefix. This change ensures consistent diagnostic formatting across both IDE and CLI usage modes. - [#​471](https://github.com/Effect-TS/language-service/pull/471) [`be70748`](be70748806) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve CLI diagnostics output formatting by displaying rule names in a more readable format. The CLI now displays diagnostic rule names using the format `effect(ruleName):` instead of `TS<code>:`, making it easier to identify which Effect diagnostic rule triggered the error. Additionally, the CLI now disables the `diagnosticsName` option internally to prevent duplicate rule name display in the message text. Example output: ``` Before: TS90001: Floating Effect detected... After: effect(floatingEffect): Floating Effect detected... ``` ### [`v0.53.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0532) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.53.1...v0.53.2) ##### Patch Changes - [#​469](https://github.com/Effect-TS/language-service/pull/469) [`f27be56`](f27be56a61) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `reportSuggestionsAsWarningsInTsc` configuration option to allow suggestions and messages to be reported as warnings in TypeScript compiler. When enabled, diagnostics with "suggestion" or "message" severity will be upgraded to "warning" severity with a "\[suggestion]" prefix in the message text. This is useful for CI/CD pipelines where you want to enforce suggestion-level diagnostics as warnings in the TypeScript compiler output. Example configuration: ```json { "compilerOptions": { "plugins": [ { "name": "@​effect/language-service", "reportSuggestionsAsWarningsInTsc": true } ] } } ``` ### [`v0.53.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0531) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.53.0...v0.53.1) ##### Patch Changes - [#​467](https://github.com/Effect-TS/language-service/pull/467) [`c2f6e50`](c2f6e5036b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix layer graph display improvements: properly render newlines in mermaid diagrams using `<br/>` tags, and improve readability by displaying variable declaration names instead of full expressions when available. Example: Instead of showing the entire `pipe(Database.Default, Layer.provideMerge(UserRepository.Default))` expression in the graph node, it now displays the cleaner variable name `AppLive` when the layer is assigned to a variable. ### [`v0.53.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0530) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.52.1...v0.53.0) ##### Minor Changes - [#​466](https://github.com/Effect-TS/language-service/pull/466) [`e76e9b9`](e76e9b9045) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add support for following symbols in Layer Graph visualization The layer graph feature now supports following symbol references to provide deeper visualization of layer dependencies. This is controlled by the new `layerGraphFollowDepth` configuration option (default: 0). Example: ```typescript // With layerGraphFollowDepth: 1 export const myLayer = otherLayer.pipe(Layer.provide(DbConnection.Default)); // Now visualizes the full dependency tree by following the 'otherLayer' reference ``` ##### Patch Changes - [#​464](https://github.com/Effect-TS/language-service/pull/464) [`4cbd549`](4cbd5499a5) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix layer graph for expression nodes not returning layers directly ### [`v0.52.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0521) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.52.0...v0.52.1) ##### Patch Changes - [#​462](https://github.com/Effect-TS/language-service/pull/462) [`4931bbd`](4931bbd5d4) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Skip patching again by default, unless --force option is provided ### [`v0.52.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0520) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.51.1...v0.52.0) ##### Minor Changes - [#​460](https://github.com/Effect-TS/language-service/pull/460) [`1ac81a0`](1ac81a0edb) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new diagnostic `catchUnfailableEffect` to warn when using catch functions on effects that never fail This diagnostic detects when catch error handling functions are applied to effects that have a `never` error type (meaning they cannot fail). It supports all Effect catch variants: - `Effect.catchAll` - `Effect.catch` - `Effect.catchIf` - `Effect.catchSome` - `Effect.catchTag` - `Effect.catchTags` Example: ```typescript // Will trigger diagnostic const example = Effect.succeed(42).pipe( Effect.catchAll(() => Effect.void) // <- Warns here ); // Will not trigger diagnostic const example2 = Effect.fail("error").pipe( Effect.catchAll(() => Effect.succeed(42)) ); ``` The diagnostic works in both pipeable style (`Effect.succeed(x).pipe(Effect.catchAll(...))`) and data-first style (`pipe(Effect.succeed(x), Effect.catchAll(...))`), analyzing the error type at each position in the pipe chain. - [#​458](https://github.com/Effect-TS/language-service/pull/458) [`372a9a7`](372a9a767b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Refactor TypeParser internals to use symbol-based navigation instead of type-based navigation This change improves the reliability and performance of the TypeParser by switching from type-based navigation to symbol-based navigation when identifying Effect, Schema, and other Effect ecosystem APIs. The new implementation: - Uses TypeScript's symbol resolution APIs to accurately identify imports and references - Supports package name resolution to verify that identifiers actually reference the correct packages - Implements proper alias resolution for imported symbols - Adds caching for source file package information lookups - Provides new helper methods like `isNodeReferenceToEffectModuleApi` and `isNodeReferenceToEffectSchemaModuleApi` This is an internal refactoring that doesn't change the public API or functionality, but provides a more robust foundation for the language service features. ### [`v0.51.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0511) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.51.0...v0.51.1) ##### Patch Changes - [#​456](https://github.com/Effect-TS/language-service/pull/456) [`ddc3da8`](ddc3da8771) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Bug fix for layer graph: properly display dependencies when they reference themselves The layer graph now correctly identifies and displays dependencies even when using type assignment compatibility (e.g., when a layer provides a base type and another layer requires a subtype). ### [`v0.51.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0510) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.50.0...v0.51.0) ##### Minor Changes - [#​452](https://github.com/Effect-TS/language-service/pull/452) [`fb0ae8b`](fb0ae8bf7b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `strictEffectProvide` diagnostic to warn when using Effect.provide with Layer outside of application entry points This new diagnostic helps developers identify potential scope lifetime issues by detecting when `Effect.provide` is called with a Layer argument in locations that are not application entry points. **Example:** ```typescript // Will trigger diagnostic export const program = Effect.void.pipe(Effect.provide(MyService.Default)); ``` **Message:** > Effect.provide with a Layer should only be used at application entry points. If this is an entry point, you can safely disable this diagnostic. Otherwise, using Effect.provide may break scope lifetimes. Compose all layers at your entry point and provide them at once. **Configuration:** - **Default severity**: `"off"` (opt-in) - **Diagnostic name**: `strictEffectProvide` This diagnostic is disabled by default and can be enabled via tsconfig.json: ```json { "compilerOptions": { "plugins": [ { "name": "@​effect/language-service", "diagnosticSeverity": { "strictEffectProvide": "warning" } } ] } } ``` ##### Patch Changes - [#​455](https://github.com/Effect-TS/language-service/pull/455) [`11743b5`](11743b5144) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Bug fix for `missedPipeableOpportunity` diagnostic ### [`v0.50.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0500) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.49.0...v0.50.0) ##### Minor Changes - [#​450](https://github.com/Effect-TS/language-service/pull/450) [`3994aaf`](3994aafb7d) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new diagnostic to detect nested function calls that can be converted to pipeable style The new `missedPipeableOpportunity` diagnostic identifies nested function calls that would be more readable when converted to Effect's pipeable style. For example: ```ts // Detected pattern: toString(double(addOne(5))); // Can be converted to: addOne(5).pipe(double, toString); ``` This diagnostic helps maintain consistent code style and improves readability by suggesting the more idiomatic pipeable approach when multiple functions are chained together. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNjUuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE2OS4xIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: #21 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud>
99 KiB
99 KiB