-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- I'd be willing to implement this feature (contributing guide)
- This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
When running yarn or yarn install to bring packages down in a corporate environment with proxy certificates, we generally get the common error about self-signed certificates. We end up setting NODE_EXTRA_CA_CERTS on all developer machines as a workaround but it means extra maintenance because sometimes the internal certificates get renewed, perhaps more often once the browser certificate lifetimes reduce.
Describe the solution you'd like
I understand from elsewhere that since Node.js v22.15.0 one can use this to pick up the system certs:
import { globalAgent } from 'https'
import { getCACertificates } from 'node:tls'
globalAgent.options.ca = getCACertificates('system')
I'd like it if this was automatically implemented where the node version was high enough.
Describe the drawbacks of your solution
Some code complexity with the version check, not aware of any other downsides.
Describe alternatives you've considered
The alternative is to continue using NODE_EXTRA_CA_CERTS.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request