diff --git a/packages/adapter-pg/package.json b/packages/adapter-pg/package.json index 5a6e0fcbbe83..cd8399283653 100644 --- a/packages/adapter-pg/package.json +++ b/packages/adapter-pg/package.json @@ -38,10 +38,10 @@ "dependencies": { "@prisma/driver-adapter-utils": "workspace:*", "pg": "^8.16.3", - "postgres-array": "3.0.4" + "postgres-array": "3.0.4", + "@types/pg": "8.11.11" }, "devDependencies": { - "@prisma/debug": "workspace:*", - "@types/pg": "8.11.11" + "@prisma/debug": "workspace:*" } } diff --git a/packages/client-generator-js/src/TSClient/jsdoc.ts b/packages/client-generator-js/src/TSClient/jsdoc.ts index 5c605135be6a..8d85e8689f3d 100644 --- a/packages/client-generator-js/src/TSClient/jsdoc.ts +++ b/packages/client-generator-js/src/TSClient/jsdoc.ts @@ -236,6 +236,7 @@ ${onlySelect} skip: JSDocFields.skip, cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, 'cursor'), take: JSDocFields.take, + distinct: JSDocFields.distinct, }, }, update: { diff --git a/packages/client-generator-ts/src/TSClient/jsdoc.ts b/packages/client-generator-ts/src/TSClient/jsdoc.ts index 5c605135be6a..8d85e8689f3d 100644 --- a/packages/client-generator-ts/src/TSClient/jsdoc.ts +++ b/packages/client-generator-ts/src/TSClient/jsdoc.ts @@ -236,6 +236,7 @@ ${onlySelect} skip: JSDocFields.skip, cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, 'cursor'), take: JSDocFields.take, + distinct: JSDocFields.distinct, }, }, update: { diff --git a/packages/client-runtime-utils/src/nullTypes.ts b/packages/client-runtime-utils/src/nullTypes.ts index e534d5267a54..bcc78145c2e7 100644 --- a/packages/client-runtime-utils/src/nullTypes.ts +++ b/packages/client-runtime-utils/src/nullTypes.ts @@ -4,25 +4,17 @@ */ const secret = Symbol() -/** - * Emulate a private property via a WeakMap manually. Using native private - * properties is a breaking change for downstream users with minimal TypeScript - * configs, because TypeScript uses ES3 as the default target. - * - * TODO: replace this with a `#representation` private property in the - * `ObjectEnumValue` class and document minimal required `target` for TypeScript. - */ -const representations = new WeakMap() - /** * Base class for unique values of object-valued enums. */ export abstract class ObjectEnumValue { + #representation: string + constructor(arg?: symbol) { if (arg === secret) { - representations.set(this, `Prisma.${this._getName()}`) + this.#representation = `Prisma.${this._getName()}` } else { - representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`) + this.#representation = `new Prisma.${this._getNamespace()}.${this._getName()}()` } } @@ -33,7 +25,7 @@ export abstract class ObjectEnumValue { } toString() { - return representations.get(this)! + return this.#representation } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6da299595636..cbeea4adb226 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -303,6 +303,9 @@ importers: '@prisma/driver-adapter-utils': specifier: workspace:* version: link:../driver-adapter-utils + '@types/pg': + specifier: 8.11.11 + version: 8.11.11 pg: specifier: ^8.16.3 version: 8.16.3 @@ -313,9 +316,6 @@ importers: '@prisma/debug': specifier: workspace:* version: link:../debug - '@types/pg': - specifier: 8.11.11 - version: 8.11.11 packages/adapter-planetscale: dependencies: