Ticket #48827: npm.patch

File npm.patch, 2.5 KB (added by seanfarley (Sean Farley), 9 years ago)

Update npm to 3.3.3

  • dports/devel/npm/Portfile

    # HG changeset patch
    # User Sean Farley <sean@farley.io>
    # Date 1442943452 25200
    #      Tue Sep 22 10:37:32 2015 -0700
    # Node ID 4f1527d3b34d122bc2379a8eedaeac69396f58cc
    # Parent  a647c82ac005713ea10fa3227ad95db48f1cd4a9
    npm: update to 3.3.3
    
    diff --git a/dports/devel/npm/Portfile b/dports/devel/npm/Portfile
    a b  
    22# $Id$
    33
    44PortSystem          1.0
    55
    66name                npm
    7 version             2.14.3
     7version             3.3.3
    88
    99categories          devel
    1010platforms           darwin
    1111license             MIT
    1212maintainers         ciserlohn
    homepage http://www.npmjs.org 
    2222
    2323master_sites        http://registry.npmjs.org/npm/-/
    2424
    2525extract.suffix      .tgz
    2626
    27 checksums           rmd160  49a1488dedf0b68b150a2448f348fe7796078318 \
    28                     sha256  19755e14283977f713bb5115aea17d383cb0ca3f90db7c9f15146aad15f24c9b
     27checksums           rmd160  a2686685197c379d63688cad4c70a99cfe7528f2 \
     28                    sha256  0034a45d46ed0e592de09b48641827b9182a794e0423f7fe4d3ce91b6af7b097
    2929
    3030worksrcdir          "package"
    3131
    3232depends_lib         path:bin/node:nodejs
    3333
  • dports/devel/npm/files/patch-lib-update.js.diff

    diff --git a/dports/devel/npm/files/patch-lib-update.js.diff b/dports/devel/npm/files/patch-lib-update.js.diff
    a b  
    1 --- lib/update.js.orig  2013-06-21 13:44:01.000000000 +0200
    2 +++ lib/update.js       2013-06-26 21:18:40.000000000 +0200
    3 @@ -35,6 +35,14 @@
    4          , req = ww[4]
    5          , url = require('url')
     1--- lib/update.orig.js  2015-09-22 10:31:24.000000000 -0700
     2+++ lib/update.js       2015-09-22 10:31:59.000000000 -0700
     3@@ -46,6 +46,14 @@
     4       // use the initial installation method (repo, tar, git) for updating
     5       if (url.parse(ww.req).protocol) ww.what = ww.req
    66 
    77+      if (what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) {
    88+        log.error("Trying to update '" + what + "' in '" + where + "'")
    99+        log.error("which is part of the MacPorts npm base installation.")
    1010+        log.error("To update npm please run:")
    1111+        log.error("sudo port selfupdate && sudo port upgrade npm\n")
    1212+        return cb()
    1313+      }
    1414+
    15        // use the initial installation method (repo, tar, git) for updating
    16        if (url.parse(req).protocol) what = req
    17        npm.commands.install(where, what, cb)
     15       var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path
     16       if (toInstall[where]) {
     17         toInstall[where].push(ww.what)