From 085133fde00af06b4b53956fa5c4041f90fe4d2f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 16 Apr 2026 18:44:51 +0200 Subject: [PATCH] Bump zod dependency to v4 for packages using configSchema These packages use `configSchema` with `zod/v4` imports and require the full Zod v4 package for JSON Schema support. The dependency range is narrowed from `^3.25.76 || ^4.0.0` to `^4.0.0`. Also adds a `.patches` entry for the patch release. Signed-off-by: Patrik Oldsberg Made-with: Cursor --- .changeset/zod-v3-config-schema-docs.md | 2 +- .changeset/zod-v4-dep-bump.md | 12 ++++++++++++ .patches/pr-33952.txt | 1 + packages/frontend-plugin-api/package.json | 2 +- plugins/app/package.json | 2 +- plugins/catalog-graph/package.json | 2 +- plugins/catalog-react/package.json | 2 +- plugins/catalog/package.json | 2 +- plugins/org/package.json | 2 +- plugins/search-react/package.json | 2 +- plugins/search/package.json | 2 +- plugins/techdocs/package.json | 2 +- yarn.lock | 20 ++++++++++---------- 13 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 .changeset/zod-v4-dep-bump.md create mode 100644 .patches/pr-33952.txt diff --git a/.changeset/zod-v3-config-schema-docs.md b/.changeset/zod-v3-config-schema-docs.md index bcac1fa253..11fafd67d9 100644 --- a/.changeset/zod-v3-config-schema-docs.md +++ b/.changeset/zod-v3-config-schema-docs.md @@ -2,4 +2,4 @@ '@backstage/frontend-plugin-api': patch --- -Updated error messages and deprecation warnings to clarify that the `zod/v4` subpath export from the Zod v3 package is not supported by `configSchema`, since it does not include JSON Schema conversion. A full migration to the `zod` v4 package (`zod@^4.0.0`) is required. +Updated error messages and deprecation warnings to clarify that the `zod/v4` subpath export from the Zod v3 package is not supported by `configSchema`, since it does not include JSON Schema conversion. The `zod` dependency has been bumped to `^4.0.0`. diff --git a/.changeset/zod-v4-dep-bump.md b/.changeset/zod-v4-dep-bump.md new file mode 100644 index 0000000000..f9b298f8c0 --- /dev/null +++ b/.changeset/zod-v4-dep-bump.md @@ -0,0 +1,12 @@ +--- +'@backstage/plugin-app': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-search': patch +'@backstage/plugin-search-react': patch +'@backstage/plugin-org': patch +--- + +The `zod` dependency has been bumped from `^3.25.76 || ^4.0.0` to `^4.0.0`, since `configSchema` requires the full Zod v4 package for JSON Schema support. diff --git a/.patches/pr-33952.txt b/.patches/pr-33952.txt new file mode 100644 index 0000000000..3244566d2e --- /dev/null +++ b/.patches/pr-33952.txt @@ -0,0 +1 @@ +Bump zod dependency to v4 for packages using configSchema and clarify that zod/v4 subpath from v3 is not supported \ No newline at end of file diff --git a/packages/frontend-plugin-api/package.json b/packages/frontend-plugin-api/package.json index 169fb3861f..237e5d01fd 100644 --- a/packages/frontend-plugin-api/package.json +++ b/packages/frontend-plugin-api/package.json @@ -49,7 +49,7 @@ "@backstage/types": "workspace:^", "@backstage/version-bridge": "workspace:^", "@standard-schema/spec": "^1.1.0", - "zod": "^3.25.76 || ^4.0.0", + "zod": "^4.0.0", "zod-to-json-schema": "^3.25.1" }, "devDependencies": { diff --git a/plugins/app/package.json b/plugins/app/package.json index b13f63bd97..65e5744ac0 100644 --- a/plugins/app/package.json +++ b/plugins/app/package.json @@ -72,7 +72,7 @@ "react-stately": "^3.46.0", "react-use": "^17.2.4", "zen-observable": "^0.10.0", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index e3dcba154c..3c720952b5 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -65,7 +65,7 @@ "lodash": "^4.17.15", "qs": "^6.9.4", "react-use": "^17.2.4", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 02c50eed58..88d10c2f97 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -87,7 +87,7 @@ "react-use": "^17.2.4", "yaml": "^2.0.0", "zen-observable": "^0.10.0", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 39e1b6739d..80482076d7 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -88,7 +88,7 @@ "react-helmet": "6.1.0", "react-use": "^17.2.4", "zen-observable": "^0.10.0", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/org/package.json b/plugins/org/package.json index 1a0befd13e..b2f25f142a 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -67,7 +67,7 @@ "pluralize": "^8.0.0", "qs": "^6.10.1", "react-use": "^17.2.4", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/catalog-client": "workspace:^", diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index 461e8d7c6a..79184a73dd 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -70,7 +70,7 @@ "qs": "^6.9.4", "react-use": "^17.3.2", "uuid": "^11.0.2", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/search/package.json b/plugins/search/package.json index db78dc070f..67a5e98ddc 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -72,7 +72,7 @@ "@material-ui/icons": "^4.9.1", "qs": "^6.9.4", "react-use": "^17.2.4", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index c2d2576229..de9b4897c0 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -87,7 +87,7 @@ "lodash": "^4.17.21", "react-helmet": "6.1.0", "react-use": "^17.2.4", - "zod": "^3.25.76 || ^4.0.0" + "zod": "^4.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^", diff --git a/yarn.lock b/yarn.lock index 079e224c13..5f44e634f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3826,7 +3826,7 @@ __metadata: react: "npm:^18.0.2" react-dom: "npm:^18.0.2" react-router-dom: "npm:^6.30.2" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" zod-to-json-schema: "npm:^3.25.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 @@ -4190,7 +4190,7 @@ __metadata: react-stately: "npm:^3.46.0" react-use: "npm:^17.2.4" zen-observable: "npm:^0.10.0" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -5265,7 +5265,7 @@ __metadata: react-dom: "npm:^18.0.2" react-router-dom: "npm:^6.30.2" react-use: "npm:^17.2.4" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -5401,7 +5401,7 @@ __metadata: react-use: "npm:^17.2.4" yaml: "npm:^2.0.0" zen-observable: "npm:^0.10.0" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@backstage/frontend-test-utils": "workspace:^" "@types/react": ^17.0.0 || ^18.0.0 @@ -5512,7 +5512,7 @@ __metadata: react-use: "npm:^17.2.4" swr: "npm:^2.2.5" zen-observable: "npm:^0.10.0" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -6417,7 +6417,7 @@ __metadata: react-dom: "npm:^18.0.2" react-router-dom: "npm:^6.30.2" react-use: "npm:^17.2.4" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -7325,7 +7325,7 @@ __metadata: react-router-dom: "npm:^6.30.2" react-use: "npm:^17.3.2" uuid: "npm:^11.0.2" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -7368,7 +7368,7 @@ __metadata: react-dom: "npm:^18.0.2" react-router-dom: "npm:^6.30.2" react-use: "npm:^17.2.4" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -7714,7 +7714,7 @@ __metadata: react-helmet: "npm:6.1.0" react-router-dom: "npm:^6.30.2" react-use: "npm:^17.2.4" - zod: "npm:^3.25.76 || ^4.0.0" + zod: "npm:^4.0.0" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -49246,7 +49246,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.25 || ^4.0, zod@npm:^3.25.76 || ^4.0.0, zod@npm:^4.1.11": +"zod@npm:^3.25 || ^4.0, zod@npm:^3.25.76 || ^4.0.0, zod@npm:^4.0.0, zod@npm:^4.1.11": version: 4.3.6 resolution: "zod@npm:4.3.6" checksum: 10/25fc0f62e01b557b4644bf0b393bbaf47542ab30877c37837ea8caf314a8713d220c7d7fe51f68ffa72f0e1018ddfa34d96f1973d23033f5a2a5a9b6b9d9da01