Skip to content

Commit

Permalink
Define optional peer dependencies and least supported versions (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo authored Jan 15, 2025
1 parent f665043 commit 29dd26a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .changeset/pink-teachers-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'graphql-ws': minor
---

Define optional peer dependencies and least supported versions

Using the [`peerDependencies`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependencies) in combination with [`peerDependenciesMeta`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependenciesmeta) configuration in `package.json`.
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,21 @@
"test": "vitest"
},
"peerDependencies": {
"graphql": "^15.10.1 || ^16.10.0"
"@fastify/websocket": "^10 || ^11",
"graphql": "^15.10.1 || ^16",
"uWebSockets.js": "^20",
"ws": "^8"
},
"peerDependenciesMeta": {
"@fastify/websocket": {
"optional": true
},
"uWebSockets.js": {
"optional": true
},
"ws": {
"optional": true
}
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
Expand All @@ -114,7 +128,7 @@
"typedoc": "^0.27.6",
"typedoc-plugin-markdown": "^4.4.1",
"typescript": "^5.7.3",
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.51.0",
"uWebSockets.js": "uNetworking/uWebSockets.js#semver:^20.51.0",
"vitest": "^2.1.8",
"ws": "^8.18.0"
},
Expand Down
16 changes: 13 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2534,11 +2534,21 @@ __metadata:
typedoc: "npm:^0.27.6"
typedoc-plugin-markdown: "npm:^4.4.1"
typescript: "npm:^5.7.3"
uWebSockets.js: "uNetworking/uWebSockets.js#v20.51.0"
uWebSockets.js: "uNetworking/uWebSockets.js#semver:^20.51.0"
vitest: "npm:^2.1.8"
ws: "npm:^8.18.0"
peerDependencies:
graphql: ^15.10.1 || ^16.10.0
"@fastify/websocket": ^10 || ^11
graphql: ^15.10.1 || ^16
uWebSockets.js: ^20
ws: ^8
peerDependenciesMeta:
"@fastify/websocket":
optional: true
uWebSockets.js:
optional: true
ws:
optional: true
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -4320,7 +4330,7 @@ __metadata:
languageName: node
linkType: hard

"uWebSockets.js@uNetworking/uWebSockets.js#v20.51.0":
"uWebSockets.js@uNetworking/uWebSockets.js#semver:^20.51.0":
version: 20.51.0
resolution: "uWebSockets.js@https://github.com/uNetworking/uWebSockets.js.git#commit=6609a88ffa9a16ac5158046761356ce03250a0df"
checksum: 10c0/25bd18780ee0582981bf40f40a56dd1d38d528c0d22806c4295d6ab165aae10e90438ca910952ca32d86e264d851325104051b3339e46c8df8633661192d7131
Expand Down

0 comments on commit 29dd26a

Please sign in to comment.