Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types referred in dependencies section of package json #384

Closed
4 tasks done
manpreet-compro opened this issue Oct 30, 2023 · 2 comments
Closed
4 tasks done

types referred in dependencies section of package json #384

manpreet-compro opened this issue Oct 30, 2023 · 2 comments
Labels

Comments

@manpreet-compro
Copy link
Contributor

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Package json of the project has 2 packages only for types

"@types/express": "^4.17.17",
"@types/jsonwebtoken": "^9.0.2",

These are only providing the type definitions and ideally should be in devDependencies folder.

This create the issue of large package size. On doing production npm install npm install --production
Size of node_modules folder is 5.33MB of which @types folder is of 4.08 MB

This is significant in the use case when this library is used in AWS Lambda - who is known to have higher cold start time dependeing on the package size

Package json should be updated and has only those dependenies which are required for production code

Reproduction

Install the dependencies using npm install --production

Additional context

No response

jwks-rsa version

3.1.0

Node.js version

18.17.0

@adamjmcgrath
Copy link
Contributor

Hi @manpreet-compro - there's been some back and forth on this. In the end we decided to stick to it in dependencies - See #80 (review)

@manpreet-compro
Copy link
Contributor Author

@adamjmcgrath Thanks for the reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants