Skip to content

Commit

Permalink
Make undici an optional peer dep
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma4345 committed Dec 10, 2024
1 parent 897e7b8 commit 860985b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ 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.

## [Unreleased]

### Changed

- Changed `undici` from an optional dependency to an optional peer dependency

The `undici` module is only required when using Unix domain sockets or
overriding the fetch agent in Node.js and does not need to be installed
otherwise.

## [10.0.0-alpha.1] - 2024-12-09

This is a major release and breaks backwards compatibility.
Expand Down Expand Up @@ -146,7 +156,7 @@ for upgrading your code to arangojs v10.
`arangojs/documents` module

The following types were moved: `DocumentOperationFailure`,
`DocumentOperationMetadata`, `DocumentExistsOptions`,
`DocumentOperationMetadata`, `DocumentExistsOptions`,
`CollectionReadOptions`, `CollectionBatchReadOptions`,
`CollectionInsertOptions`, `CollectionReplaceOptions`,
`CollectionUpdateOptions`, `CollectionRemoveOptions`,
Expand Down Expand Up @@ -243,9 +253,11 @@ for upgrading your code to arangojs v10.
- `CreateDatabaseUser` -> `CreateDatabaseUserOptions`

- Index operations:

- `IndexListOptions` -> `ListIndexesOptions`

- Collection document operations:

- `DocumentExistsOptions` -> `DocumentExistsOptions`
- `CollectionReadOptions` -> `ReadDocumentOptions`
- `CollectionBatchReadOptions` -> `BulkReadDocumentsOptions`
Expand All @@ -259,6 +271,7 @@ for upgrading your code to arangojs v10.
- `CollectionEdgesResult` -> `DocumentEdgesResult`

- Graph collection document operation:

- `GraphCollectionReadOptions` -> `ReadGraphDocumentOptions`
- `GraphCollectionInsertOptions` -> `CreateGraphDocumentOptions`
- `GraphCollectionReplaceOptions` -> `ReplaceGraphDocumentOptions`
Expand Down Expand Up @@ -2355,6 +2368,7 @@ 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.

[unreleased]: https://github.com/arangodb/arangojs/compare/v10.0.0-alpha.1...v10
[10.0.0-alpha.1]: https://github.com/arangodb/arangojs/compare/v10.0.0-alpha.0...v10.0.0-alpha.1
[10.0.0-alpha.0]: https://github.com/arangodb/arangojs/compare/v9.2.0...v10.0.0-alpha.0
[9.2.0]: https://github.com/arangodb/arangojs/compare/v9.1.0...v9.2.0
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ available.
### Unix domain sockets

If you want to use Unix domain sockets, you need to install the `undici` module,
which is an optional dependency of arangojs.
which is an optional peer dependency of arangojs.

```sh
npm install --save undici
Expand All @@ -285,7 +285,8 @@ message indicating that the `undici` module is unavailable.
### Node.js with self-signed HTTPS certificates

If you need to support self-signed HTTPS certificates in Node.js, you will need
to install the `undici` module, which is an optional dependency of arangojs.
to install the `undici` module, which is an optional peer dependency of
arangojs.

```sh
npm install --save undici
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@
"typedoc": "^0.25.12",
"typescript": "^5.4.2"
},
"optionalDependencies": {
"peerDependencies": {
"undici": ">=5.21.0"
},
"peerDependenciesMeta": {
"undici": {
"optional": true
}
}
}

0 comments on commit 860985b

Please sign in to comment.