Socket
Socket
Sign inDemoInstall

pacote

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pacote - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

13

CHANGELOG.md

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

<a name="2.0.4"></a>
## [2.0.4](https://github.com/zkat/pacote/compare/v2.0.3...v2.0.4) (2017-04-18)
### Bug Fixes
* **deps:** remove normalize-git-url ([12d464a](https://github.com/zkat/pacote/commit/12d464a))
* **git:** Correctly read in the HEAD ref after cloning ([dbe1b15](https://github.com/zkat/pacote/commit/dbe1b15))
* **git:** The full clone path doesn't have _resolved set ([ddce561](https://github.com/zkat/pacote/commit/ddce561))
* **manifest:** no _from ever ([15087c4](https://github.com/zkat/pacote/commit/15087c4))
<a name="2.0.3"></a>

@@ -7,0 +20,0 @@ ## [2.0.3](https://github.com/zkat/pacote/compare/v2.0.2...v2.0.3) (2017-04-15)

20

lib/handlers/git/manifest.js

@@ -6,3 +6,2 @@ 'use strict'

const git = require('../../util/git')
const normalizeGitUrl = require('normalize-git-url')
const optCheck = require('../../util/opt-check')

@@ -40,15 +39,15 @@ const pickManifest = require('../../registry/pick-manifest')

function plainManifest (repo, spec, opts) {
const normed = normalizeGitUrl(repo)
const rawRef = decodeURIComponent(normed.branch)
const rawRef = spec.gitCommittish
return resolve(
normed.url, rawRef, spec.name, opts
repo, rawRef, spec.name, opts
).then(ref => {
if (ref) {
const resolved = spec.saveSpec.replace(/#.*/, `#${ref.sha}`)
return {
_repo: normed.url,
_resolved: `${normed.url}#${ref.sha}`,
_repo: repo,
_resolved: resolved,
_spec: spec,
_ref: ref,
_rawRef: rawRef,
_uniqueResolved: `${normed.url}#${ref.sha}`
_uniqueResolved: resolved
}

@@ -60,7 +59,8 @@ } else {

// then we can at least get `finalize-manifest` to cache its result.
const resolved = spec.saveSpec.replace(/#.*/, `#${rawRef}`)
return {
_repo: normed.url,
_repo: repo,
_rawRef: rawRef,
_resolved: rawRef.match(/^[a-f0-9]{40}$/) && `${normed.url}#${rawRef}`,
_uniqueResolved: rawRef.match(/^[a-f0-9]{40}$/) && `${normed.url}#${rawRef}`
_resolved: rawRef.match(/^[a-f0-9]{40}$/) && resolved,
_uniqueResolved: rawRef.match(/^[a-f0-9]{40}$/) && resolved
}

@@ -67,0 +67,0 @@ }

@@ -35,6 +35,7 @@ 'use strict'

const stream = new PassThrough().on('error', e => { streamError = e })
const cacheName = manifest._resolved || spec.saveSpec || spec.fetchSpec
const cacheStream = (
opts.cache &&
cache.get.stream(
opts.cache, cache.key('packed-dir', manifest._resolved), opts
opts.cache, cache.key('packed-dir', cacheName), opts
)

@@ -54,3 +55,7 @@ )

if (streamError) { throw streamError }
return packDir(manifest, manifest._resolved, tmp, stream, opts)
if (!manifest._resolved) {
manifest._resolved = spec.saveSpec.replace(/#.*/, `#${HEAD}`)
manifest._uniqueResolved = manifest._resolved
}
return packDir(manifest, cacheName, tmp, stream, opts)
})

@@ -57,0 +62,0 @@ }).catch(err => stream.emit('error', err))

@@ -11,3 +11,2 @@ 'use strict'

const LRU = require('lru-cache')
const normalizeGitUrl = require('normalize-git-url')
const optCheck = require('./opt-check')

@@ -55,3 +54,2 @@ const osenv = require('osenv')

opts = optCheck(opts)
const normed = normalizeGitUrl(repo)
const gitArgs = [

@@ -62,3 +60,3 @@ 'clone',

'-c', 'core.longpaths=true',
normed.url,
repo,
target

@@ -80,3 +78,2 @@ ]

opts = optCheck(opts)
const normed = normalizeGitUrl(repo)
const gitArgs = [

@@ -89,3 +86,3 @@ 'clone',

'-c', 'core.longpaths=true',
normed.url,
repo,
target

@@ -115,3 +112,3 @@ ]

opts = optCheck(opts)
return execGit(['rev-parse', '--revs-only', 'HEAD', repo], {}, opts).spread(stdout => {
return execGit(['rev-parse', '--revs-only', 'HEAD'], {cwd: repo}, opts).spread(stdout => {
return stdout.trim()

@@ -118,0 +115,0 @@ })

@@ -39,3 +39,2 @@ 'use strict'

manifest._spec = spec.raw
manifest._from = spec.raw
manifest._where = opts.where

@@ -42,0 +41,0 @@ }

{
"name": "pacote",
"version": "2.0.3",
"version": "2.0.4",
"description": "JavaScript package downloader",

@@ -51,3 +51,2 @@ "main": "index.js",

"mississippi": "^1.2.0",
"normalize-git-url": "^3.0.2",
"normalize-package-data": "^2.3.6",

@@ -54,0 +53,0 @@ "npm-package-arg": "^5.0.0",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc