Skip to content

Commit

Permalink
chore (client): add Zod and Prisma as (optional) peer dependencies (#…
Browse files Browse the repository at this point in the history
…1187)

Every Electric app needs Zod in order to use the generated client.
However, in recent versions of Zod something changed that breaks the
types in the generated client (cf.
#700). Therefore, Electric
apps should always use Zod version 3.21.1. Added this as a peer
dependency such that npm complains if the app installs a different
version. Similarly, added an optional peer dependency for Prisma v4 such
that it complains if the app installs another version of Prisma.
  • Loading branch information
kevin-dp committed Apr 30, 2024
1 parent 3794e2b commit 0115a0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-onions-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"electric-sql": patch
---

Add Zod and Prisma to (optional) peer dependencies.
7 changes: 6 additions & 1 deletion clients/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,14 @@
"@op-engineering/op-sqlite": ">= 2.0.16",
"@tauri-apps/plugin-sql": "2.0.0-alpha.5",
"expo-sqlite": ">= 13.0.0",
"prisma": "4.8.1",
"react": ">= 16.8.0",
"react-dom": ">= 16.8.0",
"react-native": ">= 0.68.0",
"typeorm": ">=0.3.0",
"vue": ">=3.0.0",
"wa-sqlite": "rhashimoto/wa-sqlite#semver:^0.9.8"
"wa-sqlite": "rhashimoto/wa-sqlite#semver:^0.9.8",
"zod": "3.21.1"
},
"peerDependenciesMeta": {
"@op-engineering/op-sqlite": {
Expand All @@ -278,6 +280,9 @@
"expo-sqlite": {
"optional": true
},
"prisma": {
"optional": true
},
"react": {
"optional": true
},
Expand Down

0 comments on commit 0115a0a

Please sign in to comment.