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
path: root/lib
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-05-17 08:09:51 +0300
committerRebecca Turner <me@re-becca.org>2017-05-26 04:55:24 +0300
commit5dea82eae5fbd72ee5a141e471acaae7a626bec4 (patch)
treeb83c09d267d49cd6b1503e0c804bb44b08cb5206 /lib
parent7d495b433fe93f1e73e2b38750461b25f0101e9e (diff)
shrinkwrap: even more fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/shrinkwrap.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/shrinkwrap.js b/lib/shrinkwrap.js
index 85e0b81db..75fe0dd95 100644
--- a/lib/shrinkwrap.js
+++ b/lib/shrinkwrap.js
@@ -204,9 +204,9 @@ function updateLockfileMetadata (pkginfo, pkgJson) {
const newPkg = {}
let metainfoWritten = false
const metainfo = new Set([
- 'createdWith',
'lockfileVersion',
- 'packageIntegrity'
+ 'packageIntegrity',
+ 'preserveSymlinks'
])
Object.keys(pkginfo).forEach((k) => {
if (k === 'dependencies') {
@@ -225,7 +225,9 @@ function updateLockfileMetadata (pkginfo, pkgJson) {
function writeMetainfo (pkginfo) {
pkginfo.lockfileVersion = PKGLOCK_VERSION
pkginfo.packageIntegrity = pkgJson && pkgSri.hash(pkgJson)
- pkginfo.preserveSymlinks = process.env.NODE_PRESERVE_SYMLINKS
+ if (process.env.NODE_PRESERVE_SYMLINKS) {
+ pkginfo.preserveSymlinks = process.env.NODE_PRESERVE_SYMLINKS
+ }
metainfoWritten = true
}
return newPkg