@@ -89,6 +89,7 @@ var npm = require("./npm.js")
8989 , locker = require ( "./utils/locker.js" )
9090 , lock = locker . lock
9191 , unlock = locker . unlock
92+ , warnPeers = require ( "./utils/warn-deprecated.js" ) ( "peerDependencies" )
9293
9394function install ( args , cb_ ) {
9495 var hasArguments = ! ! args . length
@@ -159,15 +160,14 @@ function install (args, cb_) {
159160 "install" ,
160161 "peerDependency" , dep , "wasn't going to be installed; adding"
161162 )
163+ warnPeers ( [
164+ "The peer dependency " + dep + " included from " + data . name + " will no" ,
165+ "longer be automatically installed to fulfill the peerDependency " ,
166+ "in npm 3+. Your application will need to depend on it explicitly."
167+ ] , dep + "," + data . name )
162168 peers . push ( dep )
163169 }
164170 } )
165- if ( peers . length ) {
166- log . warn ( "deprecation" , "peerDependencies will no longer be" )
167- log . warn ( "deprecation" , "installed implicitly in the next major" )
168- log . warn ( "deprecation" , "version of npm (npm@3). You will need to" )
169- log . warn ( "deprecation" , "switch to depending on them explicitly." )
170- }
171171 log . verbose ( "install" , "where, peers" , [ where , peers ] )
172172
173173 var context = { family : { }
@@ -1042,6 +1042,13 @@ function write (target, targetFolder, context, cb_) {
10421042 // favor of killing implicit peerDependency installs with fire.
10431043 var peerDeps = prepareForInstallMany ( data , "peerDependencies" , bundled ,
10441044 wrap , family )
1045+ peerDeps . forEach ( function ( pd ) {
1046+ warnPeers ( [
1047+ "The peer dependency " + pd + " included from " + data . name + " will no" ,
1048+ "longer be automatically installed to fulfill the peerDependency " ,
1049+ "in npm 3+. Your application will need to depend on it explicitly."
1050+ ] , pd + "," + data . name )
1051+ } )
10451052 var pdTargetFolder = path . resolve ( targetFolder , ".." , ".." )
10461053 var pdContext = context
10471054 if ( peerDeps . length > 0 ) {
0 commit comments