Drop Zod v3 support from new configSchema path
The new `configSchema` option now strictly requires StandardSchemaV1 values (e.g. Zod v4 or `zod/v4` from the Zod v3 package). Direct Zod v3 schemas are no longer silently converted and will throw an error. The deprecated `config.schema` callback path continues to work with Zod v3 through a separate `createDeprecatedConfigSchema` function. Also adds `createZodV4FilterPredicateSchema` to `@backstage/filter-predicates` as a v4 counterpart to the now-deprecated v3 variant. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -40,7 +40,7 @@ import {
|
||||
resolveExtensionDefinition,
|
||||
} from '../../../frontend-plugin-api/src/wiring/resolveExtensionDefinition';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { createConfigSchema } from '../../../frontend-plugin-api/src/schema/createPortableSchema';
|
||||
import { createDeprecatedConfigSchema } from '../../../frontend-plugin-api/src/schema/createPortableSchema';
|
||||
import { TestApiRegistry, withLogCollector } from '@backstage/test-utils';
|
||||
import { createErrorCollector } from '../wiring/createErrorCollector';
|
||||
|
||||
@@ -181,7 +181,7 @@ describe('instantiateAppNodeTree', () => {
|
||||
test: testDataRef,
|
||||
other: otherDataRef.optional(),
|
||||
},
|
||||
configSchema: createConfigSchema({
|
||||
configSchema: createDeprecatedConfigSchema({
|
||||
output: z => z.string().default('test'),
|
||||
other: z => z.number().optional(),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user