Skip to content

Commit

Permalink
deps: pacote@13.2.0 (#4837)
Browse files Browse the repository at this point in the history
fritzy authored May 3, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b9a966c commit 62faf8a
Showing 5 changed files with 28 additions and 18 deletions.
11 changes: 9 additions & 2 deletions node_modules/pacote/lib/fetcher.js
Original file line number Diff line number Diff line change
@@ -105,8 +105,15 @@ class FetcherBase {
this[_readPackageJson] = readPackageJsonFast
}

// config values: npmjs (default), never
this.replaceRegistryHost = opts.replaceRegistryHost === 'never' ? 'never' : 'npmjs'
// config values: npmjs (default), never, always
// we don't want to mutate the original value
if (opts.replaceRegistryHost !== 'never'
&& opts.replaceRegistryHost !== 'always'
) {
this.replaceRegistryHost = 'npmjs'
} else {
this.replaceRegistryHost = opts.replaceRegistryHost
}

this.defaultTag = opts.defaultTag || 'latest'
this.registry = removeTrailingSlashes(opts.registry || 'https://registry.npmjs.org')
13 changes: 8 additions & 5 deletions node_modules/pacote/lib/remote.js
Original file line number Diff line number Diff line change
@@ -5,18 +5,21 @@ const pacoteVersion = require('../package.json').version
const fetch = require('npm-registry-fetch')
const Minipass = require('minipass')
// The default registry URL is a string of great magic.
const magic = /^https?:\/\/registry\.npmjs\.org\//
const magicHost = 'https://registry.npmjs.org'

const _cacheFetches = Symbol.for('pacote.Fetcher._cacheFetches')
const _headers = Symbol('_headers')
class RemoteFetcher extends Fetcher {
constructor (spec, opts) {
super(spec, opts)
this.resolved = this.spec.fetchSpec
if (this.replaceRegistryHost === 'npmjs'
&& magic.test(this.resolved)
&& !magic.test(this.registry + '/')) {
this.resolved = this.resolved.replace(magic, this.registry + '/')
const resolvedURL = new URL(this.resolved)
if (
(this.replaceRegistryHost === 'npmjs'
&& resolvedURL.origin === magicHost)
|| this.replaceRegistryHost === 'always'
) {
this.resolved = new URL(resolvedURL.pathname, this.registry).href
}

// nam is a fermented pork sausage that is good to eat
6 changes: 3 additions & 3 deletions node_modules/pacote/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pacote",
"version": "13.1.1",
"version": "13.2.0",
"description": "JavaScript package downloader",
"author": "GitHub Inc.",
"bin": {
@@ -26,7 +26,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.2.2",
"@npmcli/template-oss": "3.4.2",
"hosted-git-info": "^5.0.0",
"mutate-fs": "^2.1.1",
"nock": "^13.2.4",
@@ -74,7 +74,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.2.2",
"version": "3.4.2",
"windowsCI": false
}
}
14 changes: 7 additions & 7 deletions package-lock.json
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@
"npm-user-validate": "^1.0.1",
"npmlog": "^6.0.2",
"opener": "^1.5.2",
"pacote": "^13.1.1",
"pacote": "^13.2.0",
"parse-conflict-json": "^2.0.2",
"proc-log": "^2.0.1",
"qrcode-terminal": "^0.12.0",
@@ -5563,9 +5563,9 @@
}
},
"node_modules/pacote": {
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.1.1.tgz",
"integrity": "sha512-MTT3k1OhUo+IpvoHGp25OwsRU0L+kJQM236OCywxvY4OIJ/YfloNW2/Yc3HMASH10BkfZaGMVK/pxybB7fWcLw==",
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.2.0.tgz",
"integrity": "sha512-IT4/xHT8eLi4cJdKSGCuqooWp2YwRP5OgrQypbBlLG8Ubzw+h7s57QbrA2SegQcdGefD81ZvuI+aL0JlfFcPCA==",
"inBundle": true,
"dependencies": {
"@npmcli/git": "^3.0.0",
@@ -13898,9 +13898,9 @@
}
},
"pacote": {
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.1.1.tgz",
"integrity": "sha512-MTT3k1OhUo+IpvoHGp25OwsRU0L+kJQM236OCywxvY4OIJ/YfloNW2/Yc3HMASH10BkfZaGMVK/pxybB7fWcLw==",
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.2.0.tgz",
"integrity": "sha512-IT4/xHT8eLi4cJdKSGCuqooWp2YwRP5OgrQypbBlLG8Ubzw+h7s57QbrA2SegQcdGefD81ZvuI+aL0JlfFcPCA==",
"requires": {
"@npmcli/git": "^3.0.0",
"@npmcli/installed-package-contents": "^1.0.7",
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@
"npm-user-validate": "^1.0.1",
"npmlog": "^6.0.2",
"opener": "^1.5.2",
"pacote": "^13.1.1",
"pacote": "^13.2.0",
"parse-conflict-json": "^2.0.2",
"proc-log": "^2.0.1",
"qrcode-terminal": "^0.12.0",

0 comments on commit 62faf8a

Please sign in to comment.