Releases: datastax/astra-db-ts
Releases · datastax/astra-db-ts
v2.0.0-preview.5
v2.0.0-preview.4
v2.0.0-preview.3
v2.0.0-preview.2
- fix for process.env in the browser 7517a12
v2.0.0-preview.1
- remoaved feature-flag tables header 23245c2
- begrudgingly added InetAddress back as DataAPIInet 6aa0594
- DataAPIDuration massive overhaul 4ea6a97
- work for repl scirpt 98a9e66
- overhaul of times 9d087f2
- overhaul of dates ce54e01
- enhanced coll bignumbers support cbcc101
- reexport from version file 4b86423
- check for broken compilation when skipLibCheck: false w/ astra-db-ts as dep a8dfc4f
- bigints & counters now use bigint 29e5805
- killed DataAPITimestamp 344b10a
- proper checking for Bignumbers eea4db0
- separate scripts/check.sh file for typechecking/linting 3fc4f33
- UnexpectedDataAPIResponseError e1c342f
- ser-des work (#92) 60e616f
- Expand UUID versions (#91) 04af5e3
v2.0.0-preview.0
NOTE
The release notes are still under construction
The current commit list is just temporary
- slgihtly updated readme e86b308
- TSDoc + typing improvements + tweaks (#89) 0faa849
- Switch to codec-based ser/des system (#88) cfcf437
- Added complex r/w-aware
Table
&Collection
types (#87) 95f8a41 - TSDoc progress + other minor fixes (#86) f31127b
- Various minor tweaks & cleanups for 2.0 (#84) 9a933f7
- Various 2.0 cleanups/tweaks (#83) 09d1d66
- Initial tables tests (#82) 9b26268
- Timeouts overhaul (#81) c8dc9fa
- Cursor split + tests (#80) 50361dd
- minor-ish tweaks/fixes 605d9ff
- Admin class overhauls (#79) 68873cb
- Rough, complete, roughly complete
Table
implementation (#78) d0c6e0b - Initial logging implementation (#77) bee45ab
- Cursor refactors & alignment (#76) 4cca38f
- Initial tables implementation (#75) 432c807
- Deprecated features removal (#74) fc26224
- Major folder restructuring (#73) 263e90d
- updated eslint config 5dbedcd
v1.5.0
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 thedb.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))
- Equivalent to
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'
- Before, it would attempt to drop the collection from
returnDocument
onfindOneAnd*
functions are finally optional- Defaults to
'before'
on the Data API
- Defaults to
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
- Before, it would wait for the keyspace to be created first
[Admin]CommandSucceededEvents
now have awarnings
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
- Fixed some errors being obfuscated, improved the clarity of a few, added
- Exposed
FetchH2
andFetchNative
fetchers to make it easier to wrap them with your own for customization purposes- For use with setting a
'custom'
client
- For use with setting a
- 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 theastra
CLI - Also adds the
scripts
dir toPATH
- Setups up shell env w/
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)
- Much easier way to quickly test out
returnDocumentResponses
implementation- Fully implemented, but not used until Data API issue is resolved
v1.4.1
Minor findEmbeddingProviders
typing update
- Split
EmbeddingProviderParameterInfo
into two separate types:EmbeddingProviderProviderParameterInfo
EmbeddingProviderModelParameterInfo
- Added
.displayName
and.hint
toEmbeddingProviderProviderParameterInfo
v1.4.0
Db
namespaces update
Db
namespace is nowundefined
by default for non-Astra backends if unset- Still defaults to
'default_keyspace'
for Astra usage - Will error out if attempting to perform an operation that requires a namespace
- Still defaults to
db.useNamespace('<namespace>')
- Switches the current working namespace
- Does not affect collections previously spawned from the
Db
using the old namespace
dbAdmin.createNamespace('<namespace>', { updateDbNamespace: true })
- New idiom for working with namespaces right after creating them
- Sets the
DbAdmin
's parentDb
's namespace to the newly created one - See
examples/non-astra-backends
for an example
findEmbeddingProviders
dbAdmin.findEmbeddingProviders()
- Provides in-depth, structured information about all of the available embedding providers supported on the working database
- Output may vary slightly depending on the cloud-provider/region
EmbeddingHeadersProvider
- All
embeddingApiKey
parameters now take instring | EmbeddingHeadersProvider | undefined
- Two default token providers
AWSEmbeddingHeadersProvider
for bedrock vectorizationEmbeddingAPIKeyHeaderProvider
for symmetry (unit implementation)
- New
EmbeddingHeadersProvider
subclasses may be created, additionally providing "token refreshing logic" as necessary - Fully backwards compatible—string API keys can still be passed in like normal
- Two default token providers
Misc improvements
- Better private field encapsulation for the main classes (
Collection
,Db
, etc.)private get _httpClient()
escape hatch present if necessary
- Authentication failure errors are no longer intercepted/wrapped by the client
- Now shows the raw error straight from the Data API
- Root cause of error should be a bit less obfuscated now
- TokenProvider doesn't have to return a
Promise
anymore- Like the new
EmbeddingHeadersProvider
, it can now returnstring | nullish | Promise<string | nullish>
- Avoids the slight performance penalty of
await
ing aPromise
if one isn't returned anymore
- Like the new
- Further documentation fixes/tweaks (especially around vectorize)
v1.3.0
Non-Astra backend support
- New
environment
parameter onDataAPIClient
anddb.admin()
- Accepts
'astra' | 'dse' | 'hcd' | 'cassandra' | 'other'
- Defaults to
'astra'
- Accepts
- All token parameters now take in
string | TokenProvider | undefined
- Two default token providers
UsernamePasswordTokenProvider
for DSE, HCDStaticTokenProvider
for symmetry (unit implementation)
- New
TokenProvider
subclasses may be created, additionally providing "token refreshing logic" as necessary - Tokens are now "optional" (i.e. you won't see a "missing token error" until the server throws one on an API request)
- Two default token providers
- New
DataAPIDbAdmin
for namespace CRUD on non-Astra instances - New example in
examples/
for running on non-astra
Cursor sort vectors
- New
includeSortVector
parameter on cursor- False by default
- If set to true, fetches the
$vector
used in the cursor's vector sort (if applicable)
- New
await cursor.getSortVector()
to get the sort vector if the above is set
Deprecations
vector
/vectorize
keyword parameters deprecated on document operations- Use raw
$vector[ize]
in documents for inserts - Use
sort: { $vector[ize]: ... }
for sorts
- Use raw
deleteAll()
deprecated in favor ofdeleteMany({})
deleteMany({})
actually works now
Misc improvements
- Package size made 33% smaller
collection.distinct()
made much faster when "distincting" on objects- Some documentation fixes/tweaks (especially around vectorize)
- Few improved error messages