@prisma/client-engine-runtime 7.2.0-integration-fix-enums-mapped-types-v7.1 → 7.2.0-integration-fix-sqlite-deadlock-fix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -7
- package/dist/index.mjs +12 -7
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2043,16 +2043,21 @@ var TransactionManager = class {
|
|
|
2043
2043
|
const abortController = new AbortController();
|
|
2044
2044
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
2045
2045
|
startTimer?.unref?.();
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2046
|
+
transaction.transaction = await new Promise((resolve, reject) => {
|
|
2047
|
+
void once(abortController.signal, "abort");
|
|
2048
|
+
void this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing).then((tx) => {
|
|
2049
|
+
if (abortController.signal.aborted) {
|
|
2050
|
+
tx.rollback().catch((e) => debug("error in discarded transaction:", e));
|
|
2051
|
+
resolve(void 0);
|
|
2052
|
+
} else {
|
|
2053
|
+
resolve(tx);
|
|
2054
|
+
}
|
|
2055
|
+
}, reject).finally(() => clearTimeout(startTimer));
|
|
2056
|
+
});
|
|
2051
2057
|
this.transactions.set(transaction.id, transaction);
|
|
2052
2058
|
switch (transaction.status) {
|
|
2053
2059
|
case "waiting":
|
|
2054
|
-
if (
|
|
2055
|
-
void startTransactionPromise.then((tx) => tx.rollback()).catch((e) => debug("error in discarded transaction:", e));
|
|
2060
|
+
if (transaction.transaction === void 0) {
|
|
2056
2061
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2057
2062
|
throw new TransactionStartTimeoutError();
|
|
2058
2063
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1992,16 +1992,21 @@ var TransactionManager = class {
|
|
|
1992
1992
|
const abortController = new AbortController();
|
|
1993
1993
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
1994
1994
|
startTimer?.unref?.();
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1995
|
+
transaction.transaction = await new Promise((resolve, reject) => {
|
|
1996
|
+
void once(abortController.signal, "abort");
|
|
1997
|
+
void this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing).then((tx) => {
|
|
1998
|
+
if (abortController.signal.aborted) {
|
|
1999
|
+
tx.rollback().catch((e) => debug("error in discarded transaction:", e));
|
|
2000
|
+
resolve(void 0);
|
|
2001
|
+
} else {
|
|
2002
|
+
resolve(tx);
|
|
2003
|
+
}
|
|
2004
|
+
}, reject).finally(() => clearTimeout(startTimer));
|
|
2005
|
+
});
|
|
2000
2006
|
this.transactions.set(transaction.id, transaction);
|
|
2001
2007
|
switch (transaction.status) {
|
|
2002
2008
|
case "waiting":
|
|
2003
|
-
if (
|
|
2004
|
-
void startTransactionPromise.then((tx) => tx.rollback()).catch((e) => debug("error in discarded transaction:", e));
|
|
2009
|
+
if (transaction.transaction === void 0) {
|
|
2005
2010
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2006
2011
|
throw new TransactionStartTimeoutError();
|
|
2007
2012
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "7.2.0-integration-fix-
|
|
3
|
+
"version": "7.2.0-integration-fix-sqlite-deadlock-fix.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"nanoid": "5.1.5",
|
|
31
31
|
"ulid": "3.0.0",
|
|
32
32
|
"uuid": "11.1.0",
|
|
33
|
-
"@prisma/
|
|
34
|
-
"@prisma/
|
|
35
|
-
"@prisma/sqlcommenter": "7.2.0-integration-fix-
|
|
36
|
-
"@prisma/driver-adapter-utils": "7.2.0-integration-fix-
|
|
33
|
+
"@prisma/debug": "7.2.0-integration-fix-sqlite-deadlock-fix.1",
|
|
34
|
+
"@prisma/client-runtime-utils": "7.2.0-integration-fix-sqlite-deadlock-fix.1",
|
|
35
|
+
"@prisma/sqlcommenter": "7.2.0-integration-fix-sqlite-deadlock-fix.1",
|
|
36
|
+
"@prisma/driver-adapter-utils": "7.2.0-integration-fix-sqlite-deadlock-fix.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "29.5.14",
|