Skip to content

v1.5.0

Latest
Compare
Choose a tag to compare
@toptobes toptobes released this 20 Sep 21:43
· 2 commits to master since this release

Namespace deprecation (docs link)

  • The "namespace" terminology is now deprecated (still backwards compatible) everywhere
    • There is a new "keyspace" alternative for each parameter name or method with "namespace" in it
    • e.g. db.useNamespace(...) still works, but now prefer the db.useKeyspace(...) alternative
  • All usages of "namespace" will be removed in an upcoming major release

Other deprecations (to be removed in v2.0)

  • collection.bulkWrite() is now deprecated
    • Prefer to just manually call the functions yourself
  • db.collections() is also now deprecated
    • Equivalent to (await db.listCollections()).map(c => new Collection(c.name))

Misc improvements/fixes

  • collection.drop() will now work properly if the collection is in a non-default keyspace
    • Before, it would attempt to drop the collection from 'default_keyspace'
  • returnDocument on findOneAnd* functions are finally optional
    • Defaults to 'before' on the Data API
  • updateDbNamespace was changed to immediately set the new keyspace
    • Before, it would wait for the keyspace to be created first
      • This would lead to easier race conditions, and they keyspace wouldn't be set at all if creation errored
  • [Admin]CommandSucceededEvents now have a warnings field for any warnings the Data API may return
    • These may point out deprecated/incorrect practices, or any other issues that aren't strictly an error.
    • (e.g. using the now-deprecated (create|find|drop)Namespace admin commands on DSE/HCD)
  • Added missing DB statuses to the DatabaseStatus enum (e.g. 'HIBERNATED' and 'HIBERNATING')
    • You can check the diff here
  • Better error for if the Admin classes don't have a token set
    • (for the astra variants)
  • Various error message improvements throughout the client
    • Fixed some errors being obfuscated, improved the clarity of a few, added ' (+ more <num_errors> errors)' to the end of aggregated errors
  • Exposed FetchH2 and FetchNative fetchers to make it easier to wrap them with your own for customization purposes
    • For use with setting a 'custom' client
  • Exposed DEFAULT_KEYSPACE constant

Internal stuff

(Too many changes to list in detail, but here are the highlights)
  • MAJOR overhaul of test suite
    • Massively parallelized tests (full test suite used to take over 50 min to run.. now it barely takes 10 minutes!)
    • Majorly improved test filtering through custom filtering functionality
    • Custom test report file generated to store full errors thrown during tests
    • Test suite sets up and cleans up after itself much better now (tests much more reproducible now)
    • Custom test script CLI to make running tests super easy
    • Vectorize tests wait for providers to warm up now instead of erroring out after the first try
    • Much more info here
  • Updated ESLint + config
    • Including adding rules to add all missing semicolons/commas
  • shell.nix + nix-direnv
    • Setups up shell env w/ nodejs_20, jq, and the astra CLI
    • Also adds the scripts dir to PATH
  • repl.sh script
    • Much easier way to quickly test out astra-db-ts functionality
    • Added -light option to build script to set up REPL quicker
      • Doesn't typecheck or do any extraneous code transformations (such as stripping comments)
  • returnDocumentResponses implementation

v1.4.1...v1.5.0