npm dexie 4.2.0-rc.1
Dexie v4.2.0-rc.1

latest releases: 4.2.1-rc.1, 4.2.0
one month ago

Release Candidate of dexie@4.2

In contrast to previous 4.1.x betas, we've extracted the Y.js support from the "dexie" package into "y-dexie".

Migration from 4.1.x-beta

Only if the experimental Y.js support from 4.1.x beta was used, a migration is needed:

  1. npm install y-dexie
  2. Instead of import { DexieYProvider } from 'dexie' --> import { DexieYProvider } from 'y-dexie'
  3. Instead of DexieyYProvider<Y.Doc> --> DexieYProvider.
  4. No need to pass Y to Dexie constructor, but instead, pass the yDexie addon:
    import yDexie from 'y-dexie';
    ...
    const db = new Dexie('foo', { addons: [yDexie] });
    With dexieCloud addon, make sure to pass yDexie first: { addons: [yDexie, dexieCloud] }
  5. Declare Y.Doc properties as prop:Y.Doc instead of just prop:Y
    db.version(1).stores({
      friends: `
        ++id,
        name,
        age,
        friendNotes: Y.Doc` // where friendNotes holds the Y.Doc instance
    });

If you need a sample PR of these changes, have a look at dexie/dexie-cloud-starter#8

What's Changed since 4.1.0-beta.43

  • New npm package "y-dexie" and removed the Y.js code from the "dexie" library. #2180
  • Fix Named Export 'Dexie' Not Found in Production with Vite/Vinxi by @thijssmudde in #2155
  • fix: 'Dexie' Not Found in Production with Vite/Vinxi dexie-react-hooks by @Contraboi in #2162

New Contributors

Full Changelog: 19a1778...a572b57

Don't miss a new dexie release

NewReleases is sending notifications on new releases.