Ticket #55531: npm5.patch

File npm5.patch, 2.6 KB (added by mmpestorich (Mike M Pestorich), 6 years ago)
  • devel/npm5/Portfile

    diff --git a/devel/npm5/Portfile b/devel/npm5/Portfile
    index 12ed032274..2f3dd6dd92 100644
    a b  
    33PortSystem          1.0
    44
    55name                npm5
    6 version             5.5.1
     6version             5.6.0
    77
    88categories          devel
    99platforms           darwin
    distname npm-${version} 
    2727
    2828extract.suffix      .tgz
    2929
    30 checksums           rmd160  df54fbd1fb2fcad0356ff0ec1f768418d39c599d \
    31                     sha256  b8b9afb0bb6211a289f969f66ba184ca5bc83abf6a570e0853ea5185073dca6f
     30checksums           rmd160  0760654a609e113d2ee8dd77461fb560896aff08 \
     31                    sha256  b1f0de3767136c1d7b4b0f10e6eb2fb3397e2fe11e4c9cddcd0030ad1af9eddd
    3232
    3333worksrcdir          "package"
    3434
  • devel/npm5/files/patch-lib-update.js.diff

    diff --git a/devel/npm5/files/patch-lib-update.js.diff b/devel/npm5/files/patch-lib-update.js.diff
    index 3a53bd5ee7..cf0383195a 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 @@
    4        if (url.parse(ww.req).protocol) ww.what = ww.req
    5  
    6        var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path
    7 -      if (toInstall[where]) {
     1--- lib/update.js.orig  2017-11-27 19:37:39.000000000 -0800
     2+++ lib/update.js       2018-01-02 15:59:31.000000000 -0800
     3@@ -60,8 +60,16 @@
     4       const where = ww.dep.parent && ww.dep.parent.path || ww.dep.path
     5       const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
     6       const key = where + ':' + String(isTransitive)
     7-      if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
     8-      if (toInstall[key].what.indexOf(ww.what) === -1) toInstall[key].what.push(ww.what)
    89+      if (ww.what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) {
    910+        log.error("Trying to update '" + what + "' in '" + where + "'")
    1011+        log.error("which is part of the MacPorts npm base installation.")
    1112+        log.error("To update npm please run:")
    1213+        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]
     14+      } else if (!toInstall[key]) {
     15+          toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
     16+      } else if (toInstall[key].what.indexOf(ww.what) === -1) {
     17+          toInstall[key].what.push(ww.what)
     18+      }
     19     })
     20     return Bluebird.each(Object.keys(toInstall), (key) => {
     21       const deps = toInstall[key]