From 73be4608d9d7679a1b0233f64c7b60c329ccd235 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 15 Feb 2013 10:49:16 -0800 Subject: [PATCH 1/2] npm: Upgrade to v1.2.11 --- deps/npm/doc/cli/config.md | 6 +- deps/npm/doc/cli/faq.md | 46 +++++++ deps/npm/doc/cli/index.md | 4 + deps/npm/doc/cli/stars.md | 22 ++++ deps/npm/doc/cli/update.md | 5 +- deps/npm/doc/cli/version.md | 11 +- deps/npm/html/api/bin.html | 2 +- deps/npm/html/api/bugs.html | 2 +- deps/npm/html/api/commands.html | 2 +- deps/npm/html/api/config.html | 2 +- deps/npm/html/api/deprecate.html | 2 +- deps/npm/html/api/docs.html | 2 +- deps/npm/html/api/edit.html | 2 +- deps/npm/html/api/explore.html | 2 +- deps/npm/html/api/help-search.html | 2 +- deps/npm/html/api/init.html | 2 +- deps/npm/html/api/install.html | 2 +- deps/npm/html/api/link.html | 2 +- deps/npm/html/api/load.html | 2 +- deps/npm/html/api/ls.html | 2 +- deps/npm/html/api/npm.html | 4 +- deps/npm/html/api/outdated.html | 2 +- deps/npm/html/api/owner.html | 2 +- deps/npm/html/api/pack.html | 2 +- deps/npm/html/api/prefix.html | 2 +- deps/npm/html/api/prune.html | 2 +- deps/npm/html/api/publish.html | 2 +- deps/npm/html/api/rebuild.html | 2 +- deps/npm/html/api/restart.html | 2 +- deps/npm/html/api/root.html | 2 +- deps/npm/html/api/run-script.html | 2 +- deps/npm/html/api/search.html | 2 +- deps/npm/html/api/shrinkwrap.html | 2 +- deps/npm/html/api/start.html | 2 +- deps/npm/html/api/stop.html | 2 +- deps/npm/html/api/submodule.html | 2 +- deps/npm/html/api/tag.html | 2 +- deps/npm/html/api/test.html | 2 +- deps/npm/html/api/uninstall.html | 2 +- deps/npm/html/api/unpublish.html | 2 +- deps/npm/html/api/update.html | 2 +- deps/npm/html/api/version.html | 2 +- deps/npm/html/api/view.html | 2 +- deps/npm/html/api/whoami.html | 2 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/adduser.html | 2 +- deps/npm/html/doc/bin.html | 2 +- deps/npm/html/doc/bugs.html | 2 +- deps/npm/html/doc/build.html | 2 +- deps/npm/html/doc/bundle.html | 2 +- deps/npm/html/doc/cache.html | 2 +- deps/npm/html/doc/changelog.html | 2 +- deps/npm/html/doc/coding-style.html | 2 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 10 +- deps/npm/html/doc/dedupe.html | 2 +- deps/npm/html/doc/deprecate.html | 2 +- deps/npm/html/doc/developers.html | 2 +- deps/npm/html/doc/disputes.html | 2 +- deps/npm/html/doc/docs.html | 2 +- deps/npm/html/doc/edit.html | 2 +- deps/npm/html/doc/explore.html | 2 +- deps/npm/html/doc/faq.html | 48 ++++++- deps/npm/html/doc/folders.html | 2 +- deps/npm/html/doc/global.html | 2 +- deps/npm/html/doc/help-search.html | 2 +- deps/npm/html/doc/help.html | 2 +- deps/npm/html/doc/index.html | 6 +- deps/npm/html/doc/init.html | 2 +- deps/npm/html/doc/install.html | 2 +- deps/npm/html/doc/json.html | 2 +- deps/npm/html/doc/link.html | 2 +- deps/npm/html/doc/ls.html | 4 +- deps/npm/html/doc/npm.html | 4 +- deps/npm/html/doc/outdated.html | 2 +- deps/npm/html/doc/owner.html | 2 +- deps/npm/html/doc/pack.html | 2 +- deps/npm/html/doc/prefix.html | 2 +- deps/npm/html/doc/prune.html | 2 +- deps/npm/html/doc/publish.html | 2 +- deps/npm/html/doc/rebuild.html | 2 +- deps/npm/html/doc/registry.html | 2 +- deps/npm/html/doc/removing-npm.html | 2 +- deps/npm/html/doc/restart.html | 2 +- deps/npm/html/doc/rm.html | 2 +- deps/npm/html/doc/root.html | 2 +- deps/npm/html/doc/run-script.html | 2 +- deps/npm/html/doc/scripts.html | 2 +- deps/npm/html/doc/search.html | 2 +- deps/npm/html/doc/semver.html | 2 +- deps/npm/html/doc/shrinkwrap.html | 2 +- deps/npm/html/doc/star.html | 2 +- deps/npm/html/doc/stars.html | 60 +++++++++ deps/npm/html/doc/start.html | 2 +- deps/npm/html/doc/stop.html | 2 +- deps/npm/html/doc/submodule.html | 2 +- deps/npm/html/doc/tag.html | 2 +- deps/npm/html/doc/test.html | 2 +- deps/npm/html/doc/uninstall.html | 2 +- deps/npm/html/doc/unpublish.html | 2 +- deps/npm/html/doc/update.html | 7 +- deps/npm/html/doc/version.html | 13 +- deps/npm/html/doc/view.html | 2 +- deps/npm/html/doc/whoami.html | 2 +- deps/npm/lib/cache.js | 118 +++++++++++++++--- deps/npm/lib/install.js | 2 +- deps/npm/lib/npm.js | 4 + deps/npm/lib/publish.js | 7 ++ deps/npm/lib/stars.js | 27 ++++ deps/npm/lib/utils/error-handler.js | 10 +- deps/npm/lib/utils/sha.js | 15 +-- deps/npm/man/man1/config.1 | 13 +- deps/npm/man/man1/faq.1 | 50 ++++++++ deps/npm/man/man1/index.1 | 3 + deps/npm/man/man1/ls.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man1/stars.1 | 40 ++++++ deps/npm/man/man1/update.1 | 6 +- deps/npm/man/man1/version.1 | 16 ++- deps/npm/man/man3/npm.3 | 2 +- deps/npm/node_modules/glob/glob.js | 10 -- deps/npm/node_modules/glob/package.json | 10 +- .../npm-registry-client/README.md | 7 ++ .../npm-registry-client/lib/request.js | 17 ++- .../npm-registry-client/lib/stars.js | 9 ++ .../node_modules/couch-login/package.json | 6 +- .../npm-registry-client/package.json | 6 +- .../read-package-json/package.json | 4 +- .../read-package-json/read-json.js | 16 ++- deps/npm/package.json | 4 +- .../npm-test-shrinkwrap/npm-shrinkwrap.json | 15 +-- 131 files changed, 663 insertions(+), 186 deletions(-) create mode 100644 deps/npm/doc/cli/stars.md create mode 100644 deps/npm/html/doc/stars.html create mode 100644 deps/npm/lib/stars.js create mode 100644 deps/npm/man/man1/stars.1 create mode 100644 deps/npm/node_modules/npm-registry-client/lib/stars.js diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md index 3deafce5f2..e48957ba82 100644 --- a/deps/npm/doc/cli/config.md +++ b/deps/npm/doc/cli/config.md @@ -36,11 +36,15 @@ work the same. `$HOME/.npmrc` (or the `userconfig` param, if set above) This file is an ini-file formatted list of `key = value` parameters. +Environment variables can be replaced using `${VARIABLE_NAME}`. For example: + + prefix = ${HOME}/.npm-packages ### Global config file `$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): -This file is an ini-file formatted list of `key = value` parameters +This file is an ini-file formatted list of `key = value` parameters. +Environment variables can be replaced as above. ### Built-in config file diff --git a/deps/npm/doc/cli/faq.md b/deps/npm/doc/cli/faq.md index 4c8367137d..d6cc041e4c 100644 --- a/deps/npm/doc/cli/faq.md +++ b/deps/npm/doc/cli/faq.md @@ -72,6 +72,52 @@ Write your own package manager, then. It's not that hard. npm will not help you do something that is known to be a bad idea. +## `"node_modules"` is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder? + +No. This will never happen. This question comes up sometimes, +because it seems silly from the outside that npm couldn't just be +configured to put stuff somewhere else, and then npm could load them +from there. It's an arbitrary spelling choice, right? What's the bg +deal? + +At the time of this writing, the string `'node_modules'` appears 151 +times in 53 separate files in npm and node core (excluding tests and +documentation). + +Some of these references are in node's built-in module loader. Since +npm is not involved **at all** at run-time, node itself would have to +be configured to know where you've decided to stick stuff. Complexity +hurdle #1. Since the Node module system is locked, this cannot be +changed, and is enough to kill this request. But I'll continue, in +deference to your deity's delicate feelings regarding spelling. + +Many of the others are in dependencies that npm uses, which are not +necessarily tightly coupled to npm (in the sense that they do not read +npm's configuration files, etc.) Each of these would have to be +configured to take the name of the `node_modules` folder as a +parameter. Complexity hurdle #2. + +Furthermore, npm has the ability to "bundle" dependencies by adding +the dep names to the `"bundledDependencies"` list in package.json, +which causes the folder to be included in the package tarball. What +if the author of a module bundles its dependencies, and they use a +different spelling for `node_modules`? npm would have to rename the +folder at publish time, and then be smart enough to unpack it using +your locally configured name. Complexity hurdle #3. + +Furthermore, what happens when you *change* this name? Fine, it's +easy enough the first time, just rename the `node_modules` folders to +`./blergyblerp/` or whatever name you choose. But what about when you +change it again? npm doesn't currently track any state about past +configuration settings, so this would be rather difficult to do +properly. It would have to track every previous value for this +config, and always accept any of them, or else yesterday's install may +be broken tomorrow. Complexity hurdle #5. + +Never going to happen. The folder is named `node_modules`. It is +written indelibly in the Node Way, handed down from the ancient times +of Node 0.3. + ## Should I check my `node_modules` folder into git? Mikeal Rogers answered this question very well: diff --git a/deps/npm/doc/cli/index.md b/deps/npm/doc/cli/index.md index 04852ce496..903812dc21 100644 --- a/deps/npm/doc/cli/index.md +++ b/deps/npm/doc/cli/index.md @@ -190,6 +190,10 @@ npm-index(1) -- Index of all npm documentation Mark your favorite packages +## npm-stars(1) + + View packages marked as favorites + ## npm-start(1) Start a package diff --git a/deps/npm/doc/cli/stars.md b/deps/npm/doc/cli/stars.md new file mode 100644 index 0000000000..7c28f5b2a5 --- /dev/null +++ b/deps/npm/doc/cli/stars.md @@ -0,0 +1,22 @@ +npm-stars(1) -- View packages marked as favorites +================================================= + +## SYNOPSIS + + npm stars + npm stars [username] + +## DESCRIPTION + +If you have starred a lot of neat things and want to find them again +quickly this command lets you do just that. + +You may also want to see your friend's favorite packages, in this case +you will most certainly enjoy this command. + +## SEE ALSO + +* npm-star(1) +* npm-view(1) +* npm-whoami(1) +* npm-adduser(1) diff --git a/deps/npm/doc/cli/update.md b/deps/npm/doc/cli/update.md index 1de49f2e2f..302e2efff8 100644 --- a/deps/npm/doc/cli/update.md +++ b/deps/npm/doc/cli/update.md @@ -3,7 +3,7 @@ npm-update(1) -- Update a package ## SYNOPSIS - npm update [ [ ...]] + npm update [-g] [ [ ...]] ## DESCRIPTION @@ -12,6 +12,9 @@ This command will update all the packages listed to the latest version It will also install missing packages. +If the `-g` flag is specified, this command will update globally installed packages. +If no package name is specified, all packages in the specified location (global or local) will be updated. + ## SEE ALSO * npm-install(1) diff --git a/deps/npm/doc/cli/version.md b/deps/npm/doc/cli/version.md index ca9b5fbfaa..74d938d6ba 100644 --- a/deps/npm/doc/cli/version.md +++ b/deps/npm/doc/cli/version.md @@ -27,7 +27,16 @@ resulting version number. For example: If the `sign-git-tag` config is set, then the tag will be signed using the `-s` flag to git. Note that you must have a default GPG key set up -in your git config for this to work properly. +in your git config for this to work properly. For example: + + $ npm config set sign-git-tag true + $ npm version patch + + You need a passphrase to unlock the secret key for + user: "isaacs (http://blog.izs.me/) " + 2048-bit RSA key, ID 6C481CF6, created 2010-08-31 + + Enter passphrase: ## SEE ALSO diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 53761a1e83..762ed898d6 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -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/doc/start.html b/deps/npm/html/doc/start.html index 3e6aa1ca64..4a42ee1e1a 100644 --- a/deps/npm/html/doc/start.html +++ b/deps/npm/html/doc/start.html @@ -20,7 +20,7 @@ - +