From 9195455637be7ac68274c4e9a83003470efdb0c0 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 18 Jun 2013 09:42:42 -0700 Subject: [PATCH] npm: Upgrade to 1.2.32 --- deps/npm/Makefile | 7 +- deps/npm/doc/cli/faq.md | 149 +++++++----- 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 | 2 +- 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 | 150 +++++++----- 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 | 2 +- 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 | 2 +- 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 | 2 +- deps/npm/html/doc/version.html | 2 +- deps/npm/html/doc/view.html | 2 +- deps/npm/html/doc/whoami.html | 2 +- deps/npm/lib/npm.js | 1 + deps/npm/lib/outdated.js | 2 +- deps/npm/lib/update.js | 6 +- deps/npm/lib/visnup.js | 42 ++++ deps/npm/man/man1/faq.1 | 174 +++++++++----- deps/npm/man/man1/ls.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- .../init-package-json/init-package-json.js | 10 + .../node_modules/init-package-json/package.json | 4 +- .../node_modules/normalize-package-data/.npmignore | 1 + .../normalize-package-data/.travis.yml | 4 + .../node_modules/normalize-package-data/AUTHORS | 3 + .../node_modules/normalize-package-data/LICENSE | 30 +++ .../node_modules/normalize-package-data/README.md | 81 +++++++ .../lib/extract_description.js | 13 ++ .../normalize-package-data/lib/fixer.js | 253 +++++++++++++++++++++ .../normalize-package-data/lib/is_valid.js | 58 +++++ .../normalize-package-data/lib/normalize.js | 36 +++ .../normalize-package-data/lib/typos.json | 23 ++ .../node_modules/github-url-from-git/.npmignore | 1 + .../node_modules/github-url-from-git/History.md | 10 + .../node_modules/github-url-from-git/Makefile | 5 + .../node_modules/github-url-from-git/Readme.md | 41 ++++ .../node_modules/github-url-from-git/index.js | 12 + .../node_modules/github-url-from-git/package.json | 27 +++ .../node_modules/github-url-from-git/test.js | 40 ++++ .../normalize-package-data/package.json | 47 ++++ .../normalize-package-data/test/basic.js | 34 +++ .../normalize-package-data/test/consistency.js | 36 +++ .../test/fixtures/async.json | 36 +++ .../test/fixtures/bcrypt.json | 56 +++++ .../test/fixtures/coffee-script.json | 35 +++ .../test/fixtures/http-server.json | 53 +++++ .../test/fixtures/movefile.json | 21 ++ .../test/fixtures/node-module_exist.json | 26 +++ .../normalize-package-data/test/fixtures/npm.json | 135 +++++++++++ .../test/fixtures/read-package-json.json | 27 +++ .../test/fixtures/request.json | 39 ++++ .../test/fixtures/underscore.json | 17 ++ .../normalize-package-data/test/github-urls.js | 46 ++++ .../normalize-package-data/test/normalize.js | 129 +++++++++++ .../normalize-package-data/test/typo.js | 67 ++++++ .../npm/node_modules/npm-user-validate/.travis.yml | 4 + deps/npm/node_modules/npm-user-validate/README.md | 5 +- .../npm-user-validate/npm-user-validate.js | 26 ++- .../node_modules/npm-user-validate/package.json | 24 +- deps/npm/package.json | 10 +- 148 files changed, 1962 insertions(+), 300 deletions(-) create mode 100644 deps/npm/lib/visnup.js create mode 100644 deps/npm/node_modules/normalize-package-data/.npmignore create mode 100644 deps/npm/node_modules/normalize-package-data/.travis.yml create mode 100644 deps/npm/node_modules/normalize-package-data/AUTHORS create mode 100644 deps/npm/node_modules/normalize-package-data/LICENSE create mode 100644 deps/npm/node_modules/normalize-package-data/README.md create mode 100644 deps/npm/node_modules/normalize-package-data/lib/extract_description.js create mode 100644 deps/npm/node_modules/normalize-package-data/lib/fixer.js create mode 100644 deps/npm/node_modules/normalize-package-data/lib/is_valid.js create mode 100644 deps/npm/node_modules/normalize-package-data/lib/normalize.js create mode 100644 deps/npm/node_modules/normalize-package-data/lib/typos.json create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/.npmignore create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/History.md create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/Makefile create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/Readme.md create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/index.js create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/package.json create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/github-url-from-git/test.js create mode 100644 deps/npm/node_modules/normalize-package-data/package.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/basic.js create mode 100644 deps/npm/node_modules/normalize-package-data/test/consistency.js create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/async.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/bcrypt.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/coffee-script.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/http-server.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/movefile.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/node-module_exist.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/npm.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/request.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/fixtures/underscore.json create mode 100644 deps/npm/node_modules/normalize-package-data/test/github-urls.js create mode 100644 deps/npm/node_modules/normalize-package-data/test/normalize.js create mode 100644 deps/npm/node_modules/normalize-package-data/test/typo.js create mode 100644 deps/npm/node_modules/npm-user-validate/.travis.yml diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 82fa8b6..61251fb 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -102,9 +102,10 @@ test: node cli.js test publish: link doc - @git push origin :v$(shell npm -v) || true - @npm unpublish npm@$(shell npm -v) || true - git clean -fd + @git push origin :v$(shell npm -v) 2>&1 || true + @npm unpublish npm@$(shell npm -v) 2>&1 || true + git clean -fd &&\ + git push origin &&\ git push origin --tags &&\ npm publish &&\ npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\ diff --git a/deps/npm/doc/cli/faq.md b/deps/npm/doc/cli/faq.md index 05b2cd9..e00fec6 100644 --- a/deps/npm/doc/cli/faq.md +++ b/deps/npm/doc/cli/faq.md @@ -72,52 +72,6 @@ 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 big -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: @@ -219,6 +173,96 @@ Git urls can be of the form: The `commit-ish` can be any tag, sha, or branch which can be supplied as an argument to `git checkout`. The default is `master`. +## What is a `module`? + +A module is anything that can be loaded with `require()` in a Node.js +program. The following things are all examples of things that can be +loaded as modules: + +* A folder with a `package.json` file containing a `main` field. +* A folder with an `index.js` file in it. +* A JavaScript file. + +Most npm packages are modules, because they are libraries that you +load with `require`. However, there's no requirement that an npm +package be a module! Some only contain an executable command-line +interface, and don't provide a `main` field for use in Node programs. + +Almost all npm packages (at least, those that are Node programs) +*contain* many modules within them (because every file they load with +`require()` is a module). + +In the context of a Node program, the `module` is also the thing that +was loaded *from* a file. For example, in the following program: + + var req = require('request') + +we might say that "The variable `req` refers to the `request` module". + +## So, why is it the "`node_modules`" folder, but "`package.json`" file? Why not `node_packages` or `module.json`? + +The `package.json` file defines the package. (See "What is a +package?" above.) + +The `node_modules` folder is the place Node.js looks for modules. +(See "What is a module?" above.) + +For example, if you create a file at `node_modules/foo.js` and then +had a program that did `var f = require('foo.js')` then it would load +the module. However, `foo.js` is not a "package" in this case, +because it does not have a package.json. + +Alternatively, if you create a package which does not have an +`index.js` or a `"main"` field in the `package.json` file, then it is +not a module. Even if it's installed in `node_modules`, it can't be +an argument to `require()`. + +## `"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 big +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. + ## How do I install node with npm? You don't. Try one of these node version managers: @@ -257,11 +301,6 @@ See `npm-link(1)` See `npm-registry(1)`. -## What's up with the insecure channel warnings? - -Until node 0.4.10, there were problems sending big files over HTTPS. That -means that publishes go over HTTP by default in those versions of node. - ## I forgot my password, and can't publish. How do I reset it? Go to . @@ -274,8 +313,9 @@ To check if the registry is down, open up in a web browser. This will also tell you if you are just unable to access the internet for some reason. -If the registry IS down, let me know by emailing or posting an issue. -We'll have someone kick it or something. +If the registry IS down, let me know by emailing or posting +an issue at . We'll have +someone kick it or something. ## Why no namespaces? @@ -295,9 +335,8 @@ There is not sufficient need to impose namespace rules on everyone. ## I have a question or request not addressed here. Where should I put it? -Discuss it on the mailing list, or post an issue. +Post an issue on the github project: -* * ## Why does npm hate me? diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 669433d..48f910a 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.

- +