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