From: isaacs Date: Tue, 5 Jun 2012 00:32:46 +0000 (-0700) Subject: Upgrade npm to 1.1.24 X-Git-Tag: v0.7.10~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9e40fbaacc60de562481b764b0e78bf021f7cfa;p=platform%2Fupstream%2Fnodejs.git Upgrade npm to 1.1.24 --- diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index a2b8141..fcfa7f2 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -65,3 +65,4 @@ Jens Grunert Joost-Wim Boekesteijn Dalmais Maxence Marcus Ekwall +Aaron Stacy diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 19efd81..2663075 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -121,6 +121,8 @@ docpublish: doc-publish doc-publish: doc rsync -vazu --stats --no-implied-dirs --delete html/doc/ npmjs.org:/var/www/npmjs.org/public/doc rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api + rsync -vazu --stats --no-implied-dirs --delete html/webfonts/ npmjs.org:/var/www/npmjs.org/public/webfonts + scp html/style.css npmjs.org:/var/www/npmjs.org/public/ zip-publish: release scp release/* npmjs.org:/var/www/npmjs.org/public/dist/ diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index ddd500e..5f50cd2 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -394,6 +394,7 @@ Git urls can be of the form: git://github.com/user/project.git#commit-ish git+ssh://user@hostname:project.git#commit-ish + git+ssh://user@hostname/project.git#commit-ish git+http://user@hostname/project/blah.git#commit-ish git+https://user@hostname/project/blah.git#commit-ish @@ -420,6 +421,36 @@ Array of package names that will be bundled when publishing the package. If this is spelled `"bundleDependencies"`, then that is also honorable. +## optionalDependencies + +If a dependency can be used, but you would like npm to proceed if it +cannot be found or fails to install, then you may put it in the +`optionalDependencies` hash. This is a map of package name to version +or url, just like the `dependencies` hash. The difference is that +failure is tolerated. + +It is still your program's responsibility to handle the lack of the +dependency. For example, something like this: + + try { + var foo = require('foo') + var fooVersion = require('foo/package.json').version + } catch (er) { + foo = null + } + if ( notGoodFooVersion(fooVersion) ) { + foo = null + } + + // .. then later in your program .. + + if (foo) { + foo.doFooThings() + } + +Entries in `optionalDependencies` will override entries of the same name in +`dependencies`, so it's usually best to only put in one place. + ## engines You can specify the version of diff --git a/deps/npm/html/api/GubbleBum-Blocky.ttf b/deps/npm/html/api/GubbleBum-Blocky.ttf deleted file mode 100755 index 8eac02f..0000000 Binary files a/deps/npm/html/api/GubbleBum-Blocky.ttf and /dev/null differ diff --git a/deps/npm/html/api/author.html b/deps/npm/html/api/author.html deleted file mode 100644 index 0625fbc..0000000 --- a/deps/npm/html/api/author.html +++ /dev/null @@ -1,69 +0,0 @@ - - - author - - - - -
-

owner

Manage package owners

- -

SYNOPSIS

- -
npm.commands.owner(args, callback)
- -

DESCRIPTION

- -

The first element of the 'args' parameter defines what to do, and the subsequent -elements depend on the action. Possible values for the action are (order of -parameters are given in parenthesis):

- -
  • ls (package): -List all the users who have access to modify a package and push new versions. -Handy when you need to know who to bug for help.
  • add (user, package): -Add a new user as a maintainer of a package. This user is enabled to modify -metadata, publish new versions, and add other owners.
  • rm (user, package): -Remove a user from the package owner list. This immediately revokes their -privileges.
- -

Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time.

- -

SEE ALSO

- - -
- - - diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 110729f..f6781bf 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -2,7 +2,7 @@ bin - +
@@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- + - diff --git a/deps/npm/html/api/get.html b/deps/npm/html/api/get.html deleted file mode 100644 index 46d372a..0000000 --- a/deps/npm/html/api/get.html +++ /dev/null @@ -1,68 +0,0 @@ - - - get - - - - -
-

config

Manage the npm configuration files

- -

SYNOPSIS

- -
npm.commands.config(args, callback)
-var val = npm.config.get(key)
-npm.config.set(key, val)
- -

DESCRIPTION

- -

This function acts much the same way as the command-line version. The first -element in the array tells config what to do. Possible values are:

- -
  • set

    Sets a config parameter. The second element in args is interpreted as the -key, and the third element is interpreted as the value.

  • get

    Gets the value of a config parameter. The second element in args is the -key to get the value of.

  • delete (rm or del)

    Deletes a parameter from the config. The second element in args is the -key to delete.

  • list (ls)

    Show all configs that aren't secret. No parameters necessary.

  • edit:

    Opens the config file in the default editor. This command isn't very useful -programmatically, but it is made available.

- -

To programmatically access npm configuration settings, or set them for -the duration of a program, use the npm.config.set and npm.config.get -functions instead.

- -

SEE ALSO

- - -
- - - diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html index d0e8382..86ba337 100644 --- a/deps/npm/html/api/help-search.html +++ b/deps/npm/html/api/help-search.html @@ -2,7 +2,7 @@ help-search - +
@@ -32,7 +32,7 @@ Name of the file that matched

The silent parameter is not neccessary not used, but it may in the future.

- + - diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html index 400e61a..4e8b7f9 100644 --- a/deps/npm/html/api/init.html +++ b/deps/npm/html/api/init.html @@ -2,7 +2,7 @@ init - +
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.

json(1)

- + - diff --git a/deps/npm/html/api/ln.html b/deps/npm/html/api/ln.html deleted file mode 100644 index 0629e06..0000000 --- a/deps/npm/html/api/ln.html +++ /dev/null @@ -1,74 +0,0 @@ - - - ln - - - - -
-

link

Symlink a package folder

- -

SYNOPSIS

- -
npm.command.link(callback)
-npm.command.link(packages, callback)
- -

DESCRIPTION

- -

Package linking is a two-step process.

- -

Without parameters, link will create a globally-installed -symbolic link from prefix/package-name to the current folder.

- -

With a parameters, link will create a symlink from the local node_modules -folder to the global symlink.

- -

When creating tarballs for npm publish, the linked packages are -"snapshotted" to their current state by resolving the symbolic links.

- -

This is -handy for installing your own stuff, so that you can work on it and test it -iteratively without having to continually rebuild.

- -

For example:

- -
npm.commands.link(cb)           # creates global link from the cwd
-                                # (say redis package)
-npm.commands.link('redis', cb)  # link-install the package
- -

Now, any changes to the redis package will be reflected in -the package in the current working directory

-
- - - diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html index c88f9ad..68ac853 100644 --- a/deps/npm/html/api/load.html +++ b/deps/npm/html/api/load.html @@ -2,7 +2,7 @@ load - +
@@ -32,7 +32,7 @@ config object.

For a list of all the available command-line configs, see npm help config

- + - diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html index b9c8c27..174ca46 100644 --- a/deps/npm/html/api/root.html +++ b/deps/npm/html/api/root.html @@ -2,7 +2,7 @@ root - +
@@ -21,7 +21,7 @@

This function is not useful programmatically.

- + - diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html index 1b25f12..8be37c6 100644 --- a/deps/npm/html/api/shrinkwrap.html +++ b/deps/npm/html/api/shrinkwrap.html @@ -2,7 +2,7 @@ shrinkwrap - +
@@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.

Finally, 'callback' is a function that will be called when the shrinkwrap has been saved.

- + - diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html index 043f6fd..c6252a6 100644 --- a/deps/npm/html/doc/bin.html +++ b/deps/npm/html/doc/bin.html @@ -2,7 +2,7 @@ bin - + - + - diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html index 1ee33de..582305a 100644 --- a/deps/npm/html/doc/folders.html +++ b/deps/npm/html/doc/folders.html @@ -2,7 +2,7 @@ folders - +
@@ -205,7 +205,7 @@ cannot be found elsewhere. See json(1)
  • faq(1)
  • json(1)
  • install(1)
  • pack(1)
  • cache(1)
  • config(1)
  • publish(1)
  • - + - diff --git a/deps/npm/html/doc/global.html b/deps/npm/html/doc/global.html deleted file mode 100644 index 9904c30..0000000 --- a/deps/npm/html/doc/global.html +++ /dev/null @@ -1,240 +0,0 @@ - - - global - - - - -
    -

    folders

    Folder Structures Used by npm

    - -

    DESCRIPTION

    - -

    npm puts various things on your computer. That's its job.

    - -

    This document will tell you what it puts where.

    - -

    tl;dr

    - -
    • Local install (default): puts stuff in ./node_modules of the current -package root.
    • Global install (with -g): puts stuff in /usr/local or wherever node -is installed.
    • Install it locally if you're going to require() it.
    • Install it globally if you're going to run it on the command line.
    • If you need both, then install it in both places, or use npm link.
    - -

    prefix Configuration

    - -

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    - -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    - -

    When the global flag is set, npm installs things into this prefix. -When it is not set, it uses the root of the current package, or the -current working directory if not in a package already.

    - -

    Node Modules

    - -

    Packages are dropped into the node_modules folder under the prefix. -When installing locally, this means that you can -require("packagename") to load its main module, or -require("packagename/lib/path/to/sub/module") to load other modules.

    - -

    Global installs on Unix systems go to {prefix}/lib/node_modules. -Global installs on Windows go to {prefix}/node_modules (that is, no -lib folder.)

    - -

    If you wish to require() a package, then install it locally.

    - -

    Executables

    - -

    When in global mode, executables are linked into {prefix}/bin on Unix, -or directly into {prefix} on Windows.

    - -

    When in local mode, executables are linked into -./node_modules/.bin so that they can be made available to scripts run -through npm. (For example, so that a test runner will be in the path -when you run npm test.)

    - -

    Man Pages

    - -

    When in global mode, man pages are linked into {prefix}/share/man.

    - -

    When in local mode, man pages are not installed.

    - -

    Man pages are not installed on Windows systems.

    - -

    Cache

    - -

    See cache(1). Cache files are stored in ~/.npm on Posix, or -~/npm-cache on Windows.

    - -

    This is controlled by the cache configuration param.

    - -

    Temp Files

    - -

    Temporary files are stored by default in the folder specified by the -tmp config, which defaults to the TMPDIR, TMP, or TEMP environment -variables, or /tmp on Unix and c:\windows\temp on Windows.

    - -

    Temp files are given a unique folder under this root for each run of the -program, and are deleted upon successful exit.

    - -

    More Information

    - -

    When installing locally, npm first tries to find an appropriate -prefix folder. This is so that npm install foo@1.2.3 will install -to the sensible root of your package, even if you happen to have cded -into some other folder.

    - -

    Starting at the $PWD, npm will walk up the folder tree checking for a -folder that contains either a package.json file, or a node_modules -folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking -logic when running git commands in a working dir.)

    - -

    If no package root is found, then the current folder is used.

    - -

    When you run npm install foo@1.2.3, then the package is loaded into -the cache, and then unpacked into ./node_modules/foo. Then, any of -foo's dependencies are similarly unpacked into -./node_modules/foo/node_modules/....

    - -

    Any bin files are symlinked to ./node_modules/.bin/, so that they may -be found by npm scripts when necessary.

    - -

    Global Installation

    - -

    If the global configuration is set to true, then npm will -install packages "globally".

    - -

    For global installation, packages are installed roughly the same way, -but using the folders described above.

    - -

    Cycles, Conflicts, and Folder Parsimony

    - -

    Cycles are handled using the property of node's module system that it -walks up the directories looking for node_modules folders. So, at every -stage, if a package is already installed in an ancestor node_modules -folder, then it is not installed at the current location.

    - -

    Consider the case above, where foo -> bar -> baz. Imagine if, in -addition to that, baz depended on bar, so you'd have: -foo -> bar -> baz -> bar -> baz .... However, since the folder -structure is: foo/node_modules/bar/node_modules/baz, there's no need to -put another copy of bar into .../baz/node_modules, since when it calls -require("bar"), it will get the copy that is installed in -foo/node_modules/bar.

    - -

    This shortcut is only used if the exact same -version would be installed in multiple nested node_modules folders. It -is still possible to have a/node_modules/b/node_modules/a if the two -"a" packages are different versions. However, without repeating the -exact same package multiple times, an infinite regress will always be -prevented.

    - -

    Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder.

    - -

    Example

    - -

    Consider this dependency graph:

    - -
    foo
    -+-- blerg@1.2.5
    -+-- bar@1.2.3
    -|   +-- blerg@1.x (latest=1.3.7)
    -|   +-- baz@2.x
    -|   |   `-- quux@3.x
    -|   |       `-- bar@1.2.3 (cycle)
    -|   `-- asdf@*
    -`-- baz@1.2.3
    -    `-- quux@3.x
    -        `-- bar
    - -

    In this case, we might expect a folder structure like this:

    - -
    foo
    -+-- node_modules
    -    +-- blerg (1.2.5) <---[A]
    -    +-- bar (1.2.3) <---[B]
    -    |   +-- node_modules
    -    |   |   `-- baz (2.0.2) <---[C]
    -    |   |       `-- node_modules
    -    |   |           `-- quux (3.2.0)
    -    |   `-- asdf (2.3.4)
    -    `-- baz (1.2.3) <---[D]
    -        `-- node_modules
    -            `-- quux (3.2.0) <---[E]
    - -

    Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are -installed in foo's node_modules folder.

    - -

    Even though the latest copy of blerg is 1.3.7, foo has a specific -dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfie's bar's dependency on blerg@1.x, -it does not install another copy under [B].

    - -

    Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's node_modules folder. Because it depends on baz@2.x, it cannot -re-use the baz@1.2.3 installed in the parent node_modules folder [D], -and must install its own copy [C].

    - -

    Underneath bar, the baz->quux->bar dependency creates a cycle. -However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder.

    - -

    Underneath foo->baz [D], quux's [E] folder tree is empty, because its -dependency on bar is satisfied by the parent folder copy installed at [B].

    - -

    For a graphical breakdown of what is installed where, use npm ls.

    - -

    Publishing

    - -

    Upon publishing, npm will look in the node_modules folder. If any of -the items there are not in the bundledDependencies array, then they will -not be included in the package tarball.

    - -

    This allows a package maintainer to install all of their dependencies -(and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See json(1) for more information.

    - -

    SEE ALSO

    - - -
    - - - diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html index 7690a71..fd85377 100644 --- a/deps/npm/html/doc/help-search.html +++ b/deps/npm/html/doc/help-search.html @@ -2,7 +2,7 @@ help-search - +
    @@ -38,7 +38,7 @@ where the terms were found in the documentation.

    - + - diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 9082ff85b..84d6d34 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -2,7 +2,7 @@ index - +
    @@ -384,7 +384,7 @@

    Display npm username

    - + - diff --git a/deps/npm/html/doc/ls.html b/deps/npm/html/doc/ls.html deleted file mode 100644 index 9ad1fca..0000000 --- a/deps/npm/html/doc/ls.html +++ /dev/null @@ -1,87 +0,0 @@ - - - ls - - - - -
    -

    ls

    List installed packages

    - -

    SYNOPSIS

    - -
    npm list
    -npm ls
    -npm la
    -npm ll
    - -

    DESCRIPTION

    - -

    This command will print to stdout all the versions of packages that are -installed, as well as their dependencies, in a tree-structure.

    - -

    It does not take positional arguments, though you may set config flags -like with any other command, such as -g to list global packages.

    - -

    It will print out extraneous, missing, and invalid packages.

    - -

    When run as ll or la, it shows extended information by default.

    - -

    CONFIGURATION

    - -

    long

    - -
    • Default: false
    • Type: Boolean
    - -

    Show extended information.

    - -

    parseable

    - -
    • Default: false
    • Type: Boolean
    - -

    Show parseable output instead of tree view.

    - -

    global

    - -
    • Default: false
    • Type: Boolean
    - -

    List packages in the global install prefix instead of in the current -project.

    - -

    SEE ALSO

    - - -
    - - - diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html index 6f71723..0d5a069 100644 --- a/deps/npm/html/doc/npm.html +++ b/deps/npm/html/doc/npm.html @@ -2,7 +2,7 @@ npm - +
    @@ -14,7 +14,7 @@

    VERSION

    -

    1.1.23

    +

    1.1.24

    DESCRIPTION

    @@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.

    - + - diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html index ea58395..bdb274d 100644 --- a/deps/npm/html/doc/root.html +++ b/deps/npm/html/doc/root.html @@ -2,7 +2,7 @@ root - + - + - diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html index 5e9a401..e0d115e 100644 --- a/deps/npm/html/doc/shrinkwrap.html +++ b/deps/npm/html/doc/shrinkwrap.html @@ -2,7 +2,7 @@ shrinkwrap - +
    @@ -169,7 +169,7 @@ versions.

    - +