Skip to content

Commit

Permalink
remove format-shrinkwrap property and name condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bl00mber committed Sep 12, 2019
1 parent 5ad00eb commit 9f31a4b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
9 changes: 1 addition & 8 deletions doc/misc/npm-config.md
Expand Up @@ -392,14 +392,7 @@ Makes various commands more forceful.
* Default: true
* Type: Boolean

Format `package-lock.json` as a human readable file.

### format-shrinkwrap

* Default: true
* Type: Boolean

Format `npm-shrinkwrap.json` as a human readable file.
Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.

### fetch-retries

Expand Down
2 changes: 0 additions & 2 deletions lib/config/defaults.js
Expand Up @@ -142,7 +142,6 @@ Object.defineProperty(exports, 'defaults', {get: function () {
'engine-strict': false,
force: false,
'format-package-lock': true,
'format-shrinkwrap': true,

'fetch-retries': 2,
'fetch-retry-factor': 10,
Expand Down Expand Up @@ -285,7 +284,6 @@ exports.types = {
'engine-strict': Boolean,
force: Boolean,
'format-package-lock': Boolean,
'format-shrinkwrap': Boolean,
'fetch-retries': Number,
'fetch-retry-factor': Number,
'fetch-retry-mintimeout': Number,
Expand Down
9 changes: 2 additions & 7 deletions lib/shrinkwrap.js
Expand Up @@ -284,15 +284,10 @@ function checkPackageFile (dir, name) {
).then((data) => {
let indent
let newline
if (name === PKGLOCK && npm.config.get('format-package-lock') === false) {
if (npm.config.get('format-package-lock') === false) {
indent = 0
newline = 0
}
else if (name === SHRINKWRAP && npm.config.get('format-shrinkwrap') === false) {
indent = 0
newline = 0
}
else {
} else {
indent = detectIndent(data).indent
newline = detectNewline(data)
}
Expand Down

0 comments on commit 9f31a4b

Please sign in to comment.