node-jwks-rsa
node-jwks-rsa copied to clipboard
Types should not be dependencies
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
moved the types from dependencies, to devdependencies.
Checklist
- [X] I have added documentation for new/changed functionality in this PR or in auth0.com/docs
- [X] All active GitHub checks for tests, formatting, and security are passing
- [X] The correct base branch is being used, if not the default branch
Found this who added it https://github.com/auth0/node-jwks-rsa/pull/314
First time was added https://github.com/auth0/node-jwks-rsa/commit/6fc054daec155486a243561bfa569171c8d6e16b PR: https://github.com/auth0/node-jwks-rsa/pull/9 Real bad excuse to have it moved. Consumers of this library SHOULD NOT compile it, but instead, it should come pre-bundled.
BTW if the problem is that this library is exposing dependencies' types, those can be added as peerDependencies.
Additionally to moving the types to devDependencies, it would make sense to have anything that is required or imported in the code in dependencies or peerDependencies.
Could this be looked into? This repository is included in firebase-admin, and it's installing more dependencies than it should in production builds. @adamjmcgrath @nandan-bhat
Thanks in advance.
Hey, any updates on this? Because with @types/[email protected], there is an issue with typescript esm projects without esModuleInterop. @types/[email protected] relies on ms which is using commonjs. I know that this is easily addressable with changing ts configs, but allowing extra flexibility would be great 😄