Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Remove deprecated URL API usage #25

Merged
merged 1 commit into from
Apr 30, 2020
Merged

Remove deprecated URL API usage #25

merged 1 commit into from
Apr 30, 2020

Conversation

JamieMagee
Copy link
Contributor

The legacy URL API (provided by require('url')) was deprecated by NodeJS 11 released in October 2018. It is scheduled to be removed in a future release.

The main motivation for this change, is Yarn v2, which does not allow undeclared dependencies to be used. require('url') is ambiguous between the built-in NodeJS module, and the npm package url. I'm assuming the intent is to use the built-in module, so I've migrated to using the new URL API, for which the import is implicit.

@bryanmacfarlane
Copy link
Member

Thanks for pointing that out! Can you create an issue highlighting the issues and details? I want to make sure that if someone is pinning to an older http client and at some point in the future it fails, there's a good searchable issue that folks can add comments to later.

@JamieMagee
Copy link
Contributor Author

@bryanmacfarlane Sure! Opened #26

@bryanmacfarlane
Copy link
Member

Thanks @JamieMagee for this contribution!

@bryanmacfarlane bryanmacfarlane merged commit 5f61f72 into actions:master Apr 30, 2020
@JamieMagee JamieMagee deleted the deprecated-url branch May 1, 2020 19:18
@kouberl
Copy link

kouberl commented Mar 7, 2021

Hello,
I'm not sure but I think
the line

proxyAuth:` ${proxyUrl.username}:${proxyUrl.password}`,

breaks some libraries which are using this library when setting a proxy url without username and password. proxyAuth will be set to ":"

I have a issue at docker/setup-buildx-action: docker/setup-buildx-action#57

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

Successfully merging this pull request may close these issues.

3 participants