Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-02-22 23:35:59 +0300
committerisaacs <i@izs.me>2021-02-22 23:35:59 +0300
commitf3ae6ed0d25ce80868f59353ef71c09ac77b1cf5 (patch)
tree88dcee1a003262979546c79ada09880954b49164 /node_modules/read-package-json
parent3c72ab4412111c708736e3a7b8342150372a4af4 (diff)
read-package-json@3.0.1, read-package-json-fast@2.0.2
Diffstat (limited to 'node_modules/read-package-json')
-rw-r--r--node_modules/read-package-json/CHANGELOG.md10
-rw-r--r--node_modules/read-package-json/package.json2
-rw-r--r--node_modules/read-package-json/read-json.js7
3 files changed, 17 insertions, 2 deletions
diff --git a/node_modules/read-package-json/CHANGELOG.md b/node_modules/read-package-json/CHANGELOG.md
index e63fd10f7..929900482 100644
--- a/node_modules/read-package-json/CHANGELOG.md
+++ b/node_modules/read-package-json/CHANGELOG.md
@@ -2,6 +2,16 @@
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="3.0.1"></a>
+## [3.0.1](https://github.com/npm/read-package-json/compare/v3.0.0...v3.0.1) (2021-02-22)
+
+
+### Bug Fixes
+
+* Strip underscore prefixed fields from file contents ([ac771d8](https://github.com/npm/read-package-json/commit/ac771d8))
+
+
+
<a name="3.0.0"></a>
# [3.0.0](https://github.com/npm/read-package-json/compare/v2.1.2...v3.0.0) (2020-10-13)
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index 755dd3747..50feca72f 100644
--- a/node_modules/read-package-json/package.json
+++ b/node_modules/read-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
- "version": "3.0.0",
+ "version": "3.0.1",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"description": "The thing npm uses to read package.json files with semantics and defaults and validation",
"repository": {
diff --git a/node_modules/read-package-json/read-json.js b/node_modules/read-package-json/read-json.js
index 0e91e784e..64cc3fe19 100644
--- a/node_modules/read-package-json/read-json.js
+++ b/node_modules/read-package-json/read-json.js
@@ -37,7 +37,7 @@ function readJson (file, log_, strict_, cb_) {
}
if (!log) log = function () {}
- cb = arguments[ arguments.length - 1 ]
+ cb = arguments[arguments.length - 1]
readJson_(file, log, strict, cb)
}
@@ -95,6 +95,11 @@ function parseJson (file, er, d, log, strict, cb) {
try {
data = safeJSON(stripBOM(d))
+ for (var key in data) {
+ if (/^_/.test(key)) {
+ delete data[key]
+ }
+ }
} catch (er) {
data = parseIndex(d)
if (!data) return cb(parseError(er, file))