Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for Prisma 6 #2924

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/orm/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
},
"dependencies": {
"@prisma/generator-helper": "^5.20.0",
"@prisma/internals": "^5.20.0",
"@prisma/generator-helper": "^6.0.1",
"@prisma/internals": "^6.0.1",
Comment on lines +33 to +34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider using stricter version ranges

Given this is a major version upgrade (Prisma 6), consider using stricter version ranges to prevent unexpected breaking changes.

-    "@prisma/generator-helper": "^6.0.1",
-    "@prisma/internals": "^6.0.1",
+    "@prisma/generator-helper": "~6.0.1",
+    "@prisma/internals": "~6.0.1",
-    "@prisma/client": "^6.0.1",
+    "@prisma/client": "~6.0.1",
-    "prisma": "^6.0.1",
+    "prisma": "~6.0.1",

Also applies to: 42-42, 53-53


💡 Codebase verification

Prisma dependencies are correctly updated, but test packages need attention

The main package has been properly updated to Prisma 6, but test packages are still using Prisma 4:

  • packages/orm/prisma/test/postgres-esm/package.json: prisma@^4.0.0, @prisma/client@^4.0.0
  • packages/orm/prisma/test/postgres/package.json: prisma@^4.0.0, @prisma/client@^4.0.0
  • packages/orm/prisma/test/mongo-esm/package.json: prisma@^4.0.0, @prisma/client@^4.0.0
  • packages/orm/prisma/test/mongo/package.json: prisma@^4.0.0, @prisma/client@^4.0.0
  • packages/orm/prisma/test/circular-ref/package.json: prisma@^4.0.0, @prisma/client@^4.0.0

These test packages should also be updated to Prisma 6 to ensure consistent testing environment.

🔗 Analysis chain

Verify Prisma 6 dependency compatibility

The Prisma dependencies have been consistently updated to version 6.0.1. However, let's verify:

  1. If all necessary Prisma-related dependencies are updated
  2. If the version ranges are appropriate
  3. If there are any known compatibility issues

Also applies to: 42-42, 53-53, 58-58

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for Prisma-related dependencies and version compatibility

# Search for any missed Prisma dependencies
rg "@prisma/" $(fd "package.json")

# Check for any transitive Prisma dependencies
rg "\"prisma\":" $(fd "package.json")

# Look for version constraints in other packages
fd "package.json" | xargs rg "@prisma|prisma"

Length of output: 10257

"change-case": "^5.4.4",
"fs-extra": "^11.2.0",
"pluralize": "^8.0.0",
"ts-morph": "^12.2.0",
"tslib": "2.7.0"
},
"devDependencies": {
"@prisma/client": "^5.20.0",
"@prisma/client": "^6.0.1",
"@tsed/barrels": "workspace:*",
"@tsed/core": "workspace:*",
"@tsed/di": "workspace:*",
Expand All @@ -50,12 +50,12 @@
"@types/change-case": "^2.3.1",
"@types/pluralize": "0.0.33",
"eslint": "9.12.0",
"prisma": "^4.16.2",
"prisma": "^6.0.1",
"typescript": "5.4.5",
"vitest": "2.1.2"
},
"peerDependencies": {
"@prisma/client": ">=5.0.0",
"@prisma/client": ">=6.0.0",
"@tsed/core": "8.2.0",
"@tsed/di": "8.2.0",
"@tsed/json-mapper": "8.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/orm/prisma/src/generator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ts-node
import * as helpers from "@prisma/generator-helper";
import helpers from "@prisma/generator-helper";
import {join} from "path";

import {generate} from "./cli/prismaGenerator.js";
Expand Down
172 changes: 84 additions & 88 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4942,111 +4942,104 @@ __metadata:
languageName: node
linkType: hard

"@prisma/client@npm:^5.20.0":
version: 5.20.0
resolution: "@prisma/client@npm:5.20.0"
"@prisma/client@npm:^6.0.1":
version: 6.0.1
resolution: "@prisma/client@npm:6.0.1"
peerDependencies:
prisma: "*"
peerDependenciesMeta:
prisma:
optional: true
checksum: 10/d5ad98e332be6f4a9df48399e25716c229779479603147ad7b7818966a1c8823307c18ae7513f48a95bb415f18ebfbaeb0707a3a0760a3d04e72577ab3152663
checksum: 10/de537c1ef3de528b2dfa93d661d16ff47a14e688dc0e26bc97d0cf3775e7049325cd36120308e0a85bea5188cbc4be9966e9ca9df3c4508e689830082e2f3a64
languageName: node
linkType: hard

"@prisma/debug@npm:5.20.0":
version: 5.20.0
resolution: "@prisma/debug@npm:5.20.0"
checksum: 10/e5b17c1e126841f2c0f50be95804b4545dd047a1a44fed052072bb90d30cfdf86de89d0d46d5b1017925e31e0504fec282beae6c23f7af0a701087273f0108e1
languageName: node
linkType: hard

"@prisma/engines-version@npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284":
version: 5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284
resolution: "@prisma/engines-version@npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
checksum: 10/0f3de72b4d05b832050c17763a162ba061181d7f52ba497c6005d0148080a3ca26fe76dae4129f3962b6178ee03d5bd156dc458f634d06fb3b8887f1534f82d1
"@prisma/debug@npm:6.0.1":
version: 6.0.1
resolution: "@prisma/debug@npm:6.0.1"
checksum: 10/f0c232faea07c73e85ddd0269db4b345fb3826bdf5d7e0c00702121037fde715d1b66f2d9cee18201b20d4284295c3555d47254622bdde604ec6dff5da4dad64
languageName: node
linkType: hard

"@prisma/engines@npm:4.16.2":
version: 4.16.2
resolution: "@prisma/engines@npm:4.16.2"
checksum: 10/3ce9176c44d7516e7c324e96e2225a5adf4cee610e740f51199c608dce48ba6ca0160d5ff4a65354c45baedbac3279aec328990b7a42bccfcf0d89ab23af6a7a
"@prisma/engines-version@npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e":
version: 5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e
resolution: "@prisma/engines-version@npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
checksum: 10/f38106e183943014b8a7c5c7b748298ea598dbb10fba9d7cd14234daacbebdb64dda3a87d4c148a3dcca5028b3721dfdd4e506910d182771fa3c211ea279d9f4
languageName: node
linkType: hard

"@prisma/engines@npm:5.20.0":
version: 5.20.0
resolution: "@prisma/engines@npm:5.20.0"
"@prisma/engines@npm:6.0.1":
version: 6.0.1
resolution: "@prisma/engines@npm:6.0.1"
dependencies:
"@prisma/debug": "npm:5.20.0"
"@prisma/engines-version": "npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
"@prisma/fetch-engine": "npm:5.20.0"
"@prisma/get-platform": "npm:5.20.0"
checksum: 10/4ae8a919a6ea0580d30bf849abb3e41073216e596d84166bdf117df4eab62e84159f8df03058e3170d84088bb6156db6d619646fabcd3c4f042058a321a48127
"@prisma/debug": "npm:6.0.1"
"@prisma/engines-version": "npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
"@prisma/fetch-engine": "npm:6.0.1"
"@prisma/get-platform": "npm:6.0.1"
checksum: 10/f70bd915df0996feba5e564dfc237c69a704ff9275773c32823f70277a130f62b17d9c0927b3761f8430555a2c9843a24cbc6351d107b7fbc2854e3f0ae03f9f
languageName: node
linkType: hard

"@prisma/fetch-engine@npm:5.20.0":
version: 5.20.0
resolution: "@prisma/fetch-engine@npm:5.20.0"
"@prisma/fetch-engine@npm:6.0.1":
version: 6.0.1
resolution: "@prisma/fetch-engine@npm:6.0.1"
dependencies:
"@prisma/debug": "npm:5.20.0"
"@prisma/engines-version": "npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
"@prisma/get-platform": "npm:5.20.0"
checksum: 10/5e5d24e18b5d37317fbc8c60be7ea56a28bb26c6f3ec6b5be1097401947f874fde69dfffa5f821f028a1907b4c1517b31f9cd7a8662df3e24b382184f6c6aeab
"@prisma/debug": "npm:6.0.1"
"@prisma/engines-version": "npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
"@prisma/get-platform": "npm:6.0.1"
checksum: 10/6c177443c828e1bab077caeac48c5b51601d48c58dc5ef3fb7825d96352708d6ad00827a85e5eab026ac30b1180e1f3e39c98e93f414b57e34235a0712e11ff0
languageName: node
linkType: hard

"@prisma/generator-helper@npm:5.20.0, @prisma/generator-helper@npm:^5.20.0":
version: 5.20.0
resolution: "@prisma/generator-helper@npm:5.20.0"
"@prisma/generator-helper@npm:6.0.1, @prisma/generator-helper@npm:^6.0.1":
version: 6.0.1
resolution: "@prisma/generator-helper@npm:6.0.1"
dependencies:
"@prisma/debug": "npm:5.20.0"
checksum: 10/f00ef072848c8d6d8b0bbd6a531cdbabf7f3139bd30fa698243f6131ac3b2ca097070389892809154e1193132b87ba61eb5006709307c547609168e3b081b291
"@prisma/debug": "npm:6.0.1"
checksum: 10/7bf58531edbe71f4c9dd53499a66508e0989de49971c3e0854070001468e17e86988473389f44e593be744c8cce8ca756f5f2f99cd975006cdc3ddc5e2f57d35
languageName: node
linkType: hard

"@prisma/get-platform@npm:5.20.0":
version: 5.20.0
resolution: "@prisma/get-platform@npm:5.20.0"
"@prisma/get-platform@npm:6.0.1":
version: 6.0.1
resolution: "@prisma/get-platform@npm:6.0.1"
dependencies:
"@prisma/debug": "npm:5.20.0"
checksum: 10/d6a807ba26aa5d22fe7bb525fa1062d25c86b4a2a8c03ef44336b6b874b1b9ce48466f7a7678ecec0e02cabe39b6530f849d79942ee75c6198f0e6f1214ffaf3
"@prisma/debug": "npm:6.0.1"
checksum: 10/ab684fb05998374dc689b28775329742f4a91435b091f337bb6eff8ba9eeb0236fdf8365ce19b29948232adedbad0ba6cf1554d7f809009b5c0f3ea421e3e8cb
languageName: node
linkType: hard

"@prisma/internals@npm:^5.20.0":
version: 5.20.0
resolution: "@prisma/internals@npm:5.20.0"
dependencies:
"@prisma/debug": "npm:5.20.0"
"@prisma/engines": "npm:5.20.0"
"@prisma/fetch-engine": "npm:5.20.0"
"@prisma/generator-helper": "npm:5.20.0"
"@prisma/get-platform": "npm:5.20.0"
"@prisma/prisma-schema-wasm": "npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
"@prisma/schema-files-loader": "npm:5.20.0"
"@prisma/internals@npm:^6.0.1":
version: 6.0.1
resolution: "@prisma/internals@npm:6.0.1"
dependencies:
"@prisma/debug": "npm:6.0.1"
"@prisma/engines": "npm:6.0.1"
"@prisma/fetch-engine": "npm:6.0.1"
"@prisma/generator-helper": "npm:6.0.1"
"@prisma/get-platform": "npm:6.0.1"
"@prisma/prisma-schema-wasm": "npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
"@prisma/schema-files-loader": "npm:6.0.1"
arg: "npm:5.0.2"
prompts: "npm:2.4.2"
checksum: 10/96d5632f8fc5abc0717436ed47b5fc5a1db508e4662b925f3f3407f2cd6d21060d2cf0000c0aacdfbd6c00cad26b58e8f4c928824adadfb099c9d057bd3023ec
checksum: 10/d123ccc3c931c6fab7d7dd61c477a01bc9bac73996270fca6ba22eb032fcfa4aee5a2c6dc376792f11edcb1a9a68b0967a6f3775c76ce42f54374737f3fa4696
languageName: node
linkType: hard

"@prisma/prisma-schema-wasm@npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284":
version: 5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284
resolution: "@prisma/prisma-schema-wasm@npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
checksum: 10/769cbbd1a0729a42ae50919cd1261e12f2cdd2eee2431b0f35f187dbe46485f42c50eb8037daeabfdc142f2bcc117273a96318433a6ce4f54b8dc9e28a871e33
"@prisma/prisma-schema-wasm@npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e":
version: 5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e
resolution: "@prisma/prisma-schema-wasm@npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
checksum: 10/1137e6f72dd2252be1f466ef48f82938856c60e70b2c9edb98c9d11cda0ac07c520d3ae80682c14dcd0f8bcd2dd169ddf6b644e75a5276ea910fbbd6cf798954
languageName: node
linkType: hard

"@prisma/schema-files-loader@npm:5.20.0":
version: 5.20.0
resolution: "@prisma/schema-files-loader@npm:5.20.0"
"@prisma/schema-files-loader@npm:6.0.1":
version: 6.0.1
resolution: "@prisma/schema-files-loader@npm:6.0.1"
dependencies:
"@prisma/prisma-schema-wasm": "npm:5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284"
"@prisma/prisma-schema-wasm": "npm:5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e"
fs-extra: "npm:11.1.1"
checksum: 10/f8910946c74a49d2ffab5834aad12502623490e9d742b965afe871cc4e5c0c61f907f4cb92940224bc34e32b28448966d4b98f83d298850be25e911eb93c79c7
checksum: 10/a70d1a77f8d9caf74f93ab295b76dab452bcd961c06e40cca1b3b912891118e5b780200b6c07dc35b1bf3a9e91fe1d30942cdfb891f9cbc5ced98b1b928ab242
languageName: node
linkType: hard

Expand Down Expand Up @@ -8003,9 +7996,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@tsed/prisma@workspace:packages/orm/prisma"
dependencies:
"@prisma/client": "npm:^5.20.0"
"@prisma/generator-helper": "npm:^5.20.0"
"@prisma/internals": "npm:^5.20.0"
"@prisma/client": "npm:^6.0.1"
"@prisma/generator-helper": "npm:^6.0.1"
"@prisma/internals": "npm:^6.0.1"
"@tsed/barrels": "workspace:*"
"@tsed/core": "workspace:*"
"@tsed/di": "workspace:*"
Expand All @@ -8019,13 +8012,13 @@ __metadata:
eslint: "npm:9.12.0"
fs-extra: "npm:^11.2.0"
pluralize: "npm:^8.0.0"
prisma: "npm:^4.16.2"
prisma: "npm:^6.0.1"
ts-morph: "npm:^12.2.0"
tslib: "npm:2.7.0"
typescript: "npm:5.4.5"
vitest: "npm:2.1.2"
peerDependencies:
"@prisma/client": ">=5.0.0"
"@prisma/client": ">=6.0.0"
"@tsed/core": 8.2.0
"@tsed/di": 8.2.0
"@tsed/json-mapper": 8.2.0
Expand Down Expand Up @@ -16447,6 +16440,16 @@ __metadata:
languageName: node
linkType: hard

"fsevents@npm:2.3.3, fsevents@npm:~2.3.3":
version: 2.3.3
resolution: "fsevents@npm:2.3.3"
dependencies:
node-gyp: "npm:latest"
checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0
conditions: os=darwin
languageName: node
linkType: hard

"fsevents@npm:~2.3.2":
version: 2.3.2
resolution: "fsevents@npm:2.3.2"
Expand All @@ -16457,12 +16460,11 @@ __metadata:
languageName: node
linkType: hard

"fsevents@npm:~2.3.3":
"fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin<compat/fsevents>":
version: 2.3.3
resolution: "fsevents@npm:2.3.3"
resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1"
dependencies:
node-gyp: "npm:latest"
checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0
conditions: os=darwin
languageName: node
linkType: hard
Expand All @@ -16476,15 +16478,6 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin<compat/fsevents>":
version: 2.3.3
resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1"
dependencies:
node-gyp: "npm:latest"
conditions: os=darwin
languageName: node
linkType: hard

"function-bind@npm:^1.1.1":
version: 1.1.1
resolution: "function-bind@npm:1.1.1"
Expand Down Expand Up @@ -24329,15 +24322,18 @@ __metadata:
languageName: node
linkType: hard

"prisma@npm:^4.16.2":
version: 4.16.2
resolution: "prisma@npm:4.16.2"
"prisma@npm:^6.0.1":
version: 6.0.1
resolution: "prisma@npm:6.0.1"
dependencies:
"@prisma/engines": "npm:4.16.2"
"@prisma/engines": "npm:6.0.1"
fsevents: "npm:2.3.3"
dependenciesMeta:
fsevents:
optional: true
bin:
prisma: build/index.js
prisma2: build/index.js
checksum: 10/8eefe4d21ca86357dd76dc308da94f7a4b6b17b3e54a10e2a0a73304f0026d7642a1dfaa8018723e3fbf4fa7490d40d518c9581252af745ac1299e1be9afb360
checksum: 10/276ef8120c75813b7b846c7eee1cf70dc5d0c3ecf5b16b3568cb69c728d401d620f822dfd7b143706493e05712d8512b57fdc3619e7077f85771477d8698284c
languageName: node
linkType: hard

Expand Down
Loading