From 847e5f93cc3c468ed1fdecfd00aba5ef1fa37b16 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 9 Feb 2022 07:46:50 -0800 Subject: [PATCH] fix: consistent use of url.URL Even though the engines field limits the range of node versions to those that have a global URL, all but one of the files still used require('url').URL. This fixes the one remaining file to also use that. While older versions of node are still not supported, and not recommended, this will allow this module to potentially still work there for the time being. --- lib/auth.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/auth.js b/lib/auth.js index e6b50b1..17da6a1 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -1,5 +1,6 @@ 'use strict' const npa = require('npm-package-arg') +const { URL } = require('url') // Find the longest registry key that is used for some kind of auth // in the options.