From 7b251155d846dc0a7588e632e5084c6b86437376 Mon Sep 17 00:00:00 2001 From: Glenn Block Date: Sun, 29 Jul 2012 12:24:24 +0800 Subject: [PATCH 1/2] output message if shrinkwrap is present in the top level json --- lib/install.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/install.js b/lib/install.js index 28a04ddd4d4..9a11fe01ce5 100644 --- a/lib/install.js +++ b/lib/install.js @@ -85,6 +85,11 @@ function install (args, cb_) { // the /path/to/node_modules/.. var where = path.resolve(npm.dir, "..") + // output a message if shrinkwrap is present + if(path.resolve(where, "npm-shrinkwrap.json")) { + log.warn("install", "using npm-shrinkwrap.json"); + } + // internal api: install(where, what, cb) if (arguments.length === 3) { where = args @@ -99,6 +104,8 @@ function install (args, cb_) { }) } + + mkdir(where, function (er, made) { if (er) return cb(er) // install dependencies locally by default, @@ -213,7 +220,6 @@ function readDependencies (context, where, opts, cb) { } catch (ex) { return cb(ex) } - log.info("shrinkwrap", "file %j", wrapfile) var rv = {} Object.keys(data).forEach(function (key) { From e72a88098498276268c5ad15455555bfc3c2fb7a Mon Sep 17 00:00:00 2001 From: Glenn Block Date: Sun, 29 Jul 2012 12:33:45 +0800 Subject: [PATCH 2/2] fixing whitespace --- lib/install.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/install.js b/lib/install.js index 9a11fe01ce5..e4e95e14dc6 100644 --- a/lib/install.js +++ b/lib/install.js @@ -104,8 +104,6 @@ function install (args, cb_) { }) } - - mkdir(where, function (er, made) { if (er) return cb(er) // install dependencies locally by default, @@ -220,6 +218,7 @@ function readDependencies (context, where, opts, cb) { } catch (ex) { return cb(ex) } + log.info("shrinkwrap", "file %j", wrapfile) var rv = {} Object.keys(data).forEach(function (key) {