Version Packages (next)
This commit is contained in:
@@ -1,5 +1,37 @@
|
||||
# @backstage/plugin-auth-node
|
||||
|
||||
## 0.7.0-next.1
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fa55078: **BREAKING**: Refactored `SignInResolverFactoryOptions` to use a schema-first generic pattern, following Zod's [recommended approach](https://zod.dev/library-authors?id=how-to-accept-user-defined-schemas#how-to-accept-user-defined-schemas) for writing generic functions. The type parameters changed from `<TAuthResult, TOptionsOutput, TOptionsInput>` to `<TAuthResult, TSchema extends ZodType>`.
|
||||
|
||||
This fixes "Type instantiation is excessively deep and possibly infinite" errors that occurred when the Zod version in a user's project did not align with the one in Backstage core.
|
||||
|
||||
If you use `createSignInResolverFactory` without explicit type parameters (the typical usage), no changes are needed:
|
||||
|
||||
```ts
|
||||
// This usage is unchanged
|
||||
createSignInResolverFactory({
|
||||
optionsSchema: z.object({ domain: z.string() }).optional(),
|
||||
create(options = {}) {
|
||||
/* ... */
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
If you reference `SignInResolverFactoryOptions` with explicit type parameters, update as follows:
|
||||
|
||||
```diff
|
||||
- SignInResolverFactoryOptions<MyAuthResult, MyOutput, MyInput>
|
||||
+ SignInResolverFactoryOptions<MyAuthResult, typeof mySchema>
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-plugin-api@1.9.0-next.1
|
||||
|
||||
## 0.6.15-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-auth-node",
|
||||
"version": "0.6.15-next.0",
|
||||
"version": "0.7.0-next.1",
|
||||
"backstage": {
|
||||
"role": "node-library",
|
||||
"pluginId": "auth",
|
||||
|
||||
Reference in New Issue
Block a user