@prisma/client-engine-runtime 7.2.0-integration-fix-sqlite-deadlock-fix.1 → 7.2.0-integration-fix-sqlite-deadlock-fix.2
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 +5 -12
- package/dist/index.mjs +5 -12
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2043,21 +2043,14 @@ var TransactionManager = class {
|
|
|
2043
2043
|
const abortController = new AbortController();
|
|
2044
2044
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
2045
2045
|
startTimer?.unref?.();
|
|
2046
|
-
transaction.transaction = await
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
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
|
-
});
|
|
2046
|
+
transaction.transaction = await Promise.race([
|
|
2047
|
+
this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing).finally(() => clearTimeout(startTimer)),
|
|
2048
|
+
once(abortController.signal, "abort").then(() => void 0)
|
|
2049
|
+
]);
|
|
2057
2050
|
this.transactions.set(transaction.id, transaction);
|
|
2058
2051
|
switch (transaction.status) {
|
|
2059
2052
|
case "waiting":
|
|
2060
|
-
if (
|
|
2053
|
+
if (abortController.signal.aborted) {
|
|
2061
2054
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2062
2055
|
throw new TransactionStartTimeoutError();
|
|
2063
2056
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1992,21 +1992,14 @@ var TransactionManager = class {
|
|
|
1992
1992
|
const abortController = new AbortController();
|
|
1993
1993
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
1994
1994
|
startTimer?.unref?.();
|
|
1995
|
-
transaction.transaction = await
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
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
|
-
});
|
|
1995
|
+
transaction.transaction = await Promise.race([
|
|
1996
|
+
this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing).finally(() => clearTimeout(startTimer)),
|
|
1997
|
+
once(abortController.signal, "abort").then(() => void 0)
|
|
1998
|
+
]);
|
|
2006
1999
|
this.transactions.set(transaction.id, transaction);
|
|
2007
2000
|
switch (transaction.status) {
|
|
2008
2001
|
case "waiting":
|
|
2009
|
-
if (
|
|
2002
|
+
if (abortController.signal.aborted) {
|
|
2010
2003
|
await this.#closeTransaction(transaction, "timed_out");
|
|
2011
2004
|
throw new TransactionStartTimeoutError();
|
|
2012
2005
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "7.2.0-integration-fix-sqlite-deadlock-fix.
|
|
3
|
+
"version": "7.2.0-integration-fix-sqlite-deadlock-fix.2",
|
|
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/
|
|
36
|
-
"@prisma/
|
|
33
|
+
"@prisma/client-runtime-utils": "7.2.0-integration-fix-sqlite-deadlock-fix.2",
|
|
34
|
+
"@prisma/debug": "7.2.0-integration-fix-sqlite-deadlock-fix.2",
|
|
35
|
+
"@prisma/driver-adapter-utils": "7.2.0-integration-fix-sqlite-deadlock-fix.2",
|
|
36
|
+
"@prisma/sqlcommenter": "7.2.0-integration-fix-sqlite-deadlock-fix.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "29.5.14",
|