Releases: arangodb/arangojs
v10.1.1
v10.1.0
v10.0.0
This is a major release and breaks backwards compatibility.
See the migration guide for detailed instructions
for upgrading your code to arangojs v10.
Removed
-
Removed unused
CreateUserOptions
typeThe actual type used by the
db.createUser
method is stillUserOptions
. -
Removed unused
IndexDetails
typeThis type was intended to be returned by
collection.indexes
when the
withStats
option is set totrue
but thefigures
property is already
included in the current return type. -
Removed Node.js 18 support
Node.js 18 will reach its end of life in May 2025, so arangojs will no
longer support this version of Node.js going forward.For more information, see the Node.js release schedule.
Changed
-
Closing a connection now closes all open requests
Previously in certain situations only the most recent request would be
closed per server. Note that this still merely aborts the requests but
does not guarantee the underlying connections are closed as these are
handled by Node.js or the browser natively. need to be installed
otherwise. -
Moved fetch-specific
config
options from intoconfig.fetchOptions
The following options were moved:
credentials
,headers
andkeepalive
. -
db.setUserAccessLevel
now takesgrant
as a separate parameterThe parameter was previously passed as an additional property in the
options
parameter.
Error handling
-
Errors encountered before a request completes are now wrapped in a
NetworkError
or a subclass thereofThis should help making it easier to diagnose network issues and distinguish
the relevant error conditions.The originating error can still be accessed using the
cause
property of the
NetworkError
error. -
HttpError
now extends theNetworkError
classThis allows treating all non-
ArangoError
errors as one category of errors,
even when there is no server response available. -
db.waitForPropagation
now throws aPropagationTimeoutError
error when
invoked with atimeout
option and the timeout duration is exceededThe method would previously throw the most recent error encountered while
waiting for replication. The originating error can still be accessed using
thecause
property of thePropagationTimeoutError
error. -
db.waitForPropagation
now respects thetimeout
option more strictlyPreviously the method would only time out if the timeout duration was
exceeded after the most recent request failed. Now the timeout is
recalculated and passed on to each request, preventing it from exceeding
the specified duration.If the propagation timed out due to an underlying request exceeding the
timeout duration, thecause
property of thePropagationTimeoutError
error will be aResponseTimeoutError
error. -
config.beforeRequest
andconfig.afterResponse
callbacks can now return
promisesIf the callback returns a promise, it will be awaited before the request
and response cycle proceeds. If either callback throws an error or returns
a promise that is rejected, that error will be thrown instead. -
config.afterResponse
callback signature changedThe callback signature previously used the internal
ArangojsResponse
type.
The new signature uses theResponse
type of the Fetch API with an
additionalrequest
property to more accurately represent the actual value
it receives as theparsedBody
property will never be present. -
response
property onArangoError
is now optionalThis property should always be present but this allows using the error in
situations where a response might not be available.
General type changes
-
Changed
GraphVertexCollection
andGraphEdgeCollection
generic types to
take separateEntryResultType
andEntryInputType
type parameters -
Changed
db.collection
,db.createCollection
anddb.createEdgeCollection
methods to take separateEntryResultType
andEntryInputType
type
parametersThese type parameters are used to narrow the the returned collection type.
-
Changed
db.removeUser
method return type toPromise<void>
The previous return type served no purpose.
-
Changed
QueueTimeMetrics
type to an interface -
Changed
CursorExtras
andCursorStats
interfaces to types
Low-level request/route changes
-
Renamed
path
option topathname
inRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Removed
basePath
option fromRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Renamed
route.path
property toroute.pathname
Renamed methods
-
Renamed various methods for consistency:
Methods that return an array now follow the
listNouns
pattern, methods that
return a "list of nouns" wrapped in an object have been renamed to follow the
getNouns
pattern to avoid confusion:db.listServiceScripts
->db.getServiceScripts
db.listHotBackups
->db.getHotBackups
db.listFunctions
->db.listUserFunctions
db.getLogMessages
->db.listLogMessages
-
Renamed AQL user function management methods:
db.createFunction
->db.createUserFunction
db.dropFunction
->db.dropUserFunction
Module renaming
-
Renamed most modules to plural form for consistency
The following modules were renamed:
arangojs/analyzer
->arangojs/analyzers
arangojs/collection
->arangojs/collections
arangojs/cursor
->arangojs/cursors
arangojs/database
->arangojs/databases
arangojs/error
->arangojs/errors
arangojs/graph
->arangojs/graphs
arangojs/job
->arangojs/jobs
arangojs/route
->arangojs/routes
arangojs/transaction
->arangojs/transactions
arangojs/view
->arangojs/views
-
Moved internal utility functions to new
arangojs/lib/util
moduleThese methods are all still marked as internal and should not be used
directly.
Moved types
-
Moved document related types from
arangojs/collection
module to
arangojs/documents
moduleThe following types were moved:
DocumentOperationFailure
,
DocumentOperationMetadata
,DocumentExistsOptions
,
CollectionReadOptions
,CollectionBatchReadOptions
,
CollectionInsertOptions
,CollectionReplaceOptions
,
CollectionUpdateOptions
,CollectionRemoveOptions
,
CollectionImportOptions
,CollectionEdgesOptions
,
CollectionImportResult
andCollectionEdgesResult
-
Moved index related types from
arangojs/collection
module to
arangojs/indexes
moduleThe following types were moved:
IndexListOptions
. -
Moved transaction related types from
arangojs/database
module to
arangojs/transactions
moduleThe following types were moved:
TransactionCollections
,
TransactionOptions
andTransactionDetails
. -
Moved cluster related types from
arangojs/database
module to new
arangojs/clusters
moduleThe following types were moved:
ClusterImbalanceInfo
,
ClusterRebalanceState
,ClusterRebalanceOptions
,ClusterRebalanceMove
andClusterRebalanceResult
. -
Moved hot backup related types from
arangojs/database
module to new
arangojs/hot-backups
moduleThe following types were moved:
HotBackupOptions
,HotBackupResult
and
HotBackupList
. -
Moved query related types from
arangojs/database
module to new
arangojs/queries
moduleThe following types were moved:
QueryOptions
,ExplainOptions
,
ExplainPlan
,ExplainStats
,SingleExplainResult
,MultiExplainResult
,
AstNode
,ParseResult
,QueryCachePropertiesOptions
,QueryCacheEntry
,
QueryCacheProperties
,QueryOptimizerRule
,QueryTracking
,
QueryTrackingOptions
,QueryInfo
andAqlUserFunction
. -
Moved service related types from
arangojs/database
module to new
arangojs/services
moduleThe following types were moved:
InstallServiceOptions
,
ReplaceServiceOptions
,UpgradeServiceOptions
,UninstallServiceOptions
,
ServiceSummary
,ServiceInfo
,ServiceConfiguration
,
SingleServiceDependency
,MultiServiceDependency
,ServiceTestStats
,
ServiceTestStreamTest
,ServiceTestStreamReport
,ServiceTestSuiteTest
,
ServiceTestSuite
,ServiceTestSuiteReport
,ServiceTestXunitTest
,
ServiceTestXunitReport
,ServiceTestTapReport
,ServiceTestDefaultTest
,
ServiceTestDefaultReport
andSwaggerJson
. -
Moved user related types from
arangojs/database
module to new
arangojs/users
moduleThe following types were moved:
AccessLevel
,ArangoUser
,UserOptions
,
UserAccessLevelOptions
andCreateDatabaseUser
. -
Moved server administration related types from
arangojs/database
module to
newarangojs/administration
moduleThe following types were moved:
CompactOptions
,EngineInfo
,
EngineStatsInfo
,LicenseInfo
,QueueTimeMetrics
,ServerAvailability
,
ServerStatusInformation
,SingleServerSupportInfo
,ClusterSupportInfo
andVersionInfo
. -
Moved configuration related types to new
arangojs/config
moduleThe following types were moved:
Config
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
. -
Moved
ArangoErrorResponse
type toarangojs/connection
moduleThe type is now also no longer marked as internal.
-
Moved configuration related types to new
arangojs/configuration
moduleThe following types were moved:
ConfigOptions
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
.
Renamed types
-
Renamed
Index
types toIndexDescription
for consistencyThe specific index types were als...
v9.3.0
Added
-
Added
db.compact
method (DE-906) -
Added
db.engineStats
method (DE-932) -
Added
db.getLicense
anddb.setLicense
methods (DE-949) -
Added
db.listQueryCacheEntries
method (DE-149) -
Added
db.clearQueryCache
method (DE-148) -
Added
db.getQueryCacheProperties
method (DE-150) -
Added
db.setQueryCacheProperties
method (DE-151) -
Added
collection.shards
method (DE-939) -
Added support for
mdi-prefixed
indexes (DE-956) -
Restored
fulltext
index type support (DE-957)The
fulltext
index type is still no longer supported for creating new
indexes but can be used to cast existing indexes fromIndex
. -
Added support for
edge
indexes (DE-958)The
Index
type now can also be cast to theEdgeIndex
type.
v10.0.0-rc.0
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 v10.
Removed
-
Removed unused
CreateUserOptions
typeThe actual type used by the
db.createUser
method is stillUserOptions
. -
Removed unused
IndexDetails
typeThis type was intended to be returned by
collection.indexes
when the
withStats
option is set totrue
but thefigures
property is already
included in the current return type.
Changed
-
Closing a connection now closes all open requests
Previously in certain situations only the most recent request would be
closed per server. Note that this still merely aborts the requests but
does not guarantee the underlying connections are closed as these are
handled by Node.js or the browser natively. need to be installed
otherwise. -
Moved fetch-specific
config
options from intoconfig.fetchOptions
The following options were moved:
credentials
,headers
andkeepalive
.
Error handling
-
Errors encountered before a request completes are now wrapped in a
NetworkError
or a subclass thereofThis should help making it easier to diagnose network issues and distinguish
the relevant error conditions.The originating error can still be accessed using the
cause
property of the
NetworkError
error. -
HttpError
now extends theNetworkError
classThis allows treating all non-
ArangoError
errors as one category of errors,
even when there is no server response available. -
db.waitForPropagation
now throws aPropagationTimeoutError
error when
invoked with atimeout
option and the timeout duration is exceededThe method would previously throw the most recent error encountered while
waiting for replication. The originating error can still be accessed using
thecause
property of thePropagationTimeoutError
error. -
db.waitForPropagation
now respects thetimeout
option more strictlyPreviously the method would only time out if the timeout duration was
exceeded after the most recent request failed. Now the timeout is
recalculated and passed on to each request, preventing it from exceeding
the specified duration.If the propagation timed out due to an underlying request exceeding the
timeout duration, thecause
property of thePropagationTimeoutError
error will be aResponseTimeoutError
error. -
config.beforeRequest
andconfig.afterResponse
callbacks can now return
promisesIf the callback returns a promise, it will be awaited before the request
and response cycle proceeds. If either callback throws an error or returns
a promise that is rejected, that error will be thrown instead. -
config.afterResponse
callback signature changedThe callback signature previously used the internal
ArangojsResponse
type.
The new signature uses theResponse
type of the Fetch API with an
additionalrequest
property to more accurately represent the actual value
it receives as theparsedBody
property will never be present. -
response
property onArangoError
is now optionalThis property should always be present but this allows using the error in
situations where a response might not be available.
General type changes
-
Changed
GraphVertexCollection
andGraphEdgeCollection
generic types to
take separateEntryResultType
andEntryInputType
type parameters -
Changed
db.collection
,db.createCollection
anddb.createEdgeCollection
methods to take separateEntryResultType
andEntryInputType
type
parametersThese type parameters are used to narrow the the returned collection type.
-
Changed
db.removeUser
method return type toPromise<void>
The previous return type served no purpose.
-
Changed
QueueTimeMetrics
type to an interface -
Changed
CursorExtras
andCursorStats
interfaces to types
Low-level request/route changes
-
Renamed
path
option topathname
inRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Removed
basePath
option fromRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Renamed
route.path
property toroute.pathname
Renamed methods
-
Renamed various methods for consistency:
Methods that return an array now follow the
listNouns
pattern, methods that
return a "list of nouns" wrapped in an object have been renamed to follow the
getNouns
pattern to avoid confusion:db.listServiceScripts
->db.getServiceScripts
db.listHotBackups
->db.getHotBackups
db.listFunctions
->db.listUserFunctions
db.getLogMessages
->db.listLogMessages
-
Renamed AQL user function management methods:
db.createFunction
->db.createUserFunction
db.dropFunction
->db.dropUserFunction
Module renaming
-
Renamed most modules to plural form for consistency
The following modules were renamed:
arangojs/analyzer
->arangojs/analyzers
arangojs/collection
->arangojs/collections
arangojs/cursor
->arangojs/cursors
arangojs/database
->arangojs/databases
arangojs/error
->arangojs/errors
arangojs/graph
->arangojs/graphs
arangojs/job
->arangojs/jobs
arangojs/route
->arangojs/routes
arangojs/transaction
->arangojs/transactions
arangojs/view
->arangojs/views
-
Moved internal utility functions to new
arangojs/lib/util
moduleThese methods are all still marked as internal and should not be used
directly.
Moved types
-
Moved document related types from
arangojs/collection
module to
arangojs/documents
moduleThe following types were moved:
DocumentOperationFailure
,
DocumentOperationMetadata
,DocumentExistsOptions
,
CollectionReadOptions
,CollectionBatchReadOptions
,
CollectionInsertOptions
,CollectionReplaceOptions
,
CollectionUpdateOptions
,CollectionRemoveOptions
,
CollectionImportOptions
,CollectionEdgesOptions
,
CollectionImportResult
andCollectionEdgesResult
-
Moved index related types from
arangojs/collection
module to
arangojs/indexes
moduleThe following types were moved:
IndexListOptions
. -
Moved transaction related types from
arangojs/database
module to
arangojs/transactions
moduleThe following types were moved:
TransactionCollections
,
TransactionOptions
andTransactionDetails
. -
Moved cluster related types from
arangojs/database
module to new
arangojs/clusters
moduleThe following types were moved:
ClusterImbalanceInfo
,
ClusterRebalanceState
,ClusterRebalanceOptions
,ClusterRebalanceMove
andClusterRebalanceResult
. -
Moved hot backup related types from
arangojs/database
module to new
arangojs/hot-backups
moduleThe following types were moved:
HotBackupOptions
,HotBackupResult
and
HotBackupList
. -
Moved query related types from
arangojs/database
module to new
arangojs/queries
moduleThe following types were moved:
QueryOptions
,ExplainOptions
,
ExplainPlan
,ExplainStats
,SingleExplainResult
,MultiExplainResult
,
AstNode
,ParseResult
,QueryOptimizerRule
,QueryTracking
,
QueryTrackingOptions
,QueryInfo
andAqlUserFunction
. -
Moved service related types from
arangojs/database
module to new
arangojs/services
moduleThe following types were moved:
InstallServiceOptions
,
ReplaceServiceOptions
,UpgradeServiceOptions
,UninstallServiceOptions
,
ServiceSummary
,ServiceInfo
,ServiceConfiguration
,
SingleServiceDependency
,MultiServiceDependency
,ServiceTestStats
,
ServiceTestStreamTest
,ServiceTestStreamReport
,ServiceTestSuiteTest
,
ServiceTestSuite
,ServiceTestSuiteReport
,ServiceTestXunitTest
,
ServiceTestXunitReport
,ServiceTestTapReport
,ServiceTestDefaultTest
,
ServiceTestDefaultReport
andSwaggerJson
. -
Moved user related types from
arangojs/database
module to new
arangojs/users
moduleThe following types were moved:
AccessLevel
,ArangoUser
,UserOptions
,
UserAccessLevelOptions
andCreateDatabaseUser
. -
Moved server administration related types from
arangojs/database
module to
newarangojs/administration
moduleThe following types were moved:
QueueTimeMetrics
andVersionInfo
. -
Moved configuration related types to new
arangojs/config
moduleThe following types were moved:
Config
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
. -
Moved
ArangoErrorResponse
type toarangojs/connection
moduleThe type is now also no longer marked as internal.
-
Moved configuration related types to new
arangojs/configuration
moduleThe following types were moved:
ConfigOptions
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
.
Renamed types
-
Renamed
Index
types toIndexDescription
for consistencyThe specific index types were also renamed accordingly:
Index
->IndexDescription
GeoIndex
->GeoIndexDescription
PersistentIndex
->PersistentIndexDescription
PrimaryIndex
->PrimaryIndexDescription
TtlIndex
->TtlIndexDescription
MdiIndex
->MdiIndexDescription
InvertedIndex
->InvertedIndexDescription
InternalArangosearchIndex
->ArangosearchIndexDescription
InternalIndex
->InternalIndexDescription
HiddenIndex
->HiddenIndexDescription
Note that the "Internal" prefix was drop...
v10.0.0-alpha.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 v10.
Changed
-
Renamed
CollectionDropOptions
type toDropCollectionOptions
-
Renamed
CollectionTruncateOptions
type toTruncateCollectionOptions
-
Renamed
Config
type toConfigOptions
-
Renamed
path
option topathname
inRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Removed
basePath
option fromRequestOptions
typeThis affects the
db.waitForPropagation
androute.request
methods. -
Renamed
route.path
property toroute.pathname
-
Changed error type constructor signatures
The
request
property is now always positional and theoptions
property
is always optional. -
Moved configuration related types to new
config
moduleThe following types were moved:
Config
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
. -
Moved
ArangoErrorResponse
type toconnection
moduleThe type is now also no longer marked as internal.
-
Moved configuration related types to new
configuration
moduleThe following types were moved:
ConfigOptions
,LoadBalancingStrategy
,
BasicAuthCredentials
andBearerAuthCredentials
. -
Moved internal utility functions to new
lib/util
moduleThese methods are all still marked as internal and should not be used
directly. -
Closing a connection now closes all open requests
Previously in certain situations only the most recent request would be
closed per server. Note that this still merely aborts the requests but
does not guarantee the underlying connections are closed as these are
handled by Node.js or the browser natively.
Added
-
Restored support for Unix domain sockets
Using Unix domain sockets requires the
undici
library to be installed. -
Restored support for
config.agentOptions
The
config.agentOptions
option can now be used to create a customundici
agent if theundici
library is installed.
v10.0.0-alpha.0
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 v10.
Removed
-
Removed unused
CreateUserOptions
typeThe actual type used by the
db.createUser
method is stillUserOptions
. -
Removed unused
IndexDetails
typeThis type was intended to be returned by
collection.indexes
when the
withStats
option is set totrue
but thefigures
property is already
included in the current return type.
Changed
-
Changed
QueueTimeMetrics
type to an interface -
Changed
CursorExtras
andCursorStats
interfaces to types -
Changed
GraphVertexCollection
andGraphEdgeCollection
generic types to
take separateEntryResultType
andEntryInputType
type parameters -
Changed
db.collection
,db.createCollection
anddb.createEdgeCollection
methods to take separateEntryResultType
andEntryInputType
type
parametersThese type parameters are used to narrow the the returned collection type.
-
Renamed
db.listServiceScripts
method todb.getServiceScripts
-
Renamed
db.listHotBackups
method todb.getHotBackups
-
Renamed
db.getLogMessages
method todb.listLogMessages
-
Renamed
db.listFunctions
method todb.listUserFunctions
-
Renamed
db.createFunction
method todb.createUserFunction
-
Renamed
db.dropFunction
method todb.dropUserFunction
-
Changed
db.removeUser
method to returnvoid
Module renaming
-
Renamed most modules to plural form for consistency
The following modules were renamed:
arangojs/analyzer
->arangojs/analyzers
arangojs/collection
->arangojs/collections
arangojs/cursor
->arangojs/cursors
arangojs/database
->arangojs/databases
arangojs/error
->arangojs/errors
arangojs/graph
->arangojs/graphs
arangojs/job
->arangojs/jobs
arangojs/route
->arangojs/routes
arangojs/transaction
->arangojs/transactions
arangojs/view
->arangojs/views
Moved types
-
Moved document related types from
arangojs/collection
module to
arangojs/documents
moduleThe following types were moved:
DocumentOperationFailure
,
DocumentOperationMetadata
,DocumentExistsOptions
,
CollectionReadOptions
,CollectionBatchReadOptions
,
CollectionInsertOptions
,CollectionReplaceOptions
,
CollectionUpdateOptions
,CollectionRemoveOptions
,
CollectionImportOptions
,CollectionEdgesOptions
,
CollectionImportResult
andCollectionEdgesResult
-
Moved index related types from
arangojs/collection
module to
arangojs/indexes
moduleThe following types were moved:
IndexListOptions
. -
Moved transaction related types from
arangojs/database
module to
arangojs/transactions
moduleThe following types were moved:
TransactionCollections
,
TransactionOptions
andTransactionDetails
. -
Moved cluster related types from
arangojs/database
module to new
arangojs/clusters
moduleThe following types were moved:
ClusterImbalanceInfo
,
ClusterRebalanceState
,ClusterRebalanceOptions
,ClusterRebalanceMove
andClusterRebalanceResult
. -
Moved hot backup related types from
arangojs/database
module to new
arangojs/hot-backups
moduleThe following types were moved:
HotBackupOptions
,HotBackupResult
and
HotBackupList
. -
Moved query related types from
arangojs/database
module to new
arangojs/queries
moduleThe following types were moved:
QueryOptions
,ExplainOptions
,
ExplainPlan
,ExplainStats
,SingleExplainResult
,MultiExplainResult
,
AstNode
,ParseResult
,QueryOptimizerRule
,QueryTracking
,
QueryTrackingOptions
,QueryInfo
andAqlUserFunction
. -
Moved service related types from
arangojs/database
module to new
arangojs/services
moduleThe following types were moved:
InstallServiceOptions
,
ReplaceServiceOptions
,UpgradeServiceOptions
,UninstallServiceOptions
,
ServiceSummary
,ServiceInfo
,ServiceConfiguration
,
SingleServiceDependency
,MultiServiceDependency
,ServiceTestStats
,
ServiceTestStreamTest
,ServiceTestStreamReport
,ServiceTestSuiteTest
,
ServiceTestSuite
,ServiceTestSuiteReport
,ServiceTestXunitTest
,
ServiceTestXunitReport
,ServiceTestTapReport
,ServiceTestDefaultTest
,
ServiceTestDefaultReport
andSwaggerJson
. -
Moved user related types from
arangojs/database
module to new
arangojs/users
moduleThe following types were moved:
AccessLevel
,ArangoUser
,UserOptions
,
UserAccessLevelOptions
andCreateDatabaseUser
. -
Moved server administration related types from
arangojs/database
module to
newarangojs/administration
moduleThe following types were moved:
QueueTimeMetrics
andVersionInfo
.
Renamed types
-
Renamed
Index
types toIndexDescription
for consistencyThe specific index types were also renamed accordingly:
Index
->IndexDescription
GeoIndex
->GeoIndexDescription
PersistentIndex
->PersistentIndexDescription
PrimaryIndex
->PrimaryIndexDescription
TtlIndex
->TtlIndexDescription
MdiIndex
->MdiIndexDescription
InvertedIndex
->InvertedIndexDescription
InternalArangosearchIndex
->ArangosearchIndexDescription
InternalIndex
->InternalIndexDescription
HiddenIndex
->HiddenIndexDescription
Note that the "Internal" prefix was dropped from
ArangosearchIndexDescription
to more accurately reflect the index type name. The index type still refers
to an internal index, however. -
Renamed various types for consistency:
-
AqlUserFunction
->UserFunctionDescription
-
CollectionMetadata
->CollectionDescription
-
DatabaseInfo
->DatabaseDescription
-
GraphInfo
->GraphDescription
-
ServiceInfo
->ServiceDescription
-
QueryInfo
->QueryDescription
-
QueryTracking
->QueryTrackingInfo
-
TransactionDetails
->TransactionInfo
-
TransactionCollections
->TransactionCollectionOptions
-
CreateDatabaseUser
->CreateDatabaseUserOptions
-
Index operations:
IndexListOptions
->ListIndexesOptions
-
Collection document operations:
DocumentExistsOptions
->DocumentExistsOptions
CollectionReadOptions
->ReadDocumentOptions
CollectionBatchReadOptions
->BulkReadDocumentsOptions
CollectionInsertOptions
->InsertDocumentOptions
CollectionReplaceOptions
->ReplaceDocumentOptions
CollectionUpdateOptions
->UpdateDocumentOptions
CollectionRemoveOptions
->RemoveDocumentOptions
CollectionImportOptions
->ImportDocumentsOptions
CollectionEdgesOptions
->DocumentEdgesOptions
CollectionImportResult
->ImportDocumentsResult
CollectionEdgesResult
->DocumentEdgesResult
-
Graph collection document operation:
GraphCollectionReadOptions
->ReadGraphDocumentOptions
GraphCollectionInsertOptions
->CreateGraphDocumentOptions
GraphCollectionReplaceOptions
->ReplaceGraphDocumentOptions
GraphCollectionRemoveOptions
->RemoveGraphDocumentOptions
ViewPatchPropertiesOptions
->UpdateViewPropertiesOptions
-
View operations:
ArangoSearchViewPatchPropertiesOptions
->UpdateArangoSearchViewPropertiesOptions
SearchAliasViewPatchPropertiesOptions
->UpdateSearchAliasViewPropertiesOptions
SearchAliasViewPatchIndexOptions
->UpdateSearchAliasViewIndexOptions
ArangoSearchViewStoredValueOptions
->CreateArangoSearchViewStoredValueOptions
-
-
Renamed
ArrayCursor
andBatchedArrayCursor
classes toCursor
and
BatchCursor
respectivelyThe previous name was misleading because it conflicted with how the ArangoDB
distinguishes between array cursors and streaming cursors in the interactive
shell. This distinction does not apply to the driver. -
Renamed various types to reduce ambiguity:
ObjectWithId
(inindexes
module) ->ObjectWithIndexId
ObjectWithId
(indocuments
module) ->ObjectWithDocumentId
ObjectWithKey
(indocuments
module) ->ObjectWithDocumentKey
Error handling
-
Errors encountered before a request completes are now wrapped in a
NetworkError
or a subclass thereofThis should help making it easier to diagnose network issues and distinguish
the relevant error conditions.The originating error can still be accessed using the
cause
property of the
NetworkError
error. -
HttpError
now extends theNetworkError
classThis allows treating all non-
ArangoError
errors as one category of errors,
even when there is no server response available. -
db.waitForPropagation
now throws aPropagationTimeoutError
error when
invoked with atimeout
option and the timeout duration is exceededThe method would previously throw the most recent error encountered while
waiting for replication. The originating error can still be accessed using
thecause
property of thePropagationTimeoutError
error. -
db.waitForPropagation
now respects thetimeout
option more strictlyPreviously the method would only time out if the timeout duration was
exceeded after the most recent request failed. Now the timeout is
recalculated and passed on to each request, preventing it from exceeding
the specified duration.If the propagation timed out due to an underlying request exceeding the
timeout duration, thecause
property of thePropagationTimeoutError
error will be a `ResponseTi...
v9.2.0
Added
-
Added
database.availability
method -
Added
database.engine
method (DE-931) -
Added
database.status
method (#811) -
Added
database.supportInfo
method -
Added
keepNull
option toCollectionInsertOptions
type (DE-946)This option was previously missing from the type.
-
Added
allowDirtyRead
option toDocumentExistsOptions
type (DE-945)This option was previously missing from the type.
-
Added
ignoreRevs
option toCollectionBatchReadOptions
type (DE-947)This option was previously missing from the type.
-
Added
options
argument toCollectionTruncateOptions
type (DE-940)There was previously no way to pass options to the
truncate
method. -
Added
database
property toAnalyzer
,ArrayCursor
,BatchedArrayCursor
,
Collection
,Graph
,Job
,Route
,Transaction
andView
(DE-935)This property can be used to access the database instance a given object
belongs to. -
Added
Route#headers
andRoute#path
propertiesThese properties can be used to access the headers and path used when creating
the route. -
Added
ArrayCursor#id
andBatchedArrayCursor#id
properties (DE-936)This property can be used to access the ID of the cursor.
v9.1.0
Changed
-
Removed
progress
property fromIndex
typeThis property is only available when fetching indexes with the
withHidden
option set totrue
.
Added
-
Added
HiddenIndex
type (DE-849)This type is used to represent an index returned by
collection.indexes
when
thewithHidden
option is set totrue
and includes theprogress
property
in addition to internal indexes.
v9.0.0
This is a major release and breaks backwards compatibility.
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. -
Removed
Collection
methods for simple queries:list
,all
,any
,
byExample
,firstExample
,removeByExample
,replaceByExample
,
updateByExample
,lookupByKeys
,removeByKeys
,fulltext
Simple queries were deprecated in ArangoDB 3.4 and can be replicated with AQL.
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. -
Inlined
x3-linkedlist
dependencyInlining this dependency should help make arangojs more portable.
-
Split the Collection type parameter into result and input types (#807)
It is now possible to specify a separate type for the data passed when
creating or modifying documents in addition to the type of the data returned
when fetching documents. This allows excluding computed properties from
the input type while still including them in the result type.
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. -
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. -
Added support for
withStats
option incollection.indexes
This method now takes an object with
withStats
andwithHidden
options
instead of a boolean flag. -
Added readonly
Job#id
propertyThis property was not previously exposed.
-
Added
skipFastLockRound
option for streaming transactionsThis option was introduced in 3.12.1 and allows skipping the fast lock round.
-
Added non-specific
EnsureIndexOptions
type andensureIndex
method
signature (#778)This allows creating indexes without narrowing the index type.