aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote')
-rw-r--r--deps/npm/node_modules/pacote/CHANGELOG.md20
-rw-r--r--deps/npm/node_modules/pacote/README.md2
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/directory.js5
-rw-r--r--deps/npm/node_modules/pacote/lib/finalize-manifest.js3
-rw-r--r--deps/npm/node_modules/pacote/lib/util/opt-check.js1
-rw-r--r--deps/npm/node_modules/pacote/lib/util/read-json.js15
-rw-r--r--deps/npm/node_modules/pacote/package.json24
7 files changed, 54 insertions, 16 deletions
diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md
index 50a0dbde40..1c8feb9a79 100644
--- a/deps/npm/node_modules/pacote/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/CHANGELOG.md
@@ -2,6 +2,26 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="9.5.0"></a>
+# [9.5.0](https://github.com/zkat/pacote/compare/v9.4.1...v9.5.0) (2019-02-18)
+
+
+### Features
+
+* **enjoy-by:** add `before` as an alias to enjoy-by ([75d62b7](https://github.com/zkat/pacote/commit/75d62b7))
+
+
+
+<a name="9.4.1"></a>
+## [9.4.1](https://github.com/zkat/pacote/compare/v9.4.0...v9.4.1) (2019-01-24)
+
+
+### Bug Fixes
+
+* **directory, finalize-manifest:** strip byte order marker from JSON ([723ad63](https://github.com/zkat/pacote/commit/723ad63))
+
+
+
<a name="9.4.0"></a>
# [9.4.0](https://github.com/zkat/pacote/compare/v9.3.0...v9.4.0) (2019-01-14)
diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md
index 8d160b7cb7..bf2e5f4f61 100644
--- a/deps/npm/node_modules/pacote/README.md
+++ b/deps/npm/node_modules/pacote/README.md
@@ -231,7 +231,7 @@ even though npm itself does.
##### <a name="opts-enjoy-by"></a> `opts.enjoy-by`
-* Alias: `opts.enjoyBy`
+* Alias: `opts.enjoyBy`, `opts.before`
* Type: Date-able
* Default: undefined
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/directory.js b/deps/npm/node_modules/pacote/lib/fetchers/directory.js
index 83f3d7d558..3d4ec24c83 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/directory.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/directory.js
@@ -5,6 +5,7 @@ const BB = require('bluebird')
const Fetcher = require('../fetch')
const glob = BB.promisify(require('glob'))
const packDir = require('../util/pack-dir')
+const readJson = require('../util/read-json')
const path = require('path')
const pipe = BB.promisify(require('mississippi').pipe)
const through = require('mississippi').through
@@ -34,11 +35,11 @@ Fetcher.impl(fetchDirectory, {
const pkgPath = path.join(spec.fetchSpec, 'package.json')
const srPath = path.join(spec.fetchSpec, 'npm-shrinkwrap.json')
return BB.join(
- readFileAsync(pkgPath).then(JSON.parse).catch({ code: 'ENOENT' }, err => {
+ readFileAsync(pkgPath).then(readJson).catch({ code: 'ENOENT' }, err => {
err.code = 'ENOPACKAGEJSON'
throw err
}),
- readFileAsync(srPath).then(JSON.parse).catch({ code: 'ENOENT' }, () => null),
+ readFileAsync(srPath).then(readJson).catch({ code: 'ENOENT' }, () => null),
(pkg, sr) => {
pkg._shrinkwrap = sr
pkg._hasShrinkwrap = !!sr
diff --git a/deps/npm/node_modules/pacote/lib/finalize-manifest.js b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
index 80b379898f..f047517945 100644
--- a/deps/npm/node_modules/pacote/lib/finalize-manifest.js
+++ b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
@@ -13,6 +13,7 @@ const path = require('path')
const pipe = BB.promisify(require('mississippi').pipe)
const ssri = require('ssri')
const tar = require('tar')
+const readJson = require('./util/read-json')
// `finalizeManifest` takes as input the various kinds of manifests that
// manifest handlers ('lib/fetchers/*.js#manifest()') return, and makes sure
@@ -212,7 +213,7 @@ function jsonFromStream (filename, dataStream) {
entry.on('error', cb)
finished(entry).then(() => {
try {
- cb(null, JSON.parse(data))
+ cb(null, readJson(data))
} catch (err) {
cb(err)
}
diff --git a/deps/npm/node_modules/pacote/lib/util/opt-check.js b/deps/npm/node_modules/pacote/lib/util/opt-check.js
index e6afc21c84..8b6b472f85 100644
--- a/deps/npm/node_modules/pacote/lib/util/opt-check.js
+++ b/deps/npm/node_modules/pacote/lib/util/opt-check.js
@@ -13,6 +13,7 @@ module.exports = figgyPudding({
dmode: {},
'enjoy-by': 'enjoyBy',
enjoyBy: {},
+ before: 'enjoyBy',
fmode: {},
'fetch-retries': { default: 2 },
'fetch-retry-factor': { default: 10 },
diff --git a/deps/npm/node_modules/pacote/lib/util/read-json.js b/deps/npm/node_modules/pacote/lib/util/read-json.js
new file mode 100644
index 0000000000..32fffbc537
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/util/read-json.js
@@ -0,0 +1,15 @@
+'use strict'
+
+module.exports = function (content) {
+ // Code also yanked from read-package-json.
+ function stripBOM (content) {
+ content = content.toString()
+ // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ // because the buffer-to-string conversion in `fs.readFileSync()`
+ // translates it to FEFF, the UTF-16 BOM.
+ if (content.charCodeAt(0) === 0xFEFF) return content.slice(1)
+ return content
+ }
+
+ return JSON.parse(stripBOM(content))
+}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index 32e8a07b09..896afe5a77 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,21 +1,21 @@
{
- "_from": "pacote@9.4.0",
- "_id": "pacote@9.4.0",
+ "_from": "pacote@latest",
+ "_id": "pacote@9.5.0",
"_inBundle": false,
- "_integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==",
+ "_integrity": "sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg==",
"_location": "/pacote",
"_phantomChildren": {
"safe-buffer": "5.1.2"
},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "pacote@9.4.0",
+ "raw": "pacote@latest",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "9.4.0",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "9.4.0"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
@@ -23,10 +23,10 @@
"/libcipm",
"/libnpm"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz",
- "_shasum": "af979abdeb175cd347c3e33be3241af1ed254807",
- "_spec": "pacote@9.4.0",
- "_where": "/Users/aeschright/code/cli",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz",
+ "_shasum": "85f3013a3f6dd51c108b0ccabd3de8102ddfaeda",
+ "_spec": "pacote@latest",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -116,5 +116,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "9.4.0"
+ "version": "9.5.0"
}