chore(deps): update dependency arangojs to v10 #110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^8.6.0->^10.0.0Release Notes
arangodb/arangojs (arangojs)
v10.1.2Compare Source
Added
v10.1.1Compare Source
Changed
Removed
Filefromsourceoption types in Foxx CRUD methods (#818)The
sourceoption type already includesBlob, whichFileextends.v10.1.0Compare Source
Added
Added
ignoreRevsoption toRemoveDocumentOptionstype (DE-947)This affects the
collection.removeandcollection.removeAllmethods.v10.0.0Compare Source
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
CreateUserOptionstypeThe actual type used by the
db.createUsermethod is stillUserOptions.Removed unused
IndexDetailstypeThis type was intended to be returned by
collection.indexeswhen thewithStatsoption is set totruebut thefiguresproperty is alreadyincluded 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
configoptions from intoconfig.fetchOptionsThe following options were moved:
credentials,headersandkeepalive.db.setUserAccessLevelnow takesgrantas a separate parameterThe parameter was previously passed as an additional property in the
optionsparameter.Error handling
Errors encountered before a request completes are now wrapped in a
NetworkErroror 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
causeproperty of theNetworkErrorerror.HttpErrornow extends theNetworkErrorclassThis allows treating all non-
ArangoErrorerrors as one category of errors,even when there is no server response available.
db.waitForPropagationnow throws aPropagationTimeoutErrorerror wheninvoked with a
timeoutoption 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
the
causeproperty of thePropagationTimeoutErrorerror.db.waitForPropagationnow respects thetimeoutoption 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, the
causeproperty of thePropagationTimeoutErrorerror will be a
ResponseTimeoutErrorerror.config.beforeRequestandconfig.afterResponsecallbacks can now returnpromises
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.afterResponsecallback signature changedThe callback signature previously used the internal
ArangojsResponsetype.The new signature uses the
Responsetype of the Fetch API with anadditional
requestproperty to more accurately represent the actual valueit receives as the
parsedBodyproperty will never be present.responseproperty onArangoErroris 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
GraphVertexCollectionandGraphEdgeCollectiongeneric types totake separate
EntryResultTypeandEntryInputTypetype parametersChanged
db.collection,db.createCollectionanddb.createEdgeCollectionmethods to take separate
EntryResultTypeandEntryInputTypetypeparameters
These type parameters are used to narrow the the returned collection type.
Changed
db.removeUsermethod return type toPromise<void>The previous return type served no purpose.
Changed
QueueTimeMetricstype to an interfaceChanged
CursorExtrasandCursorStatsinterfaces to typesLow-level request/route changes
Renamed
pathoption topathnameinRequestOptionstypeThis affects the
db.waitForPropagationandroute.requestmethods.Removed
basePathoption fromRequestOptionstypeThis affects the
db.waitForPropagationandroute.requestmethods.Renamed
route.pathproperty toroute.pathnameRenamed methods
Renamed various methods for consistency:
Methods that return an array now follow the
listNounspattern, methods thatreturn a "list of nouns" wrapped in an object have been renamed to follow the
getNounspattern to avoid confusion:db.listServiceScripts->db.getServiceScriptsdb.listHotBackups->db.getHotBackupsdb.listFunctions->db.listUserFunctionsdb.getLogMessages->db.listLogMessagesRenamed AQL user function management methods:
db.createFunction->db.createUserFunctiondb.dropFunction->db.dropUserFunctionModule renaming
Renamed most modules to plural form for consistency
The following modules were renamed:
arangojs/analyzer->arangojs/analyzersarangojs/collection->arangojs/collectionsarangojs/cursor->arangojs/cursorsarangojs/database->arangojs/databasesarangojs/error->arangojs/errorsarangojs/graph->arangojs/graphsarangojs/job->arangojs/jobsarangojs/route->arangojs/routesarangojs/transaction->arangojs/transactionsarangojs/view->arangojs/viewsMoved internal utility functions to new
arangojs/lib/utilmoduleThese methods are all still marked as internal and should not be used
directly.
Moved types
Moved document related types from
arangojs/collectionmodule toarangojs/documentsmoduleThe following types were moved:
DocumentOperationFailure,DocumentOperationMetadata,DocumentExistsOptions,CollectionReadOptions,CollectionBatchReadOptions,CollectionInsertOptions,CollectionReplaceOptions,CollectionUpdateOptions,CollectionRemoveOptions,CollectionImportOptions,CollectionEdgesOptions,CollectionImportResultandCollectionEdgesResultMoved index related types from
arangojs/collectionmodule toarangojs/indexesmoduleThe following types were moved:
IndexListOptions.Moved transaction related types from
arangojs/databasemodule toarangojs/transactionsmoduleThe following types were moved:
TransactionCollections,TransactionOptionsandTransactionDetails.Moved cluster related types from
arangojs/databasemodule to newarangojs/clustersmoduleThe following types were moved:
ClusterImbalanceInfo,ClusterRebalanceState,ClusterRebalanceOptions,ClusterRebalanceMoveand
ClusterRebalanceResult.Moved hot backup related types from
arangojs/databasemodule to newarangojs/hot-backupsmoduleThe following types were moved:
HotBackupOptions,HotBackupResultandHotBackupList.Moved query related types from
arangojs/databasemodule to newarangojs/queriesmoduleThe following types were moved:
QueryOptions,ExplainOptions,ExplainPlan,ExplainStats,SingleExplainResult,MultiExplainResult,AstNode,ParseResult,QueryCachePropertiesOptions,QueryCacheEntry,QueryCacheProperties,QueryOptimizerRule,QueryTracking,QueryTrackingOptions,QueryInfoandAqlUserFunction.Moved service related types from
arangojs/databasemodule to newarangojs/servicesmoduleThe following types were moved:
InstallServiceOptions,ReplaceServiceOptions,UpgradeServiceOptions,UninstallServiceOptions,ServiceSummary,ServiceInfo,ServiceConfiguration,SingleServiceDependency,MultiServiceDependency,ServiceTestStats,ServiceTestStreamTest,ServiceTestStreamReport,ServiceTestSuiteTest,ServiceTestSuite,ServiceTestSuiteReport,ServiceTestXunitTest,ServiceTestXunitReport,ServiceTestTapReport,ServiceTestDefaultTest,ServiceTestDefaultReportandSwaggerJson.Moved user related types from
arangojs/databasemodule to newarangojs/usersmoduleThe following types were moved:
AccessLevel,ArangoUser,UserOptions,UserAccessLevelOptionsandCreateDatabaseUser.Moved server administration related types from
arangojs/databasemodule tonew
arangojs/administrationmoduleThe following types were moved:
CompactOptions,EngineInfo,EngineStatsInfo,LicenseInfo,QueueTimeMetrics,ServerAvailability,ServerStatusInformation,SingleServerSupportInfo,ClusterSupportInfoand
VersionInfo.Moved configuration related types to new
arangojs/configmoduleThe following types were moved:
Config,LoadBalancingStrategy,BasicAuthCredentialsandBearerAuthCredentials.Moved
ArangoErrorResponsetype toarangojs/connectionmoduleThe type is now also no longer marked as internal.
Moved configuration related types to new
arangojs/configurationmoduleThe following types were moved:
ConfigOptions,LoadBalancingStrategy,BasicAuthCredentialsandBearerAuthCredentials.Renamed types
Renamed
Indextypes toIndexDescriptionfor consistencyThe specific index types were also renamed accordingly:
Index->IndexDescriptionGeoIndex->GeoIndexDescriptionPersistentIndex->PersistentIndexDescriptionPrimaryIndex->PrimaryIndexDescriptionEdgeIndex->EdgeIndexDescriptionTtlIndex->TtlIndexDescriptionFulltextIndex->FulltextIndexDescriptionMdiIndex->MdiIndexDescriptionMdiPrefixedIndex->MdiPrefixedIndexDescriptionInvertedIndex->InvertedIndexDescriptionInternalArangosearchIndex->ArangosearchIndexDescriptionInternalIndex->InternalIndexDescriptionHiddenIndex->HiddenIndexDescriptionNote that the "Internal" prefix was dropped from
ArangosearchIndexDescriptionto more accurately reflect the index type name. The index type still refers
to an internal index, however.
Renamed various types for consistency:
Types representing an instance of a specific entity type in ArangoDB like a
collection, graph or query now follow the
NounDescriptionnaming pattern:AqlUserFunction->UserFunctionDescriptionCollectionMetadata->CollectionDescriptionDatabaseInfo->DatabaseDescriptionGraphInfo->GraphDescriptionServiceInfo->ServiceDescriptionQueryInfo->QueryDescriptionTransactionDetails->TransactionDescriptionNote that the
TransactionDescriptiontype used bydb.listTransactionsis slightly different from the
TransactionInfotype used by methods ofTransactionobjects due to implementation details of ArangoDB.Types representing general information rather than an instance of something
now generally follow the
NounInfonaming pattern, whereas typesrepresenting the result of an operation generally follow the
NounResultor
VerbNounResultnaming pattern:QueryTracking->QueryTrackingInfoServerStatusInformation->ServerStatusInfoCollectionImportResult->ImportDocumentsResultCollectionEdgesResult->DocumentEdgesResultTypes for options passed to methods now generally follow the
NounOptions,VerbNounOptionsorVerbNounAttributeOptionsnaming patterns:Config->ConfigOptionsTransactionCollections->TransactionCollectionOptionsCreateDatabaseUser->CreateDatabaseUserOptionsCollectionDropOptions->DropCollectionOptionsCollectionTruncateOptions->TruncateCollectionOptionsIndexListOptions->ListIndexesOptionsCollection document operations:
DocumentExistsOptions->DocumentExistsOptionsCollectionReadOptions->ReadDocumentOptionsCollectionBatchReadOptions->BulkReadDocumentsOptionsCollectionInsertOptions->InsertDocumentOptionsCollectionReplaceOptions->ReplaceDocumentOptionsCollectionUpdateOptions->UpdateDocumentOptionsCollectionRemoveOptions->RemoveDocumentOptionsCollectionImportOptions->ImportDocumentsOptionsCollectionEdgesOptions->DocumentEdgesOptionsGraph collection document operation:
GraphCollectionReadOptions->ReadGraphDocumentOptionsGraphCollectionInsertOptions->CreateGraphDocumentOptionsGraphCollectionReplaceOptions->ReplaceGraphDocumentOptionsGraphCollectionRemoveOptions->RemoveGraphDocumentOptionsViewPatchPropertiesOptions->UpdateViewPropertiesOptionsView operations:
ArangoSearchViewPatchPropertiesOptions->UpdateArangoSearchViewPropertiesOptionsSearchAliasViewPatchPropertiesOptions->UpdateSearchAliasViewPropertiesOptionsSearchAliasViewPatchIndexOptions->UpdateSearchAliasViewIndexOptionsArangoSearchViewStoredValueOptions->CreateArangoSearchViewStoredValueOptionsRenamed
ArrayCursorandBatchedArrayCursorclasses toCursorandBatchCursorrespectivelyThe 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(inindexesmodule) ->ObjectWithIndexIdObjectWithId(indocumentsmodule) ->ObjectWithDocumentIdObjectWithKey(indocumentsmodule) ->ObjectWithDocumentKeyAdded
Restored support for Unix domain sockets
Using Unix domain sockets requires the
undicilibrary to be installed.Restored support for
config.agentOptionsThe
config.agentOptionsoption can now be used to create a customundiciagent if the
undicilibrary is installed.Added
config.fetchOptionsoptionThis option can now be used to specify default options for the
fetchfunction used by arangojs like
headers,credentials,keepaliveandredirect.Added
BatchCursor#itemsViewproperty andBatchCursorItemsViewinterfaceThis property provides a low-level interface for consuming the items of the
cursor and is used by the regular item-wise
Cursorclass internally.Added
SystemIndexDescriptiontypeThis type represents either of the system index types
primaryandedgeand can be used to cast indexes returned by
collection.indexes.Added
ProcessedResponsetypeThis type replaces the previously internal
ArangojsResponsetype andextends the native
Responsetype with additional properties.Error handling
Added
config.onErroroption (DE-955)This option can be used to specify a callback function that will be invoked
whenever a request results in an error. Unlike
afterResponse, this callbackwill be invoked even if the request completed but returned an error status.
In this case the error will be the
HttpErrororArangoErrorrepresentingthe error response.
If the
onErrorcallback throws an error or returns a promise that isrejected, that error will be thrown instead.
Added support for
config.fetchOptions.redirectoption (#613)This option can now be used to specify the redirect mode for requests.
When set to
"manual", arangojs will throw anHttpErrorwrapping theredirect response instead of automatically following redirects.
Note that when set to
"error", the native fetch API will throw anon-specific error (usually a
TypeError) that arangojs will wrap in aFetchFailedErrorinstead.Added optional
ArangoError#requestpropertyThis property is always present if the error has a
responseproperty. Innormal use this should always be the case.
Added
NetworkErrorclassThis is the common base class for all errors (including
HttpError) thatoccur while making a request. The originating error can be accessed using the
causeproperty. The request object can be accessed using therequestproperty.
Note that
ArangoErrorand the newPropagationTimeoutErrorerror typedo not extend
NetworkErrorbut may wrap an underlying error, which canbe accessed using the
causeproperty.Added
ResponseTimeoutErrorclassThis error extends
NetworkErrorand is thrown when a request deliberatelytimes out using the
timeoutoption.Added
RequestAbortedErrorclassThis error extends
NetworkErrorand is thrown when a request is abortedby using the
db.closemethod.Added
FetchFailedErrorclassThis error extends
NetworkErrorand is thrown when a request fails becausethe underlying
fetchcall fails (usually with aTypeError).In Node.js the root cause of this error (e.g. a network failure) can often be
found in the
causeproperty of the originating error, i.e. thecauseproperty of the
causeproperty of this error.In browsers the root cause is usually not exposed directly but can often
be diagnosed by examining the developer console or network tab.
Added
PropagationTimeoutErrorclassThis error does not extend
NetworkErrorbut wraps the most recent errorencountered while waiting for replication, which can be accessed using the
causeproperty. This error is only thrown whendb.waitForPropagationis invoked with a
timeoutoption and the timeout duration is exceeded.v9.3.0Compare Source
Added
Added
db.compactmethod (DE-906)Added
db.engineStatsmethod (DE-932)Added
db.getLicenseanddb.setLicensemethods (DE-949)Added
db.listQueryCacheEntriesmethod (DE-149)Added
db.clearQueryCachemethod (DE-148)Added
db.getQueryCachePropertiesmethod (DE-150)Added
db.setQueryCachePropertiesmethod (DE-151)Added
collection.shardsmethod (DE-939)Added support for
mdi-prefixedindexes (DE-956)Restored
fulltextindex type support (DE-957)The
fulltextindex type is still no longer supported for creating newindexes but can be used to cast existing indexes from
Index.Added support for
edgeindexes (DE-958)The
Indextype now can also be cast to theEdgeIndextype.v9.2.0Compare Source
Added
Added
db.availabilitymethodAdded
db.enginemethod (DE-931)Added
db.statusmethod (#811)Added
db.supportInfomethodAdded
keepNulloption toCollectionInsertOptionstype (DE-946)This option was previously missing from the type.
Added
allowDirtyReadoption toDocumentExistsOptionstype (DE-945)This option was previously missing from the type.
Added
ignoreRevsoption toCollectionBatchReadOptionstype (DE-947)This option was previously missing from the type.
Added
optionsargument toCollectionTruncateOptionstype (DE-940)There was previously no way to pass options to the
truncatemethod.Added
databaseproperty toAnalyzer,ArrayCursor,BatchedArrayCursor,Collection,Graph,Job,Route,TransactionandView(DE-935)This property can be used to access the database instance a given object
belongs to.
Added
Route#headersandRoute#pathpropertiesThese properties can be used to access the headers and path used when creating
the route.
Added
ArrayCursor#idandBatchedArrayCursor#idproperties (DE-936)This property can be used to access the ID of the cursor.
v9.1.0Compare Source
Changed
Removed
progressproperty fromIndextypeThis property is only available when fetching indexes with the
withHiddenoption set to
true.Added
Added
HiddenIndextype (DE-849)This type is used to represent an index returned by
collection.indexeswhenthe
withHiddenoption is set totrueand includes theprogresspropertyin addition to internal indexes.
v9.0.0Compare Source
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
ParamsandHeaderstypesThese can mostly be replaced with the native
URLSearchParamsandHeaderstypes but most public methods still accept the equivalent
Recordtypes forconvenience.
Removed deprecated
FulltextIndexand 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
Collectionmethods for simple queries:list,all,any,byExample,firstExample,removeByExample,replaceByExample,updateByExample,lookupByKeys,removeByKeys,fulltextSimple queries were deprecated in ArangoDB 3.4 and can be replicated with AQL.
Changed
Replaced request logic with native
fetchAPI (#788, DE-578, DE-758)The node-specific request logic using the
httpandhttpsmodules has beenreplaced with all-new logic using the web standard
fetchAPI, which shouldwork 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
aqland the AQLjoinhelper function toAqlQueryPreviously the internal
GeneratedAqlQuerytype was exposed as the returntype of these functions, leading to complexity when handling generic type
arguments.
Removed dependency on Node
pathmodule or its browserify equivalentThis change should be backwards-compatible but may produce different results
when using non-normalized paths and base-paths in custom
routes. Thisshould help support more environments and reduce the size of the browser
bundle.
Inlined
x3-linkedlistdependencyInlining 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
withHiddenoption incollection.indexesThis 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
withStatsoption incollection.indexesThis method now takes an object with
withStatsandwithHiddenoptionsinstead of a boolean flag.
Added readonly
Job#idpropertyThis property was not previously exposed.
Added
skipFastLockRoundoption for streaming transactionsThis option was introduced in 3.12.1 and allows skipping the fast lock round.
Added non-specific
EnsureIndexOptionstype andensureIndexmethodsignature (#778)
This allows creating indexes without narrowing the index type.
v8.8.1Compare Source
Added
versionAttributeoption to the document operation options types (DE-783)v8.8.0Compare Source
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
DocumentOperationMetadataandDocumentOperationFailuretypes (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 the
overwriteModeoption.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_delimiteranalyzer type (DE-753)Added support for
wildcardanalyzer type (DE-750)v8.7.0Compare Source
Changed
optionsargument incollection.edges,inEdgesandoutEdgesoptional (#802)Deprecated
Deprecated
db.getLogMessagesThis API was deprecated in ArangoDB 3.8 and should no longer be used.
Use
db.getLogEntriesinstead.Fixed
db.getLogEntriesusing the wrong API endpointConfiguration
📅 Schedule: Branch creation - "on the first day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.