npm dexie 2.0.0-beta.4
Dexie v2.0.0-beta.4

latest releases: 4.0.4, 4.0.3, 4.0.2...
7 years ago

Bugfixes

  • #360 - stability fix.

Features

  • Improved support for async / await inside transactions. Have tested that async/await can be used within transaction scopes in the following configurations:
    • Babel
    • Typescript 2.1
    • Natively in Edge 14 ( with experimental javascript flags on )
    • Natively in Chrome 55 beta.

Changed Behavior

PrematureCommitError

PrematureCommitError makes it visible when you accedently fall outside the transaction zone and start using the database transactionless without knowing so.

Before, if you'd use a non-Dexie Promise and then continue using database after that, you wouldn't detect that your code runs outside the transaction and the code could succeed silently without you noticing it did stuff transactionless.

Now, if the indexedDB transaction commits before your returned promise is completed, PrematureCommitError will be thrown. That is; if you for example await jQuery.ajax() within your transaction block, the transaction will now fail with PrematureCommitError. In earlier releases, it would sometimes fail with TransactionInactiveError() when this occurred, but only if the zone persisted when trying to do another db call.

Don't miss a new dexie release

NewReleases is sending notifications on new releases.