Skip to content

Releases: chax-at/transactional-prisma-testing

1.4.2

17 Nov 11:32
47def94

Choose a tag to compare

Fixed

  • This package will no longer throw an error when it tries to release a savepoint that doesn't exist which may happen in rare cases in which not all Prisma calls are awaited
    • This should prevent ERROR: savepoint "..." does not exist errors

1.4.1

13 Nov 14:44
7bcdd3a

Choose a tag to compare

Fixed

  • Using .then(...) without a second (reject) parameter on a Promise returned by the proxy Prisma Client no longer throws a reject is not a function error (#20) (thank you @yamatatsu for the PR)

1.4.0

16 Sep 11:40
f5817e7

Choose a tag to compare

Changed

  • Savepoints are now released in batches to improve performance (leading to ~15% shorter test execution time in a reference project)
  • More detailed error message when trying to execute a query when the corresponding transaction has already been rolled back
  • This package now uses Trusted Publishing and provides a provenance on npm

1.3.1

23 Jan 13:57
478ab0a

Choose a tag to compare

Fixed

  • This package now passes the correct this context when calling Prisma functions (#17)
    • This fixes a bug which caused Prisma.getExtensionContext(this) to be undefined when writing custom Prisma client extensions

1.3.0

09 Dec 01:57

Choose a tag to compare

Added

  • Added support for Prisma 6

Removed

  • Removed "Transaction changed while executing a query" warning

1.2.2

02 Nov 11:55

Choose a tag to compare

Fixed

  • Using $queryRaw with an extended Prisma Client no longer throws a TypeError (#14)

1.2.1

01 Nov 00:00

Choose a tag to compare

Fixed

  • Calling const transformedData = await prisma.someTable.findMany().then(data => someTransformation(data)) now correctly returns the transformed data instead of directly returning the findMany result (#13)

Changed

  • Removed (outdated) source maps from build result

1.2.0

17 May 23:46
9fa37b5

Choose a tag to compare

Changed

  • Relaxed typing requirement when creating a new PrismaTestingHelper so that extended Prisma clients work as well

1.1.0

22 Jul 11:30
ec8e899

Choose a tag to compare

Added

  • Added support for Prisma 5
  • Added a warning when the transaction changes (startNewTransaction is called) while executing a query
    (e.g. you forgot to await a query in your test, and the next test gets executed while the query is still running)

Fixed

  • Savepoints will now always execute on the correct transaction, even if the query is not awaited and the transaction changes (i.e. startNewTransaction is called while a query is executed)
  • The proxied function return values now also provide .catch and .finally, allowing you to use
const result = await this.prismaService.user.findUniqueOrThrow(/* ... */).catch(/* ... */);

0.6.0

22 Jul 11:43

Choose a tag to compare

0.6.0 Pre-release
Pre-release

⚠️ This is an update to the old version if you can't or don't want to upgrade to v1 yet. This is the last supported major Prisma version upgrade for v0.

Added

  • Added support for Prisma 5