Releases: arangodb/arangojs
v9.0.0-preview.2
This is a preview release which is not intended for use in production and has been published under the npm next
tag.
To install the latest preview release, run npm install arangojs@next
.
See the migration guide for detailed instructions
for upgrading your code to arangojs v9.
Changed
-
Inlined
x3-linkedlist
dependencyInlining this dependency should help make arangojs more portable.
Added
-
Added support for
withHidden
option incollection.indexes
This option was introduced in ArangoDB 3.10.13 and 3.11.7 and allows
fetching the progress information of indexes that are in the building phase.
v9.0.0-preview.1
This is a preview release which is not intended for use in production and has been published under the npm next
tag.
To install the latest preview release, run npm install arangojs@next
.
See the migration guide for detailed instructions
for upgrading your code to arangojs v9.
Removed
-
Removed Node.js 14 and Node.js 16 support
With Node.js 14 and 16 having reached their end of life, arangojs will no
longer support these versions of Node.js going forward.For more information, see the Node.js release schedule.
-
Removed
Params
andHeaders
typesThese can mostly be replaced with the native
URLSearchParams
andHeaders
types but most public methods still accept the equivalentRecord
types for
convenience. -
Removed deprecated
FulltextIndex
and related typesFulltext indexes have been deprecated in ArangoDB 3.10 and should be replaced
with ArangoSearch. -
Removed browser build
The browser build has been removed from the repository and will no longer be
published to npm. The npm package can still be used in the browser by using
common frontend tooling like webpack or rollup.
Changed
-
Replaced request logic with native
fetch
API (#788, DE-578, DE-758)The node-specific request logic using the
http
andhttps
modules has been
replaced with all-new logic using the web standardfetch
API, which should
work in Node.js, browsers and other conformant environments. -
Unicode names are now no longer automatically NFC normalized (DE-65)
This change affects all database, collection, graph, view and analyzer names
using unicode characters. Starting with arangojs v7.7.0 these names were
automatically NFC normalized. This behavior has now been reverted to match
the behavior of other ArangoDB drivers and help detect normalization issues
in user code. -
Changed return type of
aql
and the AQLjoin
helper function toAqlQuery
Previously the internal
GeneratedAqlQuery
type was exposed as the return
type of these functions, leading to complexity when handling generic type
arguments. -
Removed dependency on Node
path
module or its browserify equivalentThis change should be backwards-compatible but may produce different results
when using non-normalized paths and base-paths in customroutes
. This
should help support more environments and reduce the size of the browser
bundle.
Added
-
Added ESM support (DE-236)
The driver now supports being imported as an ES module or CommonJS module
and provides exports for both types of environments. This change should be
backwards-compatible.
v8.8.1
v8.8.0
Changed
-
Renamed ZKD index type to MDI (DE-744)
The ZKD index type was previously marked as experimental and has now been
finalized and renamed to MDI in ArangoDB 3.12. -
Added
DocumentOperationMetadata
andDocumentOperationFailure
types (DE-693)The return types of document and edge operations on collections have been
modified to correctly represent the return values of bulk operations and
single document/edge operations using theoverwriteMode
option.
Deprecated
-
Deprecated active failover support (DE-746)
Active failover is no longer be supported in ArangoDB 3.12 and later. This
functionality will be removed from the driver in a future release.
Added
-
Added support for
multi_delimiter
analyzer type (DE-753) -
Added support for
wildcard
analyzer type (DE-750)
v8.7.0
v8.6.0
Added
-
Added
db.createJob
method to convert arbitrary requests into async jobs (DE-610)This method can be used to set the
x-arango-async: store
header on any
request, which will cause the server to store the request in an async job:const collectionsJob = await db.createJob(() => db.collections()); // once loaded, collectionsJob.result will be an array of Collection instances const numbersJob = await db.createJob(() => db.query(aql`FOR i IN 1..1000 RETURN i`) ); // once loaded, numbersJob.result will be an ArrayCursor of numbers
v8.5.0
Added
-
Implemented hot backup API (DE-576)
-
Implemented logging API (DE-144, DE-145, DE-146, DE-147)
-
Implemented async jobs management (DE-339)
-
Added
db.shutdown
to initiate a clean shutdown of the server -
Added
db.time
method to retrieve the server's system time
v8.4.1
v8.4.0
Changed
-
Fetching additional cursor results now uses
POST
instead ofPUT
(DE-605)The
POST
route was deprecated and thePUT
route is supported in all
actively maintained versions of ArangoDB. -
User management methods now use database-relative URLs (DE-606)
Previously these methods would make requests without a database prefix,
implicitly using the_system
database. -
aql
template strings now take a generic type argumentThis allows explictly setting the item type of the
ArrayCursor
returned by
db.query
when usingaql
template strings. Note that like when setting
the type ondb.query
directly, arangojs can make no guarantees that the
type matches the actual data returned by the query.const numbers = await db.query(aql<{ index: number; squared: number }>` FOR i IN 1..1000 RETURN { index: i, squared: i * i } `); const first = await numbers.next(); // { index: number; squared: number; } console.log(first.index, first.squared); // 1 1
Fixed
-
Fixed
listUsers
behavior (#782) -
Fixed
graph.create
not correctly handlingisDisjoint
option
Added
-
Added missing attributes to
QueryInfo
andMultiExplainResult.stats
types (DE-607) -
Added cluster rebalancing methods to
Database
(DE-583) -
Added
db.withTransaction
helper method for streaming transactions (#786)This method allows using streaming transactions without having to manually
begin and commit or abort the transaction.const vertices = db.collection("vertices"); const edges = db.collection("edges"); const info = await db.withTransaction([vertices, edges], async (step) => { const start = await step(() => vertices.document("a")); const end = await step(() => vertices.document("b")); return await step(() => edges.save({ _from: start._id, _to: end._id })); });