## Fancy Windows Install
-You can download a zip file from <http://npmjs.org/dist/>, and unpack it
+You can download a zip file from <https://npmjs.org/dist/>, and unpack it
in the same folder where node.exe lives.
If that's not fancy enough for you, then you can fetch the code with
## More Docs
-Check out the [docs](http://npmjs.org/doc/),
-especially the [faq](http://npmjs.org/doc/faq.html).
+Check out the [docs](https://npmjs.org/doc/),
+especially the [faq](https://npmjs.org/doc/faq.html).
You can use the `npm help` command to read any of them.
If you're a developer, and you want to use npm to publish your program,
-you should [read this](http://npmjs.org/doc/developers.html)
+you should [read this](https://npmjs.org/doc/developers.html)
## Legal Stuff
When you find issues, please report them:
* web:
- <http://github.com/isaacs/npm/issues>
+ <https://github.com/isaacs/npm/issues>
* email:
<npm-@googlegroups.com>
* `-reg`: `--registry`
* `-v`: `--version`
* `-f`: `--force`
-* `-l`: `--long`
* `-desc`: `--description`
* `-S`: `--save`
* `-D`: `--save-dev`
## Where can I find these docs in HTML?
-<http://npmjs.org/doc/>, or run:
+<https://npmjs.org/doc/>, or run:
npm config set viewer browser
In those cases, you can do this:
- curl http://npmjs.org/install.sh | sh
+ curl https://npmjs.org/install.sh | sh
## What is a `package`?
You don't. Try one of these:
-* <http://github.com/isaacs/nave>
-* <http://github.com/visionmedia/n>
-* <http://github.com/creationix/nvm>
+* <https://github.com/isaacs/nave>
+* <https://github.com/visionmedia/n>
+* <https://github.com/creationix/nvm>
## How can I use npm for development?
Discuss it on the mailing list, or post an issue.
* <npm-@googlegroups.com>
-* <http://github.com/isaacs/npm/issues>
+* <https://github.com/isaacs/npm/issues>
## Why does npm hate me?
<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.62</p>
+<p id="footer">bin — npm@1.1.63</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.62</p>
+<p id="footer">bugs — npm@1.1.63</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.62</p>
+<p id="footer">commands — npm@1.1.63</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.62</p>
+<p id="footer">config — npm@1.1.63</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.62</p>
+<p id="footer">deprecate — npm@1.1.63</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.62</p>
+<p id="footer">docs — npm@1.1.63</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.62</p>
+<p id="footer">edit — npm@1.1.63</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.62</p>
+<p id="footer">explore — npm@1.1.63</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.62</p>
+<p id="footer">help-search — npm@1.1.63</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.62</p>
+<p id="footer">init — npm@1.1.63</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.62</p>
+<p id="footer">install — npm@1.1.63</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.62</p>
+<p id="footer">link — npm@1.1.63</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.62</p>
+<p id="footer">load — npm@1.1.63</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.62</p>
+<p id="footer">ls — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.62</p>
+<p>1.1.63</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.62</p>
+<p id="footer">npm — npm@1.1.63</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.62</p>
+<p id="footer">outdated — npm@1.1.63</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.62</p>
+<p id="footer">owner — npm@1.1.63</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.62</p>
+<p id="footer">pack — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix — npm@1.1.62</p>
+<p id="footer">prefix — npm@1.1.63</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.62</p>
+<p id="footer">prune — npm@1.1.63</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.62</p>
+<p id="footer">publish — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild — npm@1.1.62</p>
+<p id="footer">rebuild — npm@1.1.63</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.62</p>
+<p id="footer">restart — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root — npm@1.1.62</p>
+<p id="footer">root — npm@1.1.63</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.62</p>
+<p id="footer">run-script — npm@1.1.63</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.62</p>
+<p id="footer">search — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">shrinkwrap — npm@1.1.62</p>
+<p id="footer">shrinkwrap — npm@1.1.63</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.62</p>
+<p id="footer">start — npm@1.1.63</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.62</p>
+<p id="footer">stop — npm@1.1.63</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.62</p>
+<p id="footer">submodule — npm@1.1.63</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.62</p>
+<p id="footer">tag — npm@1.1.63</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.62</p>
+<p id="footer">test — npm@1.1.63</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.62</p>
+<p id="footer">uninstall — npm@1.1.63</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.62</p>
+<p id="footer">unpublish — npm@1.1.63</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.62</p>
+<p id="footer">update — npm@1.1.63</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.62</p>
+<p id="footer">version — npm@1.1.63</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.62</p>
+<p id="footer">view — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami — npm@1.1.62</p>
+<p id="footer">whoami — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="Fancy-Windows-Install">Fancy Windows Install</h2>
-<p>You can download a zip file from <a href="http://npmjs.org/dist/">http://npmjs.org/dist/</a>, and unpack it
+<p>You can download a zip file from <a href="https://npmjs.org/dist/">https://npmjs.org/dist/</a>, and unpack it
in the same folder where node.exe lives.</p>
<p>If that's not fancy enough for you, then you can fetch the code with
<h2 id="More-Docs">More Docs</h2>
-<p>Check out the <a href="http://npmjs.org/doc/">docs</a>,
-especially the <a href="http://npmjs.org/doc/faq.html">faq</a>.</p>
+<p>Check out the <a href="https://npmjs.org/doc/">docs</a>,
+especially the <a href="https://npmjs.org/doc/faq.html">faq</a>.</p>
<p>You can use the <code>npm help</code> command to read any of them.</p>
<p>If you're a developer, and you want to use npm to publish your program,
-you should <a href="http://npmjs.org/doc/developers.html">read this</a></p>
+you should <a href="https://npmjs.org/doc/developers.html">read this</a></p>
<h2 id="Legal-Stuff">Legal Stuff</h2>
<p>When you find issues, please report them:</p>
<ul><li>web:
-<a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li>email:
+<a href="https://github.com/isaacs/npm/issues">https://github.com/isaacs/npm/issues</a></li><li>email:
<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn't work
<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.62</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.63</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.62</p>
+<p id="footer">adduser — npm@1.1.63</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.62</p>
+<p id="footer">bin — npm@1.1.63</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.62</p>
+<p id="footer">bugs — npm@1.1.63</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.62</p>
+<p id="footer">build — npm@1.1.63</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.62</p>
+<p id="footer">bundle — npm@1.1.63</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.62</p>
+<p id="footer">cache — npm@1.1.63</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.62</p>
+<p id="footer">changelog — npm@1.1.63</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.62</p>
+<p id="footer">coding-style — npm@1.1.63</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.62</p>
+<p id="footer">completion — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The following shorthands are parsed on the command-line:</p>
-<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-D</code>: <code>--save-dev</code></li><li><code>-O</code>: <code>--save-optional</code></li><li><code>-B</code>: <code>--save-bundle</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
+<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-D</code>: <code>--save-dev</code></li><li><code>-O</code>: <code>--save-optional</code></li><li><code>-B</code>: <code>--save-bundle</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
<p>If the specified configuration param resolves unambiguously to a known
configuration parameter, then it is expanded to that configuration
<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.62</p>
+<p id="footer">config — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">dedupe — npm@1.1.62</p>
+<p id="footer">dedupe — npm@1.1.63</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.62</p>
+<p id="footer">deprecate — npm@1.1.63</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.62</p>
+<p id="footer">developers — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<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.62</p>
+<p id="footer">disputes — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<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.62</p>
+<p id="footer">docs — npm@1.1.63</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.62</p>
+<p id="footer">edit — npm@1.1.63</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.62</p>
+<p id="footer">explore — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="Where-can-I-find-these-docs-in-HTML">Where can I find these docs in HTML?</h2>
-<p><a href="http://npmjs.org/doc/">http://npmjs.org/doc/</a>, or run:</p>
+<p><a href="https://npmjs.org/doc/">https://npmjs.org/doc/</a>, or run:</p>
<pre><code>npm config set viewer browser</code></pre>
<p>In those cases, you can do this:</p>
-<pre><code>curl http://npmjs.org/install.sh | sh</code></pre>
+<pre><code>curl https://npmjs.org/install.sh | sh</code></pre>
<h2 id="What-is-a-package">What is a <code>package</code>?</h2>
<p>You don't. Try one of these:</p>
-<ul><li><a href="http://github.com/isaacs/nave">http://github.com/isaacs/nave</a></li><li><a href="http://github.com/visionmedia/n">http://github.com/visionmedia/n</a></li><li><a href="http://github.com/creationix/nvm">http://github.com/creationix/nvm</a></li></ul>
+<ul><li><a href="https://github.com/isaacs/nave">https://github.com/isaacs/nave</a></li><li><a href="https://github.com/visionmedia/n">https://github.com/visionmedia/n</a></li><li><a href="https://github.com/creationix/nvm">https://github.com/creationix/nvm</a></li></ul>
<h2 id="How-can-I-use-npm-for-development">How can I use npm for development?</h2>
<p>Discuss it on the mailing list, or post an issue.</p>
-<ul><li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li><li><a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li></ul>
+<ul><li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li><li><a href="https://github.com/isaacs/npm/issues">https://github.com/isaacs/npm/issues</a></li></ul>
<h2 id="Why-does-npm-hate-me">Why does npm hate me?</h2>
<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.62</p>
+<p id="footer">faq — npm@1.1.63</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.62</p>
+<p id="footer">folders — npm@1.1.63</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.62</p>
+<p id="footer">help-search — npm@1.1.63</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.62</p>
+<p id="footer">help — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p> Display npm username</p>
</div>
-<p id="footer">index — npm@1.1.62</p>
+<p id="footer">index — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><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.62</p>
+<p id="footer">init — npm@1.1.63</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><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">install — npm@1.1.62</p>
+<p id="footer">install — npm@1.1.63</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.62</p>
+<p id="footer">json — npm@1.1.63</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.62</p>
+<p id="footer">link — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre><code>npm@1.1.62 /path/to/npm
+<pre><code>npm@1.1.63 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
<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">ls — npm@1.1.62</p>
+<p id="footer">ls — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.62</p>
+<p>1.1.63</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.62</p>
+<p id="footer">npm — npm@1.1.63</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.62</p>
+<p id="footer">outdated — npm@1.1.63</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/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.62</p>
+<p id="footer">owner — npm@1.1.63</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.62</p>
+<p id="footer">pack — npm@1.1.63</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.62</p>
+<p id="footer">prefix — npm@1.1.63</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.62</p>
+<p id="footer">prune — npm@1.1.63</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.62</p>
+<p id="footer">publish — npm@1.1.63</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.62</p>
+<p id="footer">rebuild — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<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.62</p>
+<p id="footer">registry — npm@1.1.63</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.62</p>
+<p id="footer">removing-npm — npm@1.1.63</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.62</p>
+<p id="footer">restart — npm@1.1.63</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.62</p>
+<p id="footer">root — npm@1.1.63</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.62</p>
+<p id="footer">run-script — npm@1.1.63</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.62</p>
+<p id="footer">scripts — npm@1.1.63</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.62</p>
+<p id="footer">search — npm@1.1.63</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.62</p>
+<p id="footer">semver — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap — npm@1.1.62</p>
+<p id="footer">shrinkwrap — npm@1.1.63</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.62</p>
+<p id="footer">star — npm@1.1.63</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.62</p>
+<p id="footer">start — npm@1.1.63</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.62</p>
+<p id="footer">stop — npm@1.1.63</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.62</p>
+<p id="footer">submodule — npm@1.1.63</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.62</p>
+<p id="footer">tag — npm@1.1.63</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.62</p>
+<p id="footer">test — npm@1.1.63</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.62</p>
+<p id="footer">uninstall — npm@1.1.63</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.62</p>
+<p id="footer">unpublish — npm@1.1.63</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.62</p>
+<p id="footer">update — npm@1.1.63</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.62</p>
+<p id="footer">version — npm@1.1.63</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.62</p>
+<p id="footer">view — npm@1.1.63</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.62</p>
+<p id="footer">whoami — npm@1.1.63</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ol>
<li><a href="https://github.com/isaacs/npm">Get the code.</a>
- <li>Do what <a href="http://npmjs.org/doc/README.html">the README</a>
+ <li>Do what <a href="https://npmjs.org/doc/README.html">the README</a>
says to do.
</ol>
<p>There's a pretty thorough install script at
-<a href="http://npmjs.org/install.sh">http://npmjs.org/install.sh</a></p>
+<a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a></p>
<p>For maximum security, make sure to thorougly inspect every
program that you run on your computer!</p>
<h2>Other Cool Stuff</h2>
<ul>
- <li><a href="http://npmjs.org/doc/README.html">README</a>
+ <li><a href="https://npmjs.org/doc/README.html">README</a>
<li><a href="doc/">Help Documentation</a>
<li><a href="doc/faq.html">FAQ</a>
- <li><a href="http://search.npmjs.org/">Search for Packages</a>
- <li><a href="http://groups.google.com/group/npm-">Mailing List</a>
+ <li><a href="https://search.npmjs.org/">Search for Packages</a>
+ <li><a href="https://groups.google.com/group/npm-">Mailing List</a>
<li><a href="https://github.com/isaacs/npm/issues">Bugs</a>
</ul>
, "ll" : "ls"
, "ln" : "link"
, "i" : "install"
+ , "isntall" : "install"
, "up" : "update"
, "c" : "config"
, "info" : "view"
var registry = npm.registry
if (data.publishConfig) {
var pubConf = new Conf(npm.config)
- pubConf.unshift(data.publishConfig)
+
+ // don't modify the actual publishConfig object, in case we have
+ // to set a login token or some other data.
+ pubConf.unshift(Object.keys(data.publishConfig).reduce(function (s, k) {
+ s[k] = data.publishConfig[k]
+ return s
+ }, {}))
registry = new RegClient(pubConf)
}
fields.forEach(function (f) {
var d = cleanup(data[v][f])
if (showVersions || showFields || typeof d !== "string") {
- d = util.inspect(cleanup(data[v][f]), false, 5, npm.color)
+ d = cleanup(data[v][f])
+ d = npm.config.get("json")
+ ? JSON.stringify(d, null, 2)
+ : util.inspect(d, false, 5, npm.color)
+ } else if (typeof d === "string" && npm.config.get("json")) {
+ d = JSON.stringify(d)
}
if (f && showFields) f += " = "
if (d.indexOf("\n") !== -1) d = "\n" + d
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "September 2012" "" ""
+.TH "NPM" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
for testing, or running stuff without actually installing npm itself\.)
.
.SH "Fancy Windows Install"
-You can download a zip file from \fIhttp://npmjs\.org/dist/\fR, and unpack it
+You can download a zip file from \fIhttps://npmjs\.org/dist/\fR, and unpack it
in the same folder where node\.exe lives\.
.
.P
help config\fR to learn about all the options you can set there\.
.
.SH "More Docs"
-Check out the docs \fIhttp://npmjs\.org/doc/\fR,
-especially the faq \fIhttp://npmjs\.org/doc/faq\.html\fR\|\.
+Check out the docs \fIhttps://npmjs\.org/doc/\fR,
+especially the faq \fIhttps://npmjs\.org/doc/faq\.html\fR\|\.
.
.P
You can use the \fBnpm help\fR command to read any of them\.
.
.P
If you\'re a developer, and you want to use npm to publish your program,
-you should read this \fIhttp://npmjs\.org/doc/developers\.html\fR
+you should read this \fIhttps://npmjs\.org/doc/developers\.html\fR
.
.SH "Legal Stuff"
"npm" and "the npm registry" are owned by Isaac Z\. Schlueter\. All
When you find issues, please report them:
.
.IP "\(bu" 4
-web: \fIhttp://github\.com/isaacs/npm/issues\fR
+web: \fIhttps://github\.com/isaacs/npm/issues\fR
.
.IP "\(bu" 4
email: \fInpm\-@googlegroups\.com\fR
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "September 2012" "" ""
+.TH "NPM\-ADDUSER" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "1" "September 2012" "" ""
+.TH "NPM\-BIN" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "1" "September 2012" "" ""
+.TH "NPM\-BUGS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUILD" "1" "September 2012" "" ""
+.TH "NPM\-BUILD" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "September 2012" "" ""
+.TH "NPM\-BUNDLE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "September 2012" "" ""
+.TH "NPM\-CACHE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CHANGELOG" "1" "September 2012" "" ""
+.TH "NPM\-CHANGELOG" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-changelog\fR \-\- Changes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "1" "September 2012" "" ""
+.TH "NPM\-CODING\-STYLE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "September 2012" "" ""
+.TH "NPM\-COMPLETION" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "1" "September 2012" "" ""
+.TH "NPM\-CONFIG" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration file
\fB\-f\fR: \fB\-\-force\fR
.
.IP "\(bu" 4
-\fB\-l\fR: \fB\-\-long\fR
-.
-.IP "\(bu" 4
\fB\-desc\fR: \fB\-\-description\fR
.
.IP "\(bu" 4
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEDUPE" "1" "September 2012" "" ""
+.TH "NPM\-DEDUPE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-dedupe\fR \-\- Reduce duplication
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "September 2012" "" ""
+.TH "NPM\-DEPRECATE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "1" "September 2012" "" ""
+.TH "NPM\-DEVELOPERS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DISPUTES" "1" "September 2012" "" ""
+.TH "NPM\-DISPUTES" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-disputes\fR \-\- Handling Module Name Disputes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "1" "September 2012" "" ""
+.TH "NPM\-DOCS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "1" "September 2012" "" ""
+.TH "NPM\-EDIT" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "1" "September 2012" "" ""
+.TH "NPM\-EXPLORE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "1" "September 2012" "" ""
+.TH "NPM\-FAQ" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
.
.SH "Where can I find these docs in HTML?"
-\fIhttp://npmjs\.org/doc/\fR, or run:
+\fIhttps://npmjs\.org/doc/\fR, or run:
.
.IP "" 4
.
.IP "" 4
.
.nf
-curl http://npmjs\.org/install\.sh | sh
+curl https://npmjs\.org/install\.sh | sh
.
.fi
.
You don\'t\. Try one of these:
.
.IP "\(bu" 4
-\fIhttp://github\.com/isaacs/nave\fR
+\fIhttps://github\.com/isaacs/nave\fR
.
.IP "\(bu" 4
-\fIhttp://github\.com/visionmedia/n\fR
+\fIhttps://github\.com/visionmedia/n\fR
.
.IP "\(bu" 4
-\fIhttp://github\.com/creationix/nvm\fR
+\fIhttps://github\.com/creationix/nvm\fR
.
.IP "" 0
.
\fInpm\-@googlegroups\.com\fR
.
.IP "\(bu" 4
-\fIhttp://github\.com/isaacs/npm/issues\fR
+\fIhttps://github\.com/isaacs/npm/issues\fR
.
.IP "" 0
.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "September 2012" "" ""
+.TH "NPM\-FOLDERS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "September 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP" "1" "September 2012" "" ""
+.TH "NPM\-HELP" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "1" "September 2012" "" ""
+.TH "NPM\-INDEX" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "September 2012" "" ""
+.TH "NPM\-INIT" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "1" "September 2012" "" ""
+.TH "NPM\-INSTALL" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-JSON" "1" "September 2012" "" ""
+.TH "NPM\-JSON" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "September 2012" "" ""
+.TH "NPM\-LINK" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "1" "September 2012" "" ""
+.TH "NPM\-LS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.IP "" 4
.
.nf
-npm@1.1.62 /path/to/npm
+npm@1.1.63 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "September 2012" "" ""
+.TH "NPM" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.62
+1.1.63
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "1" "September 2012" "" ""
+.TH "NPM\-OUTDATED" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "September 2012" "" ""
+.TH "NPM\-OWNER" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "September 2012" "" ""
+.TH "NPM\-PACK" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "1" "September 2012" "" ""
+.TH "NPM\-PREFIX" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "September 2012" "" ""
+.TH "NPM\-PRUNE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "September 2012" "" ""
+.TH "NPM\-PUBLISH" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "September 2012" "" ""
+.TH "NPM\-REBUILD" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "1" "September 2012" "" ""
+.TH "NPM\-REGISTRY" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "September 2012" "" ""
+.TH "NPM\-REMOVAL" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "September 2012" "" ""
+.TH "NPM\-RESTART" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "September 2012" "" ""
+.TH "NPM\-ROOT" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "1" "September 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "September 2012" "" ""
+.TH "NPM\-SCRIPTS" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "September 2012" "" ""
+.TH "NPM\-SEARCH" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEMVER" "1" "September 2012" "" ""
+.TH "NPM\-SEMVER" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-semver\fR \-\- The semantic versioner for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "1" "September 2012" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- Lock down dependency versions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STAR" "1" "September 2012" "" ""
+.TH "NPM\-STAR" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "September 2012" "" ""
+.TH "NPM\-START" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "September 2012" "" ""
+.TH "NPM\-STOP" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "September 2012" "" ""
+.TH "NPM\-SUBMODULE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "1" "September 2012" "" ""
+.TH "NPM\-TAG" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "September 2012" "" ""
+.TH "NPM\-TEST" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "September 2012" "" ""
+.TH "NPM\-RM" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "September 2012" "" ""
+.TH "NPM\-UNPUBLISH" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "1" "September 2012" "" ""
+.TH "NPM\-UPDATE" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "September 2012" "" ""
+.TH "NPM\-VERSION" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "1" "September 2012" "" ""
+.TH "NPM\-VIEW" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "September 2012" "" ""
+.TH "NPM\-WHOAMI" "1" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "September 2012" "" ""
+.TH "NPM\-BIN" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "3" "September 2012" "" ""
+.TH "NPM\-BUGS" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMMANDS" "3" "September 2012" "" ""
+.TH "NPM\-COMMANDS" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "September 2012" "" ""
+.TH "NPM\-CONFIG" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "3" "September 2012" "" ""
+.TH "NPM\-DEPRECATE" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "3" "September 2012" "" ""
+.TH "NPM\-DOCS" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "3" "September 2012" "" ""
+.TH "NPM\-EDIT" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "3" "September 2012" "" ""
+.TH "NPM\-EXPLORE" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "3" "September 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "INIT" "3" "September 2012" "" ""
+.TH "INIT" "3" "October 2012" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "3" "September 2012" "" ""
+.TH "NPM\-INSTALL" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "3" "September 2012" "" ""
+.TH "NPM\-LINK" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LOAD" "3" "September 2012" "" ""
+.TH "NPM\-LOAD" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "September 2012" "" ""
+.TH "NPM\-LS" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "September 2012" "" ""
+.TH "NPM" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.62
+1.1.63
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "September 2012" "" ""
+.TH "NPM\-OUTDATED" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "3" "September 2012" "" ""
+.TH "NPM\-OWNER" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "September 2012" "" ""
+.TH "NPM\-PACK" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "3" "September 2012" "" ""
+.TH "NPM\-PREFIX" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "September 2012" "" ""
+.TH "NPM\-PRUNE" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "September 2012" "" ""
+.TH "NPM\-PUBLISH" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "September 2012" "" ""
+.TH "NPM\-REBUILD" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "September 2012" "" ""
+.TH "NPM\-RESTART" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "September 2012" "" ""
+.TH "NPM\-ROOT" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "3" "September 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "3" "September 2012" "" ""
+.TH "NPM\-SEARCH" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "3" "September 2012" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- programmatically generate package shrinkwrap file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "3" "September 2012" "" ""
+.TH "NPM\-START" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "September 2012" "" ""
+.TH "NPM\-STOP" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "September 2012" "" ""
+.TH "NPM\-SUBMODULE" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "3" "September 2012" "" ""
+.TH "NPM\-TAG" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "3" "September 2012" "" ""
+.TH "NPM\-TEST" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "September 2012" "" ""
+.TH "NPM\-UNINSTALL" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "3" "September 2012" "" ""
+.TH "NPM\-UNPUBLISH" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "3" "September 2012" "" ""
+.TH "NPM\-UPDATE" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "September 2012" "" ""
+.TH "NPM\-VERSION" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "3" "September 2012" "" ""
+.TH "NPM\-VIEW" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "September 2012" "" ""
+.TH "NPM\-WHOAMI" "3" "October 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
language: node_js
node_js:
- - 0.6
- - 0.7
+ - 0.8
// at *some* point we statted all of these
all = all.map(function (m) {
var sc = this.statCache[m]
- if (!sc) return m
- if (m.slice(-1) !== "/" && (Array.isArray(sc) || sc === 2)) {
+ if (!sc)
+ return m
+ var isDir = (Array.isArray(sc) || sc === 2)
+ if (isDir && m.slice(-1) !== "/") {
return m + "/"
}
- if (m.slice(-1) === "/") {
- return m.replace(/\/$/, "")
+ if (!isDir && m.slice(-1) === "/") {
+ return m.replace(/\/+$/, "")
}
return m
}, this)
},
"name": "glob",
"description": "a little globber",
- "version": "3.1.12",
+ "version": "3.1.13",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
"inherits": "1"
},
"devDependencies": {
- "tap": "~0.2.3",
+ "tap": "~0.3",
"mkdirp": "0",
"rimraf": "1"
},
},
"license": "BSD",
"readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n",
- "_id": "glob@3.1.12",
- "_from": "glob@~3.1.9"
+ "_id": "glob@3.1.13",
+ "_from": "glob@latest"
}
--- /dev/null
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+ glob("a/*", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ t.same(results, [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/',
+ 'a/symlink/' ])
+ t.end()
+ })
+})
+
+test("mark=false, no / on pattern", function (t) {
+ glob("a/*", function (er, results) {
+ if (er)
+ throw er
+ t.same(results, [ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb',
+ 'a/symlink' ])
+ t.end()
+ })
+})
+
+test("mark=true, / on pattern", function (t) {
+ glob("a/*/", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ t.same(results, [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/',
+ 'a/symlink/' ])
+ t.end()
+ })
+})
+
+test("mark=false, / on pattern", function (t) {
+ glob("a/*/", function (er, results) {
+ if (er)
+ throw er
+ t.same(results, [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/',
+ 'a/symlink/' ])
+ t.end()
+ })
+})
, section = null
lines.forEach(function (line, _, __) {
- //line = line
- var rem = line.indexOf(";")
- if (rem !== -1) line = line.substr(0, rem)//.trim()
- if (!line) return
+ if (!line || line.match(/^\s*;/)) return
var match = line.match(re)
if (!match) return
if (match[1] !== undefined) {
|| (val.length > 1
&& val.charAt(0) === "\""
&& val.slice(-1) === "\"")
- || val !== val.trim() ) ? JSON.stringify(val) : val
+ || val !== val.trim() )
+ ? JSON.stringify(val)
+ : val.replace(/;/g, '\\;')
}
-function unsafe (val) {
+function unsafe (val, doUnesc) {
val = (val || "").trim()
if (val.charAt(0) === "\"" && val.slice(-1) === "\"") {
try { val = JSON.parse(val) } catch (_) {}
+ } else {
+ // walk the val to find the first not-escaped ; character
+ var esc = false
+ var unesc = "";
+ for (var i = 0, l = val.length; i < l; i++) {
+ var c = val.charAt(i)
+ if (esc) {
+ if (c === "\\" || c === ";")
+ unesc += c
+ else
+ unesc += "\\" + c
+ esc = false
+ } else if (c === ";") {
+ break
+ } else if (c === "\\") {
+ esc = true
+ } else {
+ unesc += c
+ }
+ }
+ if (esc)
+ unesc += "\\"
+ return unesc
}
return val
}
},
"name": "ini",
"description": "An ini encoder/decoder for node",
- "version": "1.0.4",
+ "version": "1.0.5",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
"tap": "~0.0.9"
},
"readme": "An ini format parser and serializer for node.\n\nSections are treated as nested objects. Items before the first heading\nare saved on the object directly.\n\n## Usage\n\nConsider an ini-file `config.ini` that looks like this:\n\n ; this comment is being ignored\n scope = global\n\n [database]\n user = dbuser\n password = dbpassword\n database = use_this_database\n\n [paths.default]\n datadir = /var/lib/data\n\nYou can read, manipulate and write the ini-file like so:\n\n var fs = require('fs')\n , ini = require('ini')\n\n var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))\n\n config.scope = 'local'\n config.database.database = 'use_another_database'\n config.paths.default.tmpdir = '/tmp'\n delete config.paths.default.datadir\n\n fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section'))\n\nThis will result in a file called `config_modified.ini` being written to the filesystem with the following content:\n\n [section]\n scope = local\n [section.database]\n user = dbuser\n password = dbpassword\n database = use_another_database\n [section.paths.default]\n tmpdir = /tmp\n\n## API\n\n### decode(inistring)\nDecode the ini-style formatted `inistring` into a nested object.\n\n### parse(inistring)\nAlias for `decode(inistring)`\n\n### encode(object, [section])\nEncode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above.\n\n### stringify(object, [section])\nAlias for `encode(object, [section])`\n\n### safe(val)\nEscapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example\n\n ini.safe('\"unsafe string\"')\n\nwould result in\n\n \"\\\"unsafe string\\\"\"\n\n### unsafe(val)\nUnescapes the string `val`\n\n",
- "_id": "ini@1.0.4",
+ "_id": "ini@1.0.5",
"_from": "ini@latest"
}
[x\.y\.z.a\.b\.c]
a.b.c = abc
+
+; this next one is not a comment! it's escaped!
+nocomment = this\; this is not a comment
+ 'j = 2\n\n[x\\.y\\.z]\nx.y.z = xyz\n\n'
+ '[x\\.y\\.z.a\\.b\\.c]\n'
+ 'a.b.c = abc\n'
+ + 'nocomment = this\\; this is not a comment\n'
, expectD =
{ o: 'p',
'a with spaces': 'b c',
'x.y.z': {
'x.y.z': 'xyz',
'a.b.c': {
- 'a.b.c': 'abc'
+ 'a.b.c': 'abc',
+ 'nocomment': 'this\; this is not a comment'
}
}
}
{
"name": "init-package-json",
- "version": "0.0.5",
+ "version": "0.0.6",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
"promzard": "~0.2.0",
"read": "~1.0.1",
"read-package-json": "0",
- "semver": "~1.0.14"
+ "semver": "1.x"
},
"devDependencies": {
"tap": "~0.2.5",
"start"
],
"readme": "# init-package-json\n\nA node module to get your node module started.\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n",
- "_id": "init-package-json@0.0.5",
- "_from": "init-package-json@0"
+ "_id": "init-package-json@0.0.6",
+ "_from": "init-package-json@latest"
}
function build (gyp, argv, callback) {
var makeCommand = gyp.opts.make || process.env.MAKE
- || (process.platform.indexOf('bsd') != -1 ? 'gmake' : 'make')
- var command = win ? 'msbuild' : makeCommand
+ || (process.platform.indexOf('bsd') != -1 ? 'gmake' : 'make')
+ , command = win ? 'msbuild' : makeCommand
, buildDir = path.resolve('build')
, configPath = path.resolve(buildDir, 'config.gypi')
+ , jobs = gyp.opts.jobs || process.env.JOBS
, buildType
, config
, arch
if (win) {
var p = arch === 'x64' ? 'x64' : 'Win32'
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
+ if (jobs) {
+ if (!isNaN(parseInt(jobs, 10))) {
+ argv.push('/m:' + parseInt(jobs, 10))
+ } else if (jobs.toUpperCase() === 'MAX') {
+ argv.push('/m:' + require('os').cpus().length)
+ }
+ }
} else {
argv.push('BUILDTYPE=' + buildType)
// Invoke the Makefile in the 'build' dir.
argv.push('-C')
argv.push('build')
+ if (jobs) {
+ if (!isNaN(parseInt(jobs, 10))) {
+ argv.push('--jobs')
+ argv.push(parseInt(jobs, 10))
+ } else if (jobs.toUpperCase() === 'MAX') {
+ argv.push('--jobs')
+ argv.push(require('os').cpus().length)
+ }
+ }
}
if (win) {
function configure (gyp, argv, callback) {
- var python = process.env.PYTHON || gyp.opts.python || 'python'
+ var python = gyp.opts.python || process.env.PYTHON || 'python'
, buildDir = path.resolve('build')
, hasVCExpress = false
, hasWin71SDK = false
, request = require('request')
, minimatch = require('minimatch')
, mkdir = require('mkdirp')
- , distUrl = 'http://nodejs.org/dist'
, win = process.platform == 'win32'
function install (gyp, argv, callback) {
}
}
+ var distUrl = gyp.opts['dist-url'] || 'http://nodejs.org/dist'
+
// Determine which node dev files version we are installing
var versionStr = argv[0] || gyp.opts.target || process.version
, nodedir: String // 'configure'
, loglevel: String // everywhere
, python: String // 'configure'
+ , 'dist-url': String // 'install'
+ , jobs: String // 'build'
}
/**
"bindings",
"gyp"
],
- "version": "0.6.11",
+ "version": "0.7.0",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
"node": ">= 0.6.0"
},
"readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is not supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n",
- "_id": "node-gyp@0.6.11",
- "_from": "node-gyp@~0.6.4"
+ "_id": "node-gyp@0.7.0",
+ "dist": {
+ "shasum": "60cc1d85885909b43ca0caa1a9bd93032c68a002"
+ },
+ "_from": "node-gyp@latest"
}
var token = this.conf.get('_token')
this.couchLogin = new CouchLogin(registry, token)
this.couchLogin.proxy = this.conf.get('proxy')
+ this.couchLogin.strictSSL = this.conf.get('strict-ssl')
+ this.couchLogin.ca = this.conf.get('ca')
}
this.log = conf.log || conf.get('log') || npmlog
--- /dev/null
+test/fixtures/couch.log
+test/fixtures/.delete
+test/fixtures/pid
+test/fixtures/_users.couch
--- /dev/null
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Related to tokenGet and tokenSet. Takes a callback which should be
called when the token is deleted.
+### couch.ca
+
+* {String | Array | null}
+
+A certificate authority string, or an array of CA strings. Only
+relevant for HTTPS couches, of course.
+
+Leave as `null` to use the default ca settings built into node.
+
+### couch.strictSSL
+
+* {Boolean | null}
+
+Whether or not to be strict about SSL connections. If left as null,
+then use the default setting in node, which is true in node versions
+0.9.x and above, and false prior to 0.8.x.
+
+Only relevant for HTTPS couches, of course.
+
### couch.anonymous()
Return a new CouchLogin object that points at the same couchdb server,
, crypto = require('crypto')
, YEAR = (1000 * 60 * 60 * 24 * 365)
, BASIC = {}
+, assert = require('assert')
module.exports = CouchLogin
this.proxy = null
this.maxAge = YEAR
+
+ // replace with a CA cert string, or an array, or leave as null
+ // to use the defaults included in node. Only relevant for HTTPS
+ // couches, of course.
+ this.ca = null
+
+ // set to boolean true or false to specify the strictSSL behavior.
+ // if left as null, then it'll use whatever node defaults to, which
+ // is false <=0.8.x, and true >=0.9.x
+ //
+ // Again, only relevant for https couches, of course.
+ this.strictSSL = null
}
CouchLogin.prototype =
{ value: CouchLogin, enumerable: false })
function decorate (req, res) {
+ assert(this instanceof CouchLogin)
req.couch = res.couch = this
// backed by some sort of set(k,v,cb), get(k,cb) session storage.
}
function anon () {
+ assert(this instanceof CouchLogin)
return new CouchLogin(this.couch, NaN)
}
function makeReq (meth, body, f) { return function madeReq (p, d, cb) {
+ assert(this instanceof CouchLogin)
f = f || (this.token !== this.token)
if (!f && !valid(this.token)) {
// lazily get the token.
req.proxy = this.proxy
}
+ // we're handling cookies, don't do it for us.
+ req.jar = false
+
+ if (this.ca)
+ req.ca = this.ca
+
+ if (this.strictSSL && this.strictSSL !== null)
+ req.strictSSL = this.strictSSL
+
request(req, function (er, res, data) {
// update cookie.
if (er || res.statusCode !== 200) return cb(er, res, data)
addToken.call(this, res)
- return cb(er, res, data)
+ return cb.call(this, er, res, data)
}.bind(this))
}}
function login (auth, cb) {
+ assert(this instanceof CouchLogin)
if (this.token === BASIC) {
this.auth = new Buffer(auth.name + ':' + auth.password).toString('base64')
this.name = auth.name
- return process.nextTick(cb, null, { statusCode: 200 }, { ok: true })
+ cb = cb.bind(this, null, { statusCode: 200 }, { ok: true })
+ return process.nextTick(cb)
}
var a = { name: auth.name, password: auth.password }
var req = makeReq('post', true, true)
return cb(er, cr, data)
this.name = auth.name
cb(er, cr, data)
- })
+ }.bind(this))
}
function changePass (auth, cb) {
+ assert(this instanceof CouchLogin)
if (!auth.name || !auth.password) return cb(new Error('invalid auth'))
var u = '/_users/org.couchdb.user:' + auth.name
data.date = new Date().toISOString()
this.put(u + '?rev=' + data._rev, data, function (er, res, data) {
- console.error('back from changepass', er, data, this.name)
if (er || res.statusCode >= 400)
return cb(er, res, data)
if (this.name && this.name !== auth.name)
//
// WATCH OUT!
function deleteAccount (name, cb) {
+ assert(this instanceof CouchLogin)
var u = '/_users/org.couchdb.user:' + name
this.get(u, thenPut.bind(this))
function signup (auth, cb) {
- if (this.token && this.token !== BASIC)
+ assert(this instanceof CouchLogin)
+ if (this.token && this.token !== BASIC) {
+
return this.logout(function (er, res, data) {
- if (er || res.statusCode !== 200) {
+ if (er || res && res.statusCode !== 200) {
return cb(er, res, data)
}
this.signup(auth, cb)
}.bind(this))
+ }
// make a new user record.
var newSalt = crypto.randomBytes(30).toString('hex')
}
function addToken (res) {
+ assert(this instanceof CouchLogin)
// not doing the whole login session cookie thing.
if (this.token === BASIC)
return
function logout (cb) {
+ assert(this instanceof CouchLogin)
if (!this.token && this.tokenGet) {
return this.tokenGet(function (er, tok) {
- if (er || !tok) return cb()
+ if (er || !tok)
+ return cb(null, { statusCode: 200 }, {})
this.token = tok
this.logout(cb)
}.bind(this))
if (!valid(this.token)) {
this.token = null
if (this.tokenDel) this.tokenDel()
- return process.nextTick(cb)
+ return process.nextTick(cb.bind(this, null, { statusCode: 200 }, {}))
}
var h = { cookie: 'AuthSession=' + this.token.AuthSession }
}
this.token = null
- if (this.tokenDel) this.tokenDel()
+ if (this.tokenDel)
+ this.tokenDel()
cb(er, res, data)
}.bind(this))
}
},
"name": "couch-login",
"description": "A module for doing logged-in requests to a couchdb server",
- "version": "0.1.12",
+ "version": "0.1.15",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/couch-login.git"
"devDependencies": {
"tap": "~0.2.4"
},
- "readme": "# couch-login\n\nThis module lets you log into couchdb to get a session token, then make\nrequests using that session. It is basically just a thin wrapper around\n[@mikeal's request module](https://github.com/mikeal/request).\n\nThis is handy if you want a user to take actions in a couchdb database\non behalf of a user, without having to store their couchdb username and\npassword anywhere. (You do need to store the AuthSession token\nsomewhere, though.)\n\n## Usage\n\n```javascript\nvar CouchLogin = require('couch-login')\n\n// Nothing about this module is http-server specific of course.\n// You could also use it to do authenticated requests against\n// a couchdb using sessions and storing the token somewhere else.\n\nhttp.createServer(function (req, res) {\n var couch = new CouchLogin('http://my-couch.iriscouch.com:5984/')\n\n // .. look up the token in the user's session or whatever ..\n // Look at couch.decorate(req, res) for more on doing that\n // automatically, below.\n\n if (sessionToken) {\n // this user already logged in.\n couch.token = sessionToken\n\n // now we can do things on their behalf, like:\n // 1. View their session info.\n // like doing request.get({ uri: couch + '/_session', ... })\n // but with the cookie and whatnot\n\n couch.get('/_session', function (er, resp, data) {\n // er = some kind of communication error.\n // resp = response object from the couchdb request.\n // data = parsed JSON response body.\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // now we have the session info, we know who this user is.\n // hitting couchdb for this on every request is kinda costly,\n // so maybe you should store the username wherever you're storing\n // the sessionToken. RedSess is a good util for this, if you're\n // into redis. And if you're not into redis, you're crazy,\n // because it is awesome.\n\n // now let's get the user record.\n // note that this will 404 for anyone other than the user,\n // unless they're a server admin.\n couch.get('/_users/org.couchdb.user:' + data.userCtx.name, etc)\n\n // PUTs and DELETEs will also use their session, of course, so\n // your validate_doc_update's will see their info in userCtx\n })\n\n } else {\n // don't have a sessionToken.\n // get a username and password from the post body or something.\n // maybe redirect to a /login page or something to ask for that.\n var login = { name: name, password: password }\n couch.login(login, function (er, resp, data) {\n // again, er is an error, resp is the response obj, data is the json\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // the data is something like\n // {\"ok\":true,\"name\":\"testuser\",\"roles\":[]}\n // and couch.token is the token you'll need to save somewhere.\n\n // at this point, you can start making authenticated requests to\n // couchdb, or save data in their session, or do whatever it is\n // that you need to do.\n\n res.statusCode = 200\n res.write(\"Who's got two thumbs and just logged you into couch?\\n\")\n setTimeout(function () {\n res.end(\"THIS GUY!\")\n }, 500)\n })\n }\n})\n```\n\n## Class: CouchLogin\n### new CouchLogin(couchdbUrl, token)\n\nCreate a new CouchLogin object bound to the couchdb url.\n\nIn addition to these, the `get`, `post`, `put`, and `del` methods all\nproxy to the associated method on [request](https://github.com/mikeal/request).\n\nHowever, as you'll note in the example above, only the pathname portion\nof the url is required. Urls will be appended to the couchdb url passed\ninto the constructor.\n\nIf you have to talk to more than one couchdb, then you'll need more than\none CouchLogin object, for somewhat obvious reasons.\n\nAll callbacks get called with the following arguments, which are exactly\nidentical to the arguments passed to a `request` callback.\n\n* `er` {Error | null} Set if a communication error happens.\n* `resp` {HTTP Response} The response from the request to couchdb\n* `data` {Object} The parsed JSON data from couch\n\nIf the token is the string \"anonymous\", then it will not attempt to log\nin before making requests. If the token is not \"anonymous\", then it\nmust be an object with the appropriate fields.\n\n### couch.token\n\n* {Object}\n\nAn object representing the couchdb session token. (Basically just a\ncookie and a timeout.)\n\nIf the token has already timed out, then setting it will have no effect.\n\n### couch.tokenSet\n\nIf set, this method is called whenever the token is saved.\n\nFor example, you could assign a function to this method to save the\ntoken into a redis session, a cookie, or in some other database.\n\nTakes a callback which should be called when the token is saved.\n\n### couch.tokenGet\n\nIf set, this method is called to look up the token on demand.\n\nThe inverse of couch.tokenSet. Takes a callback which is called with\nthe `cb(er || null, token)`.\n\n### couch.tokenDel\n\nIf set, this method is called to delete the token when it should be\ndiscarded.\n\nRelated to tokenGet and tokenSet. Takes a callback which should be\ncalled when the token is deleted.\n\n### couch.anonymous()\n\nReturn a new CouchLogin object that points at the same couchdb server,\nbut doesn't try to log in before making requests.\n\nThis is handy for situations where the user is not logged in at the\nmoment, but a request needs to be made anyway, and does not require\nauthorization.\n\n### couch.login(auth, callback)\n\n* `auth` {Object} The login details\n * `name` {String}\n * `password` {String}\n* `callback` {Function}\n\nWhen the callback is called, the `couch.token` will already have been\nset (assuming it worked!), so subsequent requests will be done as that\nuser.\n\n### couch.get(path, callback)\n\nGET the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.del(path, callback)\n\nDELETE the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.post(path, data, callback)\n\nPOST the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.put(path, data, callback)\n\nPUT the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.changePass(newAuth, callback)\n\nMust already be logged in. Updates the `_users` document with new salt\nand hash, and re-logs in with the new credentials. Callback is called\nwith the same arguments as login, or the first step of the process that\nfailed.\n\n### couch.signup(userData, callback)\n\nCreate a new user account. The userData must contain at least a `name`\nand `password` field. Any additional data will be copied to the user\nrecord. The `_id`, `name`, `roles`, `type`, `password_sha`, `salt`, and\n`date` fields are generated.\n\nAlso signs in as the newly created user, on successful account creation.\n\n### couch.deleteAccount(name, callback)\n\nDeletes a user account. If not logged in as the user, or a server\nadmin, then the request will fail.\n\nNote that this immediately invalidates any session tokens for the\ndeleted user account. If you are deleting the user's record, then you\nought to follow this with `couch.logout(callback)` so that it won't try\nto re-use the invalid session.\n\n### couch.logout(callback)\n\nDelete the session out of couchdb. This makes the token permanently\ninvalid, and deletes it.\n\n### couch.decorate(req, res)\n\nSet up `req.couch` and `res.couch` as references to this couch login\ninstance.\n\nAdditionall, if `req.session` or `res.session` is set, then it'll call\n`session.get('couch_token', cb)` as the tokenGet method,\n`session.set('couch_token', token, cb)` as the tokenSet method, and\n`session.del('couch_token', cb)` as the tokenDel method.\n\nThis works really nice with\n[RedSess](https://github.com/isaacs/redsess).\n",
- "_id": "couch-login@0.1.12",
- "_from": "couch-login@~0.1.9"
+ "readme": "# couch-login\n\nThis module lets you log into couchdb to get a session token, then make\nrequests using that session. It is basically just a thin wrapper around\n[@mikeal's request module](https://github.com/mikeal/request).\n\nThis is handy if you want a user to take actions in a couchdb database\non behalf of a user, without having to store their couchdb username and\npassword anywhere. (You do need to store the AuthSession token\nsomewhere, though.)\n\n## Usage\n\n```javascript\nvar CouchLogin = require('couch-login')\n\n// Nothing about this module is http-server specific of course.\n// You could also use it to do authenticated requests against\n// a couchdb using sessions and storing the token somewhere else.\n\nhttp.createServer(function (req, res) {\n var couch = new CouchLogin('http://my-couch.iriscouch.com:5984/')\n\n // .. look up the token in the user's session or whatever ..\n // Look at couch.decorate(req, res) for more on doing that\n // automatically, below.\n\n if (sessionToken) {\n // this user already logged in.\n couch.token = sessionToken\n\n // now we can do things on their behalf, like:\n // 1. View their session info.\n // like doing request.get({ uri: couch + '/_session', ... })\n // but with the cookie and whatnot\n\n couch.get('/_session', function (er, resp, data) {\n // er = some kind of communication error.\n // resp = response object from the couchdb request.\n // data = parsed JSON response body.\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // now we have the session info, we know who this user is.\n // hitting couchdb for this on every request is kinda costly,\n // so maybe you should store the username wherever you're storing\n // the sessionToken. RedSess is a good util for this, if you're\n // into redis. And if you're not into redis, you're crazy,\n // because it is awesome.\n\n // now let's get the user record.\n // note that this will 404 for anyone other than the user,\n // unless they're a server admin.\n couch.get('/_users/org.couchdb.user:' + data.userCtx.name, etc)\n\n // PUTs and DELETEs will also use their session, of course, so\n // your validate_doc_update's will see their info in userCtx\n })\n\n } else {\n // don't have a sessionToken.\n // get a username and password from the post body or something.\n // maybe redirect to a /login page or something to ask for that.\n var login = { name: name, password: password }\n couch.login(login, function (er, resp, data) {\n // again, er is an error, resp is the response obj, data is the json\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // the data is something like\n // {\"ok\":true,\"name\":\"testuser\",\"roles\":[]}\n // and couch.token is the token you'll need to save somewhere.\n\n // at this point, you can start making authenticated requests to\n // couchdb, or save data in their session, or do whatever it is\n // that you need to do.\n\n res.statusCode = 200\n res.write(\"Who's got two thumbs and just logged you into couch?\\n\")\n setTimeout(function () {\n res.end(\"THIS GUY!\")\n }, 500)\n })\n }\n})\n```\n\n## Class: CouchLogin\n### new CouchLogin(couchdbUrl, token)\n\nCreate a new CouchLogin object bound to the couchdb url.\n\nIn addition to these, the `get`, `post`, `put`, and `del` methods all\nproxy to the associated method on [request](https://github.com/mikeal/request).\n\nHowever, as you'll note in the example above, only the pathname portion\nof the url is required. Urls will be appended to the couchdb url passed\ninto the constructor.\n\nIf you have to talk to more than one couchdb, then you'll need more than\none CouchLogin object, for somewhat obvious reasons.\n\nAll callbacks get called with the following arguments, which are exactly\nidentical to the arguments passed to a `request` callback.\n\n* `er` {Error | null} Set if a communication error happens.\n* `resp` {HTTP Response} The response from the request to couchdb\n* `data` {Object} The parsed JSON data from couch\n\nIf the token is the string \"anonymous\", then it will not attempt to log\nin before making requests. If the token is not \"anonymous\", then it\nmust be an object with the appropriate fields.\n\n### couch.token\n\n* {Object}\n\nAn object representing the couchdb session token. (Basically just a\ncookie and a timeout.)\n\nIf the token has already timed out, then setting it will have no effect.\n\n### couch.tokenSet\n\nIf set, this method is called whenever the token is saved.\n\nFor example, you could assign a function to this method to save the\ntoken into a redis session, a cookie, or in some other database.\n\nTakes a callback which should be called when the token is saved.\n\n### couch.tokenGet\n\nIf set, this method is called to look up the token on demand.\n\nThe inverse of couch.tokenSet. Takes a callback which is called with\nthe `cb(er || null, token)`.\n\n### couch.tokenDel\n\nIf set, this method is called to delete the token when it should be\ndiscarded.\n\nRelated to tokenGet and tokenSet. Takes a callback which should be\ncalled when the token is deleted.\n\n### couch.ca\n\n* {String | Array | null}\n\nA certificate authority string, or an array of CA strings. Only\nrelevant for HTTPS couches, of course.\n\nLeave as `null` to use the default ca settings built into node.\n\n### couch.strictSSL\n\n* {Boolean | null}\n\nWhether or not to be strict about SSL connections. If left as null,\nthen use the default setting in node, which is true in node versions\n0.9.x and above, and false prior to 0.8.x.\n\nOnly relevant for HTTPS couches, of course.\n\n### couch.anonymous()\n\nReturn a new CouchLogin object that points at the same couchdb server,\nbut doesn't try to log in before making requests.\n\nThis is handy for situations where the user is not logged in at the\nmoment, but a request needs to be made anyway, and does not require\nauthorization.\n\n### couch.login(auth, callback)\n\n* `auth` {Object} The login details\n * `name` {String}\n * `password` {String}\n* `callback` {Function}\n\nWhen the callback is called, the `couch.token` will already have been\nset (assuming it worked!), so subsequent requests will be done as that\nuser.\n\n### couch.get(path, callback)\n\nGET the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.del(path, callback)\n\nDELETE the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.post(path, data, callback)\n\nPOST the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.put(path, data, callback)\n\nPUT the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.changePass(newAuth, callback)\n\nMust already be logged in. Updates the `_users` document with new salt\nand hash, and re-logs in with the new credentials. Callback is called\nwith the same arguments as login, or the first step of the process that\nfailed.\n\n### couch.signup(userData, callback)\n\nCreate a new user account. The userData must contain at least a `name`\nand `password` field. Any additional data will be copied to the user\nrecord. The `_id`, `name`, `roles`, `type`, `password_sha`, `salt`, and\n`date` fields are generated.\n\nAlso signs in as the newly created user, on successful account creation.\n\n### couch.deleteAccount(name, callback)\n\nDeletes a user account. If not logged in as the user, or a server\nadmin, then the request will fail.\n\nNote that this immediately invalidates any session tokens for the\ndeleted user account. If you are deleting the user's record, then you\nought to follow this with `couch.logout(callback)` so that it won't try\nto re-use the invalid session.\n\n### couch.logout(callback)\n\nDelete the session out of couchdb. This makes the token permanently\ninvalid, and deletes it.\n\n### couch.decorate(req, res)\n\nSet up `req.couch` and `res.couch` as references to this couch login\ninstance.\n\nAdditionall, if `req.session` or `res.session` is set, then it'll call\n`session.get('couch_token', cb)` as the tokenGet method,\n`session.set('couch_token', token, cb)` as the tokenSet method, and\n`session.del('couch_token', cb)` as the tokenDel method.\n\nThis works really nice with\n[RedSess](https://github.com/isaacs/redsess).\n",
+ "_id": "couch-login@0.1.15",
+ "_from": "couch-login@~0.1.15"
}
--- /dev/null
+// start the couchdb spinning as a detached child process.
+// the zz-teardown.js test kills it.
+//
+// localhost:15985 ==> couchdb
+// 127.0.0.1:15985 ==> npm registry
+
+var spawn = require('child_process').spawn
+var test = require('tap').test
+var path = require('path')
+var fs = require('fs')
+var request = require('request')
+
+// run with the cwd of the main program.
+var cwd = path.dirname(__dirname)
+
+var conf = path.resolve(__dirname, 'fixtures', 'couch.ini')
+var pidfile = path.resolve(__dirname, 'fixtures', 'pid')
+var logfile = path.resolve(__dirname, 'fixtures', 'couch.log')
+var started = /Apache CouchDB has started on http:\/\/127\.0\.0\.1:15985\/\n$/
+
+test('start couch as a zombie child', function (t) {
+ var fd = fs.openSync(pidfile, 'wx')
+
+ try { fs.unlinkSync(logfile) } catch (er) {}
+
+ var child = spawn('couchdb', ['-a', conf], {
+ detached: true,
+ stdio: 'ignore',
+ cwd: cwd
+ })
+ child.unref()
+ t.ok(child.pid)
+ fs.writeSync(fd, child.pid + '\n')
+ fs.closeSync(fd)
+
+ // wait for it to create a log, give it 5 seconds
+ var start = Date.now()
+ fs.readFile(logfile, function R (er, log) {
+ log = log ? log.toString() : ''
+ if (!er && !log.match(started))
+ er = new Error('not started yet')
+ if (er) {
+ if (Date.now() - start < 5000)
+ return setTimeout(function () {
+ fs.readFile(logfile, R)
+ }, 100)
+ else
+ throw er
+ }
+ t.pass('relax')
+ t.end()
+ })
+})
+
+// set up the testuser account that we'll be using everywhere.
+// first delete any existing one, so that we don't end up with
+// some newer copy taking over.
+test('create testuser', function (t) {
+ var u = 'http://admin:admin@localhost:15985/_users/org.couchdb.user:testuser'
+ var rev
+
+ request.get({ url: u, json: true }, function (er, res, data) {
+ if (er)
+ throw er
+ rev = data._rev
+ if (res.statusCode === 404)
+ put()
+ else
+ del()
+ })
+
+ function del () {
+ request.del(u + '?rev=' + rev, function (er, res, data) {
+ if (er)
+ throw er
+ put()
+ })
+ }
+
+ function put () {
+ request.put({
+ url: u,
+ body: {
+ _id: 'org.couchdb.user:testuser',
+ name: 'testuser',
+ roles: [],
+ type: 'user',
+ password_sha: 'e23952b517695e6bb72ecf060e10bf1b35bf7e0b',
+ salt: '83695c9b64d3b48b94c9dda0cd691e72',
+ date: '2012-09-26T16:49:30.175Z'
+ },
+ json: true
+ }, function (er, res, data) {
+ if (er)
+ throw er
+ t.ok(data.ok, 'user created')
+ t.end()
+ })
+ }
+})
var tap = require('tap')
, CouchLogin = require('../couch-login.js')
-// Yeah, go ahead and abuse my staging server, whatevs.
-
var auth = { name: 'testuser', password: 'test' }
, newAuth = { name: 'testuser', password: 'asdfasdf' }
-, couch = new CouchLogin('https://isaacs-staging.iriscouch.com/')
+, couch = new CouchLogin('http://localhost:15985/')
, u = '/_users/org.couchdb.user:' + auth.name
, userRecordMarker
--- /dev/null
+[couchdb]
+database_dir = test/fixtures
+view_index_dir = test/fixtures
+
+[httpd]
+port = 15985
+bind_address = 127.0.0.1
+secure_rewrites = false
+allow_jsonp = true
+config_whitelist = [{uuids,algorithm},{vhosts,"*"},{admins,"*"},{log,level},{httpd,allow_jsonp},{httpd,secure_rewrites},{httpd,mobile_futon},{httpd,sammy_futon},{httpd,cors},{httpd,x_forwarded_host},{httpd,'WWW-Authenticate'},{cors,"*"},{compactions,"*"},{replicator,db},{attachments,compression_level},{attachments,compressible_types},{couch_httpd_auth,authentication_db},{couch_httpd_auth,allow_persistent_cookies},{couch_httpd_auth,authentication_redirect},{couch_httpd_auth,require_valid_user},{couch_httpd_auth,timeout},{couch_httpd_auth,secret},{couchdb,os_process_timeout},{query_server_config,reduce_limit},{couch_httpd_oauth,"*"},{oauth_token_users,"*"},{oauth_token_secrets,"*"},{oauth_consumer_secrets,"*"},{browserid,enabled},{browserid,hash_secret},{fb,"*"}]
+
+[log]
+file = test/fixtures/couch.log
+
+[admins]
+admin = -hashed-b933598b0ade0e4c2a258d53c95990d5939461dd,a44895e5740b79d14b392ada8021d31d
+
+[couch_httpd_auth]
+secret = cafebad000deadbeef00000019790701
+timeout = 36000
+allow_persistent_cookies = true
+
+[vhosts]
+127.0.0.1:15985 = /registry/_design/ghost/_rewrite
var tap = require('tap')
, CouchLogin = require('../couch-login.js')
-// Yeah, go ahead and abuse my staging server, whatevs.
-
var auth = { name: 'testuser', password: 'test' }
, newAuth = { name: 'testuser', password: 'asdfasdf' }
-, couch = new CouchLogin('https://staging.npmjs.org/')
+, couch = new CouchLogin('http://127.0.0.1:15985/')
, u = '/_users/org.couchdb.user:' + auth.name
, userRecordMarker
t.ok(data, 'data')
t.ok(couch.token, 'token')
t.equal(data.testingCouchLogin, undefined)
- t.equal(data.mustChangePass, false)
+ t.notOk(data.mustChangePass)
userRecord = data
t.end()
})
--- /dev/null
+var test = require('tap').test
+var CouchLogin = require('../couch-login.js')
+
+var auth = { name: 'testuser', password: 'test' }
+, newAuth = { name: 'testuser', password: 'asdf', mustChangePass: true }
+, db = 'http://localhost:15985/'
+, couch = new CouchLogin(db)
+, u = '/_users/org.couchdb.user:' + auth.name
+, admin = { name: 'admin', password: 'admin' }
+, newUser = { name: 'testuser', password: 'test' }
+, newUserCouch = null
+, authToken = null
+
+newUser.name += Math.floor(Math.random() * 1E9)
+
+var okGlobal = Object.keys(global)
+
+var adminCouch = new CouchLogin(db, 'basic')
+
+function okStatus (t, res) {
+ var x = { found: res.statusCode, wanted: 'around 200' }
+ var r = res.statusCode
+ x.ok = (r >= 200 && r < 300)
+ return t.ok(x.ok, 'Status code should be 200-ish', x)
+}
+
+test('adminCouch login', function (t) {
+ t.deepEqual(Object.keys(global), okGlobal)
+ console.error('adminCouch login')
+ adminCouch.login(admin, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ t.ok(data)
+ t.end()
+ })
+})
+
+test('get the user data as admin', function (t) {
+ t.deepEqual(Object.keys(global), okGlobal)
+ console.error('2')
+ adminCouch.get(u, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ t.ok(data)
+ t.end()
+ })
+})
+
+test('admin user changes the password for non-admin user', function (t) {
+ console.error(3)
+ t.deepEqual(Object.keys(global), okGlobal)
+ adminCouch.changePass(newAuth, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ t.ok(data)
+ t.end()
+ })
+})
+
+test('testuser logs in', function (t) {
+ console.error(4)
+ t.deepEqual(Object.keys(global), okGlobal)
+ couch.login(newAuth, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ t.deepEqual(data, { ok: true, name: 'testuser', roles: [] })
+ authToken = couch.token
+ t.end()
+ })
+})
+
+// test('testuser changes password', function (t) {
+// couch = new CouchLogin(db)
+// couch.token = authToken
+// couch.changePass(auth, function (er, res, data) {
+// if (er)
+// throw er
+// okStatus(t, res)
+// console.error(data)
+// t.ok(data)
+// t.end()
+// })
+// })
+
+test('new user signup', function (t) {
+ t.deepEqual(Object.keys(global), okGlobal)
+ newUserCouch = new CouchLogin(db)
+ newUserCouch.signup(newUser, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ console.error(data)
+ t.ok(data)
+ t.end()
+ })
+})
+
+test('delete newUser account', function (t) {
+ t.deepEqual(Object.keys(global), okGlobal)
+ newUserCouch.deleteAccount(newUser.name, function (er, res, data) {
+ if (er)
+ throw er
+ okStatus(t, res)
+ console.error(data)
+ t.ok(data)
+ t.end()
+ })
+})
--- /dev/null
+// kill the couchdb process that's running as a detached child process
+// started by the 00-setup.js test
+
+var fs = require('fs')
+var test = require('tap').test
+var path = require('path')
+var pidfile = path.resolve(__dirname, 'fixtures', 'pid')
+var _users = path.resolve(__dirname, 'fixtures', '_users.couch')
+
+test('kill all the users', function (t) {
+ fs.unlinkSync(_users)
+ t.pass('_users db deleted')
+ t.end()
+})
+
+test('craigslist (well, how do you get rid of YOUR couches?)', function (t) {
+ var pid = fs.readFileSync(pidfile)
+ fs.unlinkSync(pidfile)
+ process.kill(pid)
+ t.pass('couch is no more')
+ t.end()
+})
+
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "0.2.7",
+ "version": "0.2.9",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
"dependencies": {
"request": "~2.9.202",
"graceful-fs": "~1.1.8",
- "semver": "~1.0.14",
+ "semver": "~1.1.0",
"slide": "~1.1.3",
"chownr": "0",
"mkdirp": "~0.3.3",
"rimraf": "~2.0.1",
"retry": "0.6.0",
- "couch-login": "~0.1.6",
+ "couch-login": "~0.1.15",
"npmlog": ""
},
"devDependencies": {
},
"license": "BSD",
"readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n",
- "_id": "npm-registry-client@0.2.7",
- "_from": "npm-registry-client@~0.2.6"
+ "_id": "npm-registry-client@0.2.9",
+ "_from": "npm-registry-client@~0.2.9"
}
--- /dev/null
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
"name": "read-installed",
"description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
- "version": "0.0.2",
+ "version": "0.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read-installed"
"test": "node test/basic.js"
},
"dependencies": {
- "semver": "~1.0.14",
+ "semver": "1.x",
"slide": "~1.1.3",
"read-package-json": "0",
"graceful-fs": "~1.1.8",
"url": "http://blog.izs.me/"
},
"readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, function (er, data) {\n ...\n})\n```\n",
- "_id": "read-installed@0.0.2",
+ "_id": "read-installed@0.0.3",
"_from": "read-installed@0"
}
--- /dev/null
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
"name": "read-package-json",
- "version": "0.1.5",
+ "version": "0.1.7",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"dependencies": {
"glob": "~3.1.9",
"lru-cache": "~2.0.0",
- "semver": "~1.0.14",
+ "semver": "1.x",
"slide": "~1.1.3",
"npmlog": "0",
"graceful-fs": "~1.1.8"
"graceful-fs": "~1.1.8"
},
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
- "_id": "read-package-json@0.1.5",
+ "_id": "read-package-json@0.1.7",
"_from": "read-package-json@~0.1.3"
}
function readme (file, data, cb) {
if (data.readme) return cb(null, data);
var dir = path.dirname(file)
- var globOpts = { cwd: dir, nocase: true }
+ var globOpts = { cwd: dir, nocase: true, mark: true }
glob("README?(.*)", globOpts, function (er, files) {
if (er) return cb(er);
+ // don't accept directories.
+ files = files.filter(function (file) {
+ return !file.match(/\/$/)
+ })
if (!files.length) return cb();
var rm = path.resolve(dir, files[0])
readme_(file, data, rm, cb)
}
function readme_(file, data, rm, cb) {
fs.readFile(rm, "utf8", function (er, rm) {
+ // maybe not readable, or something.
+ if (er) return cb()
data.readme = rm
return cb(er, data)
})
{
"name": "semver",
- "version": "1.0.14",
+ "version": "1.1.0",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
"scripts": {
"bin": {
"semver": "./bin/semver"
},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "semver@1.0.14",
- "dependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "_engineSupported": true,
- "_npmVersion": "1.1.22",
- "_nodeVersion": "v0.7.9",
- "_defaultsLoaded": true,
- "_from": "semver@1"
+ "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // true\n semver.valid('a.b.c') // false\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <2.0.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
+ "_id": "semver@1.1.0",
+ "_from": "semver@latest"
}
// This implementation is a *hair* less strict in that it allows
// v1.2.3 things, and also tags that don't begin with a char.
-var semver = "\\s*[v=]*\\s*([0-9]+)" // major
+var semver = "\\s*[v=]*\\s*([0-9]+)" // major
+ "\\.([0-9]+)" // minor
+ "\\.([0-9]+)" // patch
+ "(-[0-9]+-?)?" // build
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?" // tag
+ + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag
, exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
, xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
+ "(?:\\.([0-9]+|x|X|\\*)"
--- /dev/null
+var tap = require("tap")
+ , test = tap.test
+ , semver = require("./semver.js")
+ , eq = semver.eq
+ , gt = semver.gt
+ , lt = semver.lt
+ , neq = semver.neq
+ , cmp = semver.cmp
+ , gte = semver.gte
+ , lte = semver.lte
+ , satisfies = semver.satisfies
+ , validRange = semver.validRange
+ , inc = semver.inc
+ , replaceStars = semver.replaceStars
+ , toComparators = semver.toComparators
+
+tap.plan(8)
+
+test("\ncomparison tests", function (t) {
+; [ ["0.0.0", "0.0.0foo"]
+ , ["0.0.1", "0.0.0"]
+ , ["1.0.0", "0.9.9"]
+ , ["0.10.0", "0.9.0"]
+ , ["0.99.0", "0.10.0"]
+ , ["2.0.0", "1.2.3"]
+ , ["v0.0.0", "0.0.0foo"]
+ , ["v0.0.1", "0.0.0"]
+ , ["v1.0.0", "0.9.9"]
+ , ["v0.10.0", "0.9.0"]
+ , ["v0.99.0", "0.10.0"]
+ , ["v2.0.0", "1.2.3"]
+ , ["0.0.0", "v0.0.0foo"]
+ , ["0.0.1", "v0.0.0"]
+ , ["1.0.0", "v0.9.9"]
+ , ["0.10.0", "v0.9.0"]
+ , ["0.99.0", "v0.10.0"]
+ , ["2.0.0", "v1.2.3"]
+ , ["1.2.3", "1.2.3-asdf"]
+ , ["1.2.3-4", "1.2.3"]
+ , ["1.2.3-4-foo", "1.2.3"]
+ , ["1.2.3-5", "1.2.3-5-foo"]
+ , ["1.2.3-5", "1.2.3-4"]
+ , ["1.2.3-5-foo", "1.2.3-5-Foo"]
+ , ["3.0.0", "2.7.2+"]
+ ].forEach(function (v) {
+ var v0 = v[0]
+ , v1 = v[1]
+ t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')")
+ t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')")
+ t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')")
+ t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
+ t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')")
+ t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')")
+ t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')")
+ t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')")
+ t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')")
+ t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')")
+ t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')")
+ })
+ t.end()
+})
+
+test("\nequality tests", function (t) {
+; [ ["1.2.3", "v1.2.3"]
+ , ["1.2.3", "=1.2.3"]
+ , ["1.2.3", "v 1.2.3"]
+ , ["1.2.3", "= 1.2.3"]
+ , ["1.2.3", " v1.2.3"]
+ , ["1.2.3", " =1.2.3"]
+ , ["1.2.3", " v 1.2.3"]
+ , ["1.2.3", " = 1.2.3"]
+ , ["1.2.3-0", "v1.2.3-0"]
+ , ["1.2.3-0", "=1.2.3-0"]
+ , ["1.2.3-0", "v 1.2.3-0"]
+ , ["1.2.3-0", "= 1.2.3-0"]
+ , ["1.2.3-0", " v1.2.3-0"]
+ , ["1.2.3-0", " =1.2.3-0"]
+ , ["1.2.3-0", " v 1.2.3-0"]
+ , ["1.2.3-0", " = 1.2.3-0"]
+ , ["1.2.3-01", "v1.2.3-1"]
+ , ["1.2.3-01", "=1.2.3-1"]
+ , ["1.2.3-01", "v 1.2.3-1"]
+ , ["1.2.3-01", "= 1.2.3-1"]
+ , ["1.2.3-01", " v1.2.3-1"]
+ , ["1.2.3-01", " =1.2.3-1"]
+ , ["1.2.3-01", " v 1.2.3-1"]
+ , ["1.2.3-01", " = 1.2.3-1"]
+ , ["1.2.3beta", "v1.2.3beta"]
+ , ["1.2.3beta", "=1.2.3beta"]
+ , ["1.2.3beta", "v 1.2.3beta"]
+ , ["1.2.3beta", "= 1.2.3beta"]
+ , ["1.2.3beta", " v1.2.3beta"]
+ , ["1.2.3beta", " =1.2.3beta"]
+ , ["1.2.3beta", " v 1.2.3beta"]
+ , ["1.2.3beta", " = 1.2.3beta"]
+ ].forEach(function (v) {
+ var v0 = v[0]
+ , v1 = v[1]
+ t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')")
+ t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')")
+ t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")")
+ t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")")
+ t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")")
+ t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")")
+ t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')")
+ t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')")
+ t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
+ t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')")
+ })
+ t.end()
+})
+
+
+test("\nrange tests", function (t) {
+; [ ["1.0.0 - 2.0.0", "1.2.3"]
+ , ["1.0.0", "1.0.0"]
+ , [">=*", "0.2.4"]
+ , ["", "1.0.0"]
+ , ["*", "1.2.3"]
+ , ["*", "v1.2.3-foo"]
+ , [">=1.0.0", "1.0.0"]
+ , [">=1.0.0", "1.0.1"]
+ , [">=1.0.0", "1.1.0"]
+ , [">1.0.0", "1.0.1"]
+ , [">1.0.0", "1.1.0"]
+ , ["<=2.0.0", "2.0.0"]
+ , ["<=2.0.0", "1.9999.9999"]
+ , ["<=2.0.0", "0.2.9"]
+ , ["<2.0.0", "1.9999.9999"]
+ , ["<2.0.0", "0.2.9"]
+ , [">= 1.0.0", "1.0.0"]
+ , [">= 1.0.0", "1.0.1"]
+ , [">= 1.0.0", "1.1.0"]
+ , ["> 1.0.0", "1.0.1"]
+ , ["> 1.0.0", "1.1.0"]
+ , ["<= 2.0.0", "2.0.0"]
+ , ["<= 2.0.0", "1.9999.9999"]
+ , ["<= 2.0.0", "0.2.9"]
+ , ["< 2.0.0", "1.9999.9999"]
+ , ["<\t2.0.0", "0.2.9"]
+ , [">=0.1.97", "v0.1.97"]
+ , [">=0.1.97", "0.1.97"]
+ , ["0.1.20 || 1.2.4", "1.2.4"]
+ , [">=0.2.3 || <0.0.1", "0.0.0"]
+ , [">=0.2.3 || <0.0.1", "0.2.3"]
+ , [">=0.2.3 || <0.0.1", "0.2.4"]
+ , ["||", "1.3.4"]
+ , ["2.x.x", "2.1.3"]
+ , ["1.2.x", "1.2.3"]
+ , ["1.2.x || 2.x", "2.1.3"]
+ , ["1.2.x || 2.x", "1.2.3"]
+ , ["x", "1.2.3"]
+ , ["2.*.*", "2.1.3"]
+ , ["1.2.*", "1.2.3"]
+ , ["1.2.* || 2.*", "2.1.3"]
+ , ["1.2.* || 2.*", "1.2.3"]
+ , ["*", "1.2.3"]
+ , ["2", "2.1.2"]
+ , ["2.3", "2.3.1"]
+ , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0
+ , ["~2.4", "2.4.5"]
+ , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0
+ , ["~1", "1.2.3"] // >=1.0.0 <2.0.0
+ , ["~>1", "1.2.3"]
+ , ["~> 1", "1.2.3"]
+ , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0
+ , ["~ 1.0", "1.0.2"]
+ , [">=1", "1.0.0"]
+ , [">= 1", "1.0.0"]
+ , ["<1.2", "1.1.1"]
+ , ["< 1.2", "1.1.1"]
+ , ["1", "1.0.0beta"]
+ , ["~v0.5.4-pre", "0.5.5"]
+ , ["~v0.5.4-pre", "0.5.4"]
+ , ["=0.7.x", "0.7.2"]
+ , [">=0.7.x", "0.7.2"]
+ , ["=0.7.x", "0.7.0-asdf"]
+ , [">=0.7.x", "0.7.0-asdf"]
+ , ["<=0.7.x", "0.6.2"]
+ ].forEach(function (v) {
+ t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
+ })
+ t.end()
+})
+
+test("\nnegative range tests", function (t) {
+; [ ["1.0.0 - 2.0.0", "2.2.3"]
+ , ["1.0.0", "1.0.1"]
+ , [">=1.0.0", "0.0.0"]
+ , [">=1.0.0", "0.0.1"]
+ , [">=1.0.0", "0.1.0"]
+ , [">1.0.0", "0.0.1"]
+ , [">1.0.0", "0.1.0"]
+ , ["<=2.0.0", "3.0.0"]
+ , ["<=2.0.0", "2.9999.9999"]
+ , ["<=2.0.0", "2.2.9"]
+ , ["<2.0.0", "2.9999.9999"]
+ , ["<2.0.0", "2.2.9"]
+ , [">=0.1.97", "v0.1.93"]
+ , [">=0.1.97", "0.1.93"]
+ , ["0.1.20 || 1.2.4", "1.2.3"]
+ , [">=0.2.3 || <0.0.1", "0.0.3"]
+ , [">=0.2.3 || <0.0.1", "0.2.2"]
+ , ["2.x.x", "1.1.3"]
+ , ["2.x.x", "3.1.3"]
+ , ["1.2.x", "1.3.3"]
+ , ["1.2.x || 2.x", "3.1.3"]
+ , ["1.2.x || 2.x", "1.1.3"]
+ , ["2.*.*", "1.1.3"]
+ , ["2.*.*", "3.1.3"]
+ , ["1.2.*", "1.3.3"]
+ , ["1.2.* || 2.*", "3.1.3"]
+ , ["1.2.* || 2.*", "1.1.3"]
+ , ["2", "1.1.2"]
+ , ["2.3", "2.4.1"]
+ , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0
+ , ["~2.4", "2.3.9"]
+ , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0
+ , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0
+ , ["~1", "0.2.3"] // >=1.0.0 <2.0.0
+ , ["~>1", "2.2.3"]
+ , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0
+ , ["<1", "1.0.0"]
+ , [">=1.2", "1.1.1"]
+ , ["1", "2.0.0beta"]
+ , ["~v0.5.4-beta", "0.5.4-alpha"]
+ , ["<1", "1.0.0beta"]
+ , ["< 1", "1.0.0beta"]
+ , ["=0.7.x", "0.8.2"]
+ , [">=0.7.x", "0.6.2"]
+ , ["<=0.7.x", "0.7.2"]
+ ].forEach(function (v) {
+ t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
+ })
+ t.end()
+})
+
+test("\nincrement versions test", function (t) {
+; [ [ "1.2.3", "major", "2.0.0" ]
+ , [ "1.2.3", "minor", "1.3.0" ]
+ , [ "1.2.3", "patch", "1.2.4" ]
+ , [ "1.2.3", "build", "1.2.3-1" ]
+ , [ "1.2.3-4", "build", "1.2.3-5" ]
+ , [ "1.2.3tag", "major", "2.0.0" ]
+ , [ "1.2.3-tag", "major", "2.0.0" ]
+ , [ "1.2.3tag", "build", "1.2.3-1" ]
+ , [ "1.2.3-tag", "build", "1.2.3-1" ]
+ , [ "1.2.3-4-tag", "build", "1.2.3-5" ]
+ , [ "1.2.3-4tag", "build", "1.2.3-5" ]
+ , [ "1.2.3", "fake", null ]
+ , [ "fake", "major", null ]
+ ].forEach(function (v) {
+ t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2])
+ })
+
+ t.end()
+})
+
+test("\nreplace stars test", function (t) {
+; [ [ "", "" ]
+ , [ "*", "" ]
+ , [ "> *", "" ]
+ , [ "<*", "" ]
+ , [ " >= *", "" ]
+ , [ "* || 1.2.3", " || 1.2.3" ]
+ ].forEach(function (v) {
+ t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1])
+ })
+
+ t.end()
+})
+
+test("\nvalid range test", function (t) {
+; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]
+ , ["1.0.0", "1.0.0"]
+ , [">=*", ""]
+ , ["", ""]
+ , ["*", ""]
+ , ["*", ""]
+ , [">=1.0.0", ">=1.0.0"]
+ , [">1.0.0", ">1.0.0"]
+ , ["<=2.0.0", "<=2.0.0"]
+ , ["1", ">=1.0.0- <2.0.0-"]
+ , ["<=2.0.0", "<=2.0.0"]
+ , ["<=2.0.0", "<=2.0.0"]
+ , ["<2.0.0", "<2.0.0"]
+ , ["<2.0.0", "<2.0.0"]
+ , [">= 1.0.0", ">=1.0.0"]
+ , [">= 1.0.0", ">=1.0.0"]
+ , [">= 1.0.0", ">=1.0.0"]
+ , ["> 1.0.0", ">1.0.0"]
+ , ["> 1.0.0", ">1.0.0"]
+ , ["<= 2.0.0", "<=2.0.0"]
+ , ["<= 2.0.0", "<=2.0.0"]
+ , ["<= 2.0.0", "<=2.0.0"]
+ , ["< 2.0.0", "<2.0.0"]
+ , ["< 2.0.0", "<2.0.0"]
+ , [">=0.1.97", ">=0.1.97"]
+ , [">=0.1.97", ">=0.1.97"]
+ , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"]
+ , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+ , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+ , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+ , ["||", "||"]
+ , ["2.x.x", ">=2.0.0- <3.0.0-"]
+ , ["1.2.x", ">=1.2.0- <1.3.0-"]
+ , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
+ , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
+ , ["x", ""]
+ , ["2.*.*", null]
+ , ["1.2.*", null]
+ , ["1.2.* || 2.*", null]
+ , ["1.2.* || 2.*", null]
+ , ["*", ""]
+ , ["2", ">=2.0.0- <3.0.0-"]
+ , ["2.3", ">=2.3.0- <2.4.0-"]
+ , ["~2.4", ">=2.4.0- <2.5.0-"]
+ , ["~2.4", ">=2.4.0- <2.5.0-"]
+ , ["~>3.2.1", ">=3.2.1- <3.3.0-"]
+ , ["~1", ">=1.0.0- <2.0.0-"]
+ , ["~>1", ">=1.0.0- <2.0.0-"]
+ , ["~> 1", ">=1.0.0- <2.0.0-"]
+ , ["~1.0", ">=1.0.0- <1.1.0-"]
+ , ["~ 1.0", ">=1.0.0- <1.1.0-"]
+ , ["<1", "<1.0.0-"]
+ , ["< 1", "<1.0.0-"]
+ , [">=1", ">=1.0.0-"]
+ , [">= 1", ">=1.0.0-"]
+ , ["<1.2", "<1.2.0-"]
+ , ["< 1.2", "<1.2.0-"]
+ , ["1", ">=1.0.0- <2.0.0-"]
+ ].forEach(function (v) {
+ t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1])
+ })
+
+ t.end()
+})
+
+test("\ncomparators test", function (t) {
+; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]
+ , ["1.0.0", [["1.0.0"]] ]
+ , [">=*", [[">=0.0.0-"]] ]
+ , ["", [[""]]]
+ , ["*", [[""]] ]
+ , ["*", [[""]] ]
+ , [">=1.0.0", [[">=1.0.0"]] ]
+ , [">=1.0.0", [[">=1.0.0"]] ]
+ , [">=1.0.0", [[">=1.0.0"]] ]
+ , [">1.0.0", [[">1.0.0"]] ]
+ , [">1.0.0", [[">1.0.0"]] ]
+ , ["<=2.0.0", [["<=2.0.0"]] ]
+ , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
+ , ["<=2.0.0", [["<=2.0.0"]] ]
+ , ["<=2.0.0", [["<=2.0.0"]] ]
+ , ["<2.0.0", [["<2.0.0"]] ]
+ , ["<2.0.0", [["<2.0.0"]] ]
+ , [">= 1.0.0", [[">=1.0.0"]] ]
+ , [">= 1.0.0", [[">=1.0.0"]] ]
+ , [">= 1.0.0", [[">=1.0.0"]] ]
+ , ["> 1.0.0", [[">1.0.0"]] ]
+ , ["> 1.0.0", [[">1.0.0"]] ]
+ , ["<= 2.0.0", [["<=2.0.0"]] ]
+ , ["<= 2.0.0", [["<=2.0.0"]] ]
+ , ["<= 2.0.0", [["<=2.0.0"]] ]
+ , ["< 2.0.0", [["<2.0.0"]] ]
+ , ["<\t2.0.0", [["<2.0.0"]] ]
+ , [">=0.1.97", [[">=0.1.97"]] ]
+ , [">=0.1.97", [[">=0.1.97"]] ]
+ , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ]
+ , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+ , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+ , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+ , ["||", [[""], [""]] ]
+ , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ]
+ , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ]
+ , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+ , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+ , ["x", [[""]] ]
+ , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ]
+ , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ]
+ , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+ , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+ , ["*", [[""]] ]
+ , ["2", [[">=2.0.0-", "<3.0.0-"]] ]
+ , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ]
+ , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
+ , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
+ , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ]
+ , ["~1", [[">=1.0.0-", "<2.0.0-"]] ]
+ , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ]
+ , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ]
+ , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ]
+ , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ]
+ , ["<1", [["<1.0.0-"]] ]
+ , ["< 1", [["<1.0.0-"]] ]
+ , [">=1", [[">=1.0.0-"]] ]
+ , [">= 1", [[">=1.0.0-"]] ]
+ , ["<1.2", [["<1.2.0-"]] ]
+ , ["< 1.2", [["<1.2.0-"]] ]
+ , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
+ ].forEach(function (v) {
+ t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))
+ })
+
+ t.end()
+})
{
- "version": "1.1.62",
+ "version": "1.1.63",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
"config": {
"publishtest": false
},
- "homepage": "http://npmjs.org/",
+ "homepage": "https://npmjs.org/doc/",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"repository": {
"type": "git",
"main": "./lib/npm.js",
"bin": "./bin/npm-cli.js",
"dependencies": {
- "semver": "~1.0.14",
- "ini": "1",
+ "semver": "~1.1.0",
+ "ini": "~1.0.5",
"slide": "1",
"abbrev": "1",
"graceful-fs": "~1.1.1",
"mkdirp": "~0.3.3",
"read": "~1.0.4",
"lru-cache": "~2.0.0",
- "node-gyp": "~0.6.4",
+ "node-gyp": "~0.7.0",
"fstream-npm": "0.1",
"uid-number": "0",
"archy": "0",
"chownr": "0",
"npmlog": "0",
"ansi": "~0.1.2",
- "npm-registry-client": "~0.2.6",
- "read-package-json": "~0.1.3",
- "read-installed": "0",
- "glob": "~3.1.12",
- "init-package-json": "0",
+ "npm-registry-client": "~0.2.9",
+ "read-package-json": "~0.1.7",
+ "read-installed": "0.0.3",
+ "glob": "~3.1.13",
+ "init-package-json": "0.0.6",
"osenv": "0",
"lockfile": ">=0.2",
"retry": "~0.6.0",
- "couch-login": "~0.1.9",
"once": "~1.1.1",
"npmconf": "0",
"opener": "~1.3.0"
"osenv",
"lockfile",
"retry",
- "couch-login",
"once",
"npmconf",
"opener"
"licenses": [
{
"type": "MIT +no-false-attribs",
- "url": "http://github.com/isaacs/npm/raw/master/LICENSE"
+ "url": "https://github.com/isaacs/npm/raw/master/LICENSE"
}
]
}
# on some systems, you can just do cat>npm-install.sh
# which is a bit cuter. But on others, &1 is already closed,
# so catting to another script file won't do anything.
- curl -s http://npmjs.org/install.sh > npm-install-$$.sh
+ curl -s https://npmjs.org/install.sh > npm-install-$$.sh
sh npm-install-$$.sh
ret=$?
rm npm-install-$$.sh
{ "name":"npm-test-blerg"
, "version" : "0.0.0"
, "scripts" : { "test" : "node test.js" }
+, "publishConfig": {"tag": "foo"}
}