Skip to content

Commit

Permalink
do not pretty-print package-lock.json to prevent corrupting git lines…
Browse files Browse the repository at this point in the history
… count history
  • Loading branch information
bl00mber committed Apr 6, 2019
1 parent 199c970 commit f5f895b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,18 @@ function checkPackageFile (dir, name) {
return readFile(
file, 'utf8'
).then((data) => {
if (name === PKGLOCK || name === SHRINKWRAP) {
const indent = 0
const newline = 0
} else {
const indent = detectIndent(data).indent
const newline = detectNewline(data)
}
return {
path: file,
raw: data,
indent: detectIndent(data).indent,
newline: detectNewline(data)
indent,
newline
}
}).catch({code: 'ENOENT'}, () => {})
}

0 comments on commit f5f895b

Please sign in to comment.