Skip to content

Commit

Permalink
Update devel docs via a53ffe4
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma4345 committed Nov 20, 2024
1 parent 00d2bd1 commit c5f8736
Show file tree
Hide file tree
Showing 294 changed files with 620 additions and 6,211 deletions.
293 changes: 5 additions & 288 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
$---
permalink: /CHANGELOG
title: "CHANGELOG"
---
Expand All @@ -19,293 +19,19 @@ This driver uses semantic versioning:
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
changes that require changes in your code to upgrade.

## [9.1.0] - 2024-09-25

### Changed

- Removed `progress` property from `Index` type

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

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

## [9.0.0] - 2024-07-31

This is a major release and breaks backwards compatibility.

See [the migration guide](./MIGRATING.md#v8-to-v9) 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](https://nodejs.dev/en/about/releases/).

- 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](https://github.com/arangodb/arangojs/issues/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](https://github.com/arangodb/arangojs/issues/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](https://github.com/arangodb/arangojs/issues/778))

This allows creating indexes without narrowing the index type.

## [8.8.1] - 2024-03-20

### Added

- Added the `versionAttribute` option to the document operation options types (DE-783)

## [8.8.0] - 2024-03-12

### 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 `DocumentOperationMetadata` and `DocumentOperationFailure` types (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 `overwriteMode` option.

### 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_delimiter` analyzer type (DE-753)

- Added support for `wildcard` analyzer type (DE-750)

## [8.7.0] - 2024-02-14

### Changed

- Made `options` argument in `collection.edges`, `inEdges` and `outEdges` optional ([#802](https://github.com/arangodb/arangojs/issues/802))

### Deprecated

- Deprecated `db.getLogMessages`

This API was deprecated in ArangoDB 3.8 and should no longer be used.
Use `db.getLogEntries` instead.

### Fixed

- Fixed `db.getLogEntries` using the wrong API endpoint

## [8.6.0] - 2023-10-24

### Added

- Added `db.createJob` method to convert arbitrary requests into async jobs (DE-610)

This method can be used to set the `x-arango-async: store` header on any
request, which will cause the server to store the request in an async job:

```js
const collectionsJob = await db.createJob(() => db.collections());
// once loaded, collectionsJob.result will be an array of Collection instances
const numbersJob = await db.createJob(() =>
db.query(aql`FOR i IN 1..1000 RETURN i`)
);
// once loaded, numbersJob.result will be an ArrayCursor of numbers
```

## [8.5.0] - 2023-10-09

### Added

- Implemented hot backup API (DE-576)

- Implemented logging API (DE-144, DE-145, DE-146, DE-147)

- Implemented async jobs management (DE-339)

- Added `db.shutdown` to initiate a clean shutdown of the server

- Added `db.time` method to retrieve the server's system time

## [8.4.1] - 2023-09-15

### Fixed

- Fixed default return type of AQL queries being `undefined` instead of `any` ([#797](https://github.com/arangodb/arangojs/issues/797))

## [8.4.0] - 2023-07-10

### Changed

- Fetching additional cursor results now uses `POST` instead of `PUT` (DE-605)

The `PUT` route was deprecated and the `POST` route is supported in all
actively maintained versions of ArangoDB.

- User management methods now use database-relative URLs (DE-606)

Previously these methods would make requests without a database prefix,
implicitly using the `_system` database.

- `aql` template strings now take a generic type argument

This allows explictly setting the item type of the `ArrayCursor` returned by
`db.query` when using `aql` template strings. Note that like when setting
the type on `db.query` directly, arangojs can make no guarantees that the
type matches the actual data returned by the query.

```ts
const numbers = await db.query(aql<{ index: number; squared: number }>`
FOR i IN 1..1000
RETURN {
index: i,
squared: i * i
}
`);
const first = await numbers.next(); // { index: number; squared: number; }
console.log(first.index, first.squared); // 1 1
```

### Fixed

- Fixed `listUsers` behavior ([#782](https://github.com/arangodb/arangojs/issues/782))

- Fixed `graph.create` not correctly handling `isDisjoint` option

### Added

- Added missing attributes to `QueryInfo` and `MultiExplainResult.stats` types (DE-607)

- Added cluster rebalancing methods to `Database` (DE-583)

- Added `db.withTransaction` helper method for streaming transactions ([#786](https://github.com/arangodb/arangojs/discussions/786))

This method allows using streaming transactions without having to manually
begin and commit or abort the transaction.

```ts
const vertices = db.collection("vertices");
const edges = db.collection("edges");
const info = await db.withTransaction([vertices, edges], async (step) => {
const start = await step(() => vertices.document("a"));
const end = await step(() => vertices.document("b"));
return await step(() => edges.save({ _from: start._id, _to: end._id }));
});
```

## [8.3.1] - 2023-06-05

### Changed
## Changed

- Added note that Simple Queries traversals are removed in ArangoDB 3.12.

## [8.3.0] - 2023-05-11

### Fixed
## Fixed

- Fixed `updateUser` and `replaceUser` behavior ([#783](https://github.com/arangodb/arangojs/issues/783))

### Added
## Added

- Added `renewAuthToken` method to `Database` ([#784](https://github.com/arangodb/arangojs/issues/784))

Expand Down Expand Up @@ -504,7 +230,7 @@ for upgrading your code to arangojs v8.
squared: i * i
}
`);
const first = await numbers.next(); // { index: number; squared: number; }
const first = await numbers.next();
console.log(first.index, first.squared); // 1 1
```

Expand Down Expand Up @@ -1924,15 +1650,6 @@ For a detailed list of changes between pre-release versions of v7 see the

Graph methods now only return the relevant part of the response body.

[9.1.0]: https://github.com/arangodb/arangojs/compare/v9.0.0...v9.1.0
[9.0.0]: https://github.com/arangodb/arangojs/compare/v8.8.1...v9.0.0
[8.8.1]: https://github.com/arangodb/arangojs/compare/v8.8.0...v8.8.1
[8.8.0]: https://github.com/arangodb/arangojs/compare/v8.7.0...v8.8.0
[8.7.0]: https://github.com/arangodb/arangojs/compare/v8.6.0...v8.7.0
[8.6.0]: https://github.com/arangodb/arangojs/compare/v8.5.0...v8.6.0
[8.5.0]: https://github.com/arangodb/arangojs/compare/v8.4.1...v8.5.0
[8.4.1]: https://github.com/arangodb/arangojs/compare/v8.4.0...v8.4.1
[8.4.0]: https://github.com/arangodb/arangojs/compare/v8.3.1...v8.4.0
[8.3.1]: https://github.com/arangodb/arangojs/compare/v8.3.0...v8.3.1
[8.3.0]: https://github.com/arangodb/arangojs/compare/v8.2.1...v8.3.0
[8.2.1]: https://github.com/arangodb/arangojs/compare/v8.2.0...v8.2.1
Expand Down
Loading

0 comments on commit c5f8736

Please sign in to comment.