Breaking changes in 7.x

Breaking changes in 6.x

Some TypeScript definitions changed so write-methods are missing from 'readonly' transactions. This might be backwards-incompatible with code that performs a lot of type wrangling.

Breaking changes in 5.x

I moved some files around, so I bumped the major version for safety.

Changes in 4.x

Breaking changes

Opening a database

```js // Old 3.x way import { openDb } from 'idb';

openDb('db-name', 1, (upgradeDb) => { console.log(upgradeDb.oldVersion); console.log(upgradeDb.transaction); }); ```

```js // New 4.x way import { openDB } from 'idb';

openDB('db-name', 1, { upgrade(db, oldVersion, newVersion, transaction) { console.log(oldVersion); console.log(transaction); }, }); ```

Promises & throwing

The library turns all IDBRequest objects into promises, but it doesn't know in advance which methods may return promises.

As a result, methods such as store.put may throw instead of returning a promise.

If you're using async functions, there isn't a difference.

Other breaking changes

New stuff

Changes in 3.x

The library became a module.

```js // Old 2.x way: import idb from 'idb'; idb.open(…); idb.delete(…);

// 3.x way: import { openDb, deleteDb } from 'idb'; openDb(…); deleteDb(…); ```