Skip to content

Commit f2f187f

Browse files
committed
First regression from the s/-/@/ thing. Make it work when you uninstall things with the old style dep links.
1 parent 539fc5b commit f2f187f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/uninstall.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ function unpackArgs (rawArgs, cb) {
5454
if (semver.satisfies(v, ver)) args.push([pkg, v])
5555
})
5656
})
57-
;(function R (arg) {
58-
if (!arg) return cb(null, argData)
57+
asyncMap(args, function (arg, cb) {
5958
var jsonFile = path.join(npm.dir,arg[0],arg[1],"package","package.json")
6059
readJson( jsonFile
6160
, arg[1]
@@ -67,16 +66,21 @@ function unpackArgs (rawArgs, cb) {
6766
data._id = data.name+"@"+data.version
6867
argData.push(data)
6968
argData[data._id] = data
70-
R(args.pop())
69+
// todo: remove this kludge. 0.1.28
70+
argData[data.name+"-"+data.version] = data
71+
cb()
7172
})
7273
}
7374
)
74-
})(args.pop())
75+
}, function (er) {
76+
return cb(er, argData)
77+
})
7578
})
7679
}
7780
function firstPart (args, cb) {
7881
asyncMap(args, function (arg, cb) {
7982
var pkgdir = path.join(npm.dir, arg.name, arg.version)
83+
log.silly(Object.keys(args), "uninstall firstPart args")
8084
chain
8185
( [lifecycle, arg, "preuninstall"]
8286
, [lifecycle, arg, "uninstall"]

0 commit comments

Comments
 (0)