git add package.json &&\
git ci -m v$(shell npm -v)
-publish: link
+publish: link doc
+ git tag -d v$(shell npm -v) || true
+ git push origin :v$(shell npm -v) || true
+ npm unpublish npm@$(shell npm -v) || true
git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
git push origin --tags &&\
npm publish &&\
- make doc-publish
+ npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
+ make doc-publish &&\
+ make zip-publish
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
+zip-publish: release
+ scp release/*.zip npmjs.org:/var/www/npmjs.org/public/dist/
+
+release:
+ @bash scripts/release.sh
+
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || echo "make it yourself"
-.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish
+.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish release zip-publish
--- /dev/null
+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.
+
+## DESCRIPTION
+
+There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name. Here are some common
+ways that happens (each of these is based on actual events.)
+
+1. Bob writes a JavaScript module `foo`, which is not node-specific.
+ Bob doesn't use node at all. Joe wants to use `foo` in node, so he
+ wraps it in an npm module. Some time later, Bob starts using node,
+ and wants to take over management of his program.
+2. Bob writes an npm module `foo`, and publishes it. Perhaps much
+ later, Joe finds a bug in `foo`, and fixes it. He sends a pull
+ request to Bob, but Bob doesn't have the time to deal with it,
+ because he has a new job and a new baby and is focused on his new
+ erlang project, and kind of not involved with node any more. Joe
+ would like to publish a new `foo`, but can't, because the name is
+ taken.
+3. Bob writes a 10-line flow-control library, and calls it `foo`, and
+ publishes it to the npm registry. Being a simple little thing, it
+ never really has to be updated. Joe works for Foo Inc, the makers
+ of the critically acclaimed and widely-marketed `foo` JavaScript
+ toolkit framework. They publish it to npm as `foojs`, but people are
+ routinely confused when `npm install foo` is some different thing.
+4. Bob writes a parser for the widely-known `foo` file format, because
+ he needs it for work. Then, he gets a new job, and never updates the
+ prototype. Later on, Joe writes a much more complete `foo` parser,
+ but can't publish, because Bob's `foo` is in the way.
+
+The validity of Joe's claim in each situation can be debated. However,
+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**,
+ 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
+ the `foo` package.
+3. After a reasonable amount of time, if Bob has not responded, or if
+ Bob and Joe can't come to any sort of resolution, email isaacs
+ <i@izs.me> and we'll sort it out.
+
+## REASONING
+
+In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention. Most people
+really do want to be reasonable, and are probably not even aware that
+they're in your way.
+
+Module ecosystems are most vibrant and powerful when they are as
+self-directed as possible. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction.
+
+## EXCEPTIONS
+
+Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:
+
+1. Malware (that is, a module designed to exploit or harm the machine on
+ which it is installed)
+2. Violations of copyright or licenses (for example, cloning an
+ MIT-licensed program, and then removing or changing the copyright and
+ license statement)
+3. Illegal content.
+
+If you see bad behavior like this, please report it right away.
+
+## SEE ALSO
+
+* npm-registry(1)
+* npm-owner(1)
something with the `-g` flag, then its executables go in `npm bin -g`
and its modules go in `npm root -g`.
-## How do I install something everywhere?
+## How do I install something on my computer in a central location?
-Install it globally by tacking `-g` or `--global` to the command.
+Install it globally by tacking `-g` or `--global` to the command. (This
+is especially important for command line utilities that need to add
+their bins to the global system `PATH`.)
## I installed something globally, but I can't `require()` it
Install it locally.
-## I don't wanna.
+The global install location is a place for command-line utilities
+to put their bins in the system `PATH`. It's not for use with `require()`.
-Check out `npm link`. You might like it.
+If you `require()` a module in your code, then that means it's a
+dependency, and a part of your program. You need to install it locally
+in your program.
-## No, I really want 0.x style 'everything global' style.
+## Why can't npm just put everything in one place, like other package managers?
-Ok, fine. Do this:
+Not every change is an improvement, but every improvement is a change.
+This would be like asking git to do network IO for every commit. It's
+not going to happen, because it's a terrible idea that causes more
+problems than it solves.
- echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bashrc
- . ~/.bashrc
- npm config set global true
+It is much harder to avoid dependency conflicts without nesting
+dependencies. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach. See `npm-folders(1)` for
+more details.
-This is not recommended.
+If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the `npm link` command.
+That's what it's for. Install it globally, then link it into each
+program that uses it.
-Many things **will not work** if you do this. Make sure you read and
-understand `npm-config(1)` and `npm-global(1)` before you complain
-about things being broken.
+## Whatever, I really want the old style 'everything global' style.
-When you realize what a mistake it was, do this to switch back:
+Write your own package manager, then. It's not that hard.
- npm config delete global --local
+npm will not help you do something that is known to be a bad idea.
+
+## Should I check my `node_modules` folder into git?
+
+Mikeal Rogers answered this question very well:
+
+<http://www.mikealrogers.com/posts/nodemodules-in-git.html>
+
+tl;dr
+
+* Check `node_modules` into git for things you **deploy**, such as
+ websites and apps.
+* Do not check `node_modules` into git for libraries and modules
+ intended to be reused.
+* Use npm to manage dependencies in your dev environment, but not in
+ your deployment scripts.
+
+## Is it 'npm' or 'NPM' or 'Npm'?
+
+npm should never be capitalized unless it is being displayed in a
+location that is customarily all-caps (such as the title of man pages.)
## If 'npm' is an acronym, why is it never capitalized?
National Association of Pastoral Musicians. You can learn more
about them at <http://npm.org/>.
-In software, "NPM" is a non-parametric mapping utility written by
+In software, "NPM" is a Non-Parametric Mapping utility written by
Chris Rorden. You can analyze pictures of brains with it. Learn more
about the (capitalized) NPM program at <http://www.cabiatl.com/mricro/npm/>.
## I get ECONNREFUSED a lot. What's up?
Either the registry is down, or node's DNS isn't able to reach out.
-This happens a lot if you don't follow *all* the steps in the Cygwin
-setup doc.
To check if the registry is down, open up
-<http://registry.npmjs.org/-/short>
+<http://registry.npmjs.org/>
in a web browser. This will also tell you if you are just unable to
access the internet for some reason.
Developer Guide
+## npm-disputes(1)
+
+ Handling Module Name Disputes
+
## npm-docs(1)
Docs for a package in a web browser maybe
* npm-publish(1)
* npm-registry(1)
* npm-adduser(1)
+* npm-disputes(1)
* npm-config(1)
* npm-developers(1)
+* npm-disputes(1)
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin — npm@1.1.0-beta-7</p>
+<p id="footer">bin — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs — npm@1.1.0-beta-7</p>
+<p id="footer">bugs — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands — npm@1.1.0-beta-7</p>
+<p id="footer">commands — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">config — npm@1.1.0-beta-7</p>
+<p id="footer">config — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.1.0-beta-7</p>
+<p id="footer">deprecate — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">docs — npm@1.1.0-beta-7</p>
+<p id="footer">docs — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">edit — npm@1.1.0-beta-7</p>
+<p id="footer">edit — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">explore — npm@1.1.0-beta-7</p>
+<p id="footer">explore — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">help-search — npm@1.1.0-beta-7</p>
+<p id="footer">help-search — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init — npm@1.1.0-beta-7</p>
+<p id="footer">init — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">install — npm@1.1.0-beta-7</p>
+<p id="footer">install — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">link — npm@1.1.0-beta-7</p>
+<p id="footer">link — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">load — npm@1.1.0-beta-7</p>
+<p id="footer">load — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">ls — npm@1.1.0-beta-7</p>
+<p id="footer">ls — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.0-beta-7</p>
+<p>1.1.0-beta-10</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.1.0-beta-7</p>
+<p id="footer">npm — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">outdated — npm@1.1.0-beta-7</p>
+<p id="footer">outdated — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.1.0-beta-7</p>
+<p id="footer">owner — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">pack — npm@1.1.0-beta-7</p>
+<p id="footer">pack — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix — npm@1.1.0-beta-7</p>
+<p id="footer">prefix — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">prune — npm@1.1.0-beta-7</p>
+<p id="footer">prune — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.1.0-beta-7</p>
+<p id="footer">publish — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild — npm@1.1.0-beta-7</p>
+<p id="footer">rebuild — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.1.0-beta-7</p>
+<p id="footer">restart — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root — npm@1.1.0-beta-7</p>
+<p id="footer">root — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.1.0-beta-7</p>
+<p id="footer">run-script — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">search — npm@1.1.0-beta-7</p>
+<p id="footer">search — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">start — npm@1.1.0-beta-7</p>
+<p id="footer">start — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">stop — npm@1.1.0-beta-7</p>
+<p id="footer">stop — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.1.0-beta-7</p>
+<p id="footer">submodule — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">tag — npm@1.1.0-beta-7</p>
+<p id="footer">tag — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">test — npm@1.1.0-beta-7</p>
+<p id="footer">test — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">uninstall — npm@1.1.0-beta-7</p>
+<p id="footer">uninstall — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">unpublish — npm@1.1.0-beta-7</p>
+<p id="footer">unpublish — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">update — npm@1.1.0-beta-7</p>
+<p id="footer">update — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">version — npm@1.1.0-beta-7</p>
+<p id="footer">version — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view — npm@1.1.0-beta-7</p>
+<p id="footer">view — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami — npm@1.1.0-beta-7</p>
+<p id="footer">whoami — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.0-beta-7</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser — npm@1.1.0-beta-7</p>
+<p id="footer">adduser — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin — npm@1.1.0-beta-7</p>
+<p id="footer">bin — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs — npm@1.1.0-beta-7</p>
+<p id="footer">bugs — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build — npm@1.1.0-beta-7</p>
+<p id="footer">build — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle — npm@1.1.0-beta-7</p>
+<p id="footer">bundle — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache — npm@1.1.0-beta-7</p>
+<p id="footer">cache — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog — npm@1.1.0-beta-7</p>
+<p id="footer">changelog — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style — npm@1.1.0-beta-7</p>
+<p id="footer">coding-style — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion — npm@1.1.0-beta-7</p>
+<p id="footer">completion — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">config — npm@1.1.0-beta-7</p>
+<p id="footer">config — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.1.0-beta-7</p>
+<p id="footer">deprecate — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers — npm@1.1.0-beta-7</p>
+<p id="footer">developers — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
--- /dev/null
+<!doctype html>
+<html>
+ <title>disputes</title>
+ <meta http-equiv="content-type" value="text/html;utf-8">
+ <link rel="stylesheet" type="text/css" href="./style.css">
+
+ <body>
+ <div id="wrapper">
+<h1><a href="../doc/disputes.html">disputes</a></h1> <p>Handling Module Name Disputes</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<ol><li>Get the author email with <code>npm owner ls <pkgname></code></li><li>Email the author, CC <a href="mailto:i@izs.me">i@izs.me</a>.</li><li>After a few weeks, if there's no resolution, we'll sort it out.</li></ol>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name. Here are some common
+ways that happens (each of these is based on actual events.)</p>
+
+<ol><li>Bob writes a JavaScript module <code>foo</code>, which is not node-specific.
+Bob doesn't use node at all. Joe wants to use <code>foo</code> in node, so he
+wraps it in an npm module. Some time later, Bob starts using node,
+and wants to take over management of his program.</li><li>Bob writes an npm module <code>foo</code>, and publishes it. Perhaps much
+later, Joe finds a bug in <code>foo</code>, and fixes it. He sends a pull
+request to Bob, but Bob doesn't have the time to deal with it,
+because he has a new job and a new baby and is focused on his new
+erlang project, and kind of not involved with node any more. Joe
+would like to publish a new <code>foo</code>, but can't, because the name is
+taken.</li><li>Bob writes a 10-line flow-control library, and calls it <code>foo</code>, and
+publishes it to the npm registry. Being a simple little thing, it
+never really has to be updated. Joe works for Foo Inc, the makers
+of the critically acclaimed and widely-marketed <code>foo</code> JavaScript
+toolkit framework. They publish it to npm as <code>foojs</code>, but people are
+routinely confused when <code>npm install foo</code> is some different thing.</li><li>Bob writes a parser for the widely-known <code>foo</code> file format, because
+he needs it for work. Then, he gets a new job, and never updates the
+prototype. Later on, Joe writes a much more complete <code>foo</code> parser,
+but can't publish, because Bob's <code>foo</code> is in the way.</li></ol>
+
+<p>The validity of Joe's claim in each situation can be debated. However,
+Joe's appropriate course of action in each case is the same.</p>
+
+<ol><li><code>npm owner ls foo</code>. This will tell Joe the email address of the
+owner (Bob).</li><li>Joe emails Bob, explaining the situation <strong>as respecfully as possible</strong>,
+and what he would like to do with the module name. He adds
+isaacs <a href="mailto:i@izs.me">i@izs.me</a> to the CC list of the email. Mention in the email
+that Bob can run <code>npm owner add joe foo</code> to add Joe as an owner of
+the <code>foo</code> package.</li><li>After a reasonable amount of time, if Bob has not responded, or if
+Bob and Joe can't come to any sort of resolution, email isaacs
+<a href="mailto:i@izs.me">i@izs.me</a> and we'll sort it out.</li></ol>
+
+<h2 id="REASONING">REASONING</h2>
+
+<p>In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention. Most people
+really do want to be reasonable, and are probably not even aware that
+they're in your way.</p>
+
+<p>Module ecosystems are most vibrant and powerful when they are as
+self-directed as possible. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction.</p>
+
+<h2 id="EXCEPTIONS">EXCEPTIONS</h2>
+
+<p>Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:</p>
+
+<ol><li>Malware (that is, a module designed to exploit or harm the machine on
+which it is installed)</li><li>Violations of copyright or licenses (for example, cloning an
+MIT-licensed program, and then removing or changing the copyright and
+license statement)</li><li>Illegal content.</li></ol>
+
+<p>If you see bad behavior like this, please report it right away.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
+</div>
+<p id="footer">disputes — npm@1.1.0-beta-10</p>
+<script>
+;(function () {
+var wrapper = document.getElementById("wrapper")
+var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
+ .filter(function (el) {
+ return el.parentNode === wrapper
+ && el.tagName.match(/H[1-6]/)
+ && el.id
+ })
+var l = 2
+ , toc = document.createElement("ul")
+toc.innerHTML = els.map(function (el) {
+ var i = el.tagName.charAt(1)
+ , out = ""
+ while (i > l) {
+ out += "<ul>"
+ l ++
+ }
+ while (i < l) {
+ out += "</ul>"
+ l --
+ }
+ out += "<li><a href='#" + el.id + "'>" +
+ ( el.innerText || el.text || el.innerHTML)
+ + "</a>"
+ return out
+}).join("\n")
+toc.id = "toc"
+document.body.appendChild(toc)
+})()
+</script>
+</body></html>
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs — npm@1.1.0-beta-7</p>
+<p id="footer">docs — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit — npm@1.1.0-beta-7</p>
+<p id="footer">edit — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore — npm@1.1.0-beta-7</p>
+<p id="footer">explore — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
something with the <code>-g</code> flag, then its executables go in <code>npm bin -g</code>
and its modules go in <code>npm root -g</code>.</li></ul>
-<h2 id="How-do-I-install-something-everywhere">How do I install something everywhere?</h2>
+<h2 id="How-do-I-install-something-on-my-computer-in-a-central-location">How do I install something on my computer in a central location?</h2>
-<p>Install it globally by tacking <code>-g</code> or <code>--global</code> to the command.</p>
+<p>Install it globally by tacking <code>-g</code> or <code>--global</code> to the command. (This
+is especially important for command line utilities that need to add
+their bins to the global system <code>PATH</code>.)</p>
<h2 id="I-installed-something-globally-but-I-can-t-require-it">I installed something globally, but I can't `require()` it</h2>
<p>Install it locally.</p>
-<h2 id="I-don-t-wanna">I don't wanna.</h2>
+<p>The global install location is a place for command-line utilities
+to put their bins in the system <code>PATH</code>. It's not for use with <code>require()</code>.</p>
-<p>Check out <code>npm link</code>. You might like it.</p>
+<p>If you <code>require()</code> a module in your code, then that means it's a
+dependency, and a part of your program. You need to install it locally
+in your program.</p>
-<h2 id="No-I-really-want-0-x-style-everything-global-style">No, I really want 0.x style 'everything global' style.</h2>
+<h2 id="Why-can-t-npm-just-put-everything-in-one-place-like-other-package-managers">Why can't npm just put everything in one place, like other package managers?</h2>
-<p>Ok, fine. Do this:</p>
+<p>Not every change is an improvement, but every improvement is a change.
+This would be like asking git to do network IO for every commit. It's
+not going to happen, because it's a terrible idea that causes more
+problems than it solves.</p>
-<pre><code>echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bashrc
-. ~/.bashrc
-npm config set global true</code></pre>
+<p>It is much harder to avoid dependency conflicts without nesting
+dependencies. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach. See <code><a href="../doc/folders.html">folders(1)</a></code> for
+more details.</p>
-<p>This is not recommended.</p>
+<p>If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the <code>npm link</code> command.
+That's what it's for. Install it globally, then link it into each
+program that uses it.</p>
-<p>Many things <strong>will not work</strong> if you do this. Make sure you read and
-understand <code><a href="../doc/config.html">config(1)</a></code> and <code><a href="../doc/global.html">global(1)</a></code> before you complain
-about things being broken.</p>
+<h2 id="Whatever-I-really-want-the-old-style-everything-global-style">Whatever, I really want the old style 'everything global' style.</h2>
-<p>When you realize what a mistake it was, do this to switch back:</p>
+<p>Write your own package manager, then. It's not that hard.</p>
-<pre><code>npm config delete global --local</code></pre>
+<p>npm will not help you do something that is known to be a bad idea.</p>
+
+<h2 id="Should-I-check-my-node_modules-folder-into-git">Should I check my `node_modules` folder into git?</h2>
+
+<p>Mikeal Rogers answered this question very well:</p>
+
+<p><a href="http://www.mikealrogers.com/posts/nodemodules-in-git.html">http://www.mikealrogers.com/posts/nodemodules-in-git.html</a></p>
+
+<p>tl;dr</p>
+
+<ul><li>Check <code>node_modules</code> into git for things you <strong>deploy</strong>, such as
+websites and apps.</li><li>Do not check <code>node_modules</code> into git for libraries and modules
+intended to be reused.</li><li>Use npm to manage dependencies in your dev environment, but not in
+your deployment scripts.</li></ul>
+
+<h2 id="Is-it-npm-or-NPM-or-Npm">Is it 'npm' or 'NPM' or 'Npm'?</h2>
+
+<p>npm should never be capitalized unless it is being displayed in a
+location that is customarily all-caps (such as the title of man pages.)</p>
<h2 id="If-npm-is-an-acronym-why-is-it-never-capitalized">If 'npm' is an acronym, why is it never capitalized?</h2>
National Association of Pastoral Musicians. You can learn more
about them at <a href="http://npm.org/">http://npm.org/</a>.</p>
-<p>In software, "NPM" is a non-parametric mapping utility written by
+<p>In software, "NPM" is a Non-Parametric Mapping utility written by
Chris Rorden. You can analyze pictures of brains with it. Learn more
about the (capitalized) NPM program at <a href="http://www.cabiatl.com/mricro/npm/">http://www.cabiatl.com/mricro/npm/</a>.</p>
<h2 id="I-get-ECONNREFUSED-a-lot-What-s-up">I get ECONNREFUSED a lot. What's up?</h2>
-<p>Either the registry is down, or node's DNS isn't able to reach out.
-This happens a lot if you don't follow <em>all</em> the steps in the Cygwin
-setup doc.</p>
+<p>Either the registry is down, or node's DNS isn't able to reach out.</p>
<p>To check if the registry is down, open up
-<a href="http://registry.npmjs.org/-/short">http://registry.npmjs.org/-/short</a>
+<a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a>
in a web browser. This will also tell you if you are just unable to
access the internet for some reason.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq — npm@1.1.0-beta-7</p>
+<p id="footer">faq — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders — npm@1.1.0-beta-7</p>
+<p id="footer">folders — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search — npm@1.1.0-beta-7</p>
+<p id="footer">help-search — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help — npm@1.1.0-beta-7</p>
+<p id="footer">help — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p> Developer Guide</p>
+<h2 id="npm-disputes-1"><a href="../doc/disputes.html">disputes(1)</a></h2>
+
+<p> Handling Module Name Disputes</p>
+
<h2 id="npm-docs-1"><a href="../doc/docs.html">docs(1)</a></h2>
<p> Docs for a package in a web browser maybe</p>
<p> Display npm username</p>
</div>
-<p id="footer">index — npm@1.1.0-beta-7</p>
+<p id="footer">index — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init — npm@1.1.0-beta-7</p>
+<p id="footer">init — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">install — npm@1.1.0-beta-7</p>
+<p id="footer">install — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json — npm@1.1.0-beta-7</p>
+<p id="footer">json — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link — npm@1.1.0-beta-7</p>
+<p id="footer">link — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">list — npm@1.1.0-beta-7</p>
+<p id="footer">list — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.0-beta-7</p>
+<p>1.1.0-beta-10</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.1.0-beta-7</p>
+<p id="footer">npm — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated — npm@1.1.0-beta-7</p>
+<p id="footer">outdated — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
+<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.1.0-beta-7</p>
+<p id="footer">owner — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack — npm@1.1.0-beta-7</p>
+<p id="footer">pack — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix — npm@1.1.0-beta-7</p>
+<p id="footer">prefix — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune — npm@1.1.0-beta-7</p>
+<p id="footer">prune — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.1.0-beta-7</p>
+<p id="footer">publish — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild — npm@1.1.0-beta-7</p>
+<p id="footer">rebuild — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li></ul>
+<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry — npm@1.1.0-beta-7</p>
+<p id="footer">registry — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.1.0-beta-7</p>
+<p id="footer">removing-npm — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.1.0-beta-7</p>
+<p id="footer">restart — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root — npm@1.1.0-beta-7</p>
+<p id="footer">root — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.1.0-beta-7</p>
+<p id="footer">run-script — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts — npm@1.1.0-beta-7</p>
+<p id="footer">scripts — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search — npm@1.1.0-beta-7</p>
+<p id="footer">search — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver — npm@1.1.0-beta-7</p>
+<p id="footer">semver — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star — npm@1.1.0-beta-7</p>
+<p id="footer">star — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start — npm@1.1.0-beta-7</p>
+<p id="footer">start — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop — npm@1.1.0-beta-7</p>
+<p id="footer">stop — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.1.0-beta-7</p>
+<p id="footer">submodule — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag — npm@1.1.0-beta-7</p>
+<p id="footer">tag — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test — npm@1.1.0-beta-7</p>
+<p id="footer">test — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall — npm@1.1.0-beta-7</p>
+<p id="footer">uninstall — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish — npm@1.1.0-beta-7</p>
+<p id="footer">unpublish — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update — npm@1.1.0-beta-7</p>
+<p id="footer">update — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version — npm@1.1.0-beta-7</p>
+<p id="footer">version — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view — npm@1.1.0-beta-7</p>
+<p id="footer">view — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami — npm@1.1.0-beta-7</p>
+<p id="footer">whoami — npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
, findPrefix = require("./utils/find-prefix.js")
, getUid = require("./utils/uid-number.js")
, mkdir = require("./utils/mkdir-p.js")
+ , slide = require("slide")
+ , chain = slide.chain
npm.commands = {}
npm.ELIFECYCLE = {}
, "home" : "docs"
, "unstar": "star" // same function
, "apihelp" : "help"
+ , "login": "adduser"
}
, aliasNames = Object.keys(aliases)
function load (npm, conf, cb) {
which(process.argv[0], function (er, node) {
- //console.error("back from which")
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
//console.error("back from config lookup", er && er.stack)
if (er) return cb(er)
- var n = 2
- , errState
-
var umask = parseInt(conf.umask, 8)
npm.modes = { exec: 0777 & (~umask)
, file: 0666 & (~umask)
, umask: umask }
- loadPrefix(npm, conf, next)
- loadUid(npm, conf, next)
-
- function next (er) {
- //console.error("next", er && er.stack)
- if (errState) return
- if (er) return cb(errState = er)
- if (-- n <= 0) return cb()
- }
+ chain([ [ loadPrefix, npm, conf ]
+ , [ setUser, ini.configList, ini.defaultConfig ]
+ , [ loadUid, npm, conf ]
+ ], cb)
})
})
}
gp = npm.config.get("prefix")
findPrefix(p, function (er, p) {
- //console.log("Back from findPrefix", er && er.stack, p)
Object.defineProperty(npm, "localPrefix",
{ get : function () { return p }
, set : function (r) { return p = r }
, enumerable : true
})
// the prefix MUST exist, or else nothing works.
- mkdir(p, npm.modes.exec, null, null, true, next)
+ if (!npm.config.get("global")) {
+ mkdir(p, npm.modes.exec, null, null, true, next)
+ } else {
+ next(er)
+ }
})
findPrefix(gp, function (er, gp) {
if (!npm.config.get("unsafe-perm")) {
getUid(npm.config.get("user"), npm.config.get("group"), cb)
} else {
- //console.error("skipping loadUid")
process.nextTick(cb)
}
}
+function setUser (cl, dc, cb) {
+ // If global, leave it as-is.
+ // If not global, then set the user to the owner of the prefix folder.
+ // Just set the default, so it can be overridden.
+ if (cl.get("global")) return cb()
+ if (process.env.SUDO_UID) {
+ dc.user = +(process.env.SUDO_UID)
+ return cb()
+ }
+
+ var prefix = path.resolve(cl.get("prefix"))
+ mkdir(prefix, function (er) {
+ if (er) {
+ log.error(prefix, "could not create prefix directory")
+ return cb(er)
+ }
+ fs.stat(prefix, function (er, st) {
+ dc.user = st && st.uid
+ return cb(er)
+ })
+ })
+}
+
npm.config =
{ get : function (key) { return ini.get(key) }
, path = require("path")
, relativize = require("./relativize.js")
, npm = require("../npm.js")
- , shebangExpr = /^#\!(?:\/usr\/bin\/env )?([^ \t]+)(.*)$/
+ , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
function cmdShimIfExists (from, to, cb) {
fs.stat(from, function (er) {
, strictSSL: npm.config.get("strict-ssl")
, onResponse: onResponse }).pipe(fstr)
function onResponse (er, res) {
- if (er) return cb(er)
+ if (er) return fstr.emit("error", er)
log.http(res.statusCode + " " + remote.href)
}
}
, nopt = require("nopt")
, ini = require("ini")
, ProtoList = require("proto-list")
+ , mkdir = require("mkdirp")
+ , npm = require("../npm.js")
, log = require("./log.js")
, configDefs = require("./config-defs.js")
if (er) conf = {}
cl.push(conf)
cl.push(dc)
- setUser(cl, dc, thenValidate(cl, cb))
+ validate(cl)
+ cb()
})
})
})
}
-function thenValidate (cl, cb) { return function (er) {
- if (er) return cb(er)
-
+function validate (cl) {
// warn about invalid configs at every level.
cl.list.forEach(function (conf, level) {
// clean(data, types, typeDefs)
nopt.clean(conf, configDefs.types)
})
-
- cb()
-}}
-
-function setUser (cl, dc, cb) {
- // If global, leave it as-is.
- // If not global, then set the user to the owner of the prefix folder.
- // Just set the default, so it can be overridden.
- //console.error("setUser "+cl.get("global")+" "+ cb.toString())
- if (cl.get("global")) return cb()
- if (process.env.SUDO_UID) {
- //console.error("uid="+process.env.SUDO_UID)
- dc.user = +(process.env.SUDO_UID)
- return cb()
- }
- //console.error("prefix="+cl.get("prefix"))
- fs.stat(path.resolve(cl.get("prefix")), function (er, st) {
- if (er) {
- return log.er(cb, "prefix directory not found")(er)
- }
- dc.user = st.uid
- return cb()
- })
}
+
function parseEnv (env) {
var conf = {}
Object.keys(env)
var uri = "/-/all/since?stale=update_after&startkey=" + c
if (c === 0) {
- log.warn("Building the index for the first time, please be patient")
+ log.warn("Building the local index for the first time, please be patient")
uri = "/-/all"
}
GET(uri, etag, nofollow, function (er, remoteData, raw, response) {
// if we get an error talking to the registry, but we have it
// from the cache, then just pretend we got it.
- if (er && cache) {
+ if (er && cache && data && !data.error) {
er = null
response = {statusCode: 304}
}
, "depdenencies": "dependencies"
, "devEependencies": "devDependencies"
, "depends": "dependencies"
+ , "dev-dependencies": "devDependencies"
, "devDependences": "devDependencies"
, "devDepenencies": "devDependencies"
, "devdependencies": "devDependencies"
}
;["dependencies", "devDependencies"].forEach(function (d) {
- json[d] = json[d] ? depObjectify(json[d]) : {}
+ json[d] = json.hasOwnProperty(d) ? depObjectify(json[d], d, json._id) : {}
})
if (opts.dev || npm.config.get("dev") || npm.config.get("npat")) {
return json
}}
-function depObjectify (deps) {
+var depObjectifyWarn = {}
+function depObjectify (deps, d, id) {
+ if ((!deps || typeof deps !== "object" || Array.isArray(deps))
+ && !depObjectifyWarn[id+d]) {
+ log.warn( d + " field should be hash of <name>:<version-range> pairs"
+ , id )
+ depObjectifyWarn[id + d] = true
+ }
+
+ if (!deps) return {}
+ if (typeof deps === "string") {
+ deps = deps.trim().split(/[\n\r\s\t ,]+/)
+ }
if (!Array.isArray(deps)) return deps
var o = {}
deps.forEach(function (d) {
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "December 2011" "" ""
+.TH "NPM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "December 2011" "" ""
+.TH "NPM\-ADDUSER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "1" "December 2011" "" ""
+.TH "NPM\-BIN" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "1" "December 2011" "" ""
+.TH "NPM\-BUGS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUILD" "1" "December 2011" "" ""
+.TH "NPM\-BUILD" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "December 2011" "" ""
+.TH "NPM\-BUNDLE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "December 2011" "" ""
+.TH "NPM\-CACHE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CHANGELOG" "1" "December 2011" "" ""
+.TH "NPM\-CHANGELOG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-changelog\fR \-\- Changes
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "1" "December 2011" "" ""
+.TH "NPM\-CODING\-STYLE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "December 2011" "" ""
+.TH "NPM\-COMPLETION" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "1" "December 2011" "" ""
+.TH "NPM\-CONFIG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration file
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "December 2011" "" ""
+.TH "NPM\-DEPRECATE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "1" "December 2011" "" ""
+.TH "NPM\-DEVELOPERS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
--- /dev/null
+.\" Generated with Ronnjs/v0.1
+.\" http://github.com/kapouer/ronnjs/
+.
+.TH "NPM\-DISPUTES" "1" "January 2012" "" ""
+.
+.SH "NAME"
+\fBnpm-disputes\fR \-\- Handling Module Name Disputes
+.
+.SH "SYNOPSIS"
+.
+.IP "1" 4
+Get the author email with \fBnpm owner ls <pkgname>\fR
+.
+.IP "2" 4
+Email the author, CC \fIi@izs\.me\fR\|\.
+.
+.IP "3" 4
+After a few weeks, if there\'s no resolution, we\'ll sort it out\.
+.
+.IP "" 0
+.
+.SH "DESCRIPTION"
+There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name\. Here are some common
+ways that happens (each of these is based on actual events\.)
+.
+.IP "1" 4
+Bob writes a JavaScript module \fBfoo\fR, which is not node\-specific\.
+Bob doesn\'t use node at all\. Joe wants to use \fBfoo\fR in node, so he
+wraps it in an npm module\. Some time later, Bob starts using node,
+and wants to take over management of his program\.
+.
+.IP "2" 4
+Bob writes an npm module \fBfoo\fR, and publishes it\. Perhaps much
+later, Joe finds a bug in \fBfoo\fR, and fixes it\. He sends a pull
+request to Bob, but Bob doesn\'t have the time to deal with it,
+because he has a new job and a new baby and is focused on his new
+erlang project, and kind of not involved with node any more\. Joe
+would like to publish a new \fBfoo\fR, but can\'t, because the name is
+taken\.
+.
+.IP "3" 4
+Bob writes a 10\-line flow\-control library, and calls it \fBfoo\fR, and
+publishes it to the npm registry\. Being a simple little thing, it
+never really has to be updated\. Joe works for Foo Inc, the makers
+of the critically acclaimed and widely\-marketed \fBfoo\fR JavaScript
+toolkit framework\. They publish it to npm as \fBfoojs\fR, but people are
+routinely confused when \fBnpm install foo\fR is some different thing\.
+.
+.IP "4" 4
+Bob writes a parser for the widely\-known \fBfoo\fR file format, because
+he needs it for work\. Then, he gets a new job, and never updates the
+prototype\. Later on, Joe writes a much more complete \fBfoo\fR parser,
+but can\'t publish, because Bob\'s \fBfoo\fR is in the way\.
+.
+.IP "" 0
+.
+.P
+The validity of Joe\'s claim in each situation can be debated\. However,
+Joe\'s appropriate course of action in each case is the same\.
+.
+.IP "1" 4
+\fBnpm owner ls foo\fR\|\. This will tell Joe the email address of the
+owner (Bob)\.
+.
+.IP "2" 4
+Joe emails Bob, explaining the situation \fBas respecfully as possible\fR,
+and what he would like to do with the module name\. He adds
+isaacs \fIi@izs\.me\fR to the CC list of the email\. Mention in the email
+that Bob can run \fBnpm owner add joe foo\fR to add Joe as an owner of
+the \fBfoo\fR package\.
+.
+.IP "3" 4
+After a reasonable amount of time, if Bob has not responded, or if
+Bob and Joe can\'t come to any sort of resolution, email isaacs \fIi@izs\.me\fR and we\'ll sort it out\.
+.
+.IP "" 0
+.
+.SH "REASONING"
+In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention\. Most people
+really do want to be reasonable, and are probably not even aware that
+they\'re in your way\.
+.
+.P
+Module ecosystems are most vibrant and powerful when they are as
+self\-directed as possible\. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification\. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction\.
+.
+.SH "EXCEPTIONS"
+Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:
+.
+.IP "1" 4
+Malware (that is, a module designed to exploit or harm the machine on
+which it is installed)
+.
+.IP "2" 4
+Violations of copyright or licenses (for example, cloning an
+MIT\-licensed program, and then removing or changing the copyright and
+license statement)
+.
+.IP "3" 4
+Illegal content\.
+.
+.IP "" 0
+.
+.P
+If you see bad behavior like this, please report it right away\.
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+npm help registry
+.
+.IP "\(bu" 4
+npm help owner
+.
+.IP "" 0
+
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "1" "December 2011" "" ""
+.TH "NPM\-DOCS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "1" "December 2011" "" ""
+.TH "NPM\-EDIT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "1" "December 2011" "" ""
+.TH "NPM\-EXPLORE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "1" "December 2011" "" ""
+.TH "NPM\-FAQ" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
.
.IP "" 0
.
-.SH "How do I install something everywhere?"
-Install it globally by tacking \fB\-g\fR or \fB\-\-global\fR to the command\.
+.SH "How do I install something on my computer in a central location?"
+Install it globally by tacking \fB\-g\fR or \fB\-\-global\fR to the command\. (This
+is especially important for command line utilities that need to add
+their bins to the global system \fBPATH\fR\|\.)
.
.SH "I installed something globally, but I can\'t `require()` it"
Install it locally\.
.
-.SH "I don\'t wanna\."
-Check out \fBnpm link\fR\|\. You might like it\.
+.P
+The global install location is a place for command\-line utilities
+to put their bins in the system \fBPATH\fR\|\. It\'s not for use with \fBrequire()\fR\|\.
.
-.SH "No, I really want 0\.x style \'everything global\' style\."
-Ok, fine\. Do this:
+.P
+If you \fBrequire()\fR a module in your code, then that means it\'s a
+dependency, and a part of your program\. You need to install it locally
+in your program\.
.
-.IP "" 4
+.SH "Why can\'t npm just put everything in one place, like other package managers?"
+Not every change is an improvement, but every improvement is a change\.
+This would be like asking git to do network IO for every commit\. It\'s
+not going to happen, because it\'s a terrible idea that causes more
+problems than it solves\.
.
-.nf
-echo \'export NODE_PATH="\'$(npm root \-g)\'"\' >> ~/\.bashrc
-\|\. ~/\.bashrc
-npm config set global true
+.P
+It is much harder to avoid dependency conflicts without nesting
+dependencies\. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach\. See \fBnpm help folders\fR for
+more details\.
.
-.fi
+.P
+If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the \fBnpm link\fR command\.
+That\'s what it\'s for\. Install it globally, then link it into each
+program that uses it\.
.
-.IP "" 0
+.SH "Whatever, I really want the old style \'everything global\' style\."
+Write your own package manager, then\. It\'s not that hard\.
.
.P
-This is not recommended\.
+npm will not help you do something that is known to be a bad idea\.
+.
+.SH "Should I check my `node_modules` folder into git?"
+Mikeal Rogers answered this question very well:
.
.P
-Many things \fBwill not work\fR if you do this\. Make sure you read and
-understand \fBnpm help config\fR and \fBnpm help global\fR before you complain
-about things being broken\.
+\fIhttp://www\.mikealrogers\.com/posts/nodemodules\-in\-git\.html\fR
.
.P
-When you realize what a mistake it was, do this to switch back:
+tl;dr
.
-.IP "" 4
+.IP "\(bu" 4
+Check \fBnode_modules\fR into git for things you \fBdeploy\fR, such as
+websites and apps\.
.
-.nf
-npm config delete global \-\-local
+.IP "\(bu" 4
+Do not check \fBnode_modules\fR into git for libraries and modules
+intended to be reused\.
.
-.fi
+.IP "\(bu" 4
+Use npm to manage dependencies in your dev environment, but not in
+your deployment scripts\.
.
.IP "" 0
.
+.SH "Is it \'npm\' or \'NPM\' or \'Npm\'?"
+npm should never be capitalized unless it is being displayed in a
+location that is customarily all\-caps (such as the title of man pages\.)
+.
.SH "If \'npm\' is an acronym, why is it never capitalized?"
Contrary to the belief of many, "npm" is not in fact an abbreviation for
"Node Package Manager"\. It is a recursive bacronymic abbreviation for
about them at \fIhttp://npm\.org/\fR\|\.
.
.P
-In software, "NPM" is a non\-parametric mapping utility written by
+In software, "NPM" is a Non\-Parametric Mapping utility written by
Chris Rorden\. You can analyze pictures of brains with it\. Learn more
about the (capitalized) NPM program at \fIhttp://www\.cabiatl\.com/mricro/npm/\fR\|\.
.
.
.SH "I get ECONNREFUSED a lot\. What\'s up?"
Either the registry is down, or node\'s DNS isn\'t able to reach out\.
-This happens a lot if you don\'t follow \fIall\fR the steps in the Cygwin
-setup doc\.
.
.P
-To check if the registry is down, open up \fIhttp://registry\.npmjs\.org/\-/short\fR
+To check if the registry is down, open up \fIhttp://registry\.npmjs\.org/\fR
in a web browser\. This will also tell you if you are just unable to
access the internet for some reason\.
.
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "December 2011" "" ""
+.TH "NPM\-FOLDERS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "December 2011" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP" "1" "December 2011" "" ""
+.TH "NPM\-HELP" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "1" "December 2011" "" ""
+.TH "NPM\-INDEX" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
.SH "npm help developers"
Developer Guide
.
+.SH "npm help disputes"
+ Handling Module Name Disputes
+.
.SH "npm help docs"
Docs for a package in a web browser maybe
.
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "December 2011" "" ""
+.TH "NPM\-INIT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "1" "December 2011" "" ""
+.TH "NPM\-INSTALL" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-JSON" "1" "December 2011" "" ""
+.TH "NPM\-JSON" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "December 2011" "" ""
+.TH "NPM\-LINK" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "1" "December 2011" "" ""
+.TH "NPM\-LS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "December 2011" "" ""
+.TH "NPM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.0-beta-7
+1.1.0-beta-10
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "1" "December 2011" "" ""
+.TH "NPM\-OUTDATED" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "December 2011" "" ""
+.TH "NPM\-OWNER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.IP "\(bu" 4
npm help adduser
.
+.IP "\(bu" 4
+npm help disputes
+.
.IP "" 0
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "December 2011" "" ""
+.TH "NPM\-PACK" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "1" "December 2011" "" ""
+.TH "NPM\-PREFIX" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "December 2011" "" ""
+.TH "NPM\-PRUNE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "December 2011" "" ""
+.TH "NPM\-PUBLISH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "December 2011" "" ""
+.TH "NPM\-REBUILD" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "1" "December 2011" "" ""
+.TH "NPM\-REGISTRY" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
.IP "\(bu" 4
npm help developers
.
+.IP "\(bu" 4
+npm help disputes
+.
.IP "" 0
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "December 2011" "" ""
+.TH "NPM\-REMOVAL" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "December 2011" "" ""
+.TH "NPM\-RESTART" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "December 2011" "" ""
+.TH "NPM\-ROOT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "1" "December 2011" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "December 2011" "" ""
+.TH "NPM\-SCRIPTS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "December 2011" "" ""
+.TH "NPM\-SEARCH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEMVER" "1" "December 2011" "" ""
+.TH "NPM\-SEMVER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-semver\fR \-\- The semantic versioner for npm
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STAR" "1" "December 2011" "" ""
+.TH "NPM\-STAR" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "December 2011" "" ""
+.TH "NPM\-START" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "December 2011" "" ""
+.TH "NPM\-STOP" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "December 2011" "" ""
+.TH "NPM\-SUBMODULE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "1" "December 2011" "" ""
+.TH "NPM\-TAG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "December 2011" "" ""
+.TH "NPM\-TEST" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "December 2011" "" ""
+.TH "NPM\-RM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "December 2011" "" ""
+.TH "NPM\-UNPUBLISH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "1" "December 2011" "" ""
+.TH "NPM\-UPDATE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "December 2011" "" ""
+.TH "NPM\-VERSION" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "1" "December 2011" "" ""
+.TH "NPM\-VIEW" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "December 2011" "" ""
+.TH "NPM\-WHOAMI" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "December 2011" "" ""
+.TH "NPM\-BIN" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "3" "December 2011" "" ""
+.TH "NPM\-BUGS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMMANDS" "3" "December 2011" "" ""
+.TH "NPM\-COMMANDS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "December 2011" "" ""
+.TH "NPM\-CONFIG" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "3" "December 2011" "" ""
+.TH "NPM\-DEPRECATE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "3" "December 2011" "" ""
+.TH "NPM\-DOCS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "3" "December 2011" "" ""
+.TH "NPM\-EDIT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "3" "December 2011" "" ""
+.TH "NPM\-EXPLORE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "3" "December 2011" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "INIT" "3" "December 2011" "" ""
+.TH "INIT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "3" "December 2011" "" ""
+.TH "NPM\-INSTALL" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "3" "December 2011" "" ""
+.TH "NPM\-LINK" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LOAD" "3" "December 2011" "" ""
+.TH "NPM\-LOAD" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "December 2011" "" ""
+.TH "NPM\-LS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "December 2011" "" ""
+.TH "NPM" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.0-beta-7
+1.1.0-beta-10
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "December 2011" "" ""
+.TH "NPM\-OUTDATED" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "3" "December 2011" "" ""
+.TH "NPM\-OWNER" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "December 2011" "" ""
+.TH "NPM\-PACK" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "3" "December 2011" "" ""
+.TH "NPM\-PREFIX" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "December 2011" "" ""
+.TH "NPM\-PRUNE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "December 2011" "" ""
+.TH "NPM\-PUBLISH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "December 2011" "" ""
+.TH "NPM\-REBUILD" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "December 2011" "" ""
+.TH "NPM\-RESTART" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "December 2011" "" ""
+.TH "NPM\-ROOT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "3" "December 2011" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "3" "December 2011" "" ""
+.TH "NPM\-SEARCH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "3" "December 2011" "" ""
+.TH "NPM\-START" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "December 2011" "" ""
+.TH "NPM\-STOP" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "December 2011" "" ""
+.TH "NPM\-SUBMODULE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "3" "December 2011" "" ""
+.TH "NPM\-TAG" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "3" "December 2011" "" ""
+.TH "NPM\-TEST" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "December 2011" "" ""
+.TH "NPM\-UNINSTALL" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "3" "December 2011" "" ""
+.TH "NPM\-UNPUBLISH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "3" "December 2011" "" ""
+.TH "NPM\-UPDATE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "December 2011" "" ""
+.TH "NPM\-VERSION" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "3" "December 2011" "" ""
+.TH "NPM\-VIEW" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "December 2011" "" ""
+.TH "NPM\-WHOAMI" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
throw new Error("Non-link type "+ props.type)
}
+ if (props.linkpath === "") props.linkpath = "."
if (!props.linkpath) {
me.error("Need linkpath property to create " + props.type)
}
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "fstream",
"description": "Advanced file system stream things",
- "version": "0.1.10",
+ "version": "0.1.11",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
break
case "Link":
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
- wprops.linkpath = path.relative(root, lp)
+ wprops.linkpath = path.relative(root, lp) || "."
wprops.size = 0
break
case "SymbolicLink":
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
- wprops.linkpath = path.relative(path.dirname(entry.path), lp)
+ wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "."
wprops.size = 0
break
}
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "tar",
"description": "tar for node",
- "version": "0.1.9",
+ "version": "0.1.10",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
, "publishConfig": { "tag": "alpha", "proprietary-attribs": false }
, "description": "A package manager for node"
, "keywords": [ "package manager", "modules", "install", "package.json" ]
-, "version": "1.1.0-beta-7"
+, "version": "1.1.0-beta-10"
, "preferGlobal": true
, "config": { "publishtest": false }
, "homepage": "http://npmjs.org/"
clean="no"
fi
+node_version=`"$node" --version 2>&1`
+ret=$?
+if [ $ret -ne 0 ]; then
+ echo "You need node to run this program." >&2
+ echo "node --version reports: $node_version" >&2
+ echo "with exit code = $ret" >&2
+ echo "Please install node before continuing." >&2
+ exit $ret
+fi
+
t="${npm_install}"
if [ -z "$t" ]; then
- t="latest"
+ # switch based on node version.
+ # note that we can only use strict sh-compatible patterns here.
+ case $node_version in
+ 0.[0123].* | v0.[0123].*)
+ echo "You are using an outdated and unsupported version of" >&2
+ echo "node ($node_version). Please update node and try again." >&2
+ exit 99
+ ;;
+ v0.[45].* | 0.[45].*)
+ echo "install npm@1.0"
+ t=1.0
+ ;;
+ v0.[678].* | 0.[678].*)
+ echo "install npm@1.1"
+ t=1.1
+ ;;
+ *)
+ echo "install npm@latest"
+ t="latest"
+ ;;
+ esac
fi
# the npmca cert
| $tar -xzf - \
&& rm "$cacert" \
&& cd "$TMP"/* \
- && (node_version=`"$node" --version 2>&1`
- ret=$?
- if [ $ret -eq 0 ]; then
- req=`"$node" bin/read-package-json.js package.json engines.node`
- if [ -d node_modules ]; then
- "$node" node_modules/semver/bin/semver -v "$node_version" -r "$req"
- ret=$?
- else
- "$node" bin/semver.js -v "$node_version" -r "$req"
- ret=$?
- fi
+ && (req=`"$node" bin/read-package-json.js package.json engines.node`
+ if [ -d node_modules ]; then
+ "$node" node_modules/semver/bin/semver -v "$node_version" -r "$req"
+ ret=$?
+ else
+ "$node" bin/semver.js -v "$node_version" -r "$req"
+ ret=$?
fi
if [ $ret -ne 0 ]; then
echo "You need node $req to run this program." >&2
echo "node --version reports: $node_version" >&2
- echo "Please upgrade node before continuing."
+ echo "Please upgrade node before continuing." >&2
exit $ret
fi) \
&& (ver=`"$node" bin/read-package-json.js package.json version`
--- /dev/null
+#!/bin/bash
+
+# script for creating a zip and tarball for inclusion in node
+
+unset CDPATH
+
+set -e
+
+rm -rf release *.tgz || true
+mkdir release
+npm pack --loglevel error >/dev/null
+mv *.tgz release
+cd release
+tar xzf *.tgz
+
+# remove some unnecessary stuff.
+rm -rf package/node_modules/*/{test,bench,example}*
+rm -rf package/test/{disabled,output,bin,root}*
+
+mkdir node_modules
+mv package node_modules/npm
+
+# make the zip for windows users
+cp node_modules/npm/bin/*.cmd .
+zipname=npm-$(npm -v).zip
+zip -q -9 -r -X "$zipname" *.cmd node_modules
+
+# make the tar for node's deps
+cd node_modules
+tarname=npm-$(npm -v).tgz
+tar czf "$tarname" npm
+
+cd ..
+mv "node_modules/$tarname" .
+
+rm -rf *.cmd
+rm -rf node_modules
+
+echo "release/$tarname"
+echo "release/$zipname"
// special: replace 'node' with the current execPath,
// and 'npm' with the thing we installed.
+ var cmdShow = cmd
cmd = cmd.replace(/^npm /, path.resolve(npmPath, "npm") + " ")
cmd = cmd.replace(/^node /, process.execPath + " ")
execCount ++
if (!shouldFail && !er || shouldFail && er) {
// stdout = (""+stdout).trim()
- console.log("ok " + execCount + " " + cmd)
+ console.log("ok " + execCount + " " + cmdShow)
return cb()
} else {
- console.log("not ok " + execCount + " " + cmd)
- cb(new Error("failed "+cmd))
+ console.log("not ok " + execCount + " " + cmdShow)
+ cb(new Error("failed "+cmdShow))
}
})
}