Skip to content

Commit 860985b

Browse files
committed
Make undici an optional peer dep
1 parent 897e7b8 commit 860985b

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ This driver uses semantic versioning:
1414
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
1515
changes that require changes in your code to upgrade.
1616

17+
## [Unreleased]
18+
19+
### Changed
20+
21+
- Changed `undici` from an optional dependency to an optional peer dependency
22+
23+
The `undici` module is only required when using Unix domain sockets or
24+
overriding the fetch agent in Node.js and does not need to be installed
25+
otherwise.
26+
1727
## [10.0.0-alpha.1] - 2024-12-09
1828

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

148158
The following types were moved: `DocumentOperationFailure`,
149-
`DocumentOperationMetadata`, `DocumentExistsOptions`,
159+
`DocumentOperationMetadata`, `DocumentExistsOptions`,
150160
`CollectionReadOptions`, `CollectionBatchReadOptions`,
151161
`CollectionInsertOptions`, `CollectionReplaceOptions`,
152162
`CollectionUpdateOptions`, `CollectionRemoveOptions`,
@@ -243,9 +253,11 @@ for upgrading your code to arangojs v10.
243253
- `CreateDatabaseUser` -> `CreateDatabaseUserOptions`
244254

245255
- Index operations:
256+
246257
- `IndexListOptions` -> `ListIndexesOptions`
247258

248259
- Collection document operations:
260+
249261
- `DocumentExistsOptions` -> `DocumentExistsOptions`
250262
- `CollectionReadOptions` -> `ReadDocumentOptions`
251263
- `CollectionBatchReadOptions` -> `BulkReadDocumentsOptions`
@@ -259,6 +271,7 @@ for upgrading your code to arangojs v10.
259271
- `CollectionEdgesResult` -> `DocumentEdgesResult`
260272

261273
- Graph collection document operation:
274+
262275
- `GraphCollectionReadOptions` -> `ReadGraphDocumentOptions`
263276
- `GraphCollectionInsertOptions` -> `CreateGraphDocumentOptions`
264277
- `GraphCollectionReplaceOptions` -> `ReplaceGraphDocumentOptions`
@@ -2355,6 +2368,7 @@ For a detailed list of changes between pre-release versions of v7 see the
23552368

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

2371+
[unreleased]: https://github.com/arangodb/arangojs/compare/v10.0.0-alpha.1...v10
23582372
[10.0.0-alpha.1]: https://github.com/arangodb/arangojs/compare/v10.0.0-alpha.0...v10.0.0-alpha.1
23592373
[10.0.0-alpha.0]: https://github.com/arangodb/arangojs/compare/v9.2.0...v10.0.0-alpha.0
23602374
[9.2.0]: https://github.com/arangodb/arangojs/compare/v9.1.0...v9.2.0

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ available.
272272
### Unix domain sockets
273273

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

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

287287
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 arangojs.
288+
to install the `undici` module, which is an optional peer dependency of
289+
arangojs.
289290

290291
```sh
291292
npm install --save undici

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@
103103
"typedoc": "^0.25.12",
104104
"typescript": "^5.4.2"
105105
},
106-
"optionalDependencies": {
106+
"peerDependencies": {
107107
"undici": ">=5.21.0"
108+
},
109+
"peerDependenciesMeta": {
110+
"undici": {
111+
"optional": true
112+
}
108113
}
109114
}

0 commit comments

Comments
 (0)