Skip to content

Commit

Permalink
chore(deps): specify versions for @types/express and friends (#4493)
Browse files Browse the repository at this point in the history
* chore(deps): specify versions for `@types/express` and friends

In 91b8839 @abernix updated package-lock for `@types/express` (something I had
also noted happened on a branch I was working on). Soon after, in #4327, that
line got dropped from package-lock.json.

I'm guessing this caused the issue I started seeing soon afterwards, where I'd
get lots of compile errors relating to `@types/express` and other
DefinitelyTyped packages it depends on. Turns out the dependencies from
`@types/express` are unversioned, but the latest versions of that type package
depends on the latest versions of a bunch of other type packages.

This commit seems to fix things for me.

* Remove a couple type dependencies from `apollo-server-express`.

- We don't directly depend on `@types/express-serve-static-core`, so I don't
  quite understand the addition of those.  I seem to not have the flapping
  of deps without adding it!

- We shouldn't need to package the `@types/qs` (or the aforementioned pkg)
  into the `apollo-server-express` package's non-dev deps because none of
  those types are exported from our emitted `d.ts` files.  Those
  dependencies should be brought by the corresponding packages if there are
  transitive dep needs.

Co-authored-by: Jesse Rosenberger <git@jro.cc>
  • Loading branch information
glasser and abernix committed Aug 28, 2020
1 parent ebbc239 commit 3f2f414
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 17 deletions.
50 changes: 34 additions & 16 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"@types/body-parser": "1.19.0",
"@types/bunyan": "1.8.6",
"@types/connect": "3.4.33",
"@types/cors": "2.8.7",
"@types/express": "4.17.7",
"@types/fast-json-stable-stringify": "2.0.0",
"@types/hapi": "17.8.8",
"@types/ioredis": "4.17.2",
Expand All @@ -81,6 +83,7 @@
"@types/nock": "10.0.3",
"@types/node": "8.10.62",
"@types/node-fetch": "2.3.2",
"@types/qs": "6.9.4",
"@types/qs-middleware": "1.0.1",
"@types/request": "2.48.5",
"@types/request-promise": "4.1.46",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@apollographql/graphql-playground-html": "1.6.26",
"@types/accepts": "^1.3.5",
"@types/body-parser": "1.19.0",
"@types/cors": "^2.8.4",
"@types/cors": "2.8.7",
"@types/express": "4.17.7",
"accepts": "^1.3.5",
"apollo-server-core": "file:../apollo-server-core",
Expand Down

0 comments on commit 3f2f414

Please sign in to comment.