Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pacote

Package Overview
Dependencies
Maintainers
2
Versions
223
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 6.0.1 to 6.0.2

15

CHANGELOG.md

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

<a name="6.0.2"></a>
## [6.0.2](https://github.com/zkat/pacote/compare/v6.0.1...v6.0.2) (2017-09-06)
### Bug Fixes
* **extract:** preserve executable perms on extracted files ([19b3dfd](https://github.com/zkat/pacote/commit/19b3dfd))
### Performance Improvements
* replace some calls to .match() with .starts/endsWith() (#115) ([192a02f](https://github.com/zkat/pacote/commit/192a02f))
<a name="6.0.1"></a>

@@ -7,0 +22,0 @@ ## [6.0.1](https://github.com/zkat/pacote/compare/v6.0.0...v6.0.1) (2017-08-22)

12

lib/extract-stream.js

@@ -7,2 +7,8 @@ 'use strict'

module.exports = extractStream
module.exports._computeMode = computeMode
function computeMode (fileMode, optMode, umask) {
return (fileMode | optMode) & ~(umask || 0)
}
function extractStream (dest, opts) {

@@ -20,5 +26,7 @@ opts = opts || {}

if (entry.type.toLowerCase() === 'file') {
entry.mode = opts.fmode & ~(opts.umask || 0)
entry.mode = computeMode(entry.mode, opts.fmode, opts.umask)
} else if (entry.type.toLowerCase() === 'directory') {
entry.mode = opts.dmode & ~(opts.umask || 0)
entry.mode = computeMode(entry.mode, opts.dmode, opts.umask)
} else {
entry.mode = computeMode(entry.mode, 0, opts.umask)
}

@@ -25,0 +33,0 @@

15

lib/util/git.js

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

const GIT_ = 'GIT_'
let GITENV

@@ -39,3 +40,3 @@ function gitEnv () {

Object.keys(process.env).forEach(k => {
if (GOOD_ENV_VARS.has(k) || !k.match(/^GIT_/)) {
if (GOOD_ENV_VARS.has(k) || !k.startsWith(GIT_)) {
GITENV[k] = process.env[k]

@@ -98,2 +99,3 @@ }

const CARET_BRACES = '^{}'
const REVS = new LRU({

@@ -128,3 +130,3 @@ max: 100,

if (!ref) { return revs } // ???
if (ref.match(/\^\{\}$/)) { return revs } // refs/tags/x^{} crap
if (ref.endsWith(CARET_BRACES)) { return revs } // refs/tags/x^{} crap
const type = refType(line)

@@ -209,10 +211,13 @@ const doc = {sha, ref, type}

const REFS_TAGS = '/refs/tags/'
const REFS_HEADS = '/refs/heads/'
const HEAD = 'HEAD'
function refType (ref) {
return ref.match(/refs\/tags\/.*$/)
return ref.indexOf(REFS_TAGS) !== -1
? 'tag'
: ref.match(/refs\/heads\/.*$/)
: ref.indexOf(REFS_HEADS) !== -1
? 'branch'
: ref.match(/HEAD$/)
: ref.endsWith(HEAD)
? 'head'
: 'other'
}
{
"name": "pacote",
"version": "6.0.1",
"version": "6.0.2",
"description": "JavaScript package downloader",

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

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