Skip to content

Commit

Permalink
Fix a bundle of dependency issues
Browse files Browse the repository at this point in the history
Some packages were depending on other packages that were only declared
as transitive dependencies. Clean this up by adding appropriate
dependencies (or in one case, just re-declaring ValueOrPromise and
dropping the apollo-server-types dependency).

The peer dep one is a bit funny.  But "Y has a peer dep on Z" means
"when you install Y you need to install Z", and so if X depends on Y,
then when you install X you need to install Z... so sure, that means X
needs to have a peer dep on Z too, I guess.

Fixes #6389.
Fixes #6390.
Fixes #6391.
Fixes #6392.
  • Loading branch information
glasser committed May 5, 2022
1 parent b046bd1 commit e3c078e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -9,7 +9,7 @@ The version headers in this history reflect the versions of Apollo Server itself

## vNEXT

- _Nothing yet! Stay tuned._
- Add a few missing dependencies to packages. [PR #6393](https://github.com/apollographql/apollo-server/pull/6393)

## v3.7.0

Expand Down
11 changes: 7 additions & 4 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions packages/apollo-datasource-rest/package.json
Expand Up @@ -24,7 +24,7 @@
"apollo-server-errors": "file:../apollo-server-errors",
"http-cache-semantics": "^4.1.0"
},
"devDependencies": {
"apollo-server-types": "file:../apollo-server-types"
"peerDependencies": {
"graphql": "^15.3.0 || ^16.0.0"
}
}
3 changes: 1 addition & 2 deletions packages/apollo-datasource-rest/src/RESTDataSource.ts
Expand Up @@ -10,8 +10,6 @@ import {
fetch,
} from 'apollo-server-env';

import type { ValueOrPromise } from 'apollo-server-types';

import { DataSource, DataSourceConfig } from 'apollo-datasource';

import { HTTPCache } from './HTTPCache';
Expand All @@ -22,6 +20,7 @@ import {
ForbiddenError,
} from 'apollo-server-errors';

type ValueOrPromise<T> = T | Promise<T>;
declare module 'apollo-server-env/dist/fetch' {
interface RequestInit {
cacheOptions?:
Expand Down
1 change: 0 additions & 1 deletion packages/apollo-datasource-rest/tsconfig.json
Expand Up @@ -10,6 +10,5 @@
{ "path": "../apollo-datasource" },
{ "path": "../apollo-server-caching" },
{ "path": "../apollo-server-errors" },
{ "path": "../apollo-server-types" },
]
}
1 change: 1 addition & 0 deletions packages/apollo-server-types/package.json
Expand Up @@ -11,6 +11,7 @@
"node": ">=12.0"
},
"dependencies": {
"@apollo/utils.logger": "^1.0.0",
"apollo-reporting-protobuf": "file:../apollo-reporting-protobuf",
"apollo-server-caching": "file:../apollo-server-caching",
"apollo-server-env": "file:../apollo-server-env"
Expand Down
1 change: 1 addition & 0 deletions packages/apollo-server/package.json
Expand Up @@ -22,6 +22,7 @@
},
"homepage": "https://github.com/apollographql/apollo-server#readme",
"dependencies": {
"@types/express": "4.17.13",
"apollo-server-core": "file:../apollo-server-core",
"apollo-server-express": "file:../apollo-server-express",
"express": "^4.17.1"
Expand Down

0 comments on commit e3c078e

Please sign in to comment.