node-jwks-rsa icon indicating copy to clipboard operation
node-jwks-rsa copied to clipboard

Types should not be dependencies

Open andreujuanc opened this issue 1 year ago • 3 comments

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

andreujuanc avatar Oct 02 '24 23:10 andreujuanc

Found this who added it https://github.com/auth0/node-jwks-rsa/pull/314

andreujuanc avatar Oct 03 '24 00:10 andreujuanc

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.

andreujuanc avatar Oct 03 '24 00:10 andreujuanc

BTW if the problem is that this library is exposing dependencies' types, those can be added as peerDependencies.

andreujuanc avatar Oct 03 '24 00:10 andreujuanc

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.

NeoDobby avatar Mar 03 '25 15:03 NeoDobby

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.

Sealos avatar May 13 '25 11:05 Sealos

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 😄

IschanLois avatar Aug 21 '25 03:08 IschanLois