Skip to content

Releases: arangodb/arangojs

v10.1.1

13 Jan 10:06
c13259a
Compare
Choose a tag to compare

Changed

  • Removed File from source option types in Foxx CRUD methods (#818)

    The source option type already includes Blob, which File extends.

v10.1.0

13 Jan 09:48
6ded453
Compare
Choose a tag to compare

Added

  • Added ignoreRevs option to RemoveDocumentOptions type (DE-947)

    This affects the collection.remove and collection.removeAll methods.

v10.0.0

06 Jan 18:46
dec0293
Compare
Choose a tag to compare

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 type

    The actual type used by the db.createUser method is still UserOptions.

  • Removed unused IndexDetails type

    This type was intended to be returned by collection.indexes when the
    withStats option is set to true but the figures 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 into config.fetchOptions

    The following options were moved: credentials, headers and keepalive.

  • db.setUserAccessLevel now takes grant as a separate parameter

    The 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 thereof

    This 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 the NetworkError class

    This allows treating all non-ArangoError errors as one category of errors,
    even when there is no server response available.

  • db.waitForPropagation now throws a PropagationTimeoutError error when
    invoked with a timeout option and the timeout duration is exceeded

    The method would previously throw the most recent error encountered while
    waiting for replication. The originating error can still be accessed using
    the cause property of the PropagationTimeoutError error.

  • db.waitForPropagation now respects the timeout option more strictly

    Previously 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, the cause property of the PropagationTimeoutError
    error will be a ResponseTimeoutError error.

  • config.beforeRequest and config.afterResponse callbacks can now return
    promises

    If 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 changed

    The callback signature previously used the internal ArangojsResponse type.
    The new signature uses the Response type of the Fetch API with an
    additional request property to more accurately represent the actual value
    it receives as the parsedBody property will never be present.

  • response property on ArangoError is now optional

    This 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 and GraphEdgeCollection generic types to
    take separate EntryResultType and EntryInputType type parameters

  • Changed db.collection, db.createCollection and db.createEdgeCollection
    methods to take separate EntryResultType and EntryInputType type
    parameters

    These type parameters are used to narrow the the returned collection type.

  • Changed db.removeUser method return type to Promise<void>

    The previous return type served no purpose.

  • Changed QueueTimeMetrics type to an interface

  • Changed CursorExtras and CursorStats interfaces to types

Low-level request/route changes

  • Renamed path option to pathname in RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Removed basePath option from RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Renamed route.path property to route.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 module

    These 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 module

    The following types were moved: DocumentOperationFailure,
    DocumentOperationMetadata, DocumentExistsOptions,
    CollectionReadOptions, CollectionBatchReadOptions,
    CollectionInsertOptions, CollectionReplaceOptions,
    CollectionUpdateOptions, CollectionRemoveOptions,
    CollectionImportOptions, CollectionEdgesOptions,
    CollectionImportResult and CollectionEdgesResult

  • Moved index related types from arangojs/collection module to
    arangojs/indexes module

    The following types were moved: IndexListOptions.

  • Moved transaction related types from arangojs/database module to
    arangojs/transactions module

    The following types were moved: TransactionCollections,
    TransactionOptions and TransactionDetails.

  • Moved cluster related types from arangojs/database module to new
    arangojs/clusters module

    The following types were moved: ClusterImbalanceInfo,
    ClusterRebalanceState, ClusterRebalanceOptions, ClusterRebalanceMove
    and ClusterRebalanceResult.

  • Moved hot backup related types from arangojs/database module to new
    arangojs/hot-backups module

    The following types were moved: HotBackupOptions, HotBackupResult and
    HotBackupList.

  • Moved query related types from arangojs/database module to new
    arangojs/queries module

    The following types were moved: QueryOptions, ExplainOptions,
    ExplainPlan, ExplainStats, SingleExplainResult, MultiExplainResult,
    AstNode, ParseResult, QueryCachePropertiesOptions, QueryCacheEntry,
    QueryCacheProperties, QueryOptimizerRule, QueryTracking,
    QueryTrackingOptions, QueryInfo and AqlUserFunction.

  • Moved service related types from arangojs/database module to new
    arangojs/services module

    The following types were moved: InstallServiceOptions,
    ReplaceServiceOptions, UpgradeServiceOptions, UninstallServiceOptions,
    ServiceSummary, ServiceInfo, ServiceConfiguration,
    SingleServiceDependency, MultiServiceDependency, ServiceTestStats,
    ServiceTestStreamTest, ServiceTestStreamReport, ServiceTestSuiteTest,
    ServiceTestSuite, ServiceTestSuiteReport, ServiceTestXunitTest,
    ServiceTestXunitReport, ServiceTestTapReport, ServiceTestDefaultTest,
    ServiceTestDefaultReport and SwaggerJson.

  • Moved user related types from arangojs/database module to new
    arangojs/users module

    The following types were moved: AccessLevel, ArangoUser, UserOptions,
    UserAccessLevelOptions and CreateDatabaseUser.

  • Moved server administration related types from arangojs/database module to
    new arangojs/administration module

    The following types were moved: CompactOptions, EngineInfo,
    EngineStatsInfo, LicenseInfo, QueueTimeMetrics, ServerAvailability,
    ServerStatusInformation, SingleServerSupportInfo, ClusterSupportInfo
    and VersionInfo.

  • Moved configuration related types to new arangojs/config module

    The following types were moved: Config, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

  • Moved ArangoErrorResponse type to arangojs/connection module

    The type is now also no longer marked as internal.

  • Moved configuration related types to new arangojs/configuration module

    The following types were moved: ConfigOptions, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

Renamed types

  • Renamed Index types to IndexDescription for consistency

    The specific index types were als...

Read more

v9.3.0

06 Jan 18:45
eeae04b
Compare
Choose a tag to compare

Added

  • Added db.compact method (DE-906)

  • Added db.engineStats method (DE-932)

  • Added db.getLicense and db.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 from Index.

  • Added support for edge indexes (DE-958)

    The Index type now can also be cast to the EdgeIndex type.

v10.0.0-rc.0

10 Dec 16:48
f558557
Compare
Choose a tag to compare
v10.0.0-rc.0 Pre-release
Pre-release

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 type

    The actual type used by the db.createUser method is still UserOptions.

  • Removed unused IndexDetails type

    This type was intended to be returned by collection.indexes when the
    withStats option is set to true but the figures 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 into config.fetchOptions

    The following options were moved: credentials, headers and keepalive.

Error handling

  • Errors encountered before a request completes are now wrapped in a
    NetworkError or a subclass thereof

    This 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 the NetworkError class

    This allows treating all non-ArangoError errors as one category of errors,
    even when there is no server response available.

  • db.waitForPropagation now throws a PropagationTimeoutError error when
    invoked with a timeout option and the timeout duration is exceeded

    The method would previously throw the most recent error encountered while
    waiting for replication. The originating error can still be accessed using
    the cause property of the PropagationTimeoutError error.

  • db.waitForPropagation now respects the timeout option more strictly

    Previously 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, the cause property of the PropagationTimeoutError
    error will be a ResponseTimeoutError error.

  • config.beforeRequest and config.afterResponse callbacks can now return
    promises

    If 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 changed

    The callback signature previously used the internal ArangojsResponse type.
    The new signature uses the Response type of the Fetch API with an
    additional request property to more accurately represent the actual value
    it receives as the parsedBody property will never be present.

  • response property on ArangoError is now optional

    This 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 and GraphEdgeCollection generic types to
    take separate EntryResultType and EntryInputType type parameters

  • Changed db.collection, db.createCollection and db.createEdgeCollection
    methods to take separate EntryResultType and EntryInputType type
    parameters

    These type parameters are used to narrow the the returned collection type.

  • Changed db.removeUser method return type to Promise<void>

    The previous return type served no purpose.

  • Changed QueueTimeMetrics type to an interface

  • Changed CursorExtras and CursorStats interfaces to types

Low-level request/route changes

  • Renamed path option to pathname in RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Removed basePath option from RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Renamed route.path property to route.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 module

    These 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 module

    The following types were moved: DocumentOperationFailure,
    DocumentOperationMetadata, DocumentExistsOptions,
    CollectionReadOptions, CollectionBatchReadOptions,
    CollectionInsertOptions, CollectionReplaceOptions,
    CollectionUpdateOptions, CollectionRemoveOptions,
    CollectionImportOptions, CollectionEdgesOptions,
    CollectionImportResult and CollectionEdgesResult

  • Moved index related types from arangojs/collection module to
    arangojs/indexes module

    The following types were moved: IndexListOptions.

  • Moved transaction related types from arangojs/database module to
    arangojs/transactions module

    The following types were moved: TransactionCollections,
    TransactionOptions and TransactionDetails.

  • Moved cluster related types from arangojs/database module to new
    arangojs/clusters module

    The following types were moved: ClusterImbalanceInfo,
    ClusterRebalanceState, ClusterRebalanceOptions, ClusterRebalanceMove
    and ClusterRebalanceResult.

  • Moved hot backup related types from arangojs/database module to new
    arangojs/hot-backups module

    The following types were moved: HotBackupOptions, HotBackupResult and
    HotBackupList.

  • Moved query related types from arangojs/database module to new
    arangojs/queries module

    The following types were moved: QueryOptions, ExplainOptions,
    ExplainPlan, ExplainStats, SingleExplainResult, MultiExplainResult,
    AstNode, ParseResult, QueryOptimizerRule, QueryTracking,
    QueryTrackingOptions, QueryInfo and AqlUserFunction.

  • Moved service related types from arangojs/database module to new
    arangojs/services module

    The following types were moved: InstallServiceOptions,
    ReplaceServiceOptions, UpgradeServiceOptions, UninstallServiceOptions,
    ServiceSummary, ServiceInfo, ServiceConfiguration,
    SingleServiceDependency, MultiServiceDependency, ServiceTestStats,
    ServiceTestStreamTest, ServiceTestStreamReport, ServiceTestSuiteTest,
    ServiceTestSuite, ServiceTestSuiteReport, ServiceTestXunitTest,
    ServiceTestXunitReport, ServiceTestTapReport, ServiceTestDefaultTest,
    ServiceTestDefaultReport and SwaggerJson.

  • Moved user related types from arangojs/database module to new
    arangojs/users module

    The following types were moved: AccessLevel, ArangoUser, UserOptions,
    UserAccessLevelOptions and CreateDatabaseUser.

  • Moved server administration related types from arangojs/database module to
    new arangojs/administration module

    The following types were moved: QueueTimeMetrics and VersionInfo.

  • Moved configuration related types to new arangojs/config module

    The following types were moved: Config, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

  • Moved ArangoErrorResponse type to arangojs/connection module

    The type is now also no longer marked as internal.

  • Moved configuration related types to new arangojs/configuration module

    The following types were moved: ConfigOptions, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

Renamed types

  • Renamed Index types to IndexDescription for consistency

    The 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...

Read more

v10.0.0-alpha.1

09 Dec 14:28
460cf2b
Compare
Choose a tag to compare
v10.0.0-alpha.1 Pre-release
Pre-release

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 to DropCollectionOptions

  • Renamed CollectionTruncateOptions type to TruncateCollectionOptions

  • Renamed Config type to ConfigOptions

  • Renamed path option to pathname in RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Removed basePath option from RequestOptions type

    This affects the db.waitForPropagation and route.request methods.

  • Renamed route.path property to route.pathname

  • Changed error type constructor signatures

    The request property is now always positional and the options property
    is always optional.

  • Moved configuration related types to new config module

    The following types were moved: Config, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

  • Moved ArangoErrorResponse type to connection module

    The type is now also no longer marked as internal.

  • Moved configuration related types to new configuration module

    The following types were moved: ConfigOptions, LoadBalancingStrategy,
    BasicAuthCredentials and BearerAuthCredentials.

  • Moved internal utility functions to new lib/util module

    These 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 custom undici
    agent if the undici library is installed.

v10.0.0-alpha.0

28 Nov 13:24
e1cd08f
Compare
Choose a tag to compare
v10.0.0-alpha.0 Pre-release
Pre-release

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 type

    The actual type used by the db.createUser method is still UserOptions.

  • Removed unused IndexDetails type

    This type was intended to be returned by collection.indexes when the
    withStats option is set to true but the figures property is already
    included in the current return type.

Changed

  • Changed QueueTimeMetrics type to an interface

  • Changed CursorExtras and CursorStats interfaces to types

  • Changed GraphVertexCollection and GraphEdgeCollection generic types to
    take separate EntryResultType and EntryInputType type parameters

  • Changed db.collection, db.createCollection and db.createEdgeCollection
    methods to take separate EntryResultType and EntryInputType type
    parameters

    These type parameters are used to narrow the the returned collection type.

  • Renamed db.listServiceScripts method to db.getServiceScripts

  • Renamed db.listHotBackups method to db.getHotBackups

  • Renamed db.getLogMessages method to db.listLogMessages

  • Renamed db.listFunctions method to db.listUserFunctions

  • Renamed db.createFunction method to db.createUserFunction

  • Renamed db.dropFunction method to db.dropUserFunction

  • Changed db.removeUser method to return void

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 module

    The following types were moved: DocumentOperationFailure,
    DocumentOperationMetadata, DocumentExistsOptions,
    CollectionReadOptions, CollectionBatchReadOptions,
    CollectionInsertOptions, CollectionReplaceOptions,
    CollectionUpdateOptions, CollectionRemoveOptions,
    CollectionImportOptions, CollectionEdgesOptions,
    CollectionImportResult and CollectionEdgesResult

  • Moved index related types from arangojs/collection module to
    arangojs/indexes module

    The following types were moved: IndexListOptions.

  • Moved transaction related types from arangojs/database module to
    arangojs/transactions module

    The following types were moved: TransactionCollections,
    TransactionOptions and TransactionDetails.

  • Moved cluster related types from arangojs/database module to new
    arangojs/clusters module

    The following types were moved: ClusterImbalanceInfo,
    ClusterRebalanceState, ClusterRebalanceOptions, ClusterRebalanceMove
    and ClusterRebalanceResult.

  • Moved hot backup related types from arangojs/database module to new
    arangojs/hot-backups module

    The following types were moved: HotBackupOptions, HotBackupResult and
    HotBackupList.

  • Moved query related types from arangojs/database module to new
    arangojs/queries module

    The following types were moved: QueryOptions, ExplainOptions,
    ExplainPlan, ExplainStats, SingleExplainResult, MultiExplainResult,
    AstNode, ParseResult, QueryOptimizerRule, QueryTracking,
    QueryTrackingOptions, QueryInfo and AqlUserFunction.

  • Moved service related types from arangojs/database module to new
    arangojs/services module

    The following types were moved: InstallServiceOptions,
    ReplaceServiceOptions, UpgradeServiceOptions, UninstallServiceOptions,
    ServiceSummary, ServiceInfo, ServiceConfiguration,
    SingleServiceDependency, MultiServiceDependency, ServiceTestStats,
    ServiceTestStreamTest, ServiceTestStreamReport, ServiceTestSuiteTest,
    ServiceTestSuite, ServiceTestSuiteReport, ServiceTestXunitTest,
    ServiceTestXunitReport, ServiceTestTapReport, ServiceTestDefaultTest,
    ServiceTestDefaultReport and SwaggerJson.

  • Moved user related types from arangojs/database module to new
    arangojs/users module

    The following types were moved: AccessLevel, ArangoUser, UserOptions,
    UserAccessLevelOptions and CreateDatabaseUser.

  • Moved server administration related types from arangojs/database module to
    new arangojs/administration module

    The following types were moved: QueueTimeMetrics and VersionInfo.

Renamed types

  • Renamed Index types to IndexDescription for consistency

    The 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 and BatchedArrayCursor classes to Cursor and
    BatchCursor respectively

    The 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 (in indexes module) -> ObjectWithIndexId
    • ObjectWithId (in documents module) -> ObjectWithDocumentId
    • ObjectWithKey (in documents module) -> ObjectWithDocumentKey

Error handling

  • Errors encountered before a request completes are now wrapped in a
    NetworkError or a subclass thereof

    This 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 the NetworkError class

    This allows treating all non-ArangoError errors as one category of errors,
    even when there is no server response available.

  • db.waitForPropagation now throws a PropagationTimeoutError error when
    invoked with a timeout option and the timeout duration is exceeded

    The method would previously throw the most recent error encountered while
    waiting for replication. The originating error can still be accessed using
    the cause property of the PropagationTimeoutError error.

  • db.waitForPropagation now respects the timeout option more strictly

    Previously 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, the cause property of the PropagationTimeoutError
    error will be a `ResponseTi...

Read more

v9.2.0

27 Nov 09:33
a058524
Compare
Choose a tag to compare

Added

  • Added database.availability method

  • Added database.engine method (DE-931)

  • Added database.status method (#811)

  • Added database.supportInfo method

  • Added keepNull option to CollectionInsertOptions type (DE-946)

    This option was previously missing from the type.

  • Added allowDirtyRead option to DocumentExistsOptions type (DE-945)

    This option was previously missing from the type.

  • Added ignoreRevs option to CollectionBatchReadOptions type (DE-947)

    This option was previously missing from the type.

  • Added options argument to CollectionTruncateOptions type (DE-940)

    There was previously no way to pass options to the truncate method.

  • Added database property to Analyzer, ArrayCursor, BatchedArrayCursor,
    Collection, Graph, Job, Route, Transaction and View (DE-935)

    This property can be used to access the database instance a given object
    belongs to.

  • Added Route#headers and Route#path properties

    These properties can be used to access the headers and path used when creating
    the route.

  • Added ArrayCursor#id and BatchedArrayCursor#id properties (DE-936)

    This property can be used to access the ID of the cursor.

v9.1.0

25 Sep 09:17
93441dc
Compare
Choose a tag to compare

Changed

  • Removed progress property from Index type

    This property is only available when fetching indexes with the withHidden
    option set to true.

Added

  • Added HiddenIndex type (DE-849)

    This type is used to represent an index returned by collection.indexes when
    the withHidden option is set to true and includes the progress property
    in addition to internal indexes.

v9.0.0

31 Jul 08:27
23032a2
Compare
Choose a tag to compare

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 and Headers types

    These can mostly be replaced with the native URLSearchParams and Headers
    types but most public methods still accept the equivalent Record types for
    convenience.

  • Removed deprecated FulltextIndex and related types

    Fulltext 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 and https modules has been
    replaced with all-new logic using the web standard fetch 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 AQL join helper function to AqlQuery

    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 equivalent

    This change should be backwards-compatible but may produce different results
    when using non-normalized paths and base-paths in custom routes. This
    should help support more environments and reduce the size of the browser
    bundle.

  • Inlined x3-linkedlist dependency

    Inlining 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 in collection.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 in collection.indexes

    This method now takes an object with withStats and withHidden options
    instead of a boolean flag.

  • Added readonly Job#id property

    This property was not previously exposed.

  • Added skipFastLockRound option for streaming transactions

    This option was introduced in 3.12.1 and allows skipping the fast lock round.

  • Added non-specific EnsureIndexOptions type and ensureIndex method
    signature (#778)

    This allows creating indexes without narrowing the index type.