Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents 05dfac3 + 630728d commit f3470e014981589eba6808d0350e935d7ffdd2b5 @vvision committed Mar 19, 2013
Showing 1,208 changed files with 46,838 additions and 2,581 deletions.
View
@@ -16,3 +16,4 @@ npm-debug.log
/npmrc
/release/
/npm-*.tgz
+/node_modules/npm-registry-client/test/fixtures
View
12 AUTHORS
@@ -71,10 +71,22 @@ Domenic Denicola <domenic@domenicdenicola.com>
James Halliday <mail@substack.net>
Jeremy Cantrell <jmcantrell@gmail.com>
Ribettes <patlogan29@gmail.com>
+Einar Otto Stangvik <einaros@gmail.com>
Don Park <donpark@docuverse.com>
Kei Son <heyacct@gmail.com>
Nicolas Morel <marsup@gmail.com>
Mark Dube <markisdee@gmail.com>
+Nathan Rajlich <nathan@tootallnate.net>
Maxim Bogushevich <boga1@mail.ru>
Justin Beckwith <justbe@microsoft.com>
Meaglin <Meaglin.wasabi@gmail.com>
+Ben Evans <ben@bensbit.co.uk>
+Nathan Zadoks <nathan@nathan7.eu>
+Brian White <mscdex@gmail.com>
+Jed Schmidt <tr@nslator.jp>
+Ian Livingstone <ianl@cs.dal.ca>
+Patrick Pfeiffer <patrick@buzzle.at>
+Paul Miller <paul@paulmillr.com>
+seebees <seebees@gmail.com>
+Carl Lange <carl@flax.ie>
+Jan Lehnardt <jan@apache.org>
View
@@ -92,7 +92,7 @@ doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh packa
node scripts/index-build.js > $@
node_modules/.bin/ronn:
- node cli.js install
+ node cli.js install ronn
doc: man
View
@@ -42,11 +42,11 @@ There's a pretty robust install script at
You can set any npm configuration params with that script:
-npm_config_prefix=/some/path sh install.sh
+ npm_config_prefix=/some/path sh install.sh
Or, you can run it in uber-debuggery mode:
-npm_debug=1 sh install.sh
+ npm_debug=1 sh install.sh
### Even Fancier
View
@@ -25,6 +25,8 @@ The 'args' parameter must have exactly two elements:
Note that you must be the package owner to deprecate something. See the
`owner` and `adduser` help topics.
+To un-deprecate a package, specify an empty string (`""`) for the `message` argument.
+
## SEE ALSO
* npm-publish(3)
View
@@ -4,7 +4,7 @@ npm(3) -- node package manager
## SYNOPSIS
var npm = require("npm")
- npm.load(configObject, function (er, npm) {
+ npm.load([configObject,] function (er, npm) {
// use the npm object, now that it's loaded.
npm.config.set(key, val)
@@ -25,12 +25,13 @@ This is the API documentation for npm.
To find documentation of the command line
client, see `npm(1)`.
-Prior to using npm's commands,
-`npm.load()` must be called with an object hash of
-top-level configs. In the npm command line client,
-this set of configs is parsed from the command line options. Additional
-configuration params are loaded from two configuration files. See
-`npm-config(1)` for more information.
+Prior to using npm's commands, `npm.load()` must be called.
+If you provide `configObject` as an object hash of top-level
+configs, they override the values stored in the various config
+locations. In the npm command line client, this set of configs
+is parsed from the command line options. Additional configuration
+params are loaded from two configuration files. See `npm-config(1)`
+for more information.
After that, each of the functions are accessible in the
commands object: `npm.commands.<cmd>`. See `npm-index(1)` for a list of
View
@@ -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
@@ -167,6 +171,18 @@ then the user could change the behavior by doing:
Force npm to always require authentication when accessing the registry,
even for `GET` requests.
+### bin-links
+
+* Default: `true`
+* Type: Boolean
+
+Tells npm to create symlinks (or `.cmd` shims on Windows) for package
+executables.
+
+Set to false to have it not do this. This can be used to work around
+the fact that some file systems don't support symlinks, even on
+ostensibly Unix systems.
+
### browser
* Default: OS X: `"open"`, others: `"google-chrome"`
@@ -228,7 +244,7 @@ explicitly used, and that only GET requests use the cache.
### cache-min
-* Default: 0
+* Default: 10
* Type: Number
The minimum time (in seconds) to keep items in the registry cache before
@@ -357,10 +373,10 @@ Operates in "global" mode, so that packages are installed into the
`prefix` folder instead of the current working directory. See
`npm-folders(1)` for more on the differences in behavior.
-* packages are installed into the `prefix/node_modules` folder, instead of the
+* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
current working directory.
-* bin files are linked to `prefix/bin`
-* man pages are linked to `prefix/share/man`
+* bin files are linked to `{prefix}/bin`
+* man pages are linked to `{prefix}/share/man`
### globalconfig
@@ -398,7 +414,7 @@ A proxy to use for outgoing https requests.
### user-agent
-* Default: npm/{npm.version} node/{process.version}
+* Default: node/{process.version} {process.platform} {process.arch}
* Type: String
Sets a User-Agent to the request header
@@ -575,7 +591,7 @@ standard output.
### prefix
-* Default: node's process.installPrefix
+* Default: see npm-folders(1)
* Type: path
The location to install global items. If set on the command line, then
View
@@ -18,6 +18,8 @@ something like this:
Note that you must be the package owner to deprecate something. See the
`owner` and `adduser` help topics.
+To un-deprecate a package, specify an empty string (`""`) for the `message` argument.
+
## SEE ALSO
* npm-publish(1)
View
@@ -4,8 +4,10 @@ npm-disputes(1) -- Handling Module Name Disputes
## SYNOPSIS
1. Get the author email with `npm owner ls <pkgname>`
-1. Email the author, CC <i@izs.me>.
-2. After a few weeks, if there's no resolution, we'll sort it out.
+2. Email the author, CC <i@izs.me>.
+3. After a few weeks, if there's no resolution, we'll sort it out.
+
+Don't squat on package names. Publish code or move out of the way.
## DESCRIPTION
@@ -40,7 +42,7 @@ Joe's appropriate course of action in each case is the same.
1. `npm owner ls foo`. This will tell Joe the email address of the
owner (Bob).
-2. Joe emails Bob, explaining the situation **as respecfully as possible**,
+2. Joe emails Bob, explaining the situation **as respectfully as possible**,
and what he would like to do with the module name. He adds
isaacs <i@izs.me> to the CC list of the email. Mention in the email
that Bob can run `npm owner add joe foo` to add Joe as an owner of
@@ -75,6 +77,11 @@ but not limited to:
MIT-licensed program, and then removing or changing the copyright and
license statement)
3. Illegal content.
+4. "Squatting" on a package name that you *plan* to use, but aren't
+ actually using. Sorry, I don't care how great the name is, or how
+ perfect a fit it is for the thing that someday might happen. If
+ someone wants to use it today, and you're just taking up space with
+ an empty tarball, you're going to be evicted.
If you see bad behavior like this, please report it right away.
View
@@ -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 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:
Oops, something went wrong.

0 comments on commit f3470e0

Please sign in to comment.