Skip to content

Commit

Permalink
Add production dependency on @types/node-fetch. (#3546)
Browse files Browse the repository at this point in the history
* Add production dependency on `@types/node-fetch`.

As the `HeadersInit` is exported and used in the exported [`GatewayConfig`]
type via [`RemoteGatewayConfig`] - which is emitted to `@apollo/gateway`'s
`dist/index.d.ts` declaration, the `node-fetch` types need to be available
by those who install the package.

[`GatewayConfig`]: https://github.com/apollographql/apollo-server/blob/73cdf0d533908894282debdb6dc5444186af27a6/packages/apollo-gateway/src/index.ts#L74-L77
[`RemoteGatewayConfig`]: https://github.com/apollographql/apollo-server/blob/73cdf0d533908894282debdb6dc5444186af27a6/packages/apollo-gateway/src/index.ts#L62

Fixes: #3471

* Add CHANGELOG.md for #3546.
  • Loading branch information
abernix committed Nov 27, 2019
1 parent 3eaf8cf commit c63786b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The version headers in this history reflect the versions of Apollo Server itself

> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the the appropriate changes within that release will be moved into the new section.
- `@apollo/gateway`: Add `@types/node-fetch` as a regular dependency to avoid missing dependency for TypeScript consumers. [PR #3546](https://github.com/apollographql/apollo-server/pull/3546) [Issue #3471](https://github.com/apollographql/apollo-server/issues/3471)

### v2.9.12

- Reinstate [PR #3530](https://github.com/apollographql/apollo-server/pull/3530) via [#3539](https://github.com/apollographql/apollo-server/pull/3539) - after a patch release of the `@apollo/protobufjs` fork, the build issue for consumers should be resolved.
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/apollo-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"dependencies": {
"@apollo/federation": "file:../apollo-federation",
"@types/node-fetch": "2.5.4",
"apollo-engine-reporting-protobuf": "file:../apollo-engine-reporting-protobuf",
"apollo-env": "^0.6.0",
"apollo-graphql": "^0.3.4",
Expand Down

0 comments on commit c63786b

Please sign in to comment.