arangojs 10.0.0-alpha.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +232 -135
- package/README.md +8 -7
- package/administration.d.ts +67 -2
- package/administration.d.ts.map +1 -1
- package/analyzers.d.ts +6 -4
- package/analyzers.d.ts.map +1 -1
- package/aql.d.ts +0 -2
- package/aql.d.ts.map +1 -1
- package/cjs/administration.d.ts +67 -2
- package/cjs/administration.d.ts.map +1 -1
- package/cjs/administration.js +1 -1
- package/cjs/administration.js.map +1 -1
- package/cjs/analyzers.d.ts +6 -4
- package/cjs/analyzers.d.ts.map +1 -1
- package/cjs/analyzers.js.map +1 -1
- package/cjs/aql.d.ts +0 -2
- package/cjs/aql.d.ts.map +1 -1
- package/cjs/aql.js.map +1 -1
- package/cjs/collections.d.ts +86 -0
- package/cjs/collections.d.ts.map +1 -1
- package/cjs/collections.js +6 -0
- package/cjs/collections.js.map +1 -1
- package/cjs/configuration.d.ts.map +1 -1
- package/cjs/configuration.js.map +1 -1
- package/cjs/connection.d.ts +5 -9
- package/cjs/connection.d.ts.map +1 -1
- package/cjs/connection.js +52 -27
- package/cjs/connection.js.map +1 -1
- package/cjs/cursors.d.ts.map +1 -1
- package/cjs/cursors.js.map +1 -1
- package/cjs/databases.d.ts +92 -19
- package/cjs/databases.d.ts.map +1 -1
- package/cjs/databases.js +153 -26
- package/cjs/databases.js.map +1 -1
- package/cjs/documents.d.ts.map +1 -1
- package/cjs/documents.js.map +1 -1
- package/cjs/errors.d.ts +2 -2
- package/cjs/errors.d.ts.map +1 -1
- package/cjs/errors.js +14 -12
- package/cjs/errors.js.map +1 -1
- package/cjs/foxx-manifest.d.ts.map +1 -1
- package/cjs/foxx-manifest.js.map +1 -1
- package/cjs/graphs.d.ts +4 -4
- package/cjs/graphs.d.ts.map +1 -1
- package/cjs/graphs.js +24 -12
- package/cjs/graphs.js.map +1 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/indexes.d.ts +141 -14
- package/cjs/indexes.d.ts.map +1 -1
- package/cjs/indexes.js.map +1 -1
- package/cjs/jobs.d.ts.map +1 -1
- package/cjs/jobs.js.map +1 -1
- package/cjs/lib/util.d.ts.map +1 -1
- package/cjs/lib/util.js +13 -7
- package/cjs/lib/util.js.map +1 -1
- package/cjs/lib/x3-linkedlist.js.map +1 -1
- package/cjs/logs.js.map +1 -1
- package/cjs/queries.d.ts +104 -3
- package/cjs/queries.d.ts.map +1 -1
- package/cjs/queries.js +1 -0
- package/cjs/queries.js.map +1 -1
- package/cjs/routes.d.ts.map +1 -1
- package/cjs/routes.js.map +1 -1
- package/cjs/services.d.ts +14 -13
- package/cjs/services.d.ts.map +1 -1
- package/cjs/services.js.map +1 -1
- package/cjs/transactions.d.ts +3 -3
- package/cjs/transactions.d.ts.map +1 -1
- package/cjs/transactions.js.map +1 -1
- package/cjs/users.js.map +1 -1
- package/cjs/views.d.ts +6 -4
- package/cjs/views.d.ts.map +1 -1
- package/cjs/views.js.map +1 -1
- package/collections.d.ts +86 -0
- package/collections.d.ts.map +1 -1
- package/configuration.d.ts.map +1 -1
- package/connection.d.ts +5 -9
- package/connection.d.ts.map +1 -1
- package/cursors.d.ts.map +1 -1
- package/databases.d.ts +92 -19
- package/databases.d.ts.map +1 -1
- package/documents.d.ts.map +1 -1
- package/errors.d.ts +2 -2
- package/errors.d.ts.map +1 -1
- package/esm/administration.d.ts +67 -2
- package/esm/administration.d.ts.map +1 -1
- package/esm/administration.js +1 -1
- package/esm/administration.js.map +1 -1
- package/esm/analyzers.d.ts +6 -4
- package/esm/analyzers.d.ts.map +1 -1
- package/esm/analyzers.js.map +1 -1
- package/esm/aql.d.ts +0 -2
- package/esm/aql.d.ts.map +1 -1
- package/esm/aql.js.map +1 -1
- package/esm/collections.d.ts +86 -0
- package/esm/collections.d.ts.map +1 -1
- package/esm/collections.js +6 -0
- package/esm/collections.js.map +1 -1
- package/esm/configuration.d.ts.map +1 -1
- package/esm/configuration.js.map +1 -1
- package/esm/connection.d.ts +5 -9
- package/esm/connection.d.ts.map +1 -1
- package/esm/connection.js +52 -26
- package/esm/connection.js.map +1 -1
- package/esm/cursors.d.ts.map +1 -1
- package/esm/cursors.js.map +1 -1
- package/esm/databases.d.ts +92 -19
- package/esm/databases.d.ts.map +1 -1
- package/esm/databases.js +153 -26
- package/esm/databases.js.map +1 -1
- package/esm/documents.d.ts.map +1 -1
- package/esm/documents.js.map +1 -1
- package/esm/errors.d.ts +2 -2
- package/esm/errors.d.ts.map +1 -1
- package/esm/errors.js +14 -12
- package/esm/errors.js.map +1 -1
- package/esm/foxx-manifest.d.ts.map +1 -1
- package/esm/foxx-manifest.js.map +1 -1
- package/esm/graphs.d.ts +4 -4
- package/esm/graphs.d.ts.map +1 -1
- package/esm/graphs.js +24 -12
- package/esm/graphs.js.map +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/indexes.d.ts +141 -14
- package/esm/indexes.d.ts.map +1 -1
- package/esm/indexes.js.map +1 -1
- package/esm/jobs.d.ts.map +1 -1
- package/esm/jobs.js.map +1 -1
- package/esm/lib/util.d.ts.map +1 -1
- package/esm/lib/util.js +13 -7
- package/esm/lib/util.js.map +1 -1
- package/esm/lib/x3-linkedlist.js.map +1 -1
- package/esm/logs.js.map +1 -1
- package/esm/queries.d.ts +104 -3
- package/esm/queries.d.ts.map +1 -1
- package/esm/queries.js +1 -0
- package/esm/queries.js.map +1 -1
- package/esm/routes.d.ts.map +1 -1
- package/esm/routes.js.map +1 -1
- package/esm/services.d.ts +14 -13
- package/esm/services.d.ts.map +1 -1
- package/esm/services.js.map +1 -1
- package/esm/transactions.d.ts +3 -3
- package/esm/transactions.d.ts.map +1 -1
- package/esm/transactions.js.map +1 -1
- package/esm/users.js.map +1 -1
- package/esm/views.d.ts +6 -4
- package/esm/views.d.ts.map +1 -1
- package/esm/views.js.map +1 -1
- package/foxx-manifest.d.ts.map +1 -1
- package/graphs.d.ts +4 -4
- package/graphs.d.ts.map +1 -1
- package/index.d.ts.map +1 -1
- package/indexes.d.ts +141 -14
- package/indexes.d.ts.map +1 -1
- package/jobs.d.ts.map +1 -1
- package/lib/util.d.ts.map +1 -1
- package/package.json +9 -4
- package/queries.d.ts +104 -3
- package/queries.d.ts.map +1 -1
- package/routes.d.ts.map +1 -1
- package/services.d.ts +14 -13
- package/services.d.ts.map +1 -1
- package/transactions.d.ts +3 -3
- package/transactions.d.ts.map +1 -1
- package/views.d.ts +6 -4
- package/views.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,97 +14,105 @@ This driver uses semantic versioning:
|
|
|
14
14
|
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
|
|
15
15
|
changes that require changes in your code to upgrade.
|
|
16
16
|
|
|
17
|
-
## [10.0.0
|
|
17
|
+
## [10.0.0] - 2025-01-06
|
|
18
18
|
|
|
19
19
|
This is a major release and breaks backwards compatibility.
|
|
20
20
|
|
|
21
21
|
See [the migration guide](./MIGRATING.md#v9-to-v10) for detailed instructions
|
|
22
22
|
for upgrading your code to arangojs v10.
|
|
23
23
|
|
|
24
|
-
###
|
|
25
|
-
|
|
26
|
-
- Renamed `CollectionDropOptions` type to `DropCollectionOptions`
|
|
27
|
-
|
|
28
|
-
- Renamed `CollectionTruncateOptions` type to `TruncateCollectionOptions`
|
|
29
|
-
|
|
30
|
-
- Renamed `Config` type to `ConfigOptions`
|
|
31
|
-
|
|
32
|
-
- Renamed `path` option to `pathname` in `RequestOptions` type
|
|
24
|
+
### Removed
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
- Removed unused `CreateUserOptions` type
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
The actual type used by the `db.createUser` method is still `UserOptions`.
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
- Removed unused `IndexDetails` type
|
|
39
31
|
|
|
40
|
-
|
|
32
|
+
This type was intended to be returned by `collection.indexes` when the
|
|
33
|
+
`withStats` option is set to `true` but the `figures` property is already
|
|
34
|
+
included in the current return type.
|
|
41
35
|
|
|
42
|
-
-
|
|
36
|
+
- Removed Node.js 18 support
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
Node.js 18 will reach its end of life in May 2025, so arangojs will no
|
|
39
|
+
longer support this version of Node.js going forward.
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
For more information, see [the Node.js release schedule](https://nodejs.dev/en/about/releases/).
|
|
48
42
|
|
|
49
|
-
|
|
50
|
-
`BasicAuthCredentials` and `BearerAuthCredentials`.
|
|
43
|
+
### Changed
|
|
51
44
|
|
|
52
|
-
-
|
|
45
|
+
- Closing a connection now closes all open requests
|
|
53
46
|
|
|
54
|
-
|
|
47
|
+
Previously in certain situations only the most recent request would be
|
|
48
|
+
closed per server. Note that this still merely aborts the requests but
|
|
49
|
+
does not guarantee the underlying connections are closed as these are
|
|
50
|
+
handled by Node.js or the browser natively. need to be installed
|
|
51
|
+
otherwise.
|
|
55
52
|
|
|
56
|
-
- Moved
|
|
53
|
+
- Moved fetch-specific `config` options from into `config.fetchOptions`
|
|
57
54
|
|
|
58
|
-
The following
|
|
59
|
-
`BasicAuthCredentials` and `BearerAuthCredentials`.
|
|
55
|
+
The following options were moved: `credentials`, `headers` and `keepalive`.
|
|
60
56
|
|
|
61
|
-
-
|
|
57
|
+
- `db.setUserAccessLevel` now takes `grant` as a separate parameter
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
The parameter was previously passed as an additional property in the
|
|
60
|
+
`options` parameter.
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
#### Error handling
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
does not guarantee the underlying connections are closed as these are
|
|
71
|
-
handled by Node.js or the browser natively.
|
|
64
|
+
- Errors encountered before a request completes are now wrapped in a
|
|
65
|
+
`NetworkError` or a subclass thereof
|
|
72
66
|
|
|
73
|
-
|
|
67
|
+
This should help making it easier to diagnose network issues and distinguish
|
|
68
|
+
the relevant error conditions.
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
The originating error can still be accessed using the `cause` property of the
|
|
71
|
+
`NetworkError` error.
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
- `HttpError` now extends the `NetworkError` class
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
This allows treating all non-`ArangoError` errors as one category of errors,
|
|
76
|
+
even when there is no server response available.
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
- `db.waitForPropagation` now throws a `PropagationTimeoutError` error when
|
|
79
|
+
invoked with a `timeout` option and the timeout duration is exceeded
|
|
83
80
|
|
|
84
|
-
|
|
81
|
+
The method would previously throw the most recent error encountered while
|
|
82
|
+
waiting for replication. The originating error can still be accessed using
|
|
83
|
+
the `cause` property of the `PropagationTimeoutError` error.
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
- `db.waitForPropagation` now respects the `timeout` option more strictly
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
Previously the method would only time out if the timeout duration was
|
|
88
|
+
exceeded after the most recent request failed. Now the timeout is
|
|
89
|
+
recalculated and passed on to each request, preventing it from exceeding
|
|
90
|
+
the specified duration.
|
|
90
91
|
|
|
91
|
-
|
|
92
|
+
If the propagation timed out due to an underlying request exceeding the
|
|
93
|
+
timeout duration, the `cause` property of the `PropagationTimeoutError`
|
|
94
|
+
error will be a `ResponseTimeoutError` error.
|
|
92
95
|
|
|
93
|
-
-
|
|
96
|
+
- `config.beforeRequest` and `config.afterResponse` callbacks can now return
|
|
97
|
+
promises
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
If the callback returns a promise, it will be awaited before the request
|
|
100
|
+
and response cycle proceeds. If either callback throws an error or returns
|
|
101
|
+
a promise that is rejected, that error will be thrown instead.
|
|
96
102
|
|
|
97
|
-
-
|
|
103
|
+
- `config.afterResponse` callback signature changed
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
The callback signature previously used the internal `ArangojsResponse` type.
|
|
106
|
+
The new signature uses the `Response` type of the Fetch API with an
|
|
107
|
+
additional `request` property to more accurately represent the actual value
|
|
108
|
+
it receives as the `parsedBody` property will never be present.
|
|
102
109
|
|
|
103
|
-
|
|
110
|
+
- `response` property on `ArangoError` is now optional
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
This property should always be present but this allows using the error in
|
|
113
|
+
situations where a response might not be available.
|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
#### General type changes
|
|
108
116
|
|
|
109
117
|
- Changed `GraphVertexCollection` and `GraphEdgeCollection` generic types to
|
|
110
118
|
take separate `EntryResultType` and `EntryInputType` type parameters
|
|
@@ -115,13 +123,43 @@ for upgrading your code to arangojs v10.
|
|
|
115
123
|
|
|
116
124
|
These type parameters are used to narrow the the returned collection type.
|
|
117
125
|
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
- Changed `
|
|
126
|
+
- Changed `db.removeUser` method return type to `Promise<void>`
|
|
127
|
+
|
|
128
|
+
The previous return type served no purpose.
|
|
129
|
+
|
|
130
|
+
- Changed `QueueTimeMetrics` type to an interface
|
|
131
|
+
|
|
132
|
+
- Changed `CursorExtras` and `CursorStats` interfaces to types
|
|
133
|
+
|
|
134
|
+
#### Low-level request/route changes
|
|
135
|
+
|
|
136
|
+
- Renamed `path` option to `pathname` in `RequestOptions` type
|
|
137
|
+
|
|
138
|
+
This affects the `db.waitForPropagation` and `route.request` methods.
|
|
139
|
+
|
|
140
|
+
- Removed `basePath` option from `RequestOptions` type
|
|
141
|
+
|
|
142
|
+
This affects the `db.waitForPropagation` and `route.request` methods.
|
|
143
|
+
|
|
144
|
+
- Renamed `route.path` property to `route.pathname`
|
|
145
|
+
|
|
146
|
+
#### Renamed methods
|
|
147
|
+
|
|
148
|
+
- Renamed various methods for consistency:
|
|
149
|
+
|
|
150
|
+
Methods that return an array now follow the `listNouns` pattern, methods that
|
|
151
|
+
return a "list of nouns" wrapped in an object have been renamed to follow the
|
|
152
|
+
`getNouns` pattern to avoid confusion:
|
|
153
|
+
|
|
154
|
+
- `db.listServiceScripts` -> `db.getServiceScripts`
|
|
155
|
+
- `db.listHotBackups` -> `db.getHotBackups`
|
|
156
|
+
- `db.listFunctions` -> `db.listUserFunctions`
|
|
157
|
+
- `db.getLogMessages` -> `db.listLogMessages`
|
|
158
|
+
|
|
159
|
+
- Renamed AQL user function management methods:
|
|
160
|
+
|
|
161
|
+
- `db.createFunction` -> `db.createUserFunction`
|
|
162
|
+
- `db.dropFunction` -> `db.dropUserFunction`
|
|
125
163
|
|
|
126
164
|
#### Module renaming
|
|
127
165
|
|
|
@@ -140,13 +178,18 @@ for upgrading your code to arangojs v10.
|
|
|
140
178
|
- `arangojs/transaction` -> `arangojs/transactions`
|
|
141
179
|
- `arangojs/view` -> `arangojs/views`
|
|
142
180
|
|
|
181
|
+
- Moved internal utility functions to new `arangojs/lib/util` module
|
|
182
|
+
|
|
183
|
+
These methods are all still marked as internal and should not be used
|
|
184
|
+
directly.
|
|
185
|
+
|
|
143
186
|
#### Moved types
|
|
144
187
|
|
|
145
188
|
- Moved document related types from `arangojs/collection` module to
|
|
146
189
|
`arangojs/documents` module
|
|
147
190
|
|
|
148
191
|
The following types were moved: `DocumentOperationFailure`,
|
|
149
|
-
`DocumentOperationMetadata`, `DocumentExistsOptions`,
|
|
192
|
+
`DocumentOperationMetadata`, `DocumentExistsOptions`,
|
|
150
193
|
`CollectionReadOptions`, `CollectionBatchReadOptions`,
|
|
151
194
|
`CollectionInsertOptions`, `CollectionReplaceOptions`,
|
|
152
195
|
`CollectionUpdateOptions`, `CollectionRemoveOptions`,
|
|
@@ -182,7 +225,8 @@ for upgrading your code to arangojs v10.
|
|
|
182
225
|
|
|
183
226
|
The following types were moved: `QueryOptions`, `ExplainOptions`,
|
|
184
227
|
`ExplainPlan`, `ExplainStats`, `SingleExplainResult`, `MultiExplainResult`,
|
|
185
|
-
`AstNode`, `ParseResult`, `
|
|
228
|
+
`AstNode`, `ParseResult`, `QueryCachePropertiesOptions`, `QueryCacheEntry`,
|
|
229
|
+
`QueryCacheProperties`, `QueryOptimizerRule`, `QueryTracking`,
|
|
186
230
|
`QueryTrackingOptions`, `QueryInfo` and `AqlUserFunction`.
|
|
187
231
|
|
|
188
232
|
- Moved service related types from `arangojs/database` module to new
|
|
@@ -206,7 +250,24 @@ for upgrading your code to arangojs v10.
|
|
|
206
250
|
- Moved server administration related types from `arangojs/database` module to
|
|
207
251
|
new `arangojs/administration` module
|
|
208
252
|
|
|
209
|
-
The following types were moved: `
|
|
253
|
+
The following types were moved: `CompactOptions`, `EngineInfo`,
|
|
254
|
+
`EngineStatsInfo`, `LicenseInfo`, `QueueTimeMetrics`, `ServerAvailability`,
|
|
255
|
+
`ServerStatusInformation`, `SingleServerSupportInfo`, `ClusterSupportInfo`
|
|
256
|
+
and `VersionInfo`.
|
|
257
|
+
|
|
258
|
+
- Moved configuration related types to new `arangojs/config` module
|
|
259
|
+
|
|
260
|
+
The following types were moved: `Config`, `LoadBalancingStrategy`,
|
|
261
|
+
`BasicAuthCredentials` and `BearerAuthCredentials`.
|
|
262
|
+
|
|
263
|
+
- Moved `ArangoErrorResponse` type to `arangojs/connection` module
|
|
264
|
+
|
|
265
|
+
The type is now also no longer marked as internal.
|
|
266
|
+
|
|
267
|
+
- Moved configuration related types to new `arangojs/configuration` module
|
|
268
|
+
|
|
269
|
+
The following types were moved: `ConfigOptions`, `LoadBalancingStrategy`,
|
|
270
|
+
`BasicAuthCredentials` and `BearerAuthCredentials`.
|
|
210
271
|
|
|
211
272
|
#### Renamed types
|
|
212
273
|
|
|
@@ -218,8 +279,11 @@ for upgrading your code to arangojs v10.
|
|
|
218
279
|
- `GeoIndex` -> `GeoIndexDescription`
|
|
219
280
|
- `PersistentIndex` -> `PersistentIndexDescription`
|
|
220
281
|
- `PrimaryIndex` -> `PrimaryIndexDescription`
|
|
282
|
+
- `EdgeIndex` -> `EdgeIndexDescription`
|
|
221
283
|
- `TtlIndex` -> `TtlIndexDescription`
|
|
284
|
+
- `FulltextIndex` -> `FulltextIndexDescription`
|
|
222
285
|
- `MdiIndex` -> `MdiIndexDescription`
|
|
286
|
+
- `MdiPrefixedIndex` -> `MdiPrefixedIndexDescription`
|
|
223
287
|
- `InvertedIndex` -> `InvertedIndexDescription`
|
|
224
288
|
- `InternalArangosearchIndex` -> `ArangosearchIndexDescription`
|
|
225
289
|
- `InternalIndex` -> `InternalIndexDescription`
|
|
@@ -231,21 +295,43 @@ for upgrading your code to arangojs v10.
|
|
|
231
295
|
|
|
232
296
|
- Renamed various types for consistency:
|
|
233
297
|
|
|
298
|
+
Types representing an instance of a specific entity type in ArangoDB like a
|
|
299
|
+
collection, graph or query now follow the `NounDescription` naming pattern:
|
|
300
|
+
|
|
234
301
|
- `AqlUserFunction` -> `UserFunctionDescription`
|
|
235
302
|
- `CollectionMetadata` -> `CollectionDescription`
|
|
236
303
|
- `DatabaseInfo` -> `DatabaseDescription`
|
|
237
304
|
- `GraphInfo` -> `GraphDescription`
|
|
238
305
|
- `ServiceInfo` -> `ServiceDescription`
|
|
239
306
|
- `QueryInfo` -> `QueryDescription`
|
|
307
|
+
- `TransactionDetails` -> `TransactionDescription`
|
|
308
|
+
|
|
309
|
+
Note that the `TransactionDescription` type used by `db.listTransactions`
|
|
310
|
+
is slightly different from the `TransactionInfo` type used by methods of
|
|
311
|
+
`Transaction` objects due to implementation details of ArangoDB.
|
|
312
|
+
|
|
313
|
+
Types representing general information rather than an instance of something
|
|
314
|
+
now generally follow the `NounInfo` naming pattern, whereas types
|
|
315
|
+
representing the result of an operation generally follow the `NounResult`
|
|
316
|
+
or `VerbNounResult` naming pattern:
|
|
317
|
+
|
|
240
318
|
- `QueryTracking` -> `QueryTrackingInfo`
|
|
241
|
-
- `
|
|
319
|
+
- `ServerStatusInformation` -> `ServerStatusInfo`
|
|
320
|
+
- `CollectionImportResult` -> `ImportDocumentsResult`
|
|
321
|
+
- `CollectionEdgesResult` -> `DocumentEdgesResult`
|
|
322
|
+
|
|
323
|
+
Types for options passed to methods now generally follow the `NounOptions`,
|
|
324
|
+
`VerbNounOptions` or `VerbNounAttributeOptions` naming patterns:
|
|
325
|
+
|
|
326
|
+
- `Config` -> `ConfigOptions`
|
|
242
327
|
- `TransactionCollections` -> `TransactionCollectionOptions`
|
|
243
328
|
- `CreateDatabaseUser` -> `CreateDatabaseUserOptions`
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
|
|
329
|
+
- `CollectionDropOptions` -> `DropCollectionOptions`
|
|
330
|
+
- `CollectionTruncateOptions` -> `TruncateCollectionOptions`
|
|
331
|
+
- `IndexListOptions` -> `ListIndexesOptions`
|
|
247
332
|
|
|
248
333
|
- Collection document operations:
|
|
334
|
+
|
|
249
335
|
- `DocumentExistsOptions` -> `DocumentExistsOptions`
|
|
250
336
|
- `CollectionReadOptions` -> `ReadDocumentOptions`
|
|
251
337
|
- `CollectionBatchReadOptions` -> `BulkReadDocumentsOptions`
|
|
@@ -255,10 +341,9 @@ for upgrading your code to arangojs v10.
|
|
|
255
341
|
- `CollectionRemoveOptions` -> `RemoveDocumentOptions`
|
|
256
342
|
- `CollectionImportOptions` -> `ImportDocumentsOptions`
|
|
257
343
|
- `CollectionEdgesOptions` -> `DocumentEdgesOptions`
|
|
258
|
-
- `CollectionImportResult` -> `ImportDocumentsResult`
|
|
259
|
-
- `CollectionEdgesResult` -> `DocumentEdgesResult`
|
|
260
344
|
|
|
261
345
|
- Graph collection document operation:
|
|
346
|
+
|
|
262
347
|
- `GraphCollectionReadOptions` -> `ReadGraphDocumentOptions`
|
|
263
348
|
- `GraphCollectionInsertOptions` -> `CreateGraphDocumentOptions`
|
|
264
349
|
- `GraphCollectionReplaceOptions` -> `ReplaceGraphDocumentOptions`
|
|
@@ -266,6 +351,7 @@ for upgrading your code to arangojs v10.
|
|
|
266
351
|
- `ViewPatchPropertiesOptions` -> `UpdateViewPropertiesOptions`
|
|
267
352
|
|
|
268
353
|
- View operations:
|
|
354
|
+
|
|
269
355
|
- `ArangoSearchViewPatchPropertiesOptions` -> `UpdateArangoSearchViewPropertiesOptions`
|
|
270
356
|
- `SearchAliasViewPatchPropertiesOptions` -> `UpdateSearchAliasViewPropertiesOptions`
|
|
271
357
|
- `SearchAliasViewPatchIndexOptions` -> `UpdateSearchAliasViewIndexOptions`
|
|
@@ -284,67 +370,41 @@ for upgrading your code to arangojs v10.
|
|
|
284
370
|
- `ObjectWithId` (in `documents` module) -> `ObjectWithDocumentId`
|
|
285
371
|
- `ObjectWithKey` (in `documents` module) -> `ObjectWithDocumentKey`
|
|
286
372
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
- Errors encountered before a request completes are now wrapped in a
|
|
290
|
-
`NetworkError` or a subclass thereof
|
|
291
|
-
|
|
292
|
-
This should help making it easier to diagnose network issues and distinguish
|
|
293
|
-
the relevant error conditions.
|
|
294
|
-
|
|
295
|
-
The originating error can still be accessed using the `cause` property of the
|
|
296
|
-
`NetworkError` error.
|
|
297
|
-
|
|
298
|
-
- `HttpError` now extends the `NetworkError` class
|
|
299
|
-
|
|
300
|
-
This allows treating all non-`ArangoError` errors as one category of errors,
|
|
301
|
-
even when there is no server response available.
|
|
302
|
-
|
|
303
|
-
- `db.waitForPropagation` now throws a `PropagationTimeoutError` error when
|
|
304
|
-
invoked with a `timeout` option and the timeout duration is exceeded
|
|
373
|
+
### Added
|
|
305
374
|
|
|
306
|
-
|
|
307
|
-
waiting for replication. The originating error can still be accessed using
|
|
308
|
-
the `cause` property of the `PropagationTimeoutError` error.
|
|
375
|
+
- Restored support for Unix domain sockets
|
|
309
376
|
|
|
310
|
-
|
|
377
|
+
Using Unix domain sockets requires the `undici` library to be installed.
|
|
311
378
|
|
|
312
|
-
|
|
313
|
-
exceeded after the most recent request failed. Now the timeout is
|
|
314
|
-
recalculated and passed on to each request, preventing it from exceeding
|
|
315
|
-
the specified duration.
|
|
379
|
+
- Restored support for `config.agentOptions`
|
|
316
380
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
error will be a `ResponseTimeoutError` error.
|
|
381
|
+
The `config.agentOptions` option can now be used to create a custom `undici`
|
|
382
|
+
agent if the `undici` library is installed.
|
|
320
383
|
|
|
321
|
-
-
|
|
322
|
-
promises
|
|
384
|
+
- Added `config.fetchOptions` option
|
|
323
385
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
386
|
+
This option can now be used to specify default options for the `fetch`
|
|
387
|
+
function used by arangojs like `headers`, `credentials`, `keepalive` and
|
|
388
|
+
`redirect`.
|
|
327
389
|
|
|
328
|
-
- `
|
|
390
|
+
- Added `BatchCursor#itemsView` property and `BatchCursorItemsView` interface
|
|
329
391
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
additional `request` property to more accurately represent the actual value
|
|
333
|
-
it receives as the `parsedBody` property will never be present.
|
|
392
|
+
This property provides a low-level interface for consuming the items of the
|
|
393
|
+
cursor and is used by the regular item-wise `Cursor` class internally.
|
|
334
394
|
|
|
335
|
-
-
|
|
395
|
+
- Added `SystemIndexDescription` type
|
|
336
396
|
|
|
337
|
-
This
|
|
338
|
-
|
|
397
|
+
This type represents either of the system index types `primary` and `edge`
|
|
398
|
+
and can be used to cast indexes returned by `collection.indexes`.
|
|
339
399
|
|
|
340
|
-
|
|
400
|
+
- Added `ProcessedResponse` type
|
|
341
401
|
|
|
342
|
-
|
|
402
|
+
This type replaces the previously internal `ArangojsResponse` type and
|
|
403
|
+
extends the native `Response` type with additional properties.
|
|
343
404
|
|
|
344
|
-
|
|
345
|
-
cursor and is used by the regular item-wise `Cursor` class internally.
|
|
405
|
+
#### Error handling
|
|
346
406
|
|
|
347
|
-
- Added `onError` option
|
|
407
|
+
- Added `config.onError` option (DE-955)
|
|
348
408
|
|
|
349
409
|
This option can be used to specify a callback function that will be invoked
|
|
350
410
|
whenever a request results in an error. Unlike `afterResponse`, this callback
|
|
@@ -355,6 +415,22 @@ for upgrading your code to arangojs v10.
|
|
|
355
415
|
If the `onError` callback throws an error or returns a promise that is
|
|
356
416
|
rejected, that error will be thrown instead.
|
|
357
417
|
|
|
418
|
+
- Added support for `config.fetchOptions.redirect` option ([#613](https://github.com/arangodb/arangojs/issues/613))
|
|
419
|
+
|
|
420
|
+
This option can now be used to specify the redirect mode for requests.
|
|
421
|
+
|
|
422
|
+
When set to `"manual"`, arangojs will throw an `HttpError` wrapping the
|
|
423
|
+
redirect response instead of automatically following redirects.
|
|
424
|
+
|
|
425
|
+
Note that when set to `"error"`, the native fetch API will throw a
|
|
426
|
+
non-specific error (usually a `TypeError`) that arangojs will wrap in a
|
|
427
|
+
`FetchFailedError` instead.
|
|
428
|
+
|
|
429
|
+
- Added optional `ArangoError#request` property
|
|
430
|
+
|
|
431
|
+
This property is always present if the error has a `response` property. In
|
|
432
|
+
normal use this should always be the case.
|
|
433
|
+
|
|
358
434
|
- Added `NetworkError` class
|
|
359
435
|
|
|
360
436
|
This is the common base class for all errors (including `HttpError`) that
|
|
@@ -395,27 +471,48 @@ for upgrading your code to arangojs v10.
|
|
|
395
471
|
`cause` property. This error is only thrown when `db.waitForPropagation`
|
|
396
472
|
is invoked with a `timeout` option and the timeout duration is exceeded.
|
|
397
473
|
|
|
398
|
-
|
|
474
|
+
## [9.3.0] - 2025-01-06
|
|
399
475
|
|
|
400
|
-
|
|
401
|
-
extends the native `Response` type with additional properties.
|
|
476
|
+
### Added
|
|
402
477
|
|
|
403
|
-
- Added
|
|
478
|
+
- Added `db.compact` method (DE-906)
|
|
404
479
|
|
|
405
|
-
|
|
406
|
-
|
|
480
|
+
- Added `db.engineStats` method (DE-932)
|
|
481
|
+
|
|
482
|
+
- Added `db.getLicense` and `db.setLicense` methods (DE-949)
|
|
483
|
+
|
|
484
|
+
- Added `db.listQueryCacheEntries` method (DE-149)
|
|
485
|
+
|
|
486
|
+
- Added `db.clearQueryCache` method (DE-148)
|
|
487
|
+
|
|
488
|
+
- Added `db.getQueryCacheProperties` method (DE-150)
|
|
489
|
+
|
|
490
|
+
- Added `db.setQueryCacheProperties` method (DE-151)
|
|
491
|
+
|
|
492
|
+
- Added `collection.shards` method (DE-939)
|
|
493
|
+
|
|
494
|
+
- Added support for `mdi-prefixed` indexes (DE-956)
|
|
495
|
+
|
|
496
|
+
- Restored `fulltext` index type support (DE-957)
|
|
497
|
+
|
|
498
|
+
The `fulltext` index type is still no longer supported for creating new
|
|
499
|
+
indexes but can be used to cast existing indexes from `Index`.
|
|
500
|
+
|
|
501
|
+
- Added support for `edge` indexes (DE-958)
|
|
502
|
+
|
|
503
|
+
The `Index` type now can also be cast to the `EdgeIndex` type.
|
|
407
504
|
|
|
408
505
|
## [9.2.0] - 2024-11-27
|
|
409
506
|
|
|
410
507
|
### Added
|
|
411
508
|
|
|
412
|
-
- Added `
|
|
509
|
+
- Added `db.availability` method
|
|
413
510
|
|
|
414
|
-
- Added `
|
|
511
|
+
- Added `db.engine` method (DE-931)
|
|
415
512
|
|
|
416
|
-
- Added `
|
|
513
|
+
- Added `db.status` method ([#811](https://github.com/arangodb/arangojs/issues/811))
|
|
417
514
|
|
|
418
|
-
- Added `
|
|
515
|
+
- Added `db.supportInfo` method
|
|
419
516
|
|
|
420
517
|
- Added `keepNull` option to `CollectionInsertOptions` type (DE-946)
|
|
421
518
|
|
|
@@ -1510,7 +1607,7 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
1510
1607
|
|
|
1511
1608
|
- Changed `db.createDatabase` return type to `Database`
|
|
1512
1609
|
|
|
1513
|
-
- Renamed `
|
|
1610
|
+
- Renamed `db.setQueryTracking` to `db.queryTracking`
|
|
1514
1611
|
|
|
1515
1612
|
The method will now return the existing query tracking properties or set the
|
|
1516
1613
|
new query tracking properties depending on whether an argument is provided.
|
|
@@ -1906,7 +2003,7 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
1906
2003
|
|
|
1907
2004
|
- Added support for ArangoDB 3.5 Analyzers API
|
|
1908
2005
|
|
|
1909
|
-
See the documentation of the `
|
|
2006
|
+
See the documentation of the `db.analyzer` method and the `Analyzer`
|
|
1910
2007
|
instances for information on using this API.
|
|
1911
2008
|
|
|
1912
2009
|
- Added `collection.getResponsibleShard` method
|
|
@@ -2080,7 +2177,7 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
2080
2177
|
|
|
2081
2178
|
- Fixed `edgeCollection.save` not respecting options ([#554](https://github.com/arangodb/arangojs/issues/554))
|
|
2082
2179
|
|
|
2083
|
-
- Fixed `
|
|
2180
|
+
- Fixed `db.createDatabase` TypeScript signature ([#561](https://github.com/arangodb/arangojs/issues/561))
|
|
2084
2181
|
|
|
2085
2182
|
## [6.5.0] - 2018-08-03
|
|
2086
2183
|
|
|
@@ -2121,7 +2218,7 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
2121
2218
|
|
|
2122
2219
|
- Added `ArangoError` and `CollectionType` to public exports
|
|
2123
2220
|
|
|
2124
|
-
- Added `
|
|
2221
|
+
- Added `db.close` method
|
|
2125
2222
|
|
|
2126
2223
|
- Added `opts` parameter to `EdgeCollection#save`
|
|
2127
2224
|
|
|
@@ -2129,11 +2226,11 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
2129
2226
|
|
|
2130
2227
|
### Added
|
|
2131
2228
|
|
|
2132
|
-
- Added `
|
|
2229
|
+
- Added `db.version` method
|
|
2133
2230
|
|
|
2134
|
-
- Added `
|
|
2231
|
+
- Added `db.login` method
|
|
2135
2232
|
|
|
2136
|
-
- Added `
|
|
2233
|
+
- Added `db.exists` method
|
|
2137
2234
|
|
|
2138
2235
|
- Added `collection.exists` method
|
|
2139
2236
|
|
|
@@ -2355,8 +2452,8 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
2355
2452
|
|
|
2356
2453
|
Graph methods now only return the relevant part of the response body.
|
|
2357
2454
|
|
|
2358
|
-
[10.0.0
|
|
2359
|
-
[
|
|
2455
|
+
[10.0.0]: https://github.com/arangodb/arangojs/compare/v9.3.0...v10.0.0
|
|
2456
|
+
[9.3.0]: https://github.com/arangodb/arangojs/compare/v9.2.0...v9.3.0
|
|
2360
2457
|
[9.2.0]: https://github.com/arangodb/arangojs/compare/v9.1.0...v9.2.0
|
|
2361
2458
|
[9.1.0]: https://github.com/arangodb/arangojs/compare/v9.0.0...v9.1.0
|
|
2362
2459
|
[9.0.0]: https://github.com/arangodb/arangojs/compare/v8.8.1...v9.0.0
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ You can also use [jsDelivr CDN](https://www.jsdelivr.com) during development:
|
|
|
36
36
|
<script type="importmap">
|
|
37
37
|
{
|
|
38
38
|
"imports": {
|
|
39
|
-
"arangojs": "https://cdn.jsdelivr.net/npm/arangojs@
|
|
39
|
+
"arangojs": "https://cdn.jsdelivr.net/npm/arangojs@10.0.0/esm/index.js?+esm"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
</script>
|
|
@@ -183,7 +183,7 @@ For more details on the errors thrown by `undici`, see the
|
|
|
183
183
|
Please make sure you are using the latest version of this driver and that the
|
|
184
184
|
version of the arangojs documentation you are reading matches that version.
|
|
185
185
|
|
|
186
|
-
Changes in the major version number of arangojs (e.g.
|
|
186
|
+
Changes in the major version number of arangojs (e.g. 9.x.y -> 10.0.0) indicate
|
|
187
187
|
backwards-incompatible changes in the arangojs API that may require changes in
|
|
188
188
|
your code when upgrading your version of arangojs.
|
|
189
189
|
|
|
@@ -194,10 +194,10 @@ the [compatibility section](#compatibility) for additional information.
|
|
|
194
194
|
You can install an older version of arangojs using `npm` or `yarn`:
|
|
195
195
|
|
|
196
196
|
```sh
|
|
197
|
-
# for version
|
|
198
|
-
yarn add arangojs@
|
|
197
|
+
# for version 9.x.x
|
|
198
|
+
yarn add arangojs@9
|
|
199
199
|
# - or -
|
|
200
|
-
npm install --save arangojs@
|
|
200
|
+
npm install --save arangojs@9
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
### No code intelligence when using require instead of import
|
|
@@ -272,7 +272,7 @@ available.
|
|
|
272
272
|
### Unix domain sockets
|
|
273
273
|
|
|
274
274
|
If you want to use Unix domain sockets, you need to install the `undici` module,
|
|
275
|
-
which is an optional dependency of arangojs.
|
|
275
|
+
which is an optional peer dependency of arangojs.
|
|
276
276
|
|
|
277
277
|
```sh
|
|
278
278
|
npm install --save undici
|
|
@@ -285,7 +285,8 @@ message indicating that the `undici` module is unavailable.
|
|
|
285
285
|
### Node.js with self-signed HTTPS certificates
|
|
286
286
|
|
|
287
287
|
If you need to support self-signed HTTPS certificates in Node.js, you will need
|
|
288
|
-
to install the `undici` module, which is an optional dependency of
|
|
288
|
+
to install the `undici` module, which is an optional peer dependency of
|
|
289
|
+
arangojs.
|
|
289
290
|
|
|
290
291
|
```sh
|
|
291
292
|
npm install --save undici
|