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:
-rw-r--r--lib/shrinkwrap.js9
-rw-r--r--test/tap/shrinkwrap-extra-metadata.js11
2 files changed, 3 insertions, 17 deletions
diff --git a/lib/shrinkwrap.js b/lib/shrinkwrap.js
index 52035f7c2..85e0b81db 100644
--- a/lib/shrinkwrap.js
+++ b/lib/shrinkwrap.js
@@ -223,16 +223,9 @@ function updateLockfileMetadata (pkginfo, pkgJson) {
writeMetainfo(newPkg)
}
function writeMetainfo (pkginfo) {
- pkginfo.createdWith = {
- installer: `${npm.name}@${npm.version}`,
- runtime: `${process.release.name}@${
- process.version.slice(process.version[0] === 'v' ? 1 : 0)
- }`,
- platform: process.platform,
- arch: process.arch
- }
pkginfo.lockfileVersion = PKGLOCK_VERSION
pkginfo.packageIntegrity = pkgJson && pkgSri.hash(pkgJson)
+ pkginfo.preserveSymlinks = process.env.NODE_PRESERVE_SYMLINKS
metainfoWritten = true
}
return newPkg
diff --git a/test/tap/shrinkwrap-extra-metadata.js b/test/tap/shrinkwrap-extra-metadata.js
index fa3afcc09..b68b20356 100644
--- a/test/tap/shrinkwrap-extra-metadata.js
+++ b/test/tap/shrinkwrap-extra-metadata.js
@@ -52,16 +52,9 @@ test('adds additional metadata fields from the pkglock spec', function (t) {
{
'name': 'shrinkwrap-extra-metadata',
'version': '0.0.0',
- 'createdWith': {
- installer: `${npm.name}@${npm.version}`,
- runtime: `${process.release.name}@${
- process.version.slice(process.version[0] === 'v' ? 1 : 0)
- }`,
- platform: process.platform,
- arch: process.arch
- },
'lockfileVersion': npm.lockfileVersion,
- 'packageIntegrity': pkgSri.hash(json)
+ 'packageIntegrity': pkgSri.hash(json),
+ 'preserveSymlinks': process.env.NODE_PRESERVE_SYMLINKS
},
JSON.parse(desired),
'shrinkwrap wrote the expected metadata fields'