#42370d8734 Thanks @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:
// Before (with constructor override)
classMyClassextendsSchema.Class<MyClass>("MyClass")({a: Schema.Number}){b: number;constructor(){super({a: 42});this.b=56;}}// After (using static 'new' method)
classMyClassextendsSchema.Class<MyClass>("MyClass")({a: Schema.Number}){b: number;publicstaticnew(){const_this=newthis({a: 42});_this.b=56;return_this;}}
#4218c455ed Thanks @mattiamanzati! - Update dependencies to their latest versions including Effect 3.18.4, TypeScript 5.9.3, and various ESLint and build tooling packages
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-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
^0.44.0->^0.45.0Release Notes
Effect-TS/language-service (@effect/language-service)
v0.45.1Compare Source
Patch Changes
#423
70d8734Thanks @mattiamanzati! - Add code fix to rewrite Schema class constructor overrides as static 'new' methodsWhen 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:
#421
8c455edThanks @mattiamanzati! - Update dependencies to their latest versions including Effect 3.18.4, TypeScript 5.9.3, and various ESLint and build tooling packagesv0.45.0Compare Source
Minor Changes
#419
7cd7216Thanks @mattiamanzati! - Add support for custom APIs in deterministicKeys diagnostic using the@effect-identifierJSDoc tag.You can now enforce deterministic keys in custom APIs that follow an
extends MyApi("identifier")pattern by:extendedKeyDetection: trueto plugin options to enable detection/** @​effect-identifier */JSDoc tagExample:
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.
This PR has been generated by Renovate Bot.