Skip to content
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
6 changes: 3 additions & 3 deletions packages/adapter-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*"
}
}
1 change: 1 addition & 0 deletions packages/client-generator-js/src/TSClient/jsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions packages/client-generator-ts/src/TSClient/jsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
18 changes: 5 additions & 13 deletions packages/client-runtime-utils/src/nullTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ObjectEnumValue, string>()

/**
* 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()}()`
}
}

Expand All @@ -33,7 +25,7 @@ export abstract class ObjectEnumValue {
}

toString() {
return representations.get(this)!
return this.#representation
}
}

Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading