Skip to content

v9.0.0-beta.0

Pre-release
Pre-release

Choose a tag to compare

@alecgibson alecgibson released this 30 Nov 11:33
· 2 commits to main since this release
  • #783 — 💥 BREAKING: Convert ShareDB to TypeScript
    • Huge thanks to @ericyhwang, who did the majority of this work in #707, including the codemods that converted the codebase!
    • lib/ is now compiled from src/ with tsc, and still targets ES5. It behaves differently to 8.0.0 in these ways:
      • It runs in strict mode, so mutating a frozen object a caller passed in (eg Query options) now throws
      • Subclass prototypes get an enumerable constructor, so eg new MemoryDB().constructor is now MemoryDB rather than DB
      • Internal modules like lib/types gain __esModule, so bundlers and esModuleInterop resolve a default import of one (eg import types from 'sharedb/lib/types') to undefined. Use a namespace import instead: import * as types from 'sharedb/lib/types'
      • emitter.EventEmitter becomes a read-only re-export
    • This beta doesn't ship type declarations yet, so keep using @types/sharedb for now