Socket
Socket
Sign inDemoInstall

pacote

Package Overview
Dependencies
18
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.1.1

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Change Log

<a name="2.1.1"></a>
## [2.1.1](https://github.com/zkat/pacote/compare/v2.1.0...v2.1.1) (2017-04-19)
### Bug Fixes
* **git:** use sshurl instead of ssh for ssh clones ([ff20803](https://github.com/zkat/pacote/commit/ff20803))
* **notice:** only log npm-notice if the packument came from network ([eeeb411](https://github.com/zkat/pacote/commit/eeeb411))
* **registry:** improve 404 error messages ([6a5cbdb](https://github.com/zkat/pacote/commit/6a5cbdb))
<a name="2.1.0"></a>

@@ -7,0 +19,0 @@ # [2.1.0](https://github.com/zkat/pacote/compare/v2.0.5...v2.1.0) (2017-04-18)

4

lib/handlers/git/manifest.js

@@ -25,6 +25,6 @@ 'use strict'

}).catch(err => {
if (!spec.hosted.ssh()) {
if (!spec.hosted.sshurl()) {
throw err
}
return plainManifest(spec.hosted.ssh(), spec, opts)
return plainManifest(spec.hosted.sshurl(), spec, opts)
}).catch(err => {

@@ -31,0 +31,0 @@ if (!spec.hosted.git()) {

@@ -21,3 +21,3 @@ 'use strict'

return fetchPackument(uri, registry, opts).then(packument => {
return fetchPackument(uri, spec, registry, opts).then(packument => {
return pickManifest(packument, spec, {

@@ -73,3 +73,3 @@ engineFilter: opts.engineFilter,

function fetchPackument (uri, registry, opts) {
function fetchPackument (uri, spec, registry, opts) {
const startTime = Date.now()

@@ -106,3 +106,3 @@ const auth = opts.auth && opts.auth[registryKey(registry)]

}).then(res => res.json().then(packument => {
if (res.headers.get('npm-notice')) {
if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
opts.log.warn('notice', res.headers.get('npm-notice'))

@@ -120,8 +120,10 @@ }

if (res.status >= 400) {
const err = new Error(`Failed with ${res.status} while fetching ${uri}. ${JSON.stringify(packument)}`)
const err = new Error(`${res.statusText}: ${spec} (${uri}). ${JSON.stringify(packument)}`)
err.code = `E${res.status}`
err.spec = spec
err.packument = packument
err.response = res
throw err
}
packument._cached = !!res.headers.get('x-local-cache')
packument._cached = res.headers.has('x-local-cache')
packument._contentLength = +res.headers.get('content-length')

@@ -128,0 +130,0 @@ memo && memo.set(uri, packument)

@@ -78,3 +78,3 @@ 'use strict'

res.body.on('error', err => stream.emit('error', err))
if (res.headers.get('npm-notice')) {
if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
opts.log.warn('notice', res.headers.get('npm-notice'))

@@ -84,4 +84,5 @@ }

if (res.status >= 400) {
const err = new Error(`Failed with ${res.status} while fetching ${uri}.`)
const err = new Error(`${res.statusText}: tarball for ${spec} (${uri}).`)
err.code = `E${res.status}`
err.spec = spec
err.response = res

@@ -88,0 +89,0 @@ throw err

{
"name": "pacote",
"version": "2.1.0",
"version": "2.1.1",
"description": "JavaScript package downloader",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc