This is the first release candidate of dexie@4. Please upgrade your dexie@3 to this to help us verify that it is backward compatible and works well for you application. Unless any critical issue shows up within a 5 days, dexie@4.0.1 will be released as the latest stable version of dexie. At that point, release notes will contain all the news in dexie@4 compared to dexie@3. These changes are briefly covered in https://dexie.org/roadmap/dexie4.0
Please file issue as soon as possible if you find any breaking change or critical issue with this release that would prevent it from being released as the latest stable version of dexie.
Dexie v4.0.1-beta.14
Support for sync-consistently moving tree structures (via PR #1910)
New version of dexie-cloud-addon: 4.0.1-beta.58
New version of dexie: 4.0.1-beta.14
New export in 'dexie': replacePrefix
New support for replacePrefix in Dexie Cloud
Background: The parentPath pattern:
One pattern for managing tree structures in a database is to have an indexed property representing the path to the parent node, such as parentPath. This makes it efficient to delete or list all descendants in one query without any need of recursion:
// Add new node
function addNode(childProps, parentId = null) {
return db.transaction('rw', db.treeNodes, async ()=> {
const parent = parentId && await db.treeNodes.get(parentId);
await db.treeNodes.add({
...childProps,
parentPath: parent
? `${parent.parentPath}${parent.id}/`
: '' // If no parent, parentPath will be empty string (added at the root)
});
}
}
// List direct children
function listChildren(node) {
return db.treeNodes.where({parentPath: ${node.parentPath}${node.id}/}).toArray();
}
// List all descendants without recursion:
function listAllDescendants(node) {
return db.treeNodes.where('parentPath').startsWith(${node.parentPath}${node.id}/).toArray();
}
// Load parent
function loadParent(node) {
return db.treeNodes.get(node.parentPath.split('/').at(-2));
}
// Load all ancestors
function async loadAllAncestors(node) {
</tr></table>
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 show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@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 dexie from 4.0.1-beta.6 to 4.0.1-rc.1.
Release notes
Sourced from dexie's releases.
... (truncated)
Commits
03b027d
Build output90d9221
Merge remote-tracking branch 'origin/releases'0ef8b64
Releasing v4.0.1-rc.1b07b730
dexie-cloud-addon@4.0.1-beta.582b63127
Propagate PropModification to dexie-clouddfa018e
Build output07f2a74
Releasing v4.0.1-beta.148df5ce6
Merge remote-tracking branch 'origin/releases'064c182
Fix: missing exports in import-wrapper.mjsc4953ba
Build outputDependabot 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 show