chore: url → Eliminate obsolete "url" library from the cli subpackage (#19695)

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
This commit is contained in:
Juan Julián Merelo Guervós
2022-01-20 17:22:28 +01:00
committed by GitHub
parent edb4642328
commit 21cc95b8c4
2 changed files with 6 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ const arch = require('arch')
const la = require('lazy-ass')
const is = require('check-more-types')
const os = require('os')
const Url = require('url')
const url = require('url')
const path = require('path')
const debug = require('debug')('cypress:cli')
const request = require('@cypress/request')
@@ -62,7 +62,7 @@ const getCA = () => {
}
const prepend = (urlPath) => {
const endpoint = Url.resolve(getBaseUrl(), urlPath)
const endpoint = url.resolve(getBaseUrl(), urlPath)
const platform = os.platform()
const pathTemplate = util.getEnv('CYPRESS_DOWNLOAD_PATH_TEMPLATE')
@@ -318,7 +318,7 @@ const downloadFromUrl = ({ url, downloadDestination, progress, ca, version, redi
}
/**
* Download Cypress.zip from external url to local file.
* Download Cypress.zip from external versionUrl to local file.
* @param [string] version Could be "3.3.0" or full URL
* @param [string] downloadDestination Local filename to save as
*/
@@ -335,12 +335,12 @@ const start = (opts) => {
} }
}
const url = getUrl(version)
const versionUrl = getUrl(version)
progress.throttle = 100
debug('needed Cypress version: %s', version)
debug('source url %s', url)
debug('source url %s', versionUrl)
debug(`downloading cypress.zip to "${downloadDestination}"`)
// ensure download dir exists
@@ -349,7 +349,7 @@ const start = (opts) => {
return getCA()
})
.then((ca) => {
return downloadFromUrl({ url, downloadDestination, progress, ca, version,
return downloadFromUrl({ url: versionUrl, downloadDestination, progress, ca, version,
...(redirectTTL ? { redirectTTL } : {}) })
})
.catch((err) => {

View File

@@ -61,7 +61,6 @@
"supports-color": "^8.1.1",
"tmp": "~0.2.1",
"untildify": "^4.0.0",
"url": "^0.11.0",
"yauzl": "^2.10.0"
},
"devDependencies": {