@@ -11,7 +11,9 @@ This is a major release and breaks backwards compatibility.
1111
1212### Removed
1313
14- - Removed ArangoDB 2.8 compatibility
14+ #### General
15+
16+ - Removed ArangoDB 2.8 support
1517
1618 ArangoDB 2.8 has reached End of Life since mid 2018. Version 7 and above
1719 of arangojs will no longer support ArangoDB 2.8 and earlier.
@@ -25,12 +27,7 @@ This is a major release and breaks backwards compatibility.
2527
2628 This removes the ` isAbsolute ` option from the arangojs configuration.
2729
28- - Removed collection ` createCapConstraint ` , ` createHashIndex ` ,
29- ` createSkipList ` , ` createPersistentIndex ` , ` createGeoIndex ` and
30- ` createFulltextIndex ` methods
31-
32- These methods are no longer part of the official ArangoDB API and can be
33- replaced by using the ` collection.ensureIndex ` method.
30+ #### Database API
3431
3532- Removed ` db.edgeCollection ` method
3633
@@ -44,12 +41,23 @@ This is a major release and breaks backwards compatibility.
4441 The behavior of ` db.truncate ` can still be emulated by calling these methods
4542 directly.
4643
44+ #### Collection API
45+
46+ - Removed collection ` createCapConstraint ` , ` createHashIndex ` ,
47+ ` createSkipList ` , ` createPersistentIndex ` , ` createGeoIndex ` and
48+ ` createFulltextIndex ` methods
49+
50+ These methods are no longer part of the official ArangoDB API and can be
51+ replaced by using the ` collection.ensureIndex ` method.
52+
4753- Removed ` save(fromId, toId, edgeData) ` method variants
4854
4955 Methods for creating edges now require the ` _to ` and ` _from ` attributes to
5056 be specified in the edge (document) data and no longer accept these values
5157 as positional arguments.
5258
59+ #### Graph API
60+
5361- Removed generic collection methods from ` GraphVertexCollection `
5462
5563 All methods that are not part of the graph API have been removed.
@@ -62,7 +70,9 @@ This is a major release and breaks backwards compatibility.
6270 The underlying collection can still be accessed from the ` collection `
6371 property.
6472
65- - Removed ` cursor.some ` and ` cursor.every `
73+ #### Cursor API
74+
75+ - Removed ` cursor.some ` and ` cursor.every ` methods
6676
6777 These methods encouraged overfetching and should be replaced with more
6878 efficient AQL queries.
@@ -73,7 +83,9 @@ This is a major release and breaks backwards compatibility.
7383
7484### Deprecated
7585
76- - Deprecated ` db.useDatabase `
86+ #### Database API
87+
88+ - Deprecated ` db.useDatabase ` method
7789
7890 Using this method will affect ` Collection ` , ` Graph ` and other objects
7991 already created for the given database and change which database these
@@ -82,6 +94,8 @@ This is a major release and breaks backwards compatibility.
8294 As of arangojs 7 the ` db.database ` method can be used instead to create a
8395 new, separate ` Database ` object using the same connection pool.
8496
97+ #### Collection API
98+
8599- Deprecated ` Collection ` methods for simple queries: ` list ` , ` all ` , ` any ` ,
86100 ` byExample ` , ` firstExample ` , ` removeByExample ` , ` replaceByExample ` ,
87101 ` updateByExample ` , ` lookupByKeys ` , ` removeByKeys ` , ` fulltext `
@@ -92,6 +106,8 @@ This is a major release and breaks backwards compatibility.
92106
93107 Their behavior can be emulated using AQL queries.
94108
109+ #### Graph API
110+
95111- Deprecated ` graph.traversal ` and ` collection.traversal `
96112
97113 These methods were deprecated in ArangoDB 3.4 and should no longer be used.
@@ -102,6 +118,8 @@ This is a major release and breaks backwards compatibility.
102118
103119### Changed
104120
121+ #### General
122+
105123- Multiple ` Database ` objects can now share a single ` Connection `
106124
107125 All arangojs objects now reference a ` Database ` object rather than accessing
@@ -116,36 +134,13 @@ This is a major release and breaks backwards compatibility.
116134 are memoized per-database. Using ` useDatabase ` de-memoizes the database
117135 object to prevent unexpected behavior.
118136
119- - Renamed ` collection.setProperties ` to ` collection.properties `
120-
121- The method will now return the existing properties or set the properties
122- depending on whether an argument is provided.
123-
124- - Renamed ` collection.setQueryTracking ` to ` collection.queryTracking `
125-
126- The method will now return the existing query tracking properties or set the
127- new query tracking properties depending on whether an argument is provided.
128-
129- - Renamed ` db.arangoSearchView ` to ` db.view `
130-
131- - Renamed ` view.setProperties ` to ` view.updateProperties `
132-
133- - Renamed types ` ArangoAnalyzer ` , ` ArangoView ` and ` ArangoTransaction ` to
134- ` Analyzer ` , ` View ` and ` Transaction `
135-
136- - Merged ` DocumentCollection ` and ` EdgeCollection ` APIs
137+ #### Database API
137138
138- All collections are now implemented as generic ` Collection ` objects.
139- In TypeScript the generic collection object can still be explicitly cast to
140- ` DocumentCollection ` or ` EdgeCollection ` for stricter type safety.
139+ - Renamed method ` db.arangoSearchView ` to ` db.view `
141140
142- - Replaced ` db.enableServiceDevelopmentMode ` and
141+ - Replaced methods ` db.enableServiceDevelopmentMode ` and
143142 ` db.disableServiceDevelopmentMode ` with ` db.setServiceDevelopmentMode `
144143
145- - Transactions no longer take a positional ` params ` argument
146-
147- The argument can still be specified using the ` opts.params ` argument.
148-
149144- Flattened database ` query ` method ` options ` argument
150145
151146 The optional ` options ` argument previously contained an additional ` options `
@@ -170,7 +165,33 @@ This is a major release and breaks backwards compatibility.
170165 });
171166 ```
172167
173- - Collection ` save ` , ` update ` , ` replace ` and ` remove ` no longer take arrays
168+ - Changed ` db.listServices ` option ` excludeSystem ` default to ` true `
169+
170+ To be more consistent with the equivalent options in other methods,
171+ the default value has been changed from ` false ` to ` true ` .
172+
173+ - Changed ` db.createDatabase ` return type to ` Database `
174+
175+ #### Collection API
176+
177+ - Renamed ` collection.setProperties ` to ` collection.properties `
178+
179+ The method will now return the existing properties or set the properties
180+ depending on whether an argument is provided.
181+
182+ - Renamed ` collection.setQueryTracking ` to ` collection.queryTracking `
183+
184+ The method will now return the existing query tracking properties or set the
185+ new query tracking properties depending on whether an argument is provided.
186+
187+ - Merged ` DocumentCollection ` and ` EdgeCollection ` APIs
188+
189+ All collections are now implemented as generic ` Collection ` objects.
190+ In TypeScript the generic collection object can still be explicitly cast to
191+ ` DocumentCollection ` or ` EdgeCollection ` for stricter type safety.
192+
193+ - Collection methods ` save ` , ` update ` , ` replace ` and ` remove ` no longer take
194+ arrays as input
174195
175196 The array versions have been renamed to ` saveAll ` , ` updateAll ` , ` replaceAll `
176197 and ` removeAll ` to reduce the likelihood of mistakes and provide more helpful
@@ -189,6 +210,29 @@ This is a major release and breaks backwards compatibility.
189210 const doc = await bobCol .document (aliceId); // THROWS
190211 ```
191212
213+ - Changed ` collection.import ` option ` type ` behavior
214+
215+ Previously this option would always default to ` "auto" ` .
216+
217+ When passing a ` string ` , ` Buffer ` or ` Blob ` as data, the option now defaults
218+ to ` undefined ` . This matches the behavior in previous versions of setting
219+ the option explicitly to ` null ` .
220+
221+ Additionally, the value ` "array" ` has been replaced with ` "list" ` .
222+
223+ When passing an array as data, the option is now no longer supported as the
224+ corresponding value will be inferred from the array's contents:
225+
226+ If the array's first item is also an array, it will match the behavior in
227+ previous versions of setting the option explicitly to ` null ` .
228+
229+ Otherwise it will match the behavior in previous versions of setting the
230+ option explicitly to ` "documents" ` or ` "auto" ` , or omitting it entirely.
231+
232+ - Changed ` collection.list ` return type to ` ArrayCursor `
233+
234+ #### Graph API
235+
192236- Graph ` create ` method (and ` db.createGraph ` ) signature changed
193237
194238 The ` graph.create ` method now takes an array of edge definitions as the
@@ -243,70 +287,69 @@ This is a major release and breaks backwards compatibility.
243287 });
244288 ```
245289
246- - Changed ` db.listServices ` option ` excludeSystem ` default to ` true `
247-
248- To be more consistent with the equivalent options in other methods,
249- the default value has been changed from ` false ` to ` true ` .
290+ - Graph collection return values now contain ` old ` and ` new ` properties when
291+ ` returnOld ` or ` returnNew ` options are used
250292
251- - Changed ` collection.import ` option ` type ` behavior
293+ This behavior represents a compromise between remaining consistent with the
294+ behavior of the regular collection method equivalents and remaining
295+ compatible with the ArangoDB HTTP API response object quirks.
252296
253- Previously this option would always default to ` "auto" ` .
297+ #### Cursor API
254298
255- When passing a ` string ` , ` Buffer ` or ` Blob ` as data, the option now defaults
256- to ` undefined ` . This matches the behavior in previous versions of setting
257- the option explicitly to ` null ` .
299+ - Replaced ` ArrayCursor ` methods ` hasNext ` and ` hasMore ` with getters
258300
259- Additionally, the value ` "array" ` has been replaced with ` "list" ` .
301+ - Renamed ` ArrayCursor ` method ` each ` to ` forEach `
260302
261- When passing an array as data, the option is now no longer supported as the
262- corresponding value will be inferred from the array's contents:
303+ - In TypeScript ` ArrayCursor ` is now a generic type
263304
264- If the array's first item is also an array, it will match the behavior in
265- previous versions of setting the option explicitly to ` null ` .
305+ TypeScript users can now cast cursor instances to use a specific type for
306+ its values rather than ` any ` to aid type safety .
266307
267- Otherwise it will match the behavior in previous versions of setting the
268- option explicitly to ` "documents" ` or ` "auto" ` , or omitting it entirely.
308+ #### View API
269309
270- - Changed ` collection.list ` return type to ` ArrayCursor `
310+ - Renamed ` view.setProperties ` to ` view.updateProperties `
271311
272- - Changed ` db.createDatabase ` return type to ` Database `
312+ - Renamed type ` ArangoView ` to ` View `
273313
274- - Replaced ` ArrayCursor ` methods ` hasNext ` and ` hasMore ` with getters
314+ #### Analyzer API
275315
276- - Renamed ` ArrayCursor ` method ` each ` to ` forEach `
316+ - Renamed type ` ArangoAnalyzer ` to ` Analyzer `
277317
278- - Graph collection return values now contain ` old ` and ` new ` properties when
279- ` returnOld ` or ` returnNew ` options are used
318+ #### Transaction API
280319
281- This behavior is a compromise with mimicking the behavior of the regular
282- collection method equivalents and remaining compatible with the ArangoDB
283- HTTP API response object quirks.
320+ - Renamed type ` ArangoTransaction ` to ` Transaction `
284321
285- - In TypeScript ` ArrayCursor ` is now a generic type
322+ - Transactions no longer take a positional ` params ` argument
286323
287- TypeScript users can now cast cursor instances to use a specific type for
288- its values rather than ` any ` to aid type safety.
324+ The argument can still be specified using the ` opts.params ` argument.
289325
290326### Added
291327
292- - Added ` db.database ` method
328+ #### General
293329
294330- Added ` databaseName ` option to arangojs config
295331
296332 Setting this option to a database name will result in the initial ` Database `
297333 object using this database instead of the default ` _system ` database.
298334
335+ - Improved type signatures for TypeScript and inline documentation
336+
337+ Most methods should now provide full type signatures for options and response
338+ objects and provide inline documentation in IDEs and editors that support
339+ this feature in TypeScript and JavaScript.
340+
341+ #### Database API
342+
343+ - Added ` db.database ` method
344+
345+ This method replaces the use case for the deprecated ` db.useDatabase `
346+ method.
347+
299348- Added support for extended options in ` db.createDatabase `
300349
301350 This method now supports passing an extended options object instead of
302351 passing the users array directly.
303352
304- - Added collection ` saveAll ` , ` updateAll ` , ` replaceAll ` and ` removeAll ` methods
305-
306- These methods replace the respective array versions of the collection
307- methods ` save ` , ` update ` , ` replace ` and ` remove ` , which no longer accept
308- arrays as inputs.
309-
310353- Added ` db.createCollection ` and ` db.createEdgeCollection ` methods
311354
312355 These are convenience methods wrapping ` collection.create ` . In TypeScript
@@ -329,22 +372,36 @@ This is a major release and breaks backwards compatibility.
329372
330373- Added support for ` db.listServices ` option ` excludeSystem `
331374
375+ #### Collection API
376+
377+ - Added collection ` saveAll ` , ` updateAll ` , ` replaceAll ` and ` removeAll ` methods
378+
379+ These methods replace the respective array versions of the collection
380+ methods ` save ` , ` update ` , ` replace ` and ` remove ` , which no longer accept
381+ arrays as inputs.
382+
332383- Added ` collection.documentId ` method
333384
334385 The method takes a document or a document key and returns a fully qualified
335386 document ID string for the document in the current collection.
336387
388+ #### Cursor API
389+
337390- Added support for ` for await ` in ` ArrayCursor ` ([ #616 ] ( https://github.com/arangodb/arangojs/pull/616 ) )
338391
339392 It is now possible to use ` for await ` to iterate over each item in a cursor
340393 asynchronously.
341394
342- - Improved type signatures for TypeScript
395+ ### Fixed
343396
344- Most methods should now provide full type signatures for options and response
345- objects.
397+ #### General
346398
347- ### Fixed
399+ - Removed TypeScript dependency on ` dom ` library
400+
401+ If you are using arangojs in Node.js, you no longer need to add the ` dom `
402+ library to your ` tsconfig.json ` configuration.
403+
404+ #### Database API
348405
349406- Fixed ` db.dropFunction ` option ` group ` being ignored
350407
@@ -353,11 +410,6 @@ This is a major release and breaks backwards compatibility.
353410 Previously the documentation incorrectly indicated that the default value
354411 of the ` idiomatic ` option is ` true ` . The correct default value is ` false ` .
355412
356- - Removed TypeScript dependency on ` dom ` library
357-
358- If you are using arangojs in Node.js, you no longer need to add the ` dom `
359- library to your ` tsconfig.json ` configuration.
360-
361413## [ 6.14.1] - 2020-05-01
362414
363415### Fixed
0 commit comments