arangojs 9.0.0-preview.1 → 9.0.0-preview.3
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 +34 -0
- package/MIGRATING.md +7 -0
- package/README.md +21 -27
- package/analyzer.d.ts +950 -0
- package/analyzer.d.ts.map +1 -0
- package/aql.d.ts +289 -0
- package/aql.d.ts.map +1 -0
- package/cjs/collection.d.ts +11 -860
- package/cjs/collection.d.ts.map +1 -1
- package/cjs/collection.js +2 -134
- package/cjs/collection.js.map +1 -1
- package/cjs/connection.d.ts +1 -1
- package/cjs/connection.d.ts.map +1 -1
- package/cjs/connection.js +4 -4
- package/cjs/connection.js.map +1 -1
- package/cjs/cursor.d.ts +1 -1
- package/cjs/cursor.d.ts.map +1 -1
- package/cjs/cursor.js +3 -3
- package/cjs/cursor.js.map +1 -1
- package/cjs/graph.d.ts +1 -34
- package/cjs/graph.d.ts.map +1 -1
- package/cjs/graph.js +0 -43
- package/cjs/graph.js.map +1 -1
- package/cjs/indexes.d.ts +12 -0
- package/cjs/indexes.d.ts.map +1 -1
- package/cjs/indexes.js.map +1 -1
- package/cjs/lib/linkedList.d.ts +328 -0
- package/cjs/lib/linkedList.d.ts.map +1 -0
- package/cjs/lib/linkedList.js +604 -0
- package/cjs/lib/linkedList.js.map +1 -0
- package/collection.d.ts +2479 -0
- package/collection.d.ts.map +1 -0
- package/connection.d.ts +509 -0
- package/connection.d.ts.map +1 -0
- package/cursor.d.ts +862 -0
- package/cursor.d.ts.map +1 -0
- package/database.d.ts +4632 -0
- package/database.d.ts.map +1 -0
- package/documents.d.ts +98 -0
- package/documents.d.ts.map +1 -0
- package/error.d.ts +94 -0
- package/error.d.ts.map +1 -0
- package/esm/collection.d.ts +11 -860
- package/esm/collection.d.ts.map +1 -1
- package/esm/collection.js +2 -134
- package/esm/collection.js.map +1 -1
- package/esm/connection.d.ts +1 -1
- package/esm/connection.d.ts.map +1 -1
- package/esm/connection.js +2 -2
- package/esm/connection.js.map +1 -1
- package/esm/cursor.d.ts +1 -1
- package/esm/cursor.d.ts.map +1 -1
- package/esm/cursor.js +1 -1
- package/esm/cursor.js.map +1 -1
- package/esm/graph.d.ts +1 -34
- package/esm/graph.d.ts.map +1 -1
- package/esm/graph.js +0 -43
- package/esm/graph.js.map +1 -1
- package/esm/indexes.d.ts +12 -0
- package/esm/indexes.d.ts.map +1 -1
- package/esm/indexes.js.map +1 -1
- package/esm/lib/linkedList.d.ts +328 -0
- package/esm/lib/linkedList.d.ts.map +1 -0
- package/esm/lib/linkedList.js +599 -0
- package/esm/lib/linkedList.js.map +1 -0
- package/foxx-manifest.d.ts +155 -0
- package/foxx-manifest.d.ts.map +1 -0
- package/graph.d.ts +1137 -0
- package/graph.d.ts.map +1 -0
- package/index.d.ts +52 -0
- package/index.d.ts.map +1 -0
- package/indexes.d.ts +666 -0
- package/indexes.d.ts.map +1 -0
- package/job.d.ts +69 -0
- package/job.d.ts.map +1 -0
- package/lib/codes.d.ts +18 -0
- package/lib/codes.d.ts.map +1 -0
- package/lib/joinPath.d.ts +11 -0
- package/lib/joinPath.d.ts.map +1 -0
- package/lib/linkedList.d.ts +328 -0
- package/lib/linkedList.d.ts.map +1 -0
- package/lib/mergeHeaders.d.ts +12 -0
- package/lib/mergeHeaders.d.ts.map +1 -0
- package/lib/normalizeUrl.d.ts +11 -0
- package/lib/normalizeUrl.d.ts.map +1 -0
- package/lib/request.d.ts +66 -0
- package/lib/request.d.ts.map +1 -0
- package/package.json +7 -7
- package/route.d.ts +273 -0
- package/route.d.ts.map +1 -0
- package/transaction.d.ts +314 -0
- package/transaction.d.ts.map +1 -0
- package/view.d.ts +567 -0
- package/view.d.ts.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,38 @@ 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
|
+
## [9.0.0-preview.3]
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed `Collection` methods for simple queries: `list`, `all`, `any`,
|
|
22
|
+
`byExample`, `firstExample`, `removeByExample`, `replaceByExample`,
|
|
23
|
+
`updateByExample`, `lookupByKeys`, `removeByKeys`, `fulltext`
|
|
24
|
+
|
|
25
|
+
Simple queries were deprecated in ArangoDB 3.4 and can be replicated with AQL.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Added support for `withStats` option in `collection.indexes`
|
|
30
|
+
|
|
31
|
+
This method now takes an object with `withStats` and `withHidden` options
|
|
32
|
+
instead of a boolean flag.
|
|
33
|
+
|
|
34
|
+
## [9.0.0-preview.2]
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Inlined `x3-linkedlist` dependency
|
|
39
|
+
|
|
40
|
+
Inlining this dependency should help make arangojs more portable.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Added support for `withHidden` option in `collection.indexes`
|
|
45
|
+
|
|
46
|
+
This option was introduced in ArangoDB 3.10.13 and 3.11.7 and allows
|
|
47
|
+
fetching the progress information of indexes that are in the building phase.
|
|
48
|
+
|
|
17
49
|
## [9.0.0-preview.1]
|
|
18
50
|
|
|
19
51
|
This is a major release and breaks backwards compatibility.
|
|
@@ -1864,6 +1896,8 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
1864
1896
|
|
|
1865
1897
|
Graph methods now only return the relevant part of the response body.
|
|
1866
1898
|
|
|
1899
|
+
[9.0.0-preview.3]: https://github.com/arangodb/arangojs/compare/v9.0.0-preview.2...v9.0.0-preview.3
|
|
1900
|
+
[9.0.0-preview.2]: https://github.com/arangodb/arangojs/compare/v9.0.0-preview.1...v9.0.0-preview.2
|
|
1867
1901
|
[9.0.0-preview.1]: https://github.com/arangodb/arangojs/compare/v8.8.1...v9.0.0-preview.1
|
|
1868
1902
|
[8.8.1]: https://github.com/arangodb/arangojs/compare/v8.8.0...v8.8.1
|
|
1869
1903
|
[8.8.0]: https://github.com/arangodb/arangojs/compare/v8.7.0...v8.8.0
|
package/MIGRATING.md
CHANGED
|
@@ -21,6 +21,13 @@ Note that ArangoDB may reject non-normalized unicode names and identifiers.
|
|
|
21
21
|
This change is intended to make it easier to recognize normalization issues in
|
|
22
22
|
code interacting with ArangoDB that were previously masked by arangojs.
|
|
23
23
|
|
|
24
|
+
### Simple queries
|
|
25
|
+
|
|
26
|
+
Simple queries like the `removeByExample` and `firstExample` methods have been
|
|
27
|
+
removed from the collections API. These methods were deprecated in ArangoDB 3.4
|
|
28
|
+
and can be replaced with AQL queries. For examples for replicating each
|
|
29
|
+
method's behavior in AQL, see the documentation for these methods in ArangoJS 8.
|
|
30
|
+
|
|
24
31
|
### Request and Response changes
|
|
25
32
|
|
|
26
33
|
Version 9 now uses native `fetch` in all environments. This means that the
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ The official ArangoDB JavaScript client for Node.js and the browser.
|
|
|
9
9
|
|
|
10
10
|
## Links
|
|
11
11
|
|
|
12
|
-
- [API Documentation](https://arangodb.github.io/arangojs/latest/modules/
|
|
12
|
+
- [API Documentation](https://arangodb.github.io/arangojs/latest/modules/index.html)
|
|
13
13
|
|
|
14
14
|
- [Changelog](https://arangodb.github.io/arangojs/CHANGELOG)
|
|
15
15
|
|
|
@@ -30,38 +30,29 @@ yarn add arangojs
|
|
|
30
30
|
When using modern JavaScript tooling with a bundler and compiler (e.g. Babel),
|
|
31
31
|
arangojs can be installed using `npm` or `yarn` like any other dependency.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
build for evergreen browsers:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
var arangojs = require("arangojs/web");
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
You can also use [unpkg](https://unpkg.com) during development:
|
|
33
|
+
You can also use [jsDelivr CDN](https://www.jsdelivr.com) during development:
|
|
41
34
|
|
|
42
35
|
```html
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
<script type="importmap">
|
|
37
|
+
{
|
|
38
|
+
"imports": {
|
|
39
|
+
"arangojs": "https://cdn.jsdelivr.net/npm/arangojs@9.0.0-preview.1/esm/index.js?+esm"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
<script type="module">
|
|
44
|
+
import { Database } from "arangojs";
|
|
45
|
+
const db = new Database();
|
|
47
46
|
// ...
|
|
48
47
|
</script>
|
|
49
48
|
```
|
|
50
49
|
|
|
51
|
-
When loading the browser build with a script tag make sure to load the polyfill first:
|
|
52
|
-
|
|
53
|
-
```html
|
|
54
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.js"></script>
|
|
55
|
-
<script src="https://unpkg.com/arangojs@8.0.0/web.js"></script>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
50
|
## Basic usage example
|
|
59
51
|
|
|
60
|
-
Modern JavaScript/TypeScript with async/await:
|
|
52
|
+
Modern JavaScript/TypeScript with async/await and ES Modules:
|
|
61
53
|
|
|
62
54
|
```js
|
|
63
|
-
|
|
64
|
-
const { Database, aql } = require("arangojs");
|
|
55
|
+
import { Database, aql } from "arangojs";
|
|
65
56
|
|
|
66
57
|
const db = new Database();
|
|
67
58
|
const Pokemons = db.collection("my-pokemons");
|
|
@@ -73,7 +64,7 @@ async function main() {
|
|
|
73
64
|
FILTER pokemon.type == "fire"
|
|
74
65
|
RETURN pokemon
|
|
75
66
|
`);
|
|
76
|
-
console.log("My
|
|
67
|
+
console.log("My pokemans, let me show you them:");
|
|
77
68
|
for await (const pokemon of pokemons) {
|
|
78
69
|
console.log(pokemon.name);
|
|
79
70
|
}
|
|
@@ -98,7 +89,7 @@ const db = new Database({
|
|
|
98
89
|
db.useBasicAuth("admin", "maplesyrup");
|
|
99
90
|
```
|
|
100
91
|
|
|
101
|
-
Old-school JavaScript with promises:
|
|
92
|
+
Old-school JavaScript with promises and CommonJS:
|
|
102
93
|
|
|
103
94
|
```js
|
|
104
95
|
var arangojs = require("arangojs");
|
|
@@ -291,7 +282,7 @@ internally, you can override the global agent by adding `undici` as a
|
|
|
291
282
|
dependency to your project and using its `setGlobalDispatcher` as follows:
|
|
292
283
|
|
|
293
284
|
```js
|
|
294
|
-
|
|
285
|
+
import { Agent, setGlobalDispatcher } from "undici";
|
|
295
286
|
|
|
296
287
|
setGlobalDispatcher(
|
|
297
288
|
new Agent({
|
|
@@ -308,7 +299,7 @@ HTTPS certificate validation entirely, but note this has
|
|
|
308
299
|
**extremely dangerous** security implications:
|
|
309
300
|
|
|
310
301
|
```js
|
|
311
|
-
|
|
302
|
+
import { Agent, setGlobalDispatcher } from "undici";
|
|
312
303
|
|
|
313
304
|
setGlobalDispatcher(
|
|
314
305
|
new Agent({
|
|
@@ -364,3 +355,6 @@ to support larger numbers of concurrent transactions on the server side.
|
|
|
364
355
|
|
|
365
356
|
The Apache License, Version 2.0. For more information, see the accompanying
|
|
366
357
|
LICENSE file.
|
|
358
|
+
|
|
359
|
+
Includes code from [x3-linkedlist](https://github.com/x3cion/x3-linkedlist)
|
|
360
|
+
used under the MIT license.
|