Skip to content

Releases: dexie/Dexie.js

Dexie v3.0.0

03 May 05:41
Compare
Choose a tag to compare

CSP compliance

Dexie is now CSP compliant (#722)

Improved Database Upgrading

It is no longer needed to keep old versions of schemas unless they have an upgrade attached. This is explained in release notes from 3.0.0-rc.3. The docs are updated accordingly.

Also, an old issue with upgrades has been that it was impossible to copy contents from one table to a new one and then remove the old one. This is now fixed, see release notes from [3.0.0-alpha.3] (https://github.com/dfahlander/Dexie.js/releases/tag/v3.0.0-alpha.3))

Typescript

Dexie has been refactored to using Typescript (Announcement #622, PR #653).

Redesign

The big difference in this release from v2.0.4, is how we call IndexedDB. Instead of calling it directly, it will go through a middleware-enabled stack, DBCore.

NOTE: This is an internal redesign. The external API is still the same as in Dexie 2.0 so you won't have to adapt to the new possibilities that comes with this redesign, unless you want to use the new middleware api (Dexie.use()).

This rewrite is part of reaching the goals in vision for dexie, specifically it will enable asynchronic work to be done in a middleware, which is something covered in here.

See new documentation of Dexie.use()

Table.bulkGet()

In response to #833, Table.bulkGet() was added and is a more optimal way than WhereClause.anyOf() when what you need is to fetch several objects with known IDs. The documentation is here

Virtual Indexes

VirtualIndex makes it possible to use the first part of a compound index as if it was an ordinary index.
Dexie will emulate an ordinary index so that it will works with algorithms such as equalsIgnoreCase() etc.

Example:

const db = new Dexie("mydb");
db.version(1).stores({
  friends: '++id, [lastName,firstName]'
});

function findFriendByLastName(prefix) {
   // Note: You can use 'lastName' because it's the first part of a compound index.
   return db.friends.where('lastName').startsWith(prefix);
}

In earlier versions, you would have to specify 'lastName' index side by side with [lastName+firstName]

Issues and fixes since 2.0.4

  • PR #670: updating hook's onsuccess will get the updated object as documented, instead of the primary key.
  • PR #672: fix for setByKeyPath when removing array items
  • #696 Possible to query multiple multiEntry properties using db.table.where({tags: 'browser', categories: 'database'}).
  • #692 Console warnings with indexing advices shall only happen in debug mode.
  • #771 Don't console.warn() unless Dexie.debug is truthy
  • #768 Issues with Collection.raw and Table.mapToClass
  • #612 Native async/await and upgrade handlers
  • #770 Using a database in an upgrade handler prevents subsequent upgrade handlers from running
  • Bugfix for extracting index spec for handling dynamically opened outbound primkeys (commit 9718d95d9b3a434749079a7217412b8c9917c0e6)
  • #811 Dexie does not run under ESNext in Node
  • Fixed CSP compliance (#722)
  • Fixed bug that omitted changes of properties with non-primitive intrinsic types (Date, ArrayBuffer, etc) in call to update hook (#841)
  • Feature: optionally all keys are returned on Table.bulkAdd() and Table.bulkPut() methods (PR #973)
  • Fix for issue 947 (PR #948)
  • Fix #491 (Check that versions given to db.version() is a positive number.)
  • Support Promise.allSettled() and Promise.any() (runtime only. Typings still rely on Typescript lib to support it)
  • Resolves a bug that Dexie may come into a state when it is unable to open a db in case the db exists but has no ObjectStores in it.

Dexie v3.0.0-rc.7

08 Apr 00:15
Compare
Choose a tag to compare
Dexie v3.0.0-rc.7 Pre-release
Pre-release

Resolves a bug that Dexie may come into a state when it is unable to open a db in case the db exists but has no ObjectStores in it.

Dexie v3.0.0-rc.6

26 Mar 00:03
Compare
Choose a tag to compare
Dexie v3.0.0-rc.6 Pre-release
Pre-release

Resolves #1004

Getting closer to final release.

Dexie v3.0.0-rc.5

24 Feb 22:23
Compare
Choose a tag to compare
Dexie v3.0.0-rc.5 Pre-release
Pre-release
  • Fix #491 (Check that versions given to db.version() is a positive number.)
  • Support Promise.allSettled() and Promise.any() (runtime only. Typings still rely on Typescript lib to support it)
  • Fix of minor typings issue introduced in 3.0.0-rc.2 (59a0959)

Dexie v3.0.0-rc.4

24 Feb 22:17
Compare
Choose a tag to compare
Dexie v3.0.0-rc.4 Pre-release
Pre-release

Reverting to async/await behavior as in [email protected] and dexie<3.0.0-beta.1 but still CSP compliant.

d02d999

Dexie v3.0.0-rc.3

29 Jan 11:05
Compare
Choose a tag to compare
Dexie v3.0.0-rc.3 Pre-release
Pre-release

News:

  • PR #959 A very nice PR that makes it optional to keep older versions of schemas unless you have a migration (upgrader) on it. Also, which is the most important benefit with this PR, if the developer has declared an old version that is not accurate to the actual installed version, this would not harm anymore. Dexie will only rely on the actual installed version instead of inspecting the declared version. This will probably take away some headaches people have had getting UpgradeError: "Dexie specification of currently installed DB version is missing".

  • Issue #902 of dexie-export-import fixed by increasing the max buffer size for JSON strings from 64k to 10MB.

  • General dependency housekeeping

  • Fixed CI test assuring dexie and dexie-relationships will continously work together on every new Dexie version ahead.

  • Bumped version numbers for dexie-observable and dexie-syncable so that some typings corrections for them where released to npm.

Dexie v3.0.0-rc.2

27 Jan 16:16
Compare
Choose a tag to compare
Dexie v3.0.0-rc.2 Pre-release
Pre-release

News:

  • Feature: optionally all keys are returned on Table.bulkAdd() and Table.bulkPut() methods (PR #973)
  • Fix for issue 947 (PR #948)

v3.0.0-beta.1

10 Oct 13:55
Compare
Choose a tag to compare
v3.0.0-beta.1 Pre-release
Pre-release

First beta release:

Features

Virtual Indexes

VirtualIndex makes it possible to use the first part of a compound index as if it was an ordinary index.
Dexie will emulate an ordinary index so that it will works with algorithms such as equalsIgnoreCase() etc.

Example:

const db = new Dexie("mydb");
db.version(1).stores({
  friends: '++id, [lastName,firstName]'
});

function findFriendByLastName(prefix) {
   // Note: You can use 'lastName' because it's the first part of a compound index.
   return db.friends.where('lastName').startsWith(prefix);
}

In earlier versions, you would have to specify 'lastName' index side by side with [lastName+firstName]

Most important bug fixes

  • Fixed CSP compliance (#722)
  • Fixed bug that omitted changes of properties with non-primitive intrinsic types (Date, ArrayBuffer, etc) in call to update hook (#841)

Dexie v3.0.0-alpha.8

26 Apr 14:10
Compare
Choose a tag to compare
Dexie v3.0.0-alpha.8 Pre-release
Pre-release

New Features

Table.bulkGet()

In response to #833, Table.bulkGet() was added and is a more optimal way than WhereClause.anyOf() when what you need is to fetch several objects with known IDs. The documentation is here

Fixes

  • #811 Dexie does not run under ESNext in Node

Dexie v3.0.0-alpha.7

04 Mar 14:32
Compare
Choose a tag to compare
Dexie v3.0.0-alpha.7 Pre-release
Pre-release

Latest fixes. TBD.