Skip to content

Commit

Permalink
npm: Upgrade to 1.2.32
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 18, 2013
1 parent 18574bf commit 9195455
Show file tree
Hide file tree
Showing 148 changed files with 1,962 additions and 300 deletions.
7 changes: 4 additions & 3 deletions deps/npm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ test:
node cli.js test

publish: link doc
@git push origin :v$(shell npm -v) || true
@npm unpublish npm@$(shell npm -v) || true
git clean -fd
@git push origin :v$(shell npm -v) 2>&1 || true
@npm unpublish npm@$(shell npm -v) 2>&1 || true
git clean -fd &&\
git push origin &&\
git push origin --tags &&\
npm publish &&\
npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
Expand Down
149 changes: 94 additions & 55 deletions deps/npm/doc/cli/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,52 +72,6 @@ Write your own package manager, then. It's not that hard.

npm will not help you do something that is known to be a bad idea.

## `"node_modules"` is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder?

No. This will never happen. This question comes up sometimes,
because it seems silly from the outside that npm couldn't just be
configured to put stuff somewhere else, and then npm could load them
from there. It's an arbitrary spelling choice, right? What's the big
deal?

At the time of this writing, the string `'node_modules'` appears 151
times in 53 separate files in npm and node core (excluding tests and
documentation).

Some of these references are in node's built-in module loader. Since
npm is not involved **at all** at run-time, node itself would have to
be configured to know where you've decided to stick stuff. Complexity
hurdle #1. Since the Node module system is locked, this cannot be
changed, and is enough to kill this request. But I'll continue, in
deference to your deity's delicate feelings regarding spelling.

Many of the others are in dependencies that npm uses, which are not
necessarily tightly coupled to npm (in the sense that they do not read
npm's configuration files, etc.) Each of these would have to be
configured to take the name of the `node_modules` folder as a
parameter. Complexity hurdle #2.

Furthermore, npm has the ability to "bundle" dependencies by adding
the dep names to the `"bundledDependencies"` list in package.json,
which causes the folder to be included in the package tarball. What
if the author of a module bundles its dependencies, and they use a
different spelling for `node_modules`? npm would have to rename the
folder at publish time, and then be smart enough to unpack it using
your locally configured name. Complexity hurdle #3.

Furthermore, what happens when you *change* this name? Fine, it's
easy enough the first time, just rename the `node_modules` folders to
`./blergyblerp/` or whatever name you choose. But what about when you
change it again? npm doesn't currently track any state about past
configuration settings, so this would be rather difficult to do
properly. It would have to track every previous value for this
config, and always accept any of them, or else yesterday's install may
be broken tomorrow. Complexity hurdle #5.

Never going to happen. The folder is named `node_modules`. It is
written indelibly in the Node Way, handed down from the ancient times
of Node 0.3.

## Should I check my `node_modules` folder into git?

Mikeal Rogers answered this question very well:
Expand Down Expand Up @@ -219,6 +173,96 @@ Git urls can be of the form:
The `commit-ish` can be any tag, sha, or branch which can be supplied as
an argument to `git checkout`. The default is `master`.

## What is a `module`?

A module is anything that can be loaded with `require()` in a Node.js
program. The following things are all examples of things that can be
loaded as modules:

* A folder with a `package.json` file containing a `main` field.
* A folder with an `index.js` file in it.
* A JavaScript file.

Most npm packages are modules, because they are libraries that you
load with `require`. However, there's no requirement that an npm
package be a module! Some only contain an executable command-line
interface, and don't provide a `main` field for use in Node programs.

Almost all npm packages (at least, those that are Node programs)
*contain* many modules within them (because every file they load with
`require()` is a module).

In the context of a Node program, the `module` is also the thing that
was loaded *from* a file. For example, in the following program:

var req = require('request')

we might say that "The variable `req` refers to the `request` module".

## So, why is it the "`node_modules`" folder, but "`package.json`" file? Why not `node_packages` or `module.json`?

The `package.json` file defines the package. (See "What is a
package?" above.)

The `node_modules` folder is the place Node.js looks for modules.
(See "What is a module?" above.)

For example, if you create a file at `node_modules/foo.js` and then
had a program that did `var f = require('foo.js')` then it would load
the module. However, `foo.js` is not a "package" in this case,
because it does not have a package.json.

Alternatively, if you create a package which does not have an
`index.js` or a `"main"` field in the `package.json` file, then it is
not a module. Even if it's installed in `node_modules`, it can't be
an argument to `require()`.

## `"node_modules"` is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder?

No. This will never happen. This question comes up sometimes,
because it seems silly from the outside that npm couldn't just be
configured to put stuff somewhere else, and then npm could load them
from there. It's an arbitrary spelling choice, right? What's the big
deal?

At the time of this writing, the string `'node_modules'` appears 151
times in 53 separate files in npm and node core (excluding tests and
documentation).

Some of these references are in node's built-in module loader. Since
npm is not involved **at all** at run-time, node itself would have to
be configured to know where you've decided to stick stuff. Complexity
hurdle #1. Since the Node module system is locked, this cannot be
changed, and is enough to kill this request. But I'll continue, in
deference to your deity's delicate feelings regarding spelling.

Many of the others are in dependencies that npm uses, which are not
necessarily tightly coupled to npm (in the sense that they do not read
npm's configuration files, etc.) Each of these would have to be
configured to take the name of the `node_modules` folder as a
parameter. Complexity hurdle #2.

Furthermore, npm has the ability to "bundle" dependencies by adding
the dep names to the `"bundledDependencies"` list in package.json,
which causes the folder to be included in the package tarball. What
if the author of a module bundles its dependencies, and they use a
different spelling for `node_modules`? npm would have to rename the
folder at publish time, and then be smart enough to unpack it using
your locally configured name. Complexity hurdle #3.

Furthermore, what happens when you *change* this name? Fine, it's
easy enough the first time, just rename the `node_modules` folders to
`./blergyblerp/` or whatever name you choose. But what about when you
change it again? npm doesn't currently track any state about past
configuration settings, so this would be rather difficult to do
properly. It would have to track every previous value for this
config, and always accept any of them, or else yesterday's install may
be broken tomorrow. Complexity hurdle #5.

Never going to happen. The folder is named `node_modules`. It is
written indelibly in the Node Way, handed down from the ancient times
of Node 0.3.

## How do I install node with npm?

You don't. Try one of these node version managers:
Expand Down Expand Up @@ -257,11 +301,6 @@ See `npm-link(1)`

See `npm-registry(1)`.

## What's up with the insecure channel warnings?

Until node 0.4.10, there were problems sending big files over HTTPS. That
means that publishes go over HTTP by default in those versions of node.

## I forgot my password, and can't publish. How do I reset it?

Go to <https://npmjs.org/forgot>.
Expand All @@ -274,8 +313,9 @@ To check if the registry is down, open up <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.

If the registry IS down, let me know by emailing or posting an issue.
We'll have someone kick it or something.
If the registry IS down, let me know by emailing <i@izs.me> or posting
an issue at <https://github.com/isaacs/npm/issues>. We'll have
someone kick it or something.

## Why no namespaces?

Expand All @@ -295,9 +335,8 @@ There is not sufficient need to impose namespace rules on everyone.

## I have a question or request not addressed here. Where should I put it?

Discuss it on the mailing list, or post an issue.
Post an issue on the github project:

* <npm-@googlegroups.com>
* <https://github.com/isaacs/npm/issues>

## Why does npm hate me?
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/bin.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
<p id="footer">bin &mdash; npm@1.2.30</p>
<p id="footer">bin &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<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 &mdash; npm@1.2.30</p>
<p id="footer">bugs &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
<p id="footer">commands &mdash; npm@1.2.30</p>
<p id="footer">commands &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
<p id="footer">config &mdash; npm@1.2.30</p>
<p id="footer">config &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/deprecate.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.2.30</p>
<p id="footer">deprecate &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<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 &mdash; npm@1.2.30</p>
<p id="footer">docs &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<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 &mdash; npm@1.2.30</p>
<p id="footer">edit &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>The first element in the &#39;args&#39; 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 &mdash; npm@1.2.30</p>
<p id="footer">explore &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/help-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
<p id="footer">help-search &mdash; npm@1.2.30</p>
<p id="footer">help-search &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/init.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<p><a href="../doc/json.html">json(1)</a></p>
</div>
<p id="footer">init &mdash; npm@1.2.30</p>
<p id="footer">init &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>Finally, &#39;callback&#39; 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 &mdash; npm@1.2.30</p>
<p id="footer">install &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<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 &mdash; npm@1.2.30</p>
<p id="footer">link &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/load.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
<p id="footer">load &mdash; npm@1.2.30</p>
<p id="footer">load &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/ls.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h3 id="global">global</h3>
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 &mdash; npm@1.2.30</p>
<p id="footer">ls &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/html/api/npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2>

<h2 id="VERSION">VERSION</h2>

<p>1.2.30</p>
<p>1.2.32</p>

<h2 id="DESCRIPTION">DESCRIPTION</h2>

Expand Down Expand Up @@ -92,7 +92,7 @@ <h2 id="ABBREVS">ABBREVS</h2>

<pre><code>var cmd = npm.deref(&quot;unp&quot;) // cmd === &quot;unpublish&quot;</code></pre>
</div>
<p id="footer">npm &mdash; npm@1.2.30</p>
<p id="footer">npm &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/outdated.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>If the &#39;packages&#39; parameter is left out, npm will check all packages.</p>
</div>
<p id="footer">outdated &mdash; npm@1.2.30</p>
<p id="footer">outdated &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/owner.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.2.30</p>
<p id="footer">owner &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/pack.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
<p id="footer">pack &mdash; npm@1.2.30</p>
<p id="footer">pack &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/prefix.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>This function is not useful programmatically</p>
</div>
<p id="footer">prefix &mdash; npm@1.2.30</p>
<p id="footer">prefix &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/prune.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>Extraneous packages are packages that are not listed on the parent
package&#39;s dependencies list.</p>
</div>
<p id="footer">prune &mdash; npm@1.2.30</p>
<p id="footer">prune &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.2.30</p>
<p id="footer">publish &mdash; npm@1.2.32</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
Loading

0 comments on commit 9195455

Please sign in to comment.