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.
Changes in 5.x
I moved some files around, so I bumped the major version for safety.
// New 4.x way
import { openDB } from 'idb';
openDB('db-name', 1, {
upgrade(db, oldVersion, newVersion, transaction) {
console.log(oldVersion);
console.log(transaction);
},
});
openDb and deleteDb were renamed openDB and deleteDB to be more consistent with DOM naming.
The signature of openDB changed. The third parameter used to be the upgrade callback, it's now an option object which can include an upgrade method.
There's no UpgradeDB anymore. You get the same database openDB resolves with. Versions numbers and the upgrade transaction are included as additional parameters.
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps idb from 5.0.4 to 6.1.3.
Changelog
Sourced from idb's changelog.
... (truncated)
Commits
abce3c7
6.1.31f377f9
Minor readme updatee052a02
Loosen transaction storeNames type to accept ArrayLike303fa24
6.1.21c8cc81
Changing KnownKeys to be compatible with more TS versions. Fixes #223e266d61
Updating documentation for methods that are now supported by Edge (#217)c201912
6.1.1b79e17d
6.1.0e3c76a5
Change KnownKeys<T> methodedf7ace
Updating dependencies and formattingDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)