Skip to content

Instantly share code, notes, and snippets.

@pid
Forked from iki/README.md
Last active August 29, 2015 14:08

Revisions

  1. @iki iki revised this gist Nov 6, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,9 @@

    1. Either use the shell script or windows batch here instead.

    The shell script is forked from @othiym23 https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
    The shell script is forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.

    2. Or use @dylang https://github.com/dylang/npm-check to interactively select which global/local packages to update
    2. Or use https://github.com/dylang/npm-check to interactively select which global/local packages to update

    ```
    # install
  2. @iki iki revised this gist Nov 6, 2014. 1 changed file with 17 additions and 2 deletions.
    19 changes: 17 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,21 @@

    ## Solution

    Use the shell script or windows batch instead.
    1. Either use the shell script or windows batch here instead.

    The shell script is forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
    The shell script is forked from @othiym23 https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.

    2. Or use @dylang https://github.com/dylang/npm-check to interactively select which global/local packages to update

    ```
    # install
    npm -g i npm-check
    # interactive update of global packages
    npm-check -u -g
    # interactive update for a project you are working on
    npm-check -u
    ```

    ![Sample using npm-check -u](https://camo.githubusercontent.com/fd837de4101195dd7813b9905bcc58dd849008d8/68747470733a2f2f636c6f75642e67697468756275736572636f6e74656e742e636f6d2f6173736574732f35313530352f343730333133352f34316531373366652d353836382d313165342d393030352d3037363737333239613131362e706e67 "Sample using npm-check -u")
  3. @iki iki revised this gist Nov 6, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Update global top level npm packages without all their dependencies
    # Update global top level npm packages

    ## Problem

  4. @iki iki revised this gist Nov 6, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    # Scripts to update global top level npm packages without all their dependencies
    # Update global top level npm packages without all their dependencies

    ## Problem

    `npm update -g` updates all global packages *and their dependencies*, see https://github.com/npm/npm/issues/6247.

    ## Solution

    Use the scripts provided here.
    Use the shell script or windows batch instead.

    Unix scripts are forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
    The shell script is forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
  5. @iki iki revised this gist Nov 6, 2014. 2 changed files with 1 addition and 10 deletions.
    9 changes: 0 additions & 9 deletions npm-upgrade-bleeding.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +0,0 @@
    #!/bin/sh

    set -e
    set -x

    for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
    do
    npm -g install "$package"
    done
    2 changes: 1 addition & 1 deletion npm-upgrade.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    set -e
    set -x

    for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
    for package in $(npm -g outdated --parseable --depth=0 -q | cut -d: -f2)
    do
    npm -g install "$package"
    done
  6. @iki iki revised this gist Nov 6, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ## Problem

    `npm update -g` updates all global packages *and their dependencies*, see https://github.com/npm/npm/issues/6247).
    `npm update -g` updates all global packages *and their dependencies*, see https://github.com/npm/npm/issues/6247.

    ## Solution

  7. @iki iki revised this gist Nov 6, 2014. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Scripts to update global top level npm packages without all their dependencies

    ## Problem

    `npm update -g` updates all global packages *and their dependencies*, see https://github.com/npm/npm/issues/6247).

    ## Solution

    Use the scripts provided here.

    Unix scripts are forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
  8. @iki iki revised this gist Nov 6, 2014. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions npm-upgrade.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    @echo off
    setlocal enableextensions enabledelayedexpansion
    set packages=
    for /f "usebackq delims=: tokens=3" %%f in (`npm -g outdated --parseable --depth=0 -q`) do set packages=!packages! %%f
    :: Note: on windows, the first : separates drive in package path.
    call npm install -g%packages%
    exit /b %errorlevel%
  9. @othiym23 othiym23 created this gist Sep 20, 2014.
    9 changes: 9 additions & 0 deletions npm-upgrade-bleeding.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/sh

    set -e
    set -x

    for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
    do
    npm -g install "$package"
    done
    9 changes: 9 additions & 0 deletions npm-upgrade.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/sh

    set -e
    set -x

    for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
    do
    npm -g install "$package"
    done