diff --git a/devel/npm5/Portfile b/devel/npm5/Portfile
index 12ed032274..8101f70173 100644
a
|
b
|
|
3 | 3 | PortSystem 1.0 |
4 | 4 | |
5 | 5 | name npm5 |
6 | | version 5.5.1 |
| 6 | version 5.6.0 |
7 | 7 | |
8 | 8 | categories devel |
9 | 9 | platforms darwin |
… |
… |
distname npm-${version} |
27 | 27 | |
28 | 28 | extract.suffix .tgz |
29 | 29 | |
30 | | checksums rmd160 df54fbd1fb2fcad0356ff0ec1f768418d39c599d \ |
31 | | sha256 b8b9afb0bb6211a289f969f66ba184ca5bc83abf6a570e0853ea5185073dca6f |
| 30 | checksums sha1 b11e72cd5167df48b06c43474e9331fe848cb05e \ |
| 31 | rmd160 0760654a609e113d2ee8dd77461fb560896aff08 \ |
| 32 | sha256 b1f0de3767136c1d7b4b0f10e6eb2fb3397e2fe11e4c9cddcd0030ad1af9eddd |
32 | 33 | |
33 | 34 | worksrcdir "package" |
34 | 35 | |
diff --git a/devel/npm5/files/patch-lib-update.js.diff b/devel/npm5/files/patch-lib-update.js.diff
index 3a53bd5ee7..650e119ade 100644
a
|
b
|
|
1 | | --- lib/update.js.orig 2016-04-26 09:35:11.000000000 +0200 |
2 | | +++ lib/update.js 2016-04-26 09:34:24.000000000 +0200 |
3 | | @@ -47,7 +47,12 @@ |
| 1 | --- lib/update.js.orig 2017-11-27 19:37:39.000000000 -0800 |
| 2 | +++ lib/update.js 2018-01-06 18:01:25.000000000 -0800 |
| 3 | @@ -58,10 +58,17 @@ |
4 | 4 | if (url.parse(ww.req).protocol) ww.what = ww.req |
5 | 5 | |
6 | | var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path |
7 | | - if (toInstall[where]) { |
| 6 | const where = ww.dep.parent && ww.dep.parent.path || ww.dep.path |
| 7 | - const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop) |
| 8 | - const key = where + ':' + String(isTransitive) |
| 9 | - if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []} |
| 10 | - if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what) |
8 | 11 | + if (ww.what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) { |
9 | 12 | + log.error("Trying to update '" + what + "' in '" + where + "'") |
10 | 13 | + log.error("which is part of the MacPorts npm base installation.") |
11 | 14 | + log.error("To update npm please run:") |
12 | 15 | + log.error("sudo port selfupdate && sudo port upgrade npm\n") |
13 | | + } else if (toInstall[where]) { |
14 | | toInstall[where].push(ww.what) |
15 | | } else { |
16 | | toInstall[where] = [ww.what] |
| 16 | + } else { |
| 17 | + const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop) |
| 18 | + const key = where + ':' + String(isTransitive) |
| 19 | + if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []} |
| 20 | + if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what) |
| 21 | + } |
| 22 | }) |
| 23 | return Bluebird.each(Object.keys(toInstall), (key) => { |
| 24 | const deps = toInstall[key] |