auth0 / express-jwt

connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes
MIT License
4.49k stars 444 forks source link

TypeScript `@types/*` deps pollute production deps #323

Open bickelj opened 1 year ago

bickelj commented 1 year ago

Description

When adding a dependency on express-jwt, I expected all TypeScript @types dependencies to remain in the devDependencies. Instead, I see several @types dependencies showing up in production dependences. The @types should typically be used at compile-time only.

Reproduction

  1. Add express-jwt to an existing TypeScript project's project.json as a (production/non-dev) dependency and @types/jsonwebtoken as a dev dependency.
  2. npm install
  3. git diff will show that several @types, including @types/jsonwebtoken have their "dev": true flags removed and therefore these packages show up in the production distribution.

Environment

Please provide the following: