13e908713a089dd57a97959c542d761e7534a23c
19 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a5fb8fe92a |
Update bun minor+patch updates (#29)
Lint / lint (push) Failing after 3s
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.60.0` → `^0.65.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.60.0/0.65.0) |  |  | | [@effect/platform](https://effect.website) ([source](https://github.com/Effect-TS/effect/tree/HEAD/packages/platform)) | [`^0.93.6` → `^0.94.0`](https://renovatebot.com/diffs/npm/@effect%2fplatform/0.93.8/0.94.1) |  |  | | [@effect/platform-browser](https://effect.website) ([source](https://github.com/Effect-TS/effect/tree/HEAD/packages/platform-browser)) | [`^0.73.0` → `^0.74.0`](https://renovatebot.com/diffs/npm/@effect%2fplatform-browser/0.73.0/0.74.0) |  |  | --- ### Release Notes <details> <summary>Effect-TS/language-service (@​effect/language-service)</summary> ### [`v0.65.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0650) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.64.1...v0.65.0) ##### Minor Changes - [#​581](https://github.com/Effect-TS/language-service/pull/581) [`4569328`](https://github.com/Effect-TS/language-service/commit/456932800d7abe81e14d910b25d91399277a23f5) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `effectFnOpportunity` diagnostic that suggests converting functions returning `Effect.gen` to `Effect.fn` for better tracing and concise syntax. The diagnostic triggers on: - Arrow functions returning `Effect.gen(...)` - Function expressions returning `Effect.gen(...)` - Function declarations returning `Effect.gen(...)` - Functions with `Effect.gen(...).pipe(...)` patterns It provides two code fixes: - Convert to `Effect.fn` (traced) - includes the function name as the span name - Convert to `Effect.fnUntraced` - without tracing The diagnostic skips: - Generator functions (can't be converted) - Named function expressions (typically used for recursion) - Functions with multiple call signatures (overloads) When the original function has a return type annotation, the converted function will use `Effect.fn.Return<A, E, R>` as the return type. Example: ```ts // Before export const myFunction = (a: number) => Effect.gen(function* () { yield* Effect.succeed(1); return a; }); // After (with Effect.fn) export const myFunction = Effect.fn("myFunction")(function* (a: number) { yield* Effect.succeed(1); return a; }); // Before (with pipe) export const withPipe = () => Effect.gen(function* () { return yield* Effect.succeed(1); }).pipe(Effect.withSpan("withPipe")); // After (with Effect.fn) export const withPipe = Effect.fn("withPipe")(function* () { return yield* Effect.succeed(1); }, Effect.withSpan("withPipe")); ``` - [#​575](https://github.com/Effect-TS/language-service/pull/575) [`00aeed0`](https://github.com/Effect-TS/language-service/commit/00aeed0c8aadcd0b0c521e4339aa6a1a18eae772) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `effectMapVoid` diagnostic that suggests using `Effect.asVoid` instead of `Effect.map(() => void 0)`, `Effect.map(() => undefined)`, or `Effect.map(() => {})`. Also adds two new TypeParser utilities: - `lazyExpression`: matches zero-argument arrow functions or function expressions that return a single expression - `emptyFunction`: matches arrow functions or function expressions with an empty block body And adds `isVoidExpression` utility to TypeScriptUtils for detecting `void 0` or `undefined` expressions. Example: ```ts // Before Effect.succeed(1).pipe(Effect.map(() => void 0)); Effect.succeed(1).pipe(Effect.map(() => undefined)); Effect.succeed(1).pipe(Effect.map(() => {})); // After (suggested fix) Effect.succeed(1).pipe(Effect.asVoid); ``` - [#​582](https://github.com/Effect-TS/language-service/pull/582) [`94d4a6b`](https://github.com/Effect-TS/language-service/commit/94d4a6bcaa39d8b33e66390d1ead5b1da1a8f16f) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Added `layerinfo` CLI command that provides detailed information about a specific exported layer. Features: - Shows layer type, location, and description - Lists services the layer provides and requires - Suggests optimal layer composition order using `Layer.provide`, `Layer.provideMerge`, and `Layer.merge` Example usage: ```bash effect-language-service layerinfo --file ./src/layers/app.ts --name AppLive ``` Also added a tip to both `overview` and `layerinfo` commands about using `Layer.mergeAll(...)` to get suggested composition order. - [#​583](https://github.com/Effect-TS/language-service/pull/583) [`b0aa78f`](https://github.com/Effect-TS/language-service/commit/b0aa78fb75f2afed944fb062e8e74ec6eb1492c1) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `redundantSchemaTagIdentifier` diagnostic that suggests removing redundant identifier arguments when they equal the tag value in `Schema.TaggedClass`, `Schema.TaggedError`, or `Schema.TaggedRequest`. **Before:** ```typescript class MyError extends Schema.TaggedError<MyError>("MyError")("MyError", { message: Schema.String, }) {} ``` **After applying the fix:** ```typescript class MyError extends Schema.TaggedError<MyError>()("MyError", { message: Schema.String, }) {} ``` Also updates the completions to not include the redundant identifier when autocompleting `Schema.TaggedClass`, `Schema.TaggedError`, and `Schema.TaggedRequest`. - [#​573](https://github.com/Effect-TS/language-service/pull/573) [`6715f91`](https://github.com/Effect-TS/language-service/commit/6715f9131059737cf4b2d2988d7981971943ac0e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Rename `reportSuggestionsAsWarningsInTsc` option to `includeSuggestionsInTsc` and change default to `true`. This option controls whether diagnostics with "suggestion" severity are included in TSC output when using the `effect-language-service patch` feature. When enabled, suggestions are reported as messages in TSC output, which is useful for LLM-based development tools to see all suggestions. **Breaking change**: The option has been renamed and the default behavior has changed: - Old: `reportSuggestionsAsWarningsInTsc: false` (suggestions not included by default) - New: `includeSuggestionsInTsc: true` (suggestions included by default) To restore the previous behavior, set `"includeSuggestionsInTsc": false` in your tsconfig.json plugin configuration. - [#​586](https://github.com/Effect-TS/language-service/pull/586) [`e225b5f`](https://github.com/Effect-TS/language-service/commit/e225b5fb242d269b75eb6a04c89ae6372e53c8ec) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add markdown documentation support to setup command The setup command now automatically manages Effect Language Service documentation in AGENTS.md and CLAUDE.md files: - When installing: Adds or updates the Effect Language Service section with markers - When uninstalling: Removes the section if present - Case-insensitive file detection (supports both lowercase and uppercase filenames) - Skips symlinked files to avoid modifying linked content - Shows proper diff view for markdown file changes Example section added to markdown files: ```markdown <!-- effect-language-service:start --> ## Effect Language Service The Effect Language Service comes in with a useful CLI that can help you with commands to get a better understanding your Effect Layers and Services, and to help you compose them correctly. <!-- effect-language-service:end --> ``` ##### Patch Changes - [#​580](https://github.com/Effect-TS/language-service/pull/580) [`a45606b`](https://github.com/Effect-TS/language-service/commit/a45606b2b0d64bd06436c1e6c3a1c5410dcda6a9) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `Effect.fn` and `Effect.fnUntraced` support to the piping flows parser. The piping flows parser now recognizes pipe transformations passed as additional arguments to `Effect.fn`, `Effect.fn("traced")`, and `Effect.fnUntraced`. This enables diagnostics like `catchAllToMapError`, `catchUnfailableEffect`, and `multipleEffectProvide` to work with these patterns. Example: ```ts // This will now trigger the catchAllToMapError diagnostic const example = Effect.fn( function* () { return yield* Effect.fail("error"); }, Effect.catchAll((cause) => Effect.fail(new MyError(cause))) ); ``` - [#​587](https://github.com/Effect-TS/language-service/pull/587) [`7316859`](https://github.com/Effect-TS/language-service/commit/7316859ba221a212d3e8adcf458032e5c5d1b354) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Mark deprecated TypeScript Signature methods and migrate to property accessors Added `@deprecated` annotations to TypeScript Signature interface methods (`getParameters`, `getTypeParameters`, `getDeclaration`, `getReturnType`, `getTypeParameterAtPosition`) with guidance to use their modern property alternatives. Updated codebase usage of `getParameters()` to use `.parameters` property instead. - [#​584](https://github.com/Effect-TS/language-service/pull/584) [`ed12861`](https://github.com/Effect-TS/language-service/commit/ed12861c12a1fa1298fd53c97a5e01a2d02b96ac) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix TypeError in setup command when updating existing diagnosticSeverity configuration The setup command was throwing `TypeError: Cannot read properties of undefined (reading 'text')` when trying to update the `diagnosticSeverity` option of an existing `@effect/language-service` plugin configuration in tsconfig.json. This occurred because TypeScript's ChangeTracker formatter needed to compute indentation by traversing the AST tree, which failed when replacing a PropertyAssignment node inside a nested list context. The fix replaces just the initializer value (ObjectLiteralExpression) instead of the entire PropertyAssignment, avoiding the problematic list indentation calculation. - [#​585](https://github.com/Effect-TS/language-service/pull/585) [`7ebe5db`](https://github.com/Effect-TS/language-service/commit/7ebe5db2d60f36510e666e7c816623c0f9be88ab) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Enhanced `layerinfo` CLI command with output type selection for layer composition. **New Features:** - Added `--outputs` option to select which output types to include in the suggested composition (e.g., `--outputs 1,2,3`) - Shows all available output types from the layer graph with indexed checkboxes - By default, only types that are in the layer's declared `ROut` are selected - Composition code now includes `export const <name> = ...` prefix for easy copy-paste **Example output:** ``` Suggested Composition: Not sure you got your composition right? Just write all layers inside a Layer.mergeAll(...) then run this command again and use --outputs to select which outputs to include in composition. Example: --outputs 1,2,3 [ ] 1. Cache [x] 2. UserRepository export const simplePipeIn = UserRepository.Default.pipe( Layer.provide(Cache.Default) ) ``` This allows users to see all available outputs from a layer composition and choose which ones to include in the suggested composition order. - [#​577](https://github.com/Effect-TS/language-service/pull/577) [`0ed50c3`](https://github.com/Effect-TS/language-service/commit/0ed50c33c08ae6ae81fbd4af49ac4d75fd2b7f74) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Refactor `catchAllToMapError` diagnostic to use the piping flows parser for detecting Effect.catchAll calls. This change also: - Makes `outType` optional in `ParsedPipingFlowSubject` to handle cases where type information is unavailable - Sorts piping flows by position for consistent ordering - [#​578](https://github.com/Effect-TS/language-service/pull/578) [`cab6ce8`](https://github.com/Effect-TS/language-service/commit/cab6ce85ff2720c0d09cdb0b708d77d1917a50c5) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - refactor: use piping flows parser in catchUnfailableEffect diagnostic - [#​579](https://github.com/Effect-TS/language-service/pull/579) [`2a82522`](https://github.com/Effect-TS/language-service/commit/2a82522cdbcb59465ccb93dcb797f55d9408752c) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - refactor: use piping flows parser in multipleEffectProvide diagnostic - [#​570](https://github.com/Effect-TS/language-service/pull/570) [`0db6e28`](https://github.com/Effect-TS/language-service/commit/0db6e28df1caba1bb5bc42faf82f8ffab276a184) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Refactor CLI overview command to extract symbol collection logic into reusable utility - Extract `collectSourceFileExportedSymbols` into `src/cli/utils/ExportedSymbols.ts` for reuse across CLI commands - Add `--max-symbol-depth` option to overview command (default: 3) to control how deep to traverse nested symbol properties - Add tests for the overview command with snapshot testing - [#​574](https://github.com/Effect-TS/language-service/pull/574) [`9d0695e`](https://github.com/Effect-TS/language-service/commit/9d0695e3c82333400575a9d266cad4ac6af45ccc) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Remove deprecated ts-patch documentation from README. The Effect LSP CLI Patch is now the only recommended approach for getting diagnostics at compile time. - [#​576](https://github.com/Effect-TS/language-service/pull/576) [`5017d75`](https://github.com/Effect-TS/language-service/commit/5017d75f1db93f6e5d8c1fc0d8ea26c2b2db613a) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add piping flows parser for caching piping flow analysis per source file. This internal improvement introduces a `pipingFlows` function in `TypeParser` that analyzes and caches all piping flows (both `pipe()` calls and `.pipe()` method chains) in a source file. The parser: - Identifies piping flows including nested pipes and mixed call styles (e.g., `Effect.map(effect, fn).pipe(...)`) - Tracks the subject, transformations, and intermediate types for each flow - Enables more efficient diagnostic implementations by reusing cached analysis The `missedPipeableOpportunity` diagnostic has been refactored to use this new parser, improving performance when analyzing files with multiple piping patterns. ### [`v0.64.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0641) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.64.0...v0.64.1) ##### Patch Changes - [#​568](https://github.com/Effect-TS/language-service/pull/568) [`477271d`](https://github.com/Effect-TS/language-service/commit/477271d4df19391dca4131a13c8962b134156272) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix auto-import with namespace import packages generating malformed code when the identifier is at the beginning of the file. When using `namespaceImportPackages` configuration and auto-completing an export like `isAnyKeyword` from `effect/SchemaAST`, the code was incorrectly generated as: ```ts SchemaAST.import * as SchemaAST from "effect/SchemaAST"; ``` Instead of the expected: ```ts import * as SchemaAST from "effect/SchemaAST"; SchemaAST.isAnyKeyword; ``` The fix ensures the import statement is added before the namespace prefix when both changes target position 0. ### [`v0.64.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0640) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.63.2...v0.64.0) ##### Minor Changes - [#​567](https://github.com/Effect-TS/language-service/pull/567) [`dcb3fe5`](https://github.com/Effect-TS/language-service/commit/dcb3fe5f36f5c2727870e1fbc148e2a935a1a77e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Added new diagnostic `catchAllToMapError` that suggests using `Effect.mapError` instead of `Effect.catchAll` + `Effect.fail` when the callback only wraps the error. Before: ```ts Effect.catchAll((cause) => Effect.fail(new MyError(cause))); ``` After: ```ts Effect.mapError((cause) => new MyError(cause)); ``` The diagnostic includes a quick fix that automatically transforms the code. - [#​555](https://github.com/Effect-TS/language-service/pull/555) [`0424000`](https://github.com/Effect-TS/language-service/commit/04240003bbcb04db1eda967153d185fd53a3f669) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `globalErrorInEffectCatch` diagnostic to detect global Error types in catch callbacks This new diagnostic warns when catch callbacks in `Effect.tryPromise`, `Effect.try`, `Effect.tryMap`, or `Effect.tryMapPromise` return the global `Error` type instead of typed errors. Using the global `Error` type in Effect failures is not recommended as they can get merged together, making it harder to distinguish between different error cases. Instead, it's better to use tagged errors (like `Data.TaggedError`) or custom errors with discriminator properties to enable proper type checking and error handling. Example of code that triggers the diagnostic: ```typescript Effect.tryPromise({ try: () => fetch("http://example.com"), catch: () => new Error("Request failed"), // ⚠️ Warning: returns global Error type }); ``` Recommended approach: ```typescript class FetchError extends Data.TaggedError("FetchError")<{ cause: unknown; }> {} Effect.tryPromise({ try: () => fetch("http://example.com"), catch: (e) => new FetchError({ cause: e }), // ✅ Uses typed error }); ``` This diagnostic also improves the clarity message for the `leakingRequirements` diagnostic by adding additional guidance on how services should be collected in the layer creation body. - [#​558](https://github.com/Effect-TS/language-service/pull/558) [`cc5feb1`](https://github.com/Effect-TS/language-service/commit/cc5feb146de351a5466e8f8476e5b9d9020c797e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `layerMergeAllWithDependencies` diagnostic to detect interdependencies in `Layer.mergeAll` calls This new diagnostic warns when `Layer.mergeAll` is called with layers that have interdependencies, where one layer provides a service that another layer in the same call requires. `Layer.mergeAll` creates layers in parallel, so dependencies between layers will not be satisfied. This can lead to runtime errors when trying to use the merged layer. Example of code that triggers the diagnostic: ```typescript export class DbConnection extends Effect.Service<DbConnection>()( "DbConnection", { succeed: {}, } ) {} export class FileSystem extends Effect.Service<FileSystem>()("FileSystem", { succeed: {}, }) {} export class Cache extends Effect.Service<Cache>()("Cache", { effect: Effect.as(FileSystem, {}), // Cache requires FileSystem }) {} // ⚠️ Warning on FileSystem.Default const layers = Layer.mergeAll( DbConnection.Default, FileSystem.Default, // This provides FileSystem Cache.Default // This requires FileSystem ); ``` Recommended approach: ```typescript // Provide FileSystem separately before merging const layers = Layer.mergeAll(DbConnection.Default, Cache.Default).pipe( Layer.provideMerge(FileSystem.Default) ); ``` The diagnostic correctly handles pass-through layers (layers that both provide and require the same type) and only reports on layers that actually provide dependencies needed by other layers in the same `mergeAll` call. - [#​557](https://github.com/Effect-TS/language-service/pull/557) [`83ce411`](https://github.com/Effect-TS/language-service/commit/83ce411288977606f8390641dc7127e36c6f3c5b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `missingLayerContext` diagnostic to detect missing service requirements in Layer definitions This new diagnostic provides better error readability when you're missing service requirements in your Layer type definitions. It works similarly to the existing `missingEffectContext` diagnostic but specifically checks the `RIn` (requirements input) parameter of Layer types. Example of code that triggers the diagnostic: ```typescript import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; class ServiceA extends Effect.Service<ServiceA>()("ServiceA", { succeed: { a: 1 }, }) {} class ServiceB extends Effect.Service<ServiceB>()("ServiceB", { succeed: { a: 2 }, }) {} declare const layerWithServices: Layer.Layer<ServiceA, never, ServiceB>; function testFn(layer: Layer.Layer<ServiceA>) { return layer; } // ⚠️ Error: Missing 'ServiceB' in the expected Layer context. testFn(layerWithServices); ``` The diagnostic helps catch type mismatches early by clearly indicating which service requirements are missing when passing layers between functions or composing layers together. - [#​562](https://github.com/Effect-TS/language-service/pull/562) [`57d5af2`](https://github.com/Effect-TS/language-service/commit/57d5af251d3e477a8cf4c41dfae4593cede4c960) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `overview` CLI command that provides an overview of Effect-related exports in a project. The command analyzes TypeScript files and reports all exported yieldable errors, services (Context.Tag, Effect.Tag, Effect.Service), and layers with their types, file locations, and JSDoc descriptions. A progress spinner shows real-time file processing status. Usage: ```bash effect-language-service overview --file path/to/file.ts effect-language-service overview --project tsconfig.json ``` Example output: ``` ✔ Processed 3 file(s) Overview for 3 file(s). Yieldable Errors (1) NotFoundError ./src/errors.ts:5:1 NotFoundError Services (2) DbConnection ./src/services/db.ts:6:1 Manages database connections Layers (1) AppLive ./src/layers/app.ts:39:14 Layer<Cache | UserRepository, never, never> ``` ##### Patch Changes - [#​561](https://github.com/Effect-TS/language-service/pull/561) [`c3b3bd3`](https://github.com/Effect-TS/language-service/commit/c3b3bd364ff3c0567995b3c12e579459b69448e7) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add descriptions to CLI commands using `Command.withDescription` for improved help output when using `--help` flag. - [#​565](https://github.com/Effect-TS/language-service/pull/565) [`2274aef`](https://github.com/Effect-TS/language-service/commit/2274aef53902f2c31443b7e504d2add0bf24d6e4) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix `unnecessaryPipe` diagnostic and refactor not working with namespace imports from `effect/Function` (e.g., `Function.pipe()` or `Fn.pipe()`) - [#​560](https://github.com/Effect-TS/language-service/pull/560) [`75a480e`](https://github.com/Effect-TS/language-service/commit/75a480ebce3c5dfe29f22ee9d556ba1a043ba91b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve diagnostic message for `unsupportedServiceAccessors` when used with `Effect.Tag` When the `unsupportedServiceAccessors` diagnostic is triggered on an `Effect.Tag` class (which doesn't allow disabling accessors), the message now includes a helpful suggestion to use `Context.Tag` instead: ```typescript export class MyService extends Effect.Tag("MyService")< MyService, { method: <A>(value: A) => Effect.Effect<A>; } >() {} // Diagnostic: Even if accessors are enabled, accessors for 'method' won't be available // because the signature have generic type parameters or multiple call signatures. // Effect.Tag does not allow to disable accessors, so you may want to use Context.Tag instead. ``` - [#​559](https://github.com/Effect-TS/language-service/pull/559) [`4c1f809`](https://github.com/Effect-TS/language-service/commit/4c1f809d2f88102652ceea67b93df8909b408d14) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve Layer Magic refactor ordering by considering both provided and required service counts The Layer Magic refactor now uses a combined ordering heuristic that considers both: 1. The number of services a layer provides 2. The number of services a layer requires This results in more optimal layer composition order, especially in complex dependency graphs where layers have varying numbers of dependencies. - [#​566](https://github.com/Effect-TS/language-service/pull/566) [`036c491`](https://github.com/Effect-TS/language-service/commit/036c49142581a1ea428205e3d3d1647963c556f9) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Simplify diagnostic messages for global Error type usage The diagnostic messages for `globalErrorInEffectCatch` and `globalErrorInEffectFailure` now use the more generic term "tagged errors" instead of "tagged errors (Data.TaggedError)" to provide cleaner, more concise guidance. ### [`v0.63.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0632) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.63.1...v0.63.2) ##### Patch Changes - [#​553](https://github.com/Effect-TS/language-service/pull/553) [`e64e3df`](https://github.com/Effect-TS/language-service/commit/e64e3dfe235398af388e7d3ffdd36dbd02422730) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - fix: ensure correct path resolution in CLI setup - Use `process.cwd()` explicitly in `path.resolve()` for consistent behavior - Resolve the selected tsconfig path to an absolute path before validation - Simplify error handling by using direct `yield*` for `TsConfigNotFoundError` ### [`v0.63.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0631) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.63.0...v0.63.1) ##### Patch Changes - [#​551](https://github.com/Effect-TS/language-service/pull/551) [`9b3d807`](https://github.com/Effect-TS/language-service/commit/9b3d8071ec3af88ce219cc5a6a96e792bbdca2a2) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - fix: resolve TypeScript from project's working directory The CLI now attempts to resolve TypeScript from the current working directory first before falling back to the package's bundled version. This ensures the CLI uses the same TypeScript version as the project being analyzed. ### [`v0.63.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0630) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.5...v0.63.0) ##### Minor Changes - [#​548](https://github.com/Effect-TS/language-service/pull/548) [`ef8c2de`](https://github.com/Effect-TS/language-service/commit/ef8c2de288a8450344157f726986a4f35736dd78) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `globalErrorInEffectFailure` diagnostic This diagnostic warns when `Effect.fail` is called with the global `Error` type. Using the global `Error` type in Effect failures is not recommended as they can get merged together, making it harder to distinguish between different error types. Instead, the diagnostic recommends using: - Tagged errors with `Data.TaggedError` - Custom error classes with a discriminator property (like `_tag`) Example: ```ts // This will trigger a warning Effect.fail(new Error("global error")); // These are recommended alternatives Effect.fail(new CustomError()); // where CustomError extends Data.TaggedError Effect.fail(new MyError()); // where MyError has a _tag property ``` - [#​545](https://github.com/Effect-TS/language-service/pull/545) [`c590b5a`](https://github.com/Effect-TS/language-service/commit/c590b5af59cc5b656c02ea6e03ba63d110ea65d3) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `effect-language-service setup` CLI command This new command provides an interactive wizard to guide users through the complete installation and configuration of the Effect Language Service. The setup command: - Analyzes your repository structure (package.json, tsconfig files) - Guides you through adding the package to devDependencies - Configures the TypeScript plugin in your tsconfig.json - Allows customizing diagnostic severity levels - Optionally adds prepare script for automatic patching - Optionally configures VS Code settings for workspace TypeScript usage - Shows a review of all changes before applying them Example usage: ```bash effect-language-service setup ``` The wizard will walk you through each step and show you exactly what changes will be made before applying them. - [#​550](https://github.com/Effect-TS/language-service/pull/550) [`4912ee4`](https://github.com/Effect-TS/language-service/commit/4912ee41531dc91ad0ba2828ea555cb79f2c6d9e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add support for `@effect/sql`'s `Model.Class` in completions and diagnostics - Added `effectSqlModelSelfInClasses` completion: Auto-completes the `Self` type parameter when extending `Model.Class` from `@effect/sql` - Extended `classSelfMismatch` diagnostic: Now detects when the `Self` type parameter in `Model.Class<Self>` doesn't match the actual class name Example: ```ts import { Model } from "@​effect/sql"; import * as Schema from "effect/Schema"; // Completion triggers after "Model." to generate the full class boilerplate export class User extends Model.Class<User>("User")({ id: Schema.String, }) {} // Diagnostic warns when Self type parameter doesn't match class name export class User extends Model.Class<WrongName>("User")({ // ^^^^^^^^^ Self type should be "User" id: Schema.String, }) {} ``` ##### Patch Changes - [#​547](https://github.com/Effect-TS/language-service/pull/547) [`9058a37`](https://github.com/Effect-TS/language-service/commit/9058a373ba1567a9336d0c3b36de981337757219) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - refactor: simplify `unnecessaryFailYieldableError` diagnostic implementation Changed the implementation to check if a type extends `Cause.YieldableError` on-demand rather than fetching all yieldable error types upfront. - [#​549](https://github.com/Effect-TS/language-service/pull/549) [`039f4b2`](https://github.com/Effect-TS/language-service/commit/039f4b21da6e1d6ae695ba26cce0516d09f86643) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `getTypeAtLocation` utility to `TypeCheckerUtils` This refactoring adds a new `getTypeAtLocation` function to `TypeCheckerUtils` that safely retrieves types while filtering out JSX-specific nodes (JSX elements, opening/closing tags, and JSX attributes) that could cause issues when calling `typeChecker.getTypeAtLocation`. The utility is now used across multiple diagnostics and features, reducing code duplication and ensuring consistent handling of edge cases: - `anyUnknownInErrorContext` - `catchUnfailableEffect` - `floatingEffect` - `globalErrorInEffectFailure` - `leakingRequirements` - `missedPipeableOpportunity` - `missingEffectServiceDependency` - `missingReturnYieldStar` - `multipleEffectProvide` - `nonObjectEffectServiceType` - `overriddenSchemaConstructor` - `returnEffectInGen` - `scopeInLayerEffect` - `strictBooleanExpressions` - `strictEffectProvide` - `unnecessaryFailYieldableError` - And other features like quick info, goto definition, and refactors ### [`v0.62.5`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0625) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.4...v0.62.5) ##### Patch Changes - [#​543](https://github.com/Effect-TS/language-service/pull/543) [`0b13f3c`](https://github.com/Effect-TS/language-service/commit/0b13f3c862b69a84e2b3368ab301a35af8a8bf63) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix unwanted autocompletions inside import declarations Previously, Effect.**, Option.**, and Either.\_\_ completions were incorrectly suggested inside import statements. This has been fixed by detecting when the completion is requested inside an import declaration and preventing these completions from appearing. Closes [#​541](https://github.com/Effect-TS/language-service/issues/541) ### [`v0.62.4`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0624) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.3...v0.62.4) ##### Patch Changes - [#​539](https://github.com/Effect-TS/language-service/pull/539) [`4cc88d2`](https://github.com/Effect-TS/language-service/commit/4cc88d2c72535ef7608c4c0b0ecdd8b676699874) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve layerMagic refactor to prioritize layers with more provided services The layerMagic refactor now uses a heuristic that prioritizes nodes with more provided services when generating layer composition code. This ensures that telemetry and tracing layers (which typically provide fewer services) are positioned as late as possible in the dependency graph, resulting in more intuitive and correct layer ordering. Example: When composing layers for services that depend on HttpClient with telemetry, the refactor now correctly places the telemetry layer (which provides fewer services) later in the composition chain. ### [`v0.62.3`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0623) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.2...v0.62.3) ##### Patch Changes - [#​537](https://github.com/Effect-TS/language-service/pull/537) [`e31c03b`](https://github.com/Effect-TS/language-service/commit/e31c03b086eebb2bb55f23cfb9eb4c26344785d7) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix counter increment timing in structural type to schema refactor to ensure proper naming of conflicting schemas (e.g., `User_1` instead of `User_0` for the first conflict) ### [`v0.62.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0622) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.1...v0.62.2) ##### Patch Changes - [#​535](https://github.com/Effect-TS/language-service/pull/535) [`361fc1e`](https://github.com/Effect-TS/language-service/commit/361fc1ee5b6cf7684e0cf1ff8806ef267936b9cd) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix duplicate schema names in "Refactor to Schema (Recursive Structural)" code generation. When the refactor encountered types with conflicting names, it was generating a unique suffix but not properly tracking the usage count, causing duplicate schema identifiers with different contents to be generated. This fix ensures that when a name conflict is detected and a unique suffix is added (e.g., `Tax`, `Tax_1`, `Tax_2`), the usage counter is properly incremented to prevent duplicate identifiers in the generated code. Fixes [#​534](https://github.com/Effect-TS/language-service/issues/534) ### [`v0.62.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0621) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.62.0...v0.62.1) ##### Patch Changes - [#​532](https://github.com/Effect-TS/language-service/pull/532) [`8f189aa`](https://github.com/Effect-TS/language-service/commit/8f189aa7d21b8a638e3bc9cf4fc834c684f1b70f) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix handling of read-only arrays in "Refactor to Schema (Recursive Structural)" code generation. The refactor now correctly distinguishes between mutable arrays (`Array<T>`) and read-only arrays (`ReadonlyArray<T>` or `readonly T[]`): - `Array<T>` is now converted to `Schema.mutable(Schema.Array(...))` to preserve mutability - `ReadonlyArray<T>` and `readonly T[]` are converted to `Schema.Array(...)` (read-only by default) This fixes compatibility issues with external libraries (like Stripe, BetterAuth) that expect mutable arrays in their API parameters. Fixes [#​531](https://github.com/Effect-TS/language-service/issues/531) ### [`v0.62.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0620) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.61.0...v0.62.0) ##### Minor Changes - [#​528](https://github.com/Effect-TS/language-service/pull/528) [`7dc14cf`](https://github.com/Effect-TS/language-service/commit/7dc14cfaebe737f4c13ebd55f30e39207a5029bb) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add typeToSchema codegen This adds a new `// @​effect-codegens typeToSchema` codegen that automatically generates Effect Schema classes from TypeScript types. Given a type alias with object members representing schemas to generate (e.g., `type ToGenerate = { UserSchema: User, TodoSchema: Todo }`), the codegen will create the corresponding Schema class definitions. The generated schemas: - Automatically detect and reuse existing schema definitions in the file - Support both type aliases and interfaces - Include outdated detection to warn when the source type changes - Work with the `outdatedEffectCodegen` diagnostic to provide automatic fix actions Example usage: ```typescript type User = { id: number; name: string; }; // @​effect-codegens typeToSchema export type ToGenerate = { UserSchema: User; }; // Generated by the codegen: export class UserSchema extends Schema.Class<UserSchema>("UserSchema")({ id: Schema.Number, name: Schema.String, }) {} ``` ##### Patch Changes - [#​530](https://github.com/Effect-TS/language-service/pull/530) [`5ecdc62`](https://github.com/Effect-TS/language-service/commit/5ecdc626dd6dcaad3e866b7e89decb10b99fca2d) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix `Refactor to Schema (Recursive Structural)` to support `exactOptionalPropertyTypes` When `exactOptionalPropertyTypes` is enabled in tsconfig, optional properties with types like `string | undefined` are not assignable to types defined as `prop?: string`. This fix generates `Schema.optionalWith(Schema.String, { exact: true })` instead of `Schema.optional(Schema.Union(Schema.Undefined, Schema.String))` to maintain type compatibility with external libraries that don't always include `undefined` in their optional property types. Example: ```typescript // With exactOptionalPropertyTypes enabled type User = { name?: string; // External library type (e.g., Stripe API) }; // Generated schema now uses: Schema.optionalWith(Schema.String, { exact: true }); // Instead of: Schema.optional(Schema.Union(Schema.Undefined, Schema.String)); ``` This ensures the generated schema maintains proper type compatibility with external libraries when using strict TypeScript configurations. ### [`v0.61.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0610) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.60.0...v0.61.0) ##### Minor Changes - [#​525](https://github.com/Effect-TS/language-service/pull/525) [`e2dbbad`](https://github.com/Effect-TS/language-service/commit/e2dbbad00b06fb576767a5330e1cca048480264a) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add Structural Type to Schema refactor Adds a new "Structural Type to Schema" refactor that converts TypeScript interfaces and type aliases to Effect Schema classes. This refactor analyzes the structure of types and generates appropriate Schema definitions, with intelligent detection and reuse of existing schemas. Example: ```typescript // Before export interface User { id: number; name: string; } // After (using the refactor) export class User extends Schema.Class<User>("User")({ id: Schema.Number, name: Schema.String, }) {} ``` The refactor supports: - All primitive types and common TypeScript constructs - Automatic reuse of existing Schema definitions for referenced types - Optional properties, unions, intersections, and nested structures - Both interface and type alias declarations </details> <details> <summary>Effect-TS/effect (@​effect/platform)</summary> ### [`v0.94.1`](https://github.com/Effect-TS/effect/blob/HEAD/packages/platform/CHANGELOG.md#0941) [Compare Source](https://github.com/Effect-TS/effect/compare/@effect/platform@0.94.0...@effect/platform@0.94.1) ##### Patch Changes - [#​5936](https://github.com/Effect-TS/effect/pull/5936) [`65e9e35`](https://github.com/Effect-TS/effect/commit/65e9e35157cbdfb40826ddad34555c4ebcf7c0b0) Thanks [@​schickling](https://github.com/schickling)! - Document subtle CORS middleware `allowedHeaders` behavior: when empty array (default), it reflects back the client's `Access-Control-Request-Headers` (permissive), and when non-empty array, it only allows specified headers (restrictive). Added comprehensive JSDoc with examples. - [#​5940](https://github.com/Effect-TS/effect/pull/5940) [`ee69cd7`](https://github.com/Effect-TS/effect/commit/ee69cd796feb3d8d1046f52edd8950404cd4ed0e) Thanks [@​kitlangton](https://github.com/kitlangton)! - HttpServerResponse: fix `fromWeb` to preserve Content-Type header when response has a body Previously, when converting a web `Response` to an `HttpServerResponse` via `fromWeb`, the `Content-Type` header was not passed to `Body.stream()`, causing it to default to `application/octet-stream`. This affected any code using `HttpApp.fromWebHandler` to wrap web handlers, as JSON responses would incorrectly have their Content-Type set to `application/octet-stream` instead of `application/json`. - Updated dependencies \[[`488d6e8`](https://github.com/Effect-TS/effect/commit/488d6e870eda3dfc137f4940bb69416f61ed8fe3)]: - effect\@​3.19.14 ### [`v0.94.0`](https://github.com/Effect-TS/effect/blob/HEAD/packages/platform/CHANGELOG.md#0940) [Compare Source](https://github.com/Effect-TS/effect/compare/@effect/platform@0.93.8...@effect/platform@0.94.0) ##### Minor Changes - [#​5917](https://github.com/Effect-TS/effect/pull/5917) [`ff7053f`](https://github.com/Effect-TS/effect/commit/ff7053f6d8508567b6145239f97aacc5773b0c53) Thanks [@​tim-smart](https://github.com/tim-smart)! - support non-errors in HttpClient.retryTransient ##### Patch Changes - Updated dependencies \[[`77eeb86`](https://github.com/Effect-TS/effect/commit/77eeb86ddf208e51ec25932af83d52d3b4700371), [`287c32c`](https://github.com/Effect-TS/effect/commit/287c32c9f10da8e96f2b9ef8424316189d9ad4b3)]: - effect\@​3.19.13 </details> <details> <summary>Effect-TS/effect (@​effect/platform-browser)</summary> ### [`v0.74.0`](https://github.com/Effect-TS/effect/blob/HEAD/packages/platform-browser/CHANGELOG.md#0740) [Compare Source](https://github.com/Effect-TS/effect/compare/@effect/platform-browser@0.73.0...@effect/platform-browser@0.74.0) ##### Patch Changes - Updated dependencies \[[`77eeb86`](https://github.com/Effect-TS/effect/commit/77eeb86ddf208e51ec25932af83d52d3b4700371), [`ff7053f`](https://github.com/Effect-TS/effect/commit/ff7053f6d8508567b6145239f97aacc5773b0c53), [`287c32c`](https://github.com/Effect-TS/effect/commit/287c32c9f10da8e96f2b9ef8424316189d9ad4b3)]: - effect\@​3.19.13 - [@​effect/platform](https://github.com/effect/platform)@​0.94.0 </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Mi4zIiwidXBkYXRlZEluVmVyIjoiNDIuODAuMiIsInRhcmdldEJyYW5jaCI6Im5leHQiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.valverde.cloud/Thilawyn/effect-fc/pulls/29 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
f2bfca6685 |
Update dependency @effect/language-service to ^0.60.0 (#28)
Lint / lint (push) Successful in 13s
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.59.0` -> `^0.60.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.59.0/0.60.0) |  |  | --- ### Release Notes <details> <summary>Effect-TS/language-service (@​effect/language-service)</summary> ### [`v0.60.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0600) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.59.0...v0.60.0) ##### Minor Changes - [#​523](https://github.com/Effect-TS/language-service/pull/523) [`46ec3e1`](https://github.com/Effect-TS/language-service/commit/46ec3e14550edbf855f506a84c89c5096848ef85) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add configurable mermaid provider option Adds a new `mermaidProvider` configuration option that allows users to choose between different Mermaid diagram providers: - `"mermaid.com"` - Uses mermaidchart.com - `"mermaid.live"` - Uses mermaid.live (default) - Custom URL - Allows specifying a custom provider URL (e.g., `"http://localhost:8080"` for local mermaid-live-editor) This enhances flexibility for users who prefer different Mermaid visualization services or need to use self-hosted instances. </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zOS4wIiwidXBkYXRlZEluVmVyIjoiNDIuMzkuMCIsInRhcmdldEJyYW5jaCI6Im5leHQiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: Thilawyn/effect-fc#28 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
4772d02349 |
Update dependency @effect/language-service to ^0.59.0 (#27)
Lint / lint (push) Successful in 12s
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.58.0` -> `^0.59.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.58.4/0.59.0) |  |  | --- ### Release Notes <details> <summary>Effect-TS/language-service (@​effect/language-service)</summary> ### [`v0.59.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0590) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.58.4...v0.59.0) ##### Minor Changes - [#​518](https://github.com/Effect-TS/language-service/pull/518) [`660549d`](https://github.com/Effect-TS/language-service/commit/660549d2c07ecf9ccd59d9f022f5c97467f6fc17) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new `schemaStructWithTag` diagnostic that suggests using `Schema.TaggedStruct` instead of `Schema.Struct` when a `_tag` field with `Schema.Literal` is present. This makes the tag optional in the constructor, improving the developer experience. Example: ```typescript // Before (triggers diagnostic) export const User = Schema.Struct({ _tag: Schema.Literal("User"), name: Schema.String, age: Schema.Number, }); // After (applying quick fix) export const User = Schema.TaggedStruct("User", { name: Schema.String, age: Schema.Number, }); ``` The diagnostic includes a quick fix that automatically converts the `Schema.Struct` call to `Schema.TaggedStruct`, extracting the tag value and removing the `_tag` property from the fields. ##### Patch Changes - [#​521](https://github.com/Effect-TS/language-service/pull/521) [`61f28ba`](https://github.com/Effect-TS/language-service/commit/61f28babbd909ef08be25fdcd684c81af683cd62) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix auto-completion for directly imported Effect APIs. Completions now work when using direct imports like `import { Service } from "effect/Effect"` instead of only working with fully qualified names like `Effect.Service`. This fix applies to: - `Effect.Service` and `Effect.Tag` from `effect/Effect` - `Schema.Class`, `Schema.TaggedError`, `Schema.TaggedClass`, and `Schema.TaggedRequest` from `effect/Schema` - `Data.TaggedError` and `Data.TaggedClass` from `effect/Data` - `Context.Tag` from `effect/Context` Example: ```typescript // Now works with direct imports import { Service } from "effect/Effect" export class MyService extends Service // ✓ Completion available // Still works with fully qualified names import * as Effect from "effect/Effect" export class MyService extends Effect.Service // ✓ Completion available ``` Fixes [#​394](https://github.com/Effect-TS/language-service/issues/394) </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMSIsInRhcmdldEJyYW5jaCI6Im5leHQiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.valverde.cloud/Thilawyn/effect-fc/pulls/27 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
88059c5ea7 |
Upgrade deps
Lint / lint (push) Successful in 12s
|
||
|
|
6adb7061f4 |
Update dependency @effect/language-service to ^0.58.0 (#25)
Lint / lint (push) Has been cancelled
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.56.0` -> `^0.58.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.56.0/0.58.0) |  |  | --- ### Release Notes <details> <summary>Effect-TS/language-service (@​effect/language-service)</summary> ### [`v0.58.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0580) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.57.1...v0.58.0) ##### Minor Changes - [#​505](https://github.com/Effect-TS/language-service/pull/505) [`31cff49`](https://github.com/Effect-TS/language-service/commit/31cff498b6a3207eabe5609f677b202245f53967) Thanks [@​clayroach](https://github.com/clayroach)! - Enhance `diagnostics` CLI command with new options for CI/CD integration and tooling: - **`--format`**: Output format selection (`json`, `pretty`, `text`, `github-actions`) - `json`: Machine-readable JSON output with structured diagnostics and summary - `pretty`: Colored output with context (default, original behavior) - `text`: Plain text output without colors - `github-actions`: GitHub Actions workflow commands for inline PR annotations - **`--strict`**: Treat warnings as errors (affects exit code) - **`--severity`**: Filter diagnostics by severity level (comma-separated: `error`, `warning`, `message`) - **Exit codes**: Returns exit code 1 when errors are found (or warnings in strict mode) Example usage: ```bash # JSON output for CI/CD pipelines effect-language-service diagnostics --project tsconfig.json --format json # GitHub Actions with inline annotations effect-language-service diagnostics --project tsconfig.json --format github-actions # Strict mode for CI (fail on warnings) effect-language-service diagnostics --project tsconfig.json --strict # Only show errors effect-language-service diagnostics --project tsconfig.json --severity error ``` Closes Effect-TS/effect [#​5180](https://github.com/Effect-TS/language-service/issues/5180). ### [`v0.57.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0571) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.57.0...v0.57.1) ##### Patch Changes - [#​503](https://github.com/Effect-TS/language-service/pull/503) [`857e43e`](https://github.com/Effect-TS/language-service/commit/857e43e2580312963681d867e4f5daa409e1da78) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add codefix to `runEffectInsideEffect` diagnostic that automatically transforms `Effect.run*` calls to use `Runtime.run*` when inside nested Effect contexts. The codefix will extract or reuse an existing Effect runtime and replace the direct Effect run call with the appropriate Runtime method. Example: ```typescript // Before Effect.gen(function* () { websocket.onmessage = (event) => { Effect.runPromise(check); }; }); // After applying codefix Effect.gen(function* () { const effectRuntime = yield* Effect.runtime<never>(); websocket.onmessage = (event) => { Runtime.runPromise(effectRuntime, check); }; }); ``` ### [`v0.57.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0570) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.56.0...v0.57.0) ##### Minor Changes - [#​500](https://github.com/Effect-TS/language-service/pull/500) [`acc2d43`](https://github.com/Effect-TS/language-service/commit/acc2d43d62df686a3cef13112ddd3653cf0181d0) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new `annotate` codegen that automatically adds type annotations to exported constants based on their initializer types. This codegen can be used by adding `// @​effect-codegens annotate` comments above variable declarations. Example: ```typescript // @​effect-codegens annotate export const test = Effect.gen(function* () { if (Math.random() < 0.5) { return yield* Effect.fail("error"); } return 1 as const; }); // Becomes: // @​effect-codegens annotate:5fce15f7af06d924 export const test: Effect.Effect<1, string, never> = Effect.gen(function* () { if (Math.random() < 0.5) { return yield* Effect.fail("error"); } return 1 as const; }); ``` The codegen automatically detects the type from the initializer and adds the appropriate type annotation, making code more explicit and type-safe. - [#​497](https://github.com/Effect-TS/language-service/pull/497) [`b188b74`](https://github.com/Effect-TS/language-service/commit/b188b74204bfd81b64b2266dd59465a2c7d2d34f) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new diagnostic `unnecessaryFailYieldableError` that warns when using `yield* Effect.fail()` with yieldable error types. The diagnostic suggests yielding the error directly instead of wrapping it with `Effect.fail()`, as yieldable errors (like `Data.TaggedError` and `Schema.TaggedError`) can be yielded directly in Effect generators. Example: ```typescript // ❌ Unnecessary Effect.fail wrapper yield * Effect.fail(new DataTaggedError()); // ✅ Direct yield of yieldable error yield * new DataTaggedError(); ``` </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNS4zIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuNSIsInRhcmdldEJyYW5jaCI6Im5leHQiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.valverde.cloud/Thilawyn/effect-fc/pulls/25 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
cd17be8c6d |
Update dependency @effect/language-service to ^0.56.0 (#23)
Lint / lint (push) Successful in 15s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.55.3` -> `^0.56.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.55.5/0.56.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.56.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0560) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.55.5...v0.56.0) ##### Minor Changes - [#​494](https://github.com/Effect-TS/language-service/pull/494) [`9b3edf0`](https://github.com/Effect-TS/language-service/commit/9b3edf0ddc18f5a1fc697aa1d5a6bf4cc9431d19) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `codegen` CLI command to automatically update Effect codegens This release introduces a new CLI command `effect-language-service codegen` that allows you to automatically update Effect codegens in your TypeScript files from the command line. The command scans files containing `@effect-codegens` directives and applies the necessary code transformations. **Usage:** - `effect-language-service codegen --file <path>` - Update a specific file - `effect-language-service codegen --project <tsconfig.json>` - Update all files in a project - `effect-language-service codegen --verbose` - Show detailed output during processing **Example:** ```bash # Update a single file effect-language-service codegen --file src/MyService.ts # Update entire project effect-language-service codegen --project tsconfig.json --verbose ``` This is particularly useful for CI/CD pipelines or batch processing scenarios where you want to ensure all codegens are up-to-date without manual editor intervention. </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMS4wIiwidXBkYXRlZEluVmVyIjoiNDIuMTEuMCIsInRhcmdldEJyYW5jaCI6Im5leHQiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: Thilawyn/effect-fc#23 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
ec5e5bdc87 |
Form refactoring
Lint / lint (push) Successful in 12s
|
||
|
|
a8b2c1e098 |
Update bun minor+patch updates (#22)
Lint / lint (push) Failing after 6s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.54.0` -> `^0.55.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.54.0/0.55.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [@effect/platform](https://effect.website) ([source](https://github.com/Effect-TS/effect/tree/HEAD/packages/platform)) | [`^0.92.1` -> `^0.93.0`](https://renovatebot.com/diffs/npm/@effect%2fplatform/0.92.1/0.93.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [@effect/platform-browser](https://effect.website) ([source](https://github.com/Effect-TS/effect/tree/HEAD/packages/platform-browser)) | [`^0.72.0` -> `^0.73.0`](https://renovatebot.com/diffs/npm/@effect%2fplatform-browser/0.72.0/0.73.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.55.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0552) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.55.1...v0.55.2) ##### Patch Changes - [#​484](https://github.com/Effect-TS/language-service/pull/484) [`7c18fa8`](https://github.com/Effect-TS/language-service/commit/7c18fa8b08c6e6cf0914a3ac140c8e9710868eb5) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix edge cases in missedPipeableOpportunity diagnostic where it incorrectly flagged valid code patterns. The diagnostic now properly: - Excludes `pipe` function calls from chain detection - Ignores chains where the function returns a callable type (avoiding false positives for higher-order functions like `Schedule.whileOutput`) ### [`v0.55.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0551) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.55.0...v0.55.1) ##### Patch Changes - [#​482](https://github.com/Effect-TS/language-service/pull/482) [`9695bdf`](https://github.com/Effect-TS/language-service/commit/9695bdfec4412569150a5332405a1ec16b4fa085) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix `missedPipeableOpportunity` diagnostic to correctly detect nested function call chains The diagnostic now properly identifies when nested function calls can be converted to pipeable style. Previously, the chain detection logic incorrectly tracked parent-child relationships, causing false positives. This fix ensures that only valid pipeable chains are reported, such as `toString(double(addOne(5)))` which can be refactored to `addOne(5).pipe(double, toString)`. Example: ```typescript // Before: incorrectly flagged or missed identity(Schema.decodeUnknown(MyStruct)({ x: 42, y: 42 })); // After: correctly handles complex nested calls toString(double(addOne(5))); // ✓ Now correctly detected as pipeable ``` ### [`v0.55.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0550) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.54.0...v0.55.0) ##### Minor Changes - [#​478](https://github.com/Effect-TS/language-service/pull/478) [`9a9d5f9`](https://github.com/Effect-TS/language-service/commit/9a9d5f9486df177dd2e9d9cf63e97569b0436de0) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `runEffectInsideEffect` diagnostic to warn when using `Effect.runSync`, `Effect.runPromise`, `Effect.runFork`, or `Effect.runCallback` inside an Effect context (such as `Effect.gen`, `Effect.fn`, or `Effect.fnUntraced`). Running effects inside effects is generally not recommended as it breaks the composability of the Effect system. Instead, developers should extract the Runtime and use `Runtime.runSync`, `Runtime.runPromise`, etc., or restructure their code to avoid running effects inside effects. Example: ```typescript // ❌ Will trigger diagnostic export const program = Effect.gen(function* () { const data = yield* Effect.succeed(42); const result = Effect.runSync(Effect.sync(() => data * 2)); // Not recommended return result; }); // ✅ Proper approach - extract runtime export const program = Effect.gen(function* () { const data = yield* Effect.succeed(42); const runtime = yield* Effect.runtime(); const result = Runtime.runSync(runtime)(Effect.sync(() => data * 2)); return result; }); // ✅ Better approach - compose effects export const program = Effect.gen(function* () { const data = yield* Effect.succeed(42); const result = yield* Effect.sync(() => data * 2); return result; }); ``` - [#​480](https://github.com/Effect-TS/language-service/pull/480) [`f1a0ece`](https://github.com/Effect-TS/language-service/commit/f1a0ece931826bd40c35118833b3be2ae6c90ab7) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `schemaUnionOfLiterals` diagnostic to warn when using `Schema.Union` with multiple `Schema.Literal` calls that can be simplified to a single `Schema.Literal` call. This diagnostic helps improve code readability and maintainability by suggesting a more concise syntax for union of literals. Example: ```typescript // ❌ Will trigger diagnostic export const Status = Schema.Union(Schema.Literal("A"), Schema.Literal("B")); // ✅ Simplified approach export const Status = Schema.Literal("A", "B"); ``` ##### Patch Changes - [#​481](https://github.com/Effect-TS/language-service/pull/481) [`160e018`](https://github.com/Effect-TS/language-service/commit/160e018c6f2eef21d537cc5e4f2666a43beb4724) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Update Effect ecosystem dependencies to latest versions: - `@effect/cli`: 0.71.0 → 0.72.0 - `@effect/platform`: 0.92.1 → 0.93.0 - `@effect/platform-node`: 0.98.3 → 0.99.0 - `@effect/printer-ansi`: 0.46.0 → 0.47.0 - `@effect/rpc`: 0.71.0 → 0.72.0 - `effect`: Updated to stable version 3.19.0 Also updated development tooling dependencies: - `vitest`: 3.2.4 → 4.0.6 - `@vitest/coverage-v8`: 3.2.4 → 4.0.6 - TypeScript ESLint packages: 8.46.1 → 8.46.3 - Various other minor dependency updates </details> <details> <summary>Effect-TS/effect (@​effect/platform)</summary> ### [`v0.93.0`](https://github.com/Effect-TS/effect/blob/HEAD/packages/platform/CHANGELOG.md#0930) [Compare Source](https://github.com/Effect-TS/effect/compare/@effect/platform@0.92.1...@effect/platform@0.93.0) ##### Patch Changes - [#​5606](https://github.com/Effect-TS/effect/pull/5606) [`24a1685`](https://github.com/Effect-TS/effect/commit/24a1685c70a9ed157468650f95a5c3da3f2c2433) Thanks [@​tim-smart](https://github.com/tim-smart)! - expose Layer output in HttpLayerRouter.serve - Updated dependencies \[[`3c15d5f`](https://github.com/Effect-TS/effect/commit/3c15d5f99fb8d8470a00c5a33d9ba3cac89dfe4c), [`3863fa8`](https://github.com/Effect-TS/effect/commit/3863fa89f61e63e5529fd961e37333bddf7db64a), [`2a03c76`](https://github.com/Effect-TS/effect/commit/2a03c76c2781ca7e9e228e838eab2eb0d0795b1d), [`24a1685`](https://github.com/Effect-TS/effect/commit/24a1685c70a9ed157468650f95a5c3da3f2c2433)]: - effect\@​3.19.0 </details> <details> <summary>Effect-TS/effect (@​effect/platform-browser)</summary> ### [`v0.73.0`](https://github.com/Effect-TS/effect/blob/HEAD/packages/platform-browser/CHANGELOG.md#0730) [Compare Source](https://github.com/Effect-TS/effect/compare/@effect/platform-browser@0.72.0...@effect/platform-browser@0.73.0) ##### Patch Changes - Updated dependencies \[[`3c15d5f`](https://github.com/Effect-TS/effect/commit/3c15d5f99fb8d8470a00c5a33d9ba3cac89dfe4c), [`3863fa8`](https://github.com/Effect-TS/effect/commit/3863fa89f61e63e5529fd961e37333bddf7db64a), [`2a03c76`](https://github.com/Effect-TS/effect/commit/2a03c76c2781ca7e9e228e838eab2eb0d0795b1d), [`24a1685`](https://github.com/Effect-TS/effect/commit/24a1685c70a9ed157468650f95a5c3da3f2c2433)]: - effect\@​3.19.0 - [@​effect/platform](https://github.com/effect/platform)@​0.93.0 </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNjkuMyIsInVwZGF0ZWRJblZlciI6IjQxLjE3MS40IiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#22 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
13a7c44aae |
Update dependency @effect/language-service to ^0.54.0 (#21)
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`](https://github.com/Effect-TS/language-service/commit/9d5028c92cdde20a881a30f5e3d25cc2c18741bc) 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`](https://github.com/Effect-TS/language-service/commit/9f2425e65e72099fba1e78948578a5e0b8598873) 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`](https://github.com/Effect-TS/language-service/commit/b29eca54ae90283887e0f8c586c62e49a3b13737) 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`](https://github.com/Effect-TS/language-service/commit/06b9ac143919cabd0f8a4836487f583c09772081) 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`](https://github.com/Effect-TS/language-service/commit/be70748806682d9914512d363df05a0366fa1c56) 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`](https://github.com/Effect-TS/language-service/commit/f27be56a61413f7b79d8778af59b54399381ba8d) 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`](https://github.com/Effect-TS/language-service/commit/c2f6e5036b3b248201d855c61e2b206c3b8ed20d) 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`](https://github.com/Effect-TS/language-service/commit/e76e9b90454de68cbf6e025ab63ecce5464168f3) 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`](https://github.com/Effect-TS/language-service/commit/4cbd5499a5edd93cc70e77695163cbb50ad9e63e) 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`](https://github.com/Effect-TS/language-service/commit/4931bbd5d421b2b80bd0bc9eff71bd401b24f291) 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`](https://github.com/Effect-TS/language-service/commit/1ac81a0edb3fa98ffe90f5e8044d5d65de1f0027) 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`](https://github.com/Effect-TS/language-service/commit/372a9a767bf69f733d54ab93e47eb4792e87b289) 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`](https://github.com/Effect-TS/language-service/commit/ddc3da8771f614aa2391f8753b44c6dad787bbd4) 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`](https://github.com/Effect-TS/language-service/commit/fb0ae8bf7b8635c791a085022b51bf1a914c0b46) 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`](https://github.com/Effect-TS/language-service/commit/11743b5144cf5189ae2fce554113688c56ce6b9c) 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`](https://github.com/Effect-TS/language-service/commit/3994aafb7dbf5499e5d1d7177eca7135c5a02a51) 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: Thilawyn/effect-fc#21 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
b9b9f37859 |
Update dependency @effect/language-service to ^0.49.0 (#20)
Lint / lint (push) Failing after 11s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.48.0` -> `^0.49.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.48.0/0.49.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.49.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0490) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.48.0...v0.49.0) ##### Minor Changes - [#​445](https://github.com/Effect-TS/language-service/pull/445) [`fe0e390`](https://github.com/Effect-TS/language-service/commit/fe0e390f02d12f959966d651bfec256c4f313ffb) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Use the Graph module for outline line graph and layer magic ##### Patch Changes - [#​449](https://github.com/Effect-TS/language-service/pull/449) [`ff11b7d`](https://github.com/Effect-TS/language-service/commit/ff11b7da9b55a3da91131c4b5932c93c6af71fc8) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Update effect package version to [`97ff1dc`](https://github.com/Effect-TS/language-service/commit/97ff1dc). This version improves handling of special characters in layer graph mermaid diagrams by properly escaping HTML entities (parentheses, braces, quotes) to ensure correct rendering. </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNjUuMiIsInVwZGF0ZWRJblZlciI6IjQxLjE2NS4yIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#20 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
3708059da4 |
Update dependency @effect/language-service to ^0.48.0 (#17)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.46.0` -> `^0.48.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.46.0/0.48.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.48.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0480) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.47.3...v0.48.0) ##### Minor Changes - [#​441](https://github.com/Effect-TS/language-service/pull/441) [`ed1db9e`](https://github.com/Effect-TS/language-service/commit/ed1db9ef2432d9d94df80e1835eb42491f0cfbf2) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `default-hashed` pattern for deterministic keys A new `default-hashed` pattern option is now available for service and error key patterns. This pattern works like the `default` pattern but hashes the resulting string, which is useful when you want deterministic keys but are concerned about potentially exposing service names in builds. Example configuration: ```json { "keyPatterns": [ { "target": "service", "pattern": "default-hashed" }, { "target": "error", "pattern": "default-hashed" } ] } ``` ##### Patch Changes - [#​442](https://github.com/Effect-TS/language-service/pull/442) [`44f4304`](https://github.com/Effect-TS/language-service/commit/44f43041ced08ef1e6e6242baccbc855e056dfa7) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Tone down try/catch message to ignore try/finally blocks - [#​439](https://github.com/Effect-TS/language-service/pull/439) [`b73c231`](https://github.com/Effect-TS/language-service/commit/b73c231dc13fc2db31eaeb3475a129cdeeca21dc) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix regression in type unification for union types and prevent infinite recursion in layerMagic refactor - Fixed `toggleTypeAnnotation` refactor to properly unify boolean types instead of expanding them to `true | false` - Fixed infinite recursion issue in `layerMagic` refactor's `adjustedNode` function when processing variable and property declarations ### [`v0.47.3`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0473) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.47.2...v0.47.3) ##### Patch Changes - [#​437](https://github.com/Effect-TS/language-service/pull/437) [`e583192`](https://github.com/Effect-TS/language-service/commit/e583192cf73404da7c777f1e7fafd2d6ed968a96) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - In toggle return type refactors, skip type parameters if they are the same as the function default in some cases. ### [`v0.47.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0472) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.47.1...v0.47.2) ##### Patch Changes - [#​433](https://github.com/Effect-TS/language-service/pull/433) [`f359cdb`](https://github.com/Effect-TS/language-service/commit/f359cdb1069b03b978259dac74c1ba209dd26ae6) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve memory by properly evicting older cached members ### [`v0.47.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0471) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.47.0...v0.47.1) ##### Patch Changes - [#​431](https://github.com/Effect-TS/language-service/pull/431) [`acbbc55`](https://github.com/Effect-TS/language-service/commit/acbbc55f30a4223a14623d69b2b3097c74644647) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix nested project references relative paths in CLI diagnostics command The CLI diagnostics command now correctly resolves paths for nested project references by: - Using absolute paths when parsing tsconfig files - Correctly resolving the base directory for relative paths in project references - Processing files in batches to improve memory usage and prevent leaks ### [`v0.47.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0470) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.46.0...v0.47.0) ##### Minor Changes - [#​429](https://github.com/Effect-TS/language-service/pull/429) [`351d7fb`](https://github.com/Effect-TS/language-service/commit/351d7fbec1158294f6cf309eafdb99f5260de8d5) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add new `diagnostics` CLI command to check Effect-specific diagnostics for files or projects The new `effect-language-service diagnostics` command provides a way to get Effect-specific diagnostics through the CLI without patching your TypeScript installation. It supports: - `--file` option to get diagnostics for a specific file - `--project` option with a tsconfig file to check an entire project The command outputs diagnostics in the same format as the TypeScript compiler, showing errors, warnings, and messages with their locations and descriptions. </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTcuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE1OC4wIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#17 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
0bc29b2cb9 |
Update dependency @effect/language-service to ^0.46.0 (#16)
Lint / lint (push) Failing after 10s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.45.0` -> `^0.46.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.45.1/0.46.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.46.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0460) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.45.1...v0.46.0) ##### Minor Changes - [#​424](https://github.com/Effect-TS/language-service/pull/424) [`4bbfdb0`](https://github.com/Effect-TS/language-service/commit/4bbfdb0a4894ee442e93b0a6cfa845447a2a045f) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add support to mark a service as "leakable" via JSDoc tag. Services marked with `@effect-leakable-service` will be excluded from the leaking requirements diagnostic, allowing requirements that are expected to be provided per method invocation (e.g. HttpServerRequest). Example: ```ts /** * @​effect-leakable-service */ export class FileSystem extends Context.Tag("FileSystem")< FileSystem, { writeFile: (content: string) => Effect.Effect<void>; } >() {} ``` - [#​428](https://github.com/Effect-TS/language-service/pull/428) [`ebaa8e8`](https://github.com/Effect-TS/language-service/commit/ebaa8e85d1c372fb3f584a49b6ea3600c467ac33) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add diagnostic to warn when `@effect-diagnostics-next-line` comments have no effect. This helps identify unused suppression comments that don't actually suppress any diagnostics, improving code cleanliness. The new `missingDiagnosticNextLine` option controls the severity of this diagnostic (default: "warning"). Set to "off" to disable. Example: ```ts // This comment will trigger a warning because it doesn't suppress any diagnostic // @​effect-diagnostics-next-line effect/floatingEffect:off const x = 1; // This comment is correctly suppressing a diagnostic // @​effect-diagnostics-next-line effect/floatingEffect:off Effect.succeed(1); ``` ##### Patch Changes - [#​426](https://github.com/Effect-TS/language-service/pull/426) [`22717bd`](https://github.com/Effect-TS/language-service/commit/22717bda12a889f00bc4b78719a487e62da74bef) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Improve Layer Magic refactor with enhanced dependency sorting and cycle detection The Layer Magic refactor now includes: - Better handling of complex layer composition scenarios - Support for detecting missing layer implementations with helpful error messages </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTYuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1Ni4xIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#16 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
8d55a67e75 |
Update dependency @effect/language-service to ^0.45.0 (#14)
Lint / lint (push) Successful in 12s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.44.0` -> `^0.45.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.44.1/0.45.1) | [](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.45.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0451) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.45.0...v0.45.1) ##### Patch Changes - [#​423](https://github.com/Effect-TS/language-service/pull/423) [`70d8734`](https://github.com/Effect-TS/language-service/commit/70d8734558c4ba3abfd69fafce785b7f58a70a52) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add code fix to rewrite Schema class constructor overrides as static 'new' methods When detecting constructor overrides in Schema classes, the diagnostic now provides a new code fix option that automatically rewrites the constructor as a static 'new' method. This preserves the custom initialization logic while maintaining Schema's decoding behavior. Example: ```typescript // Before (with constructor override) class MyClass extends Schema.Class<MyClass>("MyClass")({ a: Schema.Number }) { b: number; constructor() { super({ a: 42 }); this.b = 56; } } // After (using static 'new' method) class MyClass extends Schema.Class<MyClass>("MyClass")({ a: Schema.Number }) { b: number; public static new() { const _this = new this({ a: 42 }); _this.b = 56; return _this; } } ``` - [#​421](https://github.com/Effect-TS/language-service/pull/421) [`8c455ed`](https://github.com/Effect-TS/language-service/commit/8c455ed7a459665d26c30f1e5d90338e48794815) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Update dependencies to their latest versions including Effect 3.18.4, TypeScript 5.9.3, and various ESLint and build tooling packages ### [`v0.45.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0450) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.44.1...v0.45.0) ##### Minor Changes - [#​419](https://github.com/Effect-TS/language-service/pull/419) [`7cd7216`](https://github.com/Effect-TS/language-service/commit/7cd7216abc8e3057098acf1889c7494d17a869d6) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add support for custom APIs in deterministicKeys diagnostic using the `@effect-identifier` JSDoc tag. You can now enforce deterministic keys in custom APIs that follow an `extends MyApi("identifier")` pattern by: - Adding `extendedKeyDetection: true` to plugin options to enable detection - Marking the identifier parameter with `/** @​effect-identifier */` JSDoc tag Example: ```ts export function Repository(/** @​effect-identifier */ identifier: string) { return Context.Tag("Repository/" + identifier); } export class UserRepo extends Repository("user-repo")< UserRepo, { /** ... */ } >() {} ``` </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTAuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE1MC4wIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#14 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
59f9358b9a |
Update dependency @effect/language-service to ^0.44.0 (#12)
Lint / lint (push) Successful in 12s
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.42.0` -> `^0.44.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.42.0/0.44.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.44.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0440) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.43.2...v0.44.0) ##### Minor Changes - [#​415](https://github.com/Effect-TS/language-service/pull/415) [`42c66a1`](https://github.com/Effect-TS/language-service/commit/42c66a12658d712671b482fdcce0c5b608171d4f) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `diagnosticsName` option to include rule names in diagnostic messages. When enabled (default: true), diagnostic messages will display the rule name at the end, e.g., "Effect must be yielded or assigned to a variable. effect(floatingEffect)" ### [`v0.43.2`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0432) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.43.1...v0.43.2) ##### Patch Changes - [#​410](https://github.com/Effect-TS/language-service/pull/410) [`0b40c04`](https://github.com/Effect-TS/language-service/commit/0b40c04625cadc0a8dfc3b194daafea1f751a3b9) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Defer typescript loading in CLI ### [`v0.43.1`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0431) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.43.0...v0.43.1) ##### Patch Changes - [#​408](https://github.com/Effect-TS/language-service/pull/408) [`9ccd800`](https://github.com/Effect-TS/language-service/commit/9ccd8007b338e0524e17d3061acb722ad5c0e87b) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix handling of leading/trailing slashes ### [`v0.43.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0430) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.42.0...v0.43.0) ##### Minor Changes - [#​407](https://github.com/Effect-TS/language-service/pull/407) [`6590590`](https://github.com/Effect-TS/language-service/commit/6590590c0decd83f0baa4fd47655f0f67b6c5db9) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add deterministicKeys diagnostic to enforce consistent key patterns for Services and Errors This new diagnostic helps maintain consistent and unique keys for Effect Services and Tagged Errors by validating them against configurable patterns. The diagnostic is disabled by default and can be enabled via the `deterministicKeys` diagnosticSeverity setting. Two patterns are supported: - `default`: Constructs keys from package name + file path + class identifier (e.g., `@effect/package/FileName/ClassIdentifier`) - `package-identifier`: Uses package name + identifier for flat project structures Example configuration: ```jsonc { "diagnosticSeverity": { "deterministicKeys": "error" }, "keyPatterns": [ { "target": "service", "pattern": "default", "skipLeadingPath": ["src/"] } ] } ``` The diagnostic also provides auto-fix code actions to update keys to match the configured patterns. ##### Patch Changes - [#​405](https://github.com/Effect-TS/language-service/pull/405) [`f43b3ab`](https://github.com/Effect-TS/language-service/commit/f43b3ab32cad347fb2eb0af740771e35a6c7ff66) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Fix wrapWithEffectGen refactor not working on class heritage clauses The wrapWithEffectGen refactor now correctly skips expressions in heritage clauses (e.g., `extends` clauses in class declarations) to avoid wrapping them inappropriately. </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzguNCIsInVwZGF0ZWRJblZlciI6IjQxLjE0Ni4wIiwidGFyZ2V0QnJhbmNoIjoibmV4dCIsImxhYmVscyI6W119--> Reviewed-on: Thilawyn/effect-fc#12 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
03aa7c467c |
Update dependency @effect/language-service to ^0.42.0 (#11)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@effect/language-service](https://github.com/Effect-TS/language-service) | [`^0.41.1` -> `^0.42.0`](https://renovatebot.com/diffs/npm/@effect%2flanguage-service/0.41.1/0.42.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.42.0`](https://github.com/Effect-TS/language-service/blob/HEAD/CHANGELOG.md#0420) [Compare Source](https://github.com/Effect-TS/language-service/compare/v0.41.1...v0.42.0) ##### Minor Changes - [#​403](https://github.com/Effect-TS/language-service/pull/403) [`dc3f7e9`](https://github.com/Effect-TS/language-service/commit/dc3f7e90fad5743d7d47593221137908130f2f6e) Thanks [@​mattiamanzati](https://github.com/mattiamanzati)! - Add `quickinfoMaximumLength` option to control the maximum length of types displayed in quickinfo hover. This helps improve performance when dealing with very long types by allowing TypeScript to truncate them to a specified budget. Defaults to -1 (no truncation), but can be set to any positive number (e.g., 1000) to limit type display length. </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzUuOCIsInVwZGF0ZWRJblZlciI6IjQxLjEzNS44IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Reviewed-on: Thilawyn/effect-fc#11 Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Co-committed-by: Renovate Bot <renovate-bot@valverde.cloud> |
||
|
|
59298e7074 | Fix project config | ||
|
|
9a3c91b50b |
0.1.4 (#5)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: Thilawyn/effect-fc#5 |
||
|
|
831a808568 |
0.1.3 (#4)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://gitea:3000/Thilawyn/effect-fc/pulls/4 |
||
|
|
7524094a56 | Initial commit |