Releases: datastax/astra-db-ts
Releases · datastax/astra-db-ts
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&Collectiontypes (#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
Tableimplementation (#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
returnDocumentonfindOneAnd*functions are finally optional- Defaults to
'before'on the Data API
- Defaults to
updateDbNamespacewas 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]CommandSucceededEventsnow have awarningsfield 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)Namespaceadmin commands on DSE/HCD)
- Added missing DB statuses to the
DatabaseStatusenum (e.g.'HIBERNATED'and'HIBERNATING')- You can check the diff here
- Better error for if the
Adminclasses 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
FetchH2andFetchNativefetchers 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_KEYSPACEconstant
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 theastraCLI - Also adds the
scriptsdir toPATH
- Setups up shell env w/
repl.shscript- Much easier way to quickly test out
astra-db-tsfunctionality - Added
-lightoption 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
returnDocumentResponsesimplementation- Fully implemented, but not used until Data API issue is resolved
v1.4.1
Minor findEmbeddingProviders typing update
- Split
EmbeddingProviderParameterInfointo two separate types:EmbeddingProviderProviderParameterInfoEmbeddingProviderModelParameterInfo
- Added
.displayNameand.hinttoEmbeddingProviderProviderParameterInfo
v1.4.0
Db namespaces update
Dbnamespace is nowundefinedby 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
Dbusing 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-backendsfor 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
embeddingApiKeyparameters now take instring | EmbeddingHeadersProvider | undefined- Two default token providers
AWSEmbeddingHeadersProviderfor bedrock vectorizationEmbeddingAPIKeyHeaderProviderfor symmetry (unit implementation)
- New
EmbeddingHeadersProvidersubclasses 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
Promiseanymore- Like the new
EmbeddingHeadersProvider, it can now returnstring | nullish | Promise<string | nullish> - Avoids the slight performance penalty of
awaiting aPromiseif one isn't returned anymore
- Like the new
- Further documentation fixes/tweaks (especially around vectorize)
v1.3.0
Non-Astra backend support
- New
environmentparameter onDataAPIClientanddb.admin()- Accepts
'astra' | 'dse' | 'hcd' | 'cassandra' | 'other' - Defaults to
'astra'
- Accepts
- All token parameters now take in
string | TokenProvider | undefined- Two default token providers
UsernamePasswordTokenProviderfor DSE, HCDStaticTokenProviderfor symmetry (unit implementation)
- New
TokenProvidersubclasses 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
DataAPIDbAdminfor namespace CRUD on non-Astra instances - New example in
examples/for running on non-astra
Cursor sort vectors
- New
includeSortVectorparameter on cursor- False by default
- If set to true, fetches the
$vectorused in the cursor's vector sort (if applicable)
- New
await cursor.getSortVector()to get the sort vector if the above is set
Deprecations
vector/vectorizekeyword 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
v1.2.1
Extended "non-standard" environment support
- Client will now try using
fetch-h2(by default) regardless of runtime/environment- Before, it only did this if the runtime were standard node
- Client will now default to
fetchiffetch-h2doesn't work by default- This will only happen if
httpOptionsis not set at all inDataAPIClientOptions
- This will only happen if
- Client accepts a new
client: 'custom'type inhttpOptions, allowing you to create your own component to make API calls for the client - You can now manually pass in the
fetch-h2module to use yourself ifastra-db-tsis having issues importing the default one when your code is minified (see the README) - New
examples/folder which has some common examples of runningastra-db-tsin a "non-standard" environment- Also updated the README to cover more cases as well
Faster insertMany
- Default batch size of documents was updated to 50
- Data API now supports up to 100, >50 generally gives diminishing returns, especially depending on document size
- You can still do your own tweaking with the
chunkSizeparameter to find what's fastest for you if necessary
v1.2.0
Added support for vectorize
createCollectionwas updated w/ vectorize options
Non-standard runtime support
- Non-node runtimes will now trigger default use of the native fetch API instead of fetch-h2 which gives access to extended HTTP/2 and HTTP/1.1 support
- Extended HTTP/1.1 options