Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
npm@1.1.0-beta-10
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 5, 2012
1 parent 760928b commit 78dbb4b
Show file tree
Hide file tree
Showing 204 changed files with 835 additions and 326 deletions.
17 changes: 14 additions & 3 deletions deps/npm/Makefile
Expand Up @@ -108,18 +108,29 @@ version: link
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
84 changes: 84 additions & 0 deletions deps/npm/doc/cli/disputes.md
@@ -0,0 +1,84 @@
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)
66 changes: 47 additions & 19 deletions deps/npm/doc/cli/faq.md
Expand Up @@ -32,35 +32,65 @@ tl;dr:
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?

Expand All @@ -73,7 +103,7 @@ acronym, and thus incorrectly named.)
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/>.

Expand Down Expand Up @@ -186,11 +216,9 @@ Go to <http://admin.npmjs.org/reset>.
## 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.

Expand Down
4 changes: 4 additions & 0 deletions deps/npm/doc/cli/index.md
Expand Up @@ -54,6 +54,10 @@ npm-index(1) -- Index of all npm documentation

Developer Guide

## npm-disputes(1)

Handling Module Name Disputes

## npm-docs(1)

Docs for a package in a web browser maybe
Expand Down
1 change: 1 addition & 0 deletions deps/npm/doc/cli/owner.md
Expand Up @@ -30,3 +30,4 @@ that is not implemented at this time.
* npm-publish(1)
* npm-registry(1)
* npm-adduser(1)
* npm-disputes(1)
1 change: 1 addition & 0 deletions deps/npm/doc/cli/registry.md
Expand Up @@ -90,3 +90,4 @@ Stay tuned!

* npm-config(1)
* npm-developers(1)
* npm-disputes(1)
2 changes: 1 addition & 1 deletion deps/npm/html/api/bin.html
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.1.0-beta-7</p>
<p id="footer">bin &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/bugs.html
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.1.0-beta-7</p>
<p id="footer">bugs &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/commands.html
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.1.0-beta-7</p>
<p id="footer">commands &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/config.html
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.1.0-beta-7</p>
<p id="footer">config &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/deprecate.html
Expand Up @@ -30,7 +30,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.1.0-beta-7</p>
<p id="footer">deprecate &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/docs.html
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.1.0-beta-7</p>
<p id="footer">docs &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/edit.html
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.1.0-beta-7</p>
<p id="footer">edit &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/explore.html
Expand Up @@ -24,7 +24,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>

<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 &mdash; npm@1.1.0-beta-7</p>
<p id="footer">explore &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/help-search.html
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.1.0-beta-7</p>
<p id="footer">help-search &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/init.html
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.1.0-beta-7</p>
<p id="footer">init &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/install.html
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<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 &mdash; npm@1.1.0-beta-7</p>
<p id="footer">install &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/link.html
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.1.0-beta-7</p>
<p id="footer">link &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/load.html
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.1.0-beta-7</p>
<p id="footer">load &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/ls.html
Expand Up @@ -53,7 +53,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.1.0-beta-7</p>
<p id="footer">ls &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/html/api/npm.html
Expand Up @@ -24,7 +24,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2>

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

<p>1.1.0-beta-7</p>
<p>1.1.0-beta-10</p>

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

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

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

<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
<p id="footer">outdated &mdash; npm@1.1.0-beta-7</p>
<p id="footer">outdated &mdash; npm@1.1.0-beta-10</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down

0 comments on commit 78dbb4b

Please sign in to comment.