node cli.js link -f
clean: ronnclean doc-clean uninstall
- rm npmrc
+ rm -rf npmrc
node cli.js cache clean
uninstall:
ronn: node_modules/.bin/ronn
node_modules/.bin/ronn:
- node cli.js install ronn
+ node cli.js install ronn --no-global
doc: man
man: $(cli_docs) $(api_docs)
-test:
+test: doc
node cli.js test
publish: link doc
## DETAILS
-npm stores cache data in `$HOME/.npm`. For each package that is added
-to the cache, three pieces of information are stored in
-`{cache}/{name}/{version}`:
+npm stores cache data in the directory specified in `npm config get cache`.
+For each package that is added to the cache, three pieces of information are
+stored in `{cache}/{name}/{version}`:
* .../package/:
A folder containing the package contents as they appear in the tarball.
### cache
-Default: `$HOME/.npm` on Posix, or `$HOME/npm-cache` on Windows.
+Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows.
The root cache folder.
This feature is experimental, and may change in future versions.
+The `--tag` argument will apply to all of the affected dependencies. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
+
## SEE ALSO
* npm-ls(1)
npm install sax@">=0.1.0 <0.2.0" bench supervisor
-The `--tag` argument will apply to all of the specified install targets.
+The `--tag` argument will apply to all of the specified install targets. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
The `--force` argument will force npm to fetch remote resources even if a
local copy exists on disk.
This command will check the registry to see if any (or, specific) installed
packages are currently outdated.
+The resulting field 'wanted' shows the latest version according to the
+version specified in the package.json, the field 'latest' the very latest
+version of the package.
+
## SEE ALSO
* npm-update(1)
## SYNOPSIS
npm prune [<name> [<name ...]]
+ npm prune [<name> [<name ...]] [--production]
## DESCRIPTION
Extraneous packages are packages that are not listed on the parent
package's dependencies list.
+If the `--production` flag is specified, this command will remove the
+packages specified in your `devDependencies`.
+
## SEE ALSO
* npm-rm(1)
Tags the specified version of the package with the specified tag, or the
`--tag` config if not specified.
+A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:
+
+ npm install <name>@<tag>
+
+When installing dependencies, a preferred tagged version may be specified:
+
+ npm install --tag <tag>
+
+This also applies to `npm dedupe`.
+
+Publishing a package always sets the "latest" tag to the published version.
+
## SEE ALSO
* npm-publish(1)
+* npm-install(1)
+* npm-dedupe(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
### cache
-* Default: Windows: `%APPDATA%\npm-cache`, Posix: `~/.npm`
+* Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm`
* Type: path
The location of npm's cache directory. See `npm-cache(1)`
<ul><li><a href="cli/npm.html">npm(1)</a></li><li><a href="misc/npm-faq.html">npm-faq(7)</a></li><li><a href="cli/npm-help.html">npm-help(1)</a></li><li><a href="misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.11</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">npm-bin — npm@1.3.11</p>
+<p id="footer">npm-bin — npm@1.3.12</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">npm-bugs — npm@1.3.11</p>
+<p id="footer">npm-bugs — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-commands — npm@1.3.11</p>
+<p id="footer">npm-commands — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.11</p>
+<p id="footer">npm-config — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate — npm@1.3.11</p>
+<p id="footer">npm-deprecate — npm@1.3.12</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">npm-docs — npm@1.3.11</p>
+<p id="footer">npm-docs — npm@1.3.12</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">npm-edit — npm@1.3.11</p>
+<p id="footer">npm-edit — npm@1.3.12</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">npm-explore — npm@1.3.11</p>
+<p id="footer">npm-explore — npm@1.3.12</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">npm-help-search — npm@1.3.11</p>
+<p id="footer">npm-help-search — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../files/package.json.html">package.json(5)</a></p>
</div>
-<p id="footer">npm-init — npm@1.3.11</p>
+<p id="footer">npm-init — npm@1.3.12</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">npm-install — npm@1.3.11</p>
+<p id="footer">npm-install — npm@1.3.12</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">npm-link — npm@1.3.11</p>
+<p id="footer">npm-link — npm@1.3.12</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">npm-load — npm@1.3.11</p>
+<p id="footer">npm-load — npm@1.3.12</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">npm-ls — npm@1.3.11</p>
+<p id="footer">npm-ls — npm@1.3.12</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">npm-outdated — npm@1.3.11</p>
+<p id="footer">npm-outdated — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-owner — npm@1.3.11</p>
+<p id="footer">npm-owner — npm@1.3.12</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">npm-pack — npm@1.3.11</p>
+<p id="footer">npm-pack — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-prefix — npm@1.3.11</p>
+<p id="footer">npm-prefix — npm@1.3.12</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">npm-prune — npm@1.3.11</p>
+<p id="footer">npm-prune — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../api/npm-owner.html">npm-owner(3)</a></li></ul>
</div>
-<p id="footer">npm-publish — npm@1.3.11</p>
+<p id="footer">npm-publish — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">npm-rebuild — npm@1.3.11</p>
+<p id="footer">npm-rebuild — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-restart — npm@1.3.11</p>
+<p id="footer">npm-restart — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">npm-root — npm@1.3.11</p>
+<p id="footer">npm-root — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../api/npm-test.html">npm-test(3)</a></li><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-restart.html">npm-restart(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-run-script — npm@1.3.11</p>
+<p id="footer">npm-run-script — npm@1.3.12</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">npm-search — npm@1.3.11</p>
+<p id="footer">npm-search — npm@1.3.12</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">npm-shrinkwrap — npm@1.3.11</p>
+<p id="footer">npm-shrinkwrap — npm@1.3.12</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">npm-start — npm@1.3.11</p>
+<p id="footer">npm-start — npm@1.3.12</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">npm-stop — npm@1.3.11</p>
+<p id="footer">npm-stop — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule — npm@1.3.11</p>
+<p id="footer">npm-submodule — npm@1.3.12</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">npm-tag — npm@1.3.11</p>
+<p id="footer">npm-tag — npm@1.3.12</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">npm-test — npm@1.3.11</p>
+<p id="footer">npm-test — npm@1.3.12</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">npm-uninstall — npm@1.3.11</p>
+<p id="footer">npm-uninstall — npm@1.3.12</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">npm-unpublish — npm@1.3.11</p>
+<p id="footer">npm-unpublish — npm@1.3.12</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">npm-update — npm@1.3.11</p>
+<p id="footer">npm-update — npm@1.3.12</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">npm-version — npm@1.3.11</p>
+<p id="footer">npm-version — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">npm-view — npm@1.3.11</p>
+<p id="footer">npm-view — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-whoami — npm@1.3.11</p>
+<p id="footer">npm-whoami — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.3.11</p>
+<p>1.3.12</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.3.11</p>
+<p id="footer">npm — npm@1.3.12</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">repo — npm@1.3.11</p>
+<p id="footer">repo — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li></ul>
</div>
-<p id="footer">npm-adduser — npm@1.3.11</p>
+<p id="footer">npm-adduser — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-bin — npm@1.3.11</p>
+<p id="footer">npm-bin — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-bugs — npm@1.3.11</p>
+<p id="footer">npm-bugs — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-build — npm@1.3.11</p>
+<p id="footer">npm-build — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-bundle — npm@1.3.11</p>
+<p id="footer">npm-bundle — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="DETAILS">DETAILS</h2>
-<p>npm stores cache data in <code>$HOME/.npm</code>. For each package that is added
-to the cache, three pieces of information are stored in
-<code>{cache}/{name}/{version}</code>:</p>
+<p>npm stores cache data in the directory specified in <code>npm config get cache</code>.
+For each package that is added to the cache, three pieces of information are
+stored in <code>{cache}/{name}/{version}</code>:</p>
<ul><li>.../package/:
A folder containing the package contents as they appear in the tarball.</li><li>.../package.json:
<h3 id="cache">cache</h3>
-<p>Default: <code>$HOME/.npm</code> on Posix, or <code>$HOME/npm-cache</code> on Windows.</p>
+<p>Default: <code>~/.npm</code> on Posix, or <code>%AppData%/npm-cache</code> on Windows.</p>
<p>The root cache folder.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li></ul>
</div>
-<p id="footer">npm-cache — npm@1.3.11</p>
+<p id="footer">npm-cache — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-completion — npm@1.3.11</p>
+<p id="footer">npm-completion — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.11</p>
+<p id="footer">npm-config — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This feature is experimental, and may change in future versions.</p>
+<p>The <code>--tag</code> argument will apply to all of the affected dependencies. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.</p>
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
<ul><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-dedupe — npm@1.3.11</p>
+<p id="footer">npm-dedupe — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate — npm@1.3.11</p>
+<p id="footer">npm-deprecate — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-docs — npm@1.3.11</p>
+<p id="footer">npm-docs — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-explore.html">npm-explore(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-edit — npm@1.3.11</p>
+<p id="footer">npm-edit — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-submodule.html">npm-submodule(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-edit.html">npm-edit(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-explore — npm@1.3.11</p>
+<p id="footer">npm-explore — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul>
</div>
-<p id="footer">npm-help-search — npm@1.3.11</p>
+<p id="footer">npm-help-search — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-help-search.html">npm-help-search(1)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-help — npm@1.3.11</p>
+<p id="footer">npm-help — npm@1.3.12</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="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li></ul>
</div>
-<p id="footer">npm-init — npm@1.3.11</p>
+<p id="footer">npm-init — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<pre><code>npm install sax@">=0.1.0 <0.2.0" bench supervisor</code></pre>
-<p>The <code>--tag</code> argument will apply to all of the specified install targets.</p>
+<p>The <code>--tag</code> argument will apply to all of the specified install targets. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.</p>
<p>The <code>--force</code> argument will force npm to fetch remote resources even if a
local copy exists on disk.</p>
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">npm-install — npm@1.3.11</p>
+<p id="footer">npm-install — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-link — npm@1.3.11</p>
+<p id="footer">npm-link — npm@1.3.12</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.3.11 /path/to/npm
+<pre><code>npm@1.3.12 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li></ul>
</div>
-<p id="footer">npm-ls — npm@1.3.11</p>
+<p id="footer">npm-ls — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will check the registry to see if any (or, specific) installed
packages are currently outdated.</p>
+<p>The resulting field 'wanted' shows the latest version according to the
+version specified in the package.json, the field 'latest' the very latest
+version of the package.</p>
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
<ul><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-outdated — npm@1.3.11</p>
+<p id="footer">npm-outdated — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-owner — npm@1.3.11</p>
+<p id="footer">npm-owner — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-pack — npm@1.3.11</p>
+<p id="footer">npm-pack — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-prefix — npm@1.3.11</p>
+<p id="footer">npm-prefix — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="SYNOPSIS">SYNOPSIS</h2>
-<pre><code>npm prune [<name> [<name ...]]</code></pre>
+<pre><code>npm prune [<name> [<name ...]]
+npm prune [<name> [<name ...]] [--production]</code></pre>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
+<p>If the <code>--production</code> flag is specified, this command will remove the
+packages specified in your <code>devDependencies</code>.</p>
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
<ul><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-prune — npm@1.3.11</p>
+<p id="footer">npm-prune — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li></ul>
</div>
-<p id="footer">npm-publish — npm@1.3.11</p>
+<p id="footer">npm-publish — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-rebuild — npm@1.3.11</p>
+<p id="footer">npm-rebuild — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-restart — npm@1.3.11</p>
+<p id="footer">npm-restart — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-rm — npm@1.3.11</p>
+<p id="footer">npm-rm — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-root — npm@1.3.11</p>
+<p id="footer">npm-root — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-run-script — npm@1.3.11</p>
+<p id="footer">npm-run-script — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li></ul>
</div>
-<p id="footer">npm-search — npm@1.3.11</p>
+<p id="footer">npm-search — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-shrinkwrap — npm@1.3.11</p>
+<p id="footer">npm-shrinkwrap — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-star — npm@1.3.11</p>
+<p id="footer">npm-star — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-star.html">npm-star(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-stars — npm@1.3.11</p>
+<p id="footer">npm-stars — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-start — npm@1.3.11</p>
+<p id="footer">npm-start — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li></ul>
</div>
-<p id="footer">npm-stop — npm@1.3.11</p>
+<p id="footer">npm-stop — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/package.json.html">package.json(5)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule — npm@1.3.11</p>
+<p id="footer">npm-submodule — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Tags the specified version of the package with the specified tag, or the
<code>--tag</code> config if not specified.</p>
+<p>A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:</p>
+
+<pre><code>npm install <name>@<tag></code></pre>
+
+<p>When installing dependencies, a preferred tagged version may be specified:</p>
+
+<pre><code>npm install --tag <tag></code></pre>
+
+<p>This also applies to <code>npm dedupe</code>.</p>
+
+<p>Publishing a package always sets the "latest" tag to the published version.</p>
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
+<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-dedupe.html">npm-dedupe(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-tag — npm@1.3.11</p>
+<p id="footer">npm-tag — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-test — npm@1.3.11</p>
+<p id="footer">npm-test — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-uninstall — npm@1.3.11</p>
+<p id="footer">npm-uninstall — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-unpublish — npm@1.3.11</p>
+<p id="footer">npm-unpublish — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-update — npm@1.3.11</p>
+<p id="footer">npm-update — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/semver.html">semver(7)</a></li></ul>
</div>
-<p id="footer">npm-version — npm@1.3.11</p>
+<p id="footer">npm-version — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-search.html">npm-search(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li></ul>
</div>
-<p id="footer">npm-view — npm@1.3.11</p>
+<p id="footer">npm-view — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-whoami — npm@1.3.11</p>
+<p id="footer">npm-whoami — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.3.11</p>
+<p>1.3.12</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.3.11</p>
+<p id="footer">npm — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li></ul>
</div>
-<p id="footer">repo — npm@1.3.11</p>
+<p id="footer">repo — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders — npm@1.3.11</p>
+<p id="footer">npm-folders — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders — npm@1.3.11</p>
+<p id="footer">npm-folders — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json — npm@1.3.11</p>
+<p id="footer">package.json — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npmrc — npm@1.3.11</p>
+<p id="footer">npmrc — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json — npm@1.3.11</p>
+<p id="footer">package.json — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index — npm@1.3.11</p>
+<p id="footer">npm-index — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-coding-style — npm@1.3.11</p>
+<p id="footer">npm-coding-style — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h3 id="cache">cache</h3>
-<ul><li>Default: Windows: <code>%APPDATA%\npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
+<ul><li>Default: Windows: <code>%AppData%\npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
<p>The location of npm's cache directory. See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code></p>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.11</p>
+<p id="footer">npm-config — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-developers — npm@1.3.11</p>
+<p id="footer">npm-developers — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-disputes — npm@1.3.11</p>
+<p id="footer">npm-disputes — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-faq — npm@1.3.11</p>
+<p id="footer">npm-faq — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index — npm@1.3.11</p>
+<p id="footer">npm-index — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-registry — npm@1.3.11</p>
+<p id="footer">npm-registry — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-scripts — npm@1.3.11</p>
+<p id="footer">npm-scripts — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.3.11</p>
+<p id="footer">removing-npm — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
range.</li><li>maxSatisfying(versions, range): Return the highest version in the list
that satisfies the range, or null if none of them do.</li></ul>
</div>
-<p id="footer">semver — npm@1.3.11</p>
+<p id="footer">semver — npm@1.3.12</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
getCacheStat(function (er, cs) {
mkdir(path.dirname(tgz), function (er, made) {
if (er) return cb(er)
- tar.pack(tgz, p, data, false, function (er) {
+
+ var fancy = p.indexOf(npm.tmp) !== 0
+ && p.indexOf(npm.cache) !== 0
+ tar.pack(tgz, p, data, fancy, function (er) {
if (er) {
log.error( "addLocalDirectory", "Could not pack %j to %j"
, p, tgz )
npm.registry.get(name, function (er, data) {
var regVersions = er ? [] : Object.keys(data.versions)
var locMatch = bestMatch(versions, ranges)
- var regMatch = bestMatch(regVersions, ranges)
+ var regMatch;
+ var tag = npm.config.get("tag");
+ var distTags = data["dist-tags"];
+ if (distTags && distTags[tag] && data.versions[distTags[tag]]) {
+ regMatch = distTags[tag]
+ } else {
+ regMatch = bestMatch(regVersions, ranges)
+ }
cb(null, [[name, has, loc, locMatch, regMatch, locs]])
})
-
module.exports = docs
docs.usage = "npm docs <pkgname>"
function docs (args, cb) {
if (!args.length) return cb(docs.usage)
- var n = args[0].split("@").shift()
- registry.get(n + "/latest", 3600, function (er, d) {
- if (er) return cb(er)
+ var project = args[0]
+ var npmName = project.split("@").shift()
+ registry.get(project + "/latest", 3600, function (er, d) {
+ if (er) {
+ if (project.split("/").length !== 2) return cb(er)
+
+ var url = "https://github.com/" + project + "#readme"
+ return opener(url, { command: npm.config.get("browser") }, cb)
+ }
+
var homepage = d.homepage
, repo = d.repository || d.repositories
, url = homepage ? homepage
}
console.log(out)
+ if (args.length && !data._found) process.exitCode = 1
+
// if any errors were found, then complain and exit status 1
if (lite.problems && lite.problems.length) {
er = lite.problems.join('\n')
, dir = path.resolve(p[0], "node_modules", dep)
, has = p[2]
, want = p[3]
+ , latest = p[4]
// XXX add --json support
// Should match (more or less) the output of ls --json
if (!npm.config.get("global")) {
dir = path.relative(process.cwd(), dir)
}
- return dep + "@" + want + " " + dir
+ return dep + " " + dir
+ " current=" + (has || "MISSING")
+ + " wanted=" + want
+ + " latest=" + latest
}
function outdated_ (args, dir, parentHas, cb) {
readJson(path.resolve(dir, "package.json"), function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
deps = (er) ? true : (d.dependencies || {})
+ var doUpdate = npm.config.get("dev") ||
+ (!npm.config.get("production") &&
+ !Object.keys(parentHas).length &&
+ !npm.config.get("global"))
+ if (!er && d && doUpdate) {
+ Object.keys(d.devDependencies || {}).forEach(function (k) {
+ if (!(k in parentHas)) {
+ deps[k] = d.devDependencies[k]
+ }
+ })
+ }
return next()
})
, cb )
}
- function doIt (shouldHave) {
- cb(null, [[ dir, dep, curr && curr.version, shouldHave, req ]])
+ function doIt (wanted, latest) {
+ cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req ]])
}
if (args.length && args.indexOf(dep) === -1) {
return skip()
}
- // so, we can conceivably update this. find out if we need to.
- cache.add(dep, req, function (er, d) {
- // if this fails, then it means we can't update this thing.
- // it's probably a thing that isn't published.
- if (er) return skip()
-
- // check that the url origin hasn't changed (#1727) and that
- // there is no newer version available
- var dFromUrl = d._from && url.parse(d._from).protocol
- var cFromUrl = curr && curr.from && url.parse(curr.from).protocol
-
- if (!curr || dFromUrl && cFromUrl && d._from !== curr.from
- || d.version !== curr.version)
- doIt(d.version)
- else
- skip()
+ var registry = npm.registry
+ // search for the latest package
+ registry.get(dep + "/latest", function (er, l) {
+ if (er) return cb()
+ // so, we can conceivably update this. find out if we need to.
+ cache.add(dep, req, function (er, d) {
+ // if this fails, then it means we can't update this thing.
+ // it's probably a thing that isn't published.
+ if (er) return skip()
+
+ // check that the url origin hasn't changed (#1727) and that
+ // there is no newer version available
+ var dFromUrl = d._from && url.parse(d._from).protocol
+ var cFromUrl = curr && curr.from && url.parse(curr.from).protocol
+
+ if (!curr || dFromUrl && cFromUrl && d._from !== curr.from
+ || d.version !== curr.version
+ || d.version !== l.version)
+ doIt(d.version, l.version)
+ else
+ skip()
+ })
})
}
, log = require("npmlog")
, opener = require("opener")
, github = require('github-url-from-git')
+ , githubUserRepo = require("github-url-from-username-repo")
function repo (args, cb) {
if (!args.length) return cb(repo.usage)
if (er) return cb(er)
var r = d.repository;
if (!r) return cb(new Error('no repository'));
- var url = github(r.url);
+ // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated
+ // from https://github.com/isaacs/npm-www/issues/418
+ if (githubUserRepo(r.url))
+ r.url = githubUserRepo(r.url)
+
+ var url = github(r.url)
+ if (!url)
+ return cb(new Error('no repository: could not get url'))
opener(url, { command: npm.config.get("browser") }, cb)
})
}
asyncMap(args, unbuild_(silent), cb)
}
-function unbuild_ (silent) { return function (folder, cb) {
+function unbuild_ (silent) { return function (folder, cb_) {
+ function cb (er) {
+ cb_(er, path.relative(npm.root, folder))
+ }
folder = path.resolve(folder)
delete build._didBuild[folder]
log.info(folder, "unbuild")
})
function exit (code, noLog) {
- exitCode = exitCode || code
+ exitCode = exitCode || process.exitCode || code
var doExit = npm.config.get("_exit")
log.verbose("exit", [code, doExit])
, path = require("path")
, fs = require("graceful-fs")
, chain = require("slide").chain
- , constants = require("constants")
, Stream = require("stream").Stream
, PATH = "PATH"
+ , uidNumber = require("uid-number")
// windows calls it's path "Path" usually, but this is not guaranteed.
if (process.platform === "win32") {
function runPackageLifecycle (pkg, env, wd, unsafe, cb) {
// run package lifecycle scripts in the package root, or the nearest parent.
var stage = env.npm_lifecycle_event
- , user = unsafe ? null : npm.config.get("user")
- , group = unsafe ? null : npm.config.get("group")
, cmd = env.npm_lifecycle_script
- , sh = "sh"
- , shFlag = "-c"
+
+ var note = "\n> " + pkg._id + " " + stage + " " + wd
+ + "\n> " + cmd + "\n"
+ console.log(note)
+ runCmd(cmd, pkg, env, stage, wd, unsafe, cb)
+}
+
+function runCmd (cmd, pkg, env, stage, wd, unsafe, cb) {
+ var user = unsafe ? null : npm.config.get("user")
+ , group = unsafe ? null : npm.config.get("group")
+
+ log.verbose("unsafe-perm in lifecycle", unsafe)
+
+ if (process.platform === "win32") {
+ unsafe = true
+ }
+
+ if (unsafe) {
+ runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb)
+ } else {
+ uidNumber(user, group, function (er, uid, gid) {
+ runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb)
+ })
+ }
+}
+
+function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb) {
+ var sh = "sh"
+ var shFlag = "-c"
if (process.platform === "win32") {
sh = "cmd"
shFlag = "/c"
}
- log.verbose("unsafe-perm in lifecycle", unsafe)
-
- var note = "\n> " + pkg._id + " " + stage + " " + wd
- + "\n> " + cmd + "\n"
+ var conf = { cwd: wd
+ , env: env
+ , stdio: [ 0, 1, 2 ]
+ }
- console.log(note)
+ if (!unsafe) {
+ conf.uid = uid
+ conf.gid = gid
+ }
- var conf = { cwd: wd, env: env, customFds: [ 0, 1, 2] }
var proc = spawn(sh, [shFlag, cmd], conf)
- proc.on("close", function (er, stdout, stderr) {
+ proc.on("close", function (code) {
+ if (code) {
+ var er = new Error("Exit status " + code)
+ }
if (er && !npm.ROLLBACK) {
log.info(pkg._id, "Failed to exec "+stage+" script")
er.message = pkg._id + " "
- + stage + ": `" + env.npm_lifecycle_script+"`\n"
+ + stage + ": `" + cmd +"`\n"
+ er.message
if (er.code !== "EPERM") {
er.code = "ELIFECYCLE"
}
er.pkgid = pkg._id
er.stage = stage
- er.script = env.npm_lifecycle_script
+ er.script = cmd
er.pkgname = pkg.name
return cb(er)
} else if (er) {
})
}
+
function runHookLifecycle (pkg, env, wd, unsafe, cb) {
// check for a hook script, run if present.
var stage = env.npm_lifecycle_event
fs.stat(hook, function (er) {
if (er) return cb()
-
- var conf = { cwd: wd, env: env, customFds: [ 0, 1, 2] }
- var proc = spawn("sh", ["-c", cmd], conf)
- proc.on("close", function (er) {
- if (er) {
- er.message += "\nFailed to exec "+stage+" hook script"
- log.info(pkg._id, er)
- }
- if (npm.ROLLBACK) return cb()
- cb(er)
- })
+ runCmd(hook, pkg, env, stage, wd, unsafe, cb)
})
}
--- /dev/null
+:: The tests run "make doc" in the prepublish script,
+:: so this file gives windows something that'll exit
+:: successfully, without having to install make.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "September 2013" "" ""
+.TH "NPM" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "September 2013" "" ""
+.TH "NPM\-ADDUSER" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-BIN" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-BUGS" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-BUILD" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "September 2013" "" ""
+.TH "NPM\-BUNDLE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "September 2013" "" ""
+.TH "NPM\-CACHE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
.IP "" 0
.
.SH "DETAILS"
-npm stores cache data in \fB$HOME/\.npm\fR\|\. For each package that is added
-to the cache, three pieces of information are stored in \fB{cache}/{name}/{version}\fR:
+npm stores cache data in the directory specified in \fBnpm config get cache\fR\|\.
+For each package that is added to the cache, three pieces of information are
+stored in \fB{cache}/{name}/{version}\fR:
.
.IP "\(bu" 4
\|\.\.\./package/:
.SH "CONFIGURATION"
.
.SS "cache"
-Default: \fB$HOME/\.npm\fR on Posix, or \fB$HOME/npm\-cache\fR on Windows\.
+Default: \fB~/\.npm\fR on Posix, or \fB%AppData%/npm\-cache\fR on Windows\.
.
.P
The root cache folder\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "September 2013" "" ""
+.TH "NPM\-COMPLETION" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-CONFIG" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEDUPE" "1" "September 2013" "" ""
+.TH "NPM\-DEDUPE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-dedupe\fR \-\- Reduce duplication
.P
This feature is experimental, and may change in future versions\.
.
+.P
+The \fB\-\-tag\fR argument will apply to all of the affected dependencies\. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions\.
+.
.SH "SEE ALSO"
.
.IP "\(bu" 4
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "September 2013" "" ""
+.TH "NPM\-DEPRECATE" "1" "October 2013" "" ""
.
.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" "1" "September 2013" "" ""
+.TH "NPM\-DOCS" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-EDIT" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-EXPLORE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "September 2013" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-HELP" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "September 2013" "" ""
+.TH "NPM\-INIT" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-INSTALL" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
.IP "" 0
.
.P
-The \fB\-\-tag\fR argument will apply to all of the specified install targets\.
+The \fB\-\-tag\fR argument will apply to all of the specified install targets\. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions\.
.
.P
The \fB\-\-force\fR argument will force npm to fetch remote resources even if a
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "September 2013" "" ""
+.TH "NPM\-LINK" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-LS" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.IP "" 4
.
.nf
-npm@1.3.11 /path/to/npm
+npm@1.3.12 /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\-OUTDATED" "1" "September 2013" "" ""
+.TH "NPM\-OUTDATED" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
This command will check the registry to see if any (or, specific) installed
packages are currently outdated\.
.
+.P
+The resulting field \'wanted\' shows the latest version according to the
+version specified in the package\.json, the field \'latest\' the very latest
+version of the package\.
+.
.SH "SEE ALSO"
.
.IP "\(bu" 4
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "September 2013" "" ""
+.TH "NPM\-OWNER" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "September 2013" "" ""
+.TH "NPM\-PACK" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-PREFIX" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "September 2013" "" ""
+.TH "NPM\-PRUNE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.
.nf
npm prune [<name> [<name \.\.\.]]
+npm prune [<name> [<name \.\.\.]] [\-\-production]
.
.fi
.
Extraneous packages are packages that are not listed on the parent
package\'s dependencies list\.
.
+.P
+If the \fB\-\-production\fR flag is specified, this command will remove the
+packages specified in your \fBdevDependencies\fR\|\.
+.
.SH "SEE ALSO"
.
.IP "\(bu" 4
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "September 2013" "" ""
+.TH "NPM\-PUBLISH" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "September 2013" "" ""
+.TH "NPM\-REBUILD" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "September 2013" "" ""
+.TH "NPM\-RESTART" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "September 2013" "" ""
+.TH "NPM\-RM" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "September 2013" "" ""
+.TH "NPM\-ROOT" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "September 2013" "" ""
+.TH "NPM\-SEARCH" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "1" "September 2013" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-STAR" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STARS" "1" "September 2013" "" ""
+.TH "NPM\-STARS" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-stars\fR \-\- View packages marked as favorites
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "September 2013" "" ""
+.TH "NPM\-START" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "September 2013" "" ""
+.TH "NPM\-STOP" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "September 2013" "" ""
+.TH "NPM\-SUBMODULE" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-TAG" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.SH "DESCRIPTION"
Tags the specified version of the package with the specified tag, or the \fB\-\-tag\fR config if not specified\.
.
+.P
+A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:
+.
+.IP "" 4
+.
+.nf
+npm install <name>@<tag>
+.
+.fi
+.
+.IP "" 0
+.
+.P
+When installing dependencies, a preferred tagged version may be specified:
+.
+.IP "" 4
+.
+.nf
+npm install \-\-tag <tag>
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This also applies to \fBnpm dedupe\fR\|\.
+.
+.P
+Publishing a package always sets the "latest" tag to the published version\.
+.
.SH "SEE ALSO"
.
.IP "\(bu" 4
npm help publish
.
.IP "\(bu" 4
+npm help install
+.
+.IP "\(bu" 4
+npm help dedupe
+.
+.IP "\(bu" 4
npm help registry
.
.IP "\(bu" 4
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "September 2013" "" ""
+.TH "NPM\-TEST" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "September 2013" "" ""
+.TH "NPM\-RM" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "September 2013" "" ""
+.TH "NPM\-UNPUBLISH" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-UPDATE" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "September 2013" "" ""
+.TH "NPM\-VERSION" "1" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-VIEW" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "September 2013" "" ""
+.TH "NPM\-WHOAMI" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "September 2013" "" ""
+.TH "NPM" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.3.11
+1.3.12
.
.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\-REPO" "1" "September 2013" "" ""
+.TH "NPM\-REPO" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-repo\fR \-\- Open package repository page in the browser
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "September 2013" "" ""
+.TH "NPM\-BIN" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-BUGS" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-COMMANDS" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "September 2013" "" ""
+.TH "NPM\-CONFIG" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-DEPRECATE" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-DOCS" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-EDIT" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-EXPLORE" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "INIT" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-INSTALL" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-LINK" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-LOAD" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "September 2013" "" ""
+.TH "NPM\-LS" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "September 2013" "" ""
+.TH "NPM\-OUTDATED" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-OWNER" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "September 2013" "" ""
+.TH "NPM\-PACK" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-PREFIX" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "September 2013" "" ""
+.TH "NPM\-PRUNE" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "September 2013" "" ""
+.TH "NPM\-PUBLISH" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "September 2013" "" ""
+.TH "NPM\-REBUILD" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "September 2013" "" ""
+.TH "NPM\-RESTART" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "September 2013" "" ""
+.TH "NPM\-ROOT" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-SEARCH" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "3" "September 2013" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-START" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "September 2013" "" ""
+.TH "NPM\-STOP" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "September 2013" "" ""
+.TH "NPM\-SUBMODULE" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-TAG" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-TEST" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "September 2013" "" ""
+.TH "NPM\-UNINSTALL" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-UNPUBLISH" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-UPDATE" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "September 2013" "" ""
+.TH "NPM\-VERSION" "3" "October 2013" "" ""
.
.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 2013" "" ""
+.TH "NPM\-VIEW" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "September 2013" "" ""
+.TH "NPM\-WHOAMI" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "September 2013" "" ""
+.TH "NPM" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.3.11
+1.3.12
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REPO" "3" "September 2013" "" ""
+.TH "NPM\-REPO" "3" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-repo\fR \-\- Open package repository page in the browser
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "5" "September 2013" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "5" "September 2013" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "PACKAGE\.JSON" "5" "September 2013" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2013" "" ""
.
.SH "NAME"
\fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPMRC" "5" "September 2013" "" ""
+.TH "NPMRC" "5" "October 2013" "" ""
.
.SH "NAME"
\fBnpmrc\fR \-\- The npm config files
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "PACKAGE\.JSON" "5" "September 2013" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2013" "" ""
.
.SH "NAME"
\fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "7" "September 2013" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "7" "September 2013" "" ""
+.TH "NPM\-CONFIG" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- More than you probably want to know about npm configuration
.SS "cache"
.
.IP "\(bu" 4
-Default: Windows: \fB%APPDATA%\\npm\-cache\fR, Posix: \fB~/\.npm\fR
+Default: Windows: \fB%AppData%\\npm\-cache\fR, Posix: \fB~/\.npm\fR
.
.IP "\(bu" 4
Type: path
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "7" "September 2013" "" ""
+.TH "NPM\-DEVELOPERS" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DISPUTES" "7" "September 2013" "" ""
+.TH "NPM\-DISPUTES" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-disputes\fR \-\- Handling Module Name Disputes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "7" "September 2013" "" ""
+.TH "NPM\-FAQ" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "7" "September 2013" "" ""
+.TH "NPM\-INDEX" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "7" "September 2013" "" ""
+.TH "NPM\-REGISTRY" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "7" "September 2013" "" ""
+.TH "NPM\-SCRIPTS" "7" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "September 2013" "" ""
+.TH "NPM\-REMOVAL" "1" "October 2013" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "SEMVER" "7" "September 2013" "" ""
+.TH "SEMVER" "7" "October 2013" "" ""
.
.SH "NAME"
\fBsemver\fR \-\- The semantic versioner for npm
=========
### Advanced ANSI formatting tool for Node.js
-![](http://f.cl.ly/items/0D3w3d1W443f2z3X361G/Screen%20Shot%202012-01-26%20at%202.18.31%20AM.png)
-
`ansi.js` is a module for Node.js that provides an easy-to-use API for
writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do
fancy things in a terminal window, like render text in colors, delete characters,
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-----------
-
-Additionally:
-
- * The `yoshi.png` file inside `examples/imgcat` is copyright to Nintendo, Inc.
--- /dev/null
+#!/usr/bin/perl
+# Author: Todd Larason <jtl@molehill.org>
+# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $
+
+print "256 color mode\n\n";
+
+# display back ground colors
+
+for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
+
+# first the system ones:
+print "System colors:\n";
+for ($color = 0; $color < 8; $color++) {
+ print "\x1b[${fgbg};5;${color}m::";
+}
+print "\x1b[0m\n";
+for ($color = 8; $color < 16; $color++) {
+ print "\x1b[${fgbg};5;${color}m::";
+}
+print "\x1b[0m\n\n";
+
+# now the color cube
+print "Color cube, 6x6x6:\n";
+for ($green = 0; $green < 6; $green++) {
+ for ($red = 0; $red < 6; $red++) {
+ for ($blue = 0; $blue < 6; $blue++) {
+ $color = 16 + ($red * 36) + ($green * 6) + $blue;
+ print "\x1b[${fgbg};5;${color}m::";
+ }
+ print "\x1b[0m ";
+ }
+ print "\n";
+}
+
+# now the grayscale ramp
+print "Grayscale ramp:\n";
+for ($color = 232; $color < 256; $color++) {
+ print "\x1b[${fgbg};5;${color}m::";
+}
+print "\x1b[0m\n\n";
+
+}
+
+print "Examples for the 3-byte color mode\n\n";
+
+for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
+
+# now the color cube
+print "Color cube\n";
+for ($green = 0; $green < 256; $green+=51) {
+ for ($red = 0; $red < 256; $red+=51) {
+ for ($blue = 0; $blue < 256; $blue+=51) {
+ print "\x1b[${fgbg};2;${red};${green};${blue}m::";
+ }
+ print "\x1b[0m ";
+ }
+ print "\n";
+}
+
+# now the grayscale ramp
+print "Grayscale ramp:\n";
+for ($gray = 8; $gray < 256; $gray+=10) {
+ print "\x1b[${fgbg};2;${gray};${gray};${gray}m::";
+}
+print "\x1b[0m\n\n";
+
+}
// listen for the queryPosition report on stdin
process.stdin.resume()
-tty.setRawMode(true)
+raw(true)
process.stdin.once('data', function (b) {
var match = /\[(\d+)\;(\d+)R$/.exec(b.toString())
}
// cleanup and close stdin
- tty.setRawMode(false)
+ raw(false)
process.stdin.pause()
})
// send the query position request code to stdout
cursor.queryPosition()
+
+function raw (mode) {
+ if (process.stdin.setRawMode) {
+ process.stdin.setRawMode(mode)
+ } else {
+ tty.setRawMode(mode)
+ }
+}
+++ /dev/null
-#!/usr/bin/env node
-
-process.title = 'imgcat'
-
-var ansi = require('../../')
- , cursor = ansi(process.stdout, { enabled: true })
- , tty = require('tty')
- , Canvas = require('canvas')
- , imageFile = process.argv[2] || __dirname + '/yoshi.png'
- , screenWidth = process.stdout.isTTY ? process.stdout.getWindowSize()[0] : Infinity
- , maxWidth = parseInt(process.argv[3], 10) || screenWidth
- , image = require('fs').readFileSync(imageFile)
- , pixel = ' '
- , alphaThreshold = 0
-
-var img = new Canvas.Image();
-img.src = image;
-
-function draw () {
- var width = maxWidth / pixel.length
- , scaleW = img.width > width ? width / img.width : 1
- , w = Math.floor(img.width * scaleW)
- , h = Math.floor(img.height * scaleW);
-
- var canvas = new Canvas(w, h)
- , ctx = canvas.getContext('2d');
-
- ctx.drawImage(img, 0, 0, w, h);
-
- var data = ctx.getImageData(0, 0, w, h).data;
-
- for (var i=0, l=data.length; i<l; i+=4) {
- var r = data[i]
- , g = data[i+1]
- , b = data[i+2]
- , alpha = data[i+3];
- if (alpha > alphaThreshold) {
- cursor.bg.rgb(r, g, b);
- } else {
- cursor.bg.reset();
- }
- process.stdout.write(pixel);
- if ((i/4|0) % w === (w-1)) {
- cursor.bg.reset();
- process.stdout.write('\n');
- }
- }
-}
-
-draw();
var net = require('net')
, cursor = require('../')(process.stdout)
+ , color = process.argv[2]
// enable "raw mode" so that keystrokes aren't visible
process.stdin.resume()
var socket = net.connect(23, 'towel.blinkenlights.nl')
socket.on('connect', function () {
+ if (color in cursor.fg) {
+ cursor.fg[color]()
+ }
cursor.hide()
socket.pipe(process.stdout)
})
})
process.on('exit', function () {
- cursor.show().write('\n')
+ cursor
+ .show()
+ .fg.reset()
+ .write('\n')
})
*/
var emitNewlineEvents = require('./newlines')
- , prefix = '\033[' // For all escape codes
+ , prefix = '\x1b[' // For all escape codes
, suffix = 'm' // Only for color codes
/**
}
this.enabled = !!this.enabled
+ // then `buffering` is true, then `write()` calls are buffered in
+ // memory until `flush()` is invoked
+ this.buffering = !!(options && options.buffering)
+ this._buffer = []
+
// controls the foreground and background colors
this.fg = this.foreground = new Colorer(this, 0)
this.bg = this.background = new Colorer(this, 10)
* the chaining going.
*/
-Cursor.prototype.write = function () {
- this.stream.write.apply(this.stream, arguments)
+Cursor.prototype.write = function (data) {
+ if (this.buffering) {
+ this._buffer.push(arguments)
+ } else {
+ this.stream.write.apply(this.stream, arguments)
+ }
+ return this
+}
+
+/**
+ * Buffer `write()` calls into memory.
+ *
+ * @api public
+ */
+
+Cursor.prototype.buffer = function () {
+ this.buffering = true
+ return this
+}
+
+/**
+ * Write out the in-memory buffer.
+ *
+ * @api public
+ */
+
+Cursor.prototype.flush = function () {
+ this.buffering = false
+ var str = this._buffer.map(function (args) {
+ if (args.length != 1) throw new Error('unexpected args length! ' + args.length);
+ return args[0];
+ }).join('');
+ this._buffer.splice(0); // empty
+ this.write(str);
return this
}
*/
Cursor.prototype.beep = function () {
- this.enabled && this.write('\007')
+ this.enabled && this.write('\x07')
return this
}
"256",
"stream"
],
- "version": "0.1.2",
+ "version": "0.2.1",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
"bin": {
"beep": "./examples/beep/index.js",
"clear": "./examples/clear/index.js",
- "imgcat": "./examples/imgcat/index.js",
"starwars": "./examples/starwars.js"
},
"scripts": {
"test": "mocha --reporter spec"
},
"devDependencies": {
- "mocha": "*",
- "canvas": "*"
+ "mocha": "*"
},
"engines": {
"node": "*"
},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "ansi@0.1.2",
- "dependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.24",
- "_nodeVersion": "v0.7.10-pre",
- "_defaultsLoaded": true,
+ "readme": "ansi.js\n=========\n### Advanced ANSI formatting tool for Node.js\n\n`ansi.js` is a module for Node.js that provides an easy-to-use API for\nwriting ANSI escape codes to `Stream` instances. ANSI escape codes are used to do\nfancy things in a terminal window, like render text in colors, delete characters,\nlines, the entire window, or hide and show the cursor, and lots more!\n\nThe code for the example in the screenshot above can be found in the\n`examples/imgcat` directory.\n\n#### Features:\n\n * 256 color support for the terminal!\n * Make a beep sound from your terminal!\n * Works with *any* writable `Stream` instance.\n * Allows you to move the cursor anywhere on the terminal window.\n * Allows you to delete existing contents from the terminal window.\n * Allows you to hide and show the cursor.\n * Converts CSS color codes and RGB values into ANSI escape codes.\n * Low-level; you are in control of when escape codes are used, it's not abstracted.\n\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install ansi\n```\n\n\nExample\n-------\n\n``` js\nvar ansi = require('ansi')\n , cursor = ansi(process.stdout)\n\n// You can chain your calls forever:\ncursor\n .red() // Set font color to red\n .bg.grey() // Set background color to grey\n .write('Hello World!') // Write 'Hello World!' to stdout\n .bg.reset() // Reset the bgcolor before writing the trailing \\n,\n // to avoid Terminal glitches\n .write('\\n') // And a final \\n to wrap things up\n\n// Rendering modes are persistent:\ncursor.hex('#660000').bold().underline()\n\n// You can use the regular logging functions, text will be green\nconsole.log('This is blood red, bold text')\n\n// To reset just the foreground color:\ncursor.fg.reset()\n\nconsole.log('This will still be bold')\n\n// Clean up after yourself!\ncursor.reset()\n```\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",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/ansi.js/issues"
+ },
+ "_id": "ansi@0.2.1",
"dist": {
- "shasum": "6139b23459bcd74b04572cf56b36102983d0a7d4"
+ "shasum": "76961682ac06d5ea0729af53295ea8f953a0cb21"
},
- "_from": "ansi@~0.1.2"
+ "_from": "ansi@latest",
+ "_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.2.1.tgz"
}
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-
-pids
-logs
-results
-
-npm-debug.log
-
-node_modules
+lib-cov\r
+*.seed\r
+*.log\r
+*.csv\r
+*.dat\r
+*.out\r
+*.pid\r
+*.gz\r
+\r
+pids\r
+logs\r
+results\r
+\r
+npm-debug.log\r
+\r
+node_modules\r
--- /dev/null
+language: node_js\r
+node_js:\r
+ - "0.10"\r
+ - "0.8"
\ No newline at end of file
-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.
+Copyright (c) Isaac Z. Schlueter ("Author")\r
+All rights reserved.\r
+\r
+The BSD License\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions\r
+are met:\r
+\r
+1. Redistributions of source code must retain the above copyright\r
+ notice, this list of conditions and the following disclaimer.\r
+\r
+2. Redistributions in binary form must reproduce the above copyright\r
+ notice, this list of conditions and the following disclaimer in the\r
+ documentation and/or other materials provided with the distribution.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\r
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS\r
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\r
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\r
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\r
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-# cmd-shim
-
-The cmd-shim used in npm to create executable scripts on Windows,
-since symlinks are not suitable for this purpose there.
-
-On Unix systems, you should use a symbolic link instead.
-
-## Installation
-
-```
-npm install cmd-shim
-```
-
-## API
-
-### cmdShim(from, to, cb)
-
-Create a cmd shim at `to` for the command line program at `from`.
-e.g.
-
-```javascript
-var cmdShim = require('cmd-shim');
-cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {
- if (err) throw err;
-});
-```
-
-### cmdShim.ifExists(from, to, cb)
-
-The same as above, but will just continue if the file does not exist.
-Source:
-
-```javascript
-function cmdShimIfExists (from, to, cb) {
- fs.stat(from, function (er) {
- if (er) return cb()
- cmdShim(from, to, cb)
- })
-}
-```
+# cmd-shim\r
+\r
+The cmd-shim used in npm to create executable scripts on Windows,\r
+since symlinks are not suitable for this purpose there.\r
+\r
+On Unix systems, you should use a symbolic link instead.\r
+\r
+[![Build Status](https://travis-ci.org/ForbesLindesay/cmd-shim.png?branch=master)](https://travis-ci.org/ForbesLindesay/cmd-shim) [![Dependency Status](https://gemnasium.com/ForbesLindesay/cmd-shim.png)](https://gemnasium.com/ForbesLindesay/cmd-shim)\r
+\r
+## Installation\r
+\r
+```\r
+npm install cmd-shim\r
+```\r
+\r
+## API\r
+\r
+### cmdShim(from, to, cb)\r
+\r
+Create a cmd shim at `to` for the command line program at `from`.\r
+e.g.\r
+\r
+```javascript\r
+var cmdShim = require('cmd-shim');\r
+cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {\r
+ if (err) throw err;\r
+});\r
+```\r
+\r
+### cmdShim.ifExists(from, to, cb)\r
+\r
+The same as above, but will just continue if the file does not exist.\r
+Source:\r
+\r
+```javascript\r
+function cmdShimIfExists (from, to, cb) {\r
+ fs.stat(from, function (er) {\r
+ if (er) return cb()\r
+ cmdShim(from, to, cb)\r
+ })\r
+}\r
+```\r
-// On windows, create a .cmd file.
-// Read the #! in the file to see what it uses. The vast majority
-// of the time, this will be either:
-// "#!/usr/bin/env <prog> <args...>"
-// or:
-// "#!<prog> <args...>"
-//
-// Write a binroot/pkg.bin + ".cmd" file that has this line in it:
-// @<prog> <args...> %~dp0<target> %*
-
-module.exports = cmdShim
-cmdShim.ifExists = cmdShimIfExists
-
-try {
- var fs = require("graceful-fs")
-} catch (e) {
- var fs = require("fs")
-}
-
-var mkdir = require("mkdirp")
- , path = require("path")
- , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
-
-function cmdShimIfExists (from, to, cb) {
- fs.stat(from, function (er) {
- if (er) return cb()
- cmdShim(from, to, cb)
- })
-}
-
-// Try to unlink, but ignore errors.
-// Any problems will surface later.
-function rm (path, cb) {
- fs.unlink(path, function(er) {
- cb()
- })
-}
-
-function cmdShim (from, to, cb) {
- fs.stat(from, function (er, stat) {
- if (er)
- return cb(er)
-
- cmdShim_(from, to, cb)
- })
-}
-
-function cmdShim_ (from, to, cb) {
- var then = times(2, next, cb)
- rm(to, then)
- rm(to + ".cmd", then)
-
- function next(er) {
- writeShim(from, to, cb)
- }
-}
-
-function writeShim (from, to, cb) {
- // make a cmd file and a sh script
- // First, check if the bin is a #! of some sort.
- // If not, then assume it's something that'll be compiled, or some other
- // sort of script, and just call it directly.
- mkdir(path.dirname(to), function (er) {
- if (er)
- return cb(er)
- fs.readFile(from, "utf8", function (er, data) {
- if (er) return writeShim_(from, to, null, null, cb)
- var firstLine = data.trim().split(/\r*\n/)[0]
- , shebang = firstLine.match(shebangExpr)
- if (!shebang) return writeShim_(from, to, null, null, cb)
- var prog = shebang[1]
- , args = shebang[2] || ""
- return writeShim_(from, to, prog, args, cb)
- })
- })
-}
-
-function writeShim_ (from, to, prog, args, cb) {
- var shTarget = path.relative(path.dirname(to), from)
- , target = shTarget.split("/").join("\\")
- , longProg
- , shProg = prog && prog.split("\\").join("/")
- , shLongProg
- shTarget = shTarget.split("\\").join("/")
- args = args || ""
- if (!prog) {
- prog = "\"%~dp0\\" + target + "\""
- shProg = "\"$basedir/" + shTarget + "\""
- args = ""
- target = ""
- shTarget = ""
- } else {
- longProg = "\"%~dp0\\" + prog + ".exe\""
- shLongProg = "\"$basedir/" + prog + "\""
- target = "\"%~dp0\\" + target + "\""
- shTarget = "\"$basedir/" + shTarget + "\""
- }
-
- // @IF EXIST "%~dp0\node.exe" (
- // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
- // ) ELSE (
- // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
- // )
- var cmd
- if (longProg) {
- cmd = "@IF EXIST " + longProg + " (\r\n"
- + " " + longProg + " " + args + " " + target + " %*\r\n"
- + ") ELSE (\r\n"
- + " " + prog + " " + args + " " + target + " %*\r\n"
- + ")"
- } else {
- cmd = prog + " " + args + " " + target + " %*\r\n"
- }
-
- // #!/bin/sh
- // basedir=`dirname "$0"`
- //
- // case `uname` in
- // *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
- // esac
- //
- // if [ -x "$basedir/node.exe" ]; then
- // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
- // ret=$?
- // else
- // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
- // ret=$?
- // fi
- // exit $ret
-
- var sh = "#!/bin/sh\n"
-
- if (shLongProg) {
- sh = sh
- + "basedir=`dirname \"$0\"`\n"
- + "\n"
- + "case `uname` in\n"
- + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n"
- + "esac\n"
- + "\n"
-
- sh = sh
- + "if [ -x "+shLongProg+" ]; then\n"
- + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n"
- + " ret=$?\n"
- + "else \n"
- + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n"
- + " ret=$?\n"
- + "fi\n"
- + "exit $ret\n"
- } else {
- sh = shProg + " " + args + " " + shTarget + " \"$@\"\n"
- + "exit $?\n"
- }
-
- var then = times(2, next, cb)
- fs.writeFile(to + ".cmd", cmd, "utf8", then)
- fs.writeFile(to, sh, "utf8", then)
- function next () {
- chmodShim(to, cb)
- }
-}
-
-function chmodShim (to, cb) {
- var then = times(2, cb, cb)
- fs.chmod(to, 0755, then)
- fs.chmod(to + ".cmd", 0755, then)
-}
-
-function times(n, ok, cb) {
- var errState = null
- return function(er) {
- if (!errState) {
- if (er)
- cb(errState = er)
- else if (--n === 0)
- ok()
- }
- }
-}
+// On windows, create a .cmd file.\r
+// Read the #! in the file to see what it uses. The vast majority\r
+// of the time, this will be either:\r
+// "#!/usr/bin/env <prog> <args...>"\r
+// or:\r
+// "#!<prog> <args...>"\r
+//\r
+// Write a binroot/pkg.bin + ".cmd" file that has this line in it:\r
+// @<prog> <args...> %~dp0<target> %*\r
+\r
+module.exports = cmdShim\r
+cmdShim.ifExists = cmdShimIfExists\r
+\r
+try {\r
+ var fs = require("graceful-fs")\r
+} catch (e) {\r
+ var fs = require("fs")\r
+}\r
+\r
+var mkdir = require("mkdirp")\r
+ , path = require("path")\r
+ , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/\r
+\r
+function cmdShimIfExists (from, to, cb) {\r
+ fs.stat(from, function (er) {\r
+ if (er) return cb()\r
+ cmdShim(from, to, cb)\r
+ })\r
+}\r
+\r
+// Try to unlink, but ignore errors.\r
+// Any problems will surface later.\r
+function rm (path, cb) {\r
+ fs.unlink(path, function(er) {\r
+ cb()\r
+ })\r
+}\r
+\r
+function cmdShim (from, to, cb) {\r
+ fs.stat(from, function (er, stat) {\r
+ if (er)\r
+ return cb(er)\r
+\r
+ cmdShim_(from, to, cb)\r
+ })\r
+}\r
+\r
+function cmdShim_ (from, to, cb) {\r
+ var then = times(2, next, cb)\r
+ rm(to, then)\r
+ rm(to + ".cmd", then)\r
+\r
+ function next(er) {\r
+ writeShim(from, to, cb)\r
+ }\r
+}\r
+\r
+function writeShim (from, to, cb) {\r
+ // make a cmd file and a sh script\r
+ // First, check if the bin is a #! of some sort.\r
+ // If not, then assume it's something that'll be compiled, or some other\r
+ // sort of script, and just call it directly.\r
+ mkdir(path.dirname(to), function (er) {\r
+ if (er)\r
+ return cb(er)\r
+ fs.readFile(from, "utf8", function (er, data) {\r
+ if (er) return writeShim_(from, to, null, null, cb)\r
+ var firstLine = data.trim().split(/\r*\n/)[0]\r
+ , shebang = firstLine.match(shebangExpr)\r
+ if (!shebang) return writeShim_(from, to, null, null, cb)\r
+ var prog = shebang[1]\r
+ , args = shebang[2] || ""\r
+ return writeShim_(from, to, prog, args, cb)\r
+ })\r
+ })\r
+}\r
+\r
+function writeShim_ (from, to, prog, args, cb) {\r
+ var shTarget = path.relative(path.dirname(to), from)\r
+ , target = shTarget.split("/").join("\\")\r
+ , longProg\r
+ , shProg = prog && prog.split("\\").join("/")\r
+ , shLongProg\r
+ shTarget = shTarget.split("\\").join("/")\r
+ args = args || ""\r
+ if (!prog) {\r
+ prog = "\"%~dp0\\" + target + "\""\r
+ shProg = "\"$basedir/" + shTarget + "\""\r
+ args = ""\r
+ target = ""\r
+ shTarget = ""\r
+ } else {\r
+ longProg = "\"%~dp0\\" + prog + ".exe\""\r
+ shLongProg = "\"$basedir/" + prog + "\""\r
+ target = "\"%~dp0\\" + target + "\""\r
+ shTarget = "\"$basedir/" + shTarget + "\""\r
+ }\r
+\r
+ // @IF EXIST "%~dp0\node.exe" (\r
+ // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
+ // ) ELSE (\r
+ // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
+ // )\r
+ var cmd\r
+ if (longProg) {\r
+ cmd = "@IF EXIST " + longProg + " (\r\n"\r
+ + " " + longProg + " " + args + " " + target + " %*\r\n"\r
+ + ") ELSE (\r\n"\r
+ + " " + prog + " " + args + " " + target + " %*\r\n"\r
+ + ")"\r
+ } else {\r
+ cmd = prog + " " + args + " " + target + " %*\r\n"\r
+ }\r
+\r
+ // #!/bin/sh\r
+ // basedir=`dirname "$0"`\r
+ //\r
+ // case `uname` in\r
+ // *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\r
+ // esac\r
+ //\r
+ // if [ -x "$basedir/node.exe" ]; then\r
+ // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"\r
+ // ret=$?\r
+ // else\r
+ // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"\r
+ // ret=$?\r
+ // fi\r
+ // exit $ret\r
+\r
+ var sh = "#!/bin/sh\n"\r
+\r
+ if (shLongProg) {\r
+ sh = sh\r
+ + "basedir=`dirname \"$0\"`\n"\r
+ + "\n"\r
+ + "case `uname` in\n"\r
+ + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n"\r
+ + "esac\n"\r
+ + "\n"\r
+\r
+ sh = sh\r
+ + "if [ -x "+shLongProg+" ]; then\n"\r
+ + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n"\r
+ + " ret=$?\n"\r
+ + "else \n"\r
+ + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n"\r
+ + " ret=$?\n"\r
+ + "fi\n"\r
+ + "exit $ret\n"\r
+ } else {\r
+ sh = shProg + " " + args + " " + shTarget + " \"$@\"\n"\r
+ + "exit $?\n"\r
+ }\r
+\r
+ var then = times(2, next, cb)\r
+ fs.writeFile(to + ".cmd", cmd, "utf8", then)\r
+ fs.writeFile(to, sh, "utf8", then)\r
+ function next () {\r
+ chmodShim(to, cb)\r
+ }\r
+}\r
+\r
+function chmodShim (to, cb) {\r
+ var then = times(2, cb, cb)\r
+ fs.chmod(to, 0755, then)\r
+ fs.chmod(to + ".cmd", 0755, then)\r
+}\r
+\r
+function times(n, ok, cb) {\r
+ var errState = null\r
+ return function(er) {\r
+ if (!errState) {\r
+ if (er)\r
+ cb(errState = er)\r
+ else if (--n === 0)\r
+ ok()\r
+ }\r
+ }\r
+}\r
{
"name": "cmd-shim",
- "version": "1.0.1",
+ "version": "1.1.1",
"description": "Used in npm for command line application support",
"scripts": {
"test": "tap test/*.js"
"tap": "~0.4.1",
"rimraf": "~2.1.4"
},
- "readme": "# cmd-shim\n\nThe cmd-shim used in npm to create executable scripts on Windows,\nsince symlinks are not suitable for this purpose there.\n\nOn Unix systems, you should use a symbolic link instead.\n\n## Installation\n\n```\nnpm install cmd-shim\n```\n\n## API\n\n### cmdShim(from, to, cb)\n\nCreate a cmd shim at `to` for the command line program at `from`.\ne.g.\n\n```javascript\nvar cmdShim = require('cmd-shim');\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {\n if (err) throw err;\n});\n```\n\n### cmdShim.ifExists(from, to, cb)\n\nThe same as above, but will just continue if the file does not exist.\nSource:\n\n```javascript\nfunction cmdShimIfExists (from, to, cb) {\n fs.stat(from, function (er) {\n if (er) return cb()\n cmdShim(from, to, cb)\n })\n}\n```\n",
+ "readme": "# cmd-shim\r\n\r\nThe cmd-shim used in npm to create executable scripts on Windows,\r\nsince symlinks are not suitable for this purpose there.\r\n\r\nOn Unix systems, you should use a symbolic link instead.\r\n\r\n[![Build Status](https://travis-ci.org/ForbesLindesay/cmd-shim.png?branch=master)](https://travis-ci.org/ForbesLindesay/cmd-shim) [![Dependency Status](https://gemnasium.com/ForbesLindesay/cmd-shim.png)](https://gemnasium.com/ForbesLindesay/cmd-shim)\r\n\r\n## Installation\r\n\r\n```\r\nnpm install cmd-shim\r\n```\r\n\r\n## API\r\n\r\n### cmdShim(from, to, cb)\r\n\r\nCreate a cmd shim at `to` for the command line program at `from`.\r\ne.g.\r\n\r\n```javascript\r\nvar cmdShim = require('cmd-shim');\r\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {\r\n if (err) throw err;\r\n});\r\n```\r\n\r\n### cmdShim.ifExists(from, to, cb)\r\n\r\nThe same as above, but will just continue if the file does not exist.\r\nSource:\r\n\r\n```javascript\r\nfunction cmdShimIfExists (from, to, cb) {\r\n fs.stat(from, function (er) {\r\n if (er) return cb()\r\n cmdShim(from, to, cb)\r\n })\r\n}\r\n```\r\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/ForbesLindesay/cmd-shim/issues"
},
- "_id": "cmd-shim@1.0.1",
- "_from": "cmd-shim@latest"
+ "_id": "cmd-shim@1.1.1",
+ "dist": {
+ "shasum": "87741e2a8b6307ea1ea8bf1f65287cb4a9ca977a"
+ },
+ "_from": "cmd-shim@latest",
+ "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-1.1.1.tgz"
}
-var test = require('tap').test
-var mkdirp = require('mkdirp')
-var fs = require('fs')
-var path = require('path')
-var fixtures = path.resolve(__dirname, 'fixtures')
-var which = require('which')
-var whichTap = which.sync('tap')
-
-var froms = {
- 'from.exe': 'exe',
- 'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n',
- 'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n',
- 'from.sh': '#!/usr/bin/sh\necho hi\n',
- 'from.sh.args': '#!/usr/bin/sh -x\necho hi\n'
-}
-
-var cmdShim = require('../')
-
-test('create fixture', function (t) {
- mkdirp(fixtures, function (er) {
- if (er)
- throw er
- t.pass('made dir')
- Object.keys(froms).forEach(function (f) {
- t.test('write ' + f, function (t) {
- fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) {
- if (er)
- throw er
- t.pass('wrote ' + f)
- t.end()
- })
- })
- })
- t.end()
- })
-})
+var test = require('tap').test\r
+var mkdirp = require('mkdirp')\r
+var fs = require('fs')\r
+var path = require('path')\r
+var fixtures = path.resolve(__dirname, 'fixtures')\r
+\r
+var froms = {\r
+ 'from.exe': 'exe',\r
+ 'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n',\r
+ 'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n',\r
+ 'from.sh': '#!/usr/bin/sh\necho hi\n',\r
+ 'from.sh.args': '#!/usr/bin/sh -x\necho hi\n'\r
+}\r
+\r
+var cmdShim = require('../')\r
+\r
+test('create fixture', function (t) {\r
+ mkdirp(fixtures, function (er) {\r
+ if (er)\r
+ throw er\r
+ t.pass('made dir')\r
+ Object.keys(froms).forEach(function (f) {\r
+ t.test('write ' + f, function (t) {\r
+ fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) {\r
+ if (er)\r
+ throw er\r
+ t.pass('wrote ' + f)\r
+ t.end()\r
+ })\r
+ })\r
+ })\r
+ t.end()\r
+ })\r
+})\r
-var test = require('tap').test
-var mkdirp = require('mkdirp')
-var fs = require('fs')
-var path = require('path')
-var fixtures = path.resolve(__dirname, 'fixtures')
-var which = require('which')
-var whichTap = which.sync('tap')
-
-var cmdShim = require('../')
-
-test('no shebang', function (t) {
- var from = path.resolve(fixtures, 'from.exe')
- var to = path.resolve(fixtures, 'exe.shim')
- cmdShim(from, to, function(er) {
- if (er)
- throw er
- t.equal(fs.readFileSync(to, 'utf8'),
- "\"$basedir/from.exe\" \"$@\"\nexit $?\n")
- t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
- "\"%~dp0\\from.exe\" %*\r\n")
- t.end()
- })
-})
-
-test('env shebang', function (t) {
- var from = path.resolve(fixtures, 'from.env')
- var to = path.resolve(fixtures, 'env.shim')
- cmdShim(from, to, function(er) {
- if (er)
- throw er
- console.error('%j', fs.readFileSync(to, 'utf8'))
- console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
-
- t.equal(fs.readFileSync(to, 'utf8'),
- "#!/bin/sh"+
- "\nbasedir=`dirname \"$0\"`"+
- "\n"+
- "\ncase `uname` in"+
- "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+
- "\nesac"+
- "\n"+
- "\nif [ -x \"$basedir/node\" ]; then"+
- "\n \"$basedir/node\" \"$basedir/from.env\" \"$@\""+
- "\n ret=$?"+
- "\nelse "+
- "\n node \"$basedir/from.env\" \"$@\""+
- "\n ret=$?"+
- "\nfi"+
- "\nexit $ret"+
- "\n")
- t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
- "@IF EXIST \"%~dp0\\node.exe\" (\r"+
- "\n \"%~dp0\\node.exe\" \"%~dp0\\from.env\" %*\r"+
- "\n) ELSE (\r"+
- "\n node \"%~dp0\\from.env\" %*\r"+
- "\n)")
- t.end()
- })
-})
-
-test('env shebang with args', function (t) {
- var from = path.resolve(fixtures, 'from.env.args')
- var to = path.resolve(fixtures, 'env.args.shim')
- cmdShim(from, to, function(er) {
- if (er)
- throw er
- console.error('%j', fs.readFileSync(to, 'utf8'))
- console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
-
- t.equal(fs.readFileSync(to, 'utf8'),
- "#!/bin/sh"+
- "\nbasedir=`dirname \"$0\"`"+
- "\n"+
- "\ncase `uname` in"+
- "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+
- "\nesac"+
- "\n"+
- "\nif [ -x \"$basedir/node\" ]; then"+
- "\n \"$basedir/node\" --expose_gc \"$basedir/from.env.args\" \"$@\""+
- "\n ret=$?"+
- "\nelse "+
- "\n node --expose_gc \"$basedir/from.env.args\" \"$@\""+
- "\n ret=$?"+
- "\nfi"+
- "\nexit $ret"+
- "\n")
- t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
- "@IF EXIST \"%~dp0\\node.exe\" (\r"+
- "\n \"%~dp0\\node.exe\" --expose_gc \"%~dp0\\from.env.args\" %*\r"+
- "\n) ELSE (\r"+
- "\n node --expose_gc \"%~dp0\\from.env.args\" %*\r"+
- "\n)")
- t.end()
- })
-})
-
-test('explicit shebang', function (t) {
- var from = path.resolve(fixtures, 'from.sh')
- var to = path.resolve(fixtures, 'sh.shim')
- cmdShim(from, to, function(er) {
- if (er)
- throw er
- console.error('%j', fs.readFileSync(to, 'utf8'))
- console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
-
- t.equal(fs.readFileSync(to, 'utf8'),
- "#!/bin/sh" +
- "\nbasedir=`dirname \"$0\"`" +
- "\n" +
- "\ncase `uname` in" +
- "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +
- "\nesac" +
- "\n" +
- "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +
- "\n \"$basedir//usr/bin/sh\" \"$basedir/from.sh\" \"$@\"" +
- "\n ret=$?" +
- "\nelse " +
- "\n /usr/bin/sh \"$basedir/from.sh\" \"$@\"" +
- "\n ret=$?" +
- "\nfi" +
- "\nexit $ret" +
- "\n")
-
- t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
- "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +
- "\n \"%~dp0\\/usr/bin/sh.exe\" \"%~dp0\\from.sh\" %*\r" +
- "\n) ELSE (\r" +
- "\n /usr/bin/sh \"%~dp0\\from.sh\" %*\r" +
- "\n)")
- t.end()
- })
-})
-
-test('explicit shebang with args', function (t) {
- var from = path.resolve(fixtures, 'from.sh.args')
- var to = path.resolve(fixtures, 'sh.args.shim')
- cmdShim(from, to, function(er) {
- if (er)
- throw er
- console.error('%j', fs.readFileSync(to, 'utf8'))
- console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
-
- t.equal(fs.readFileSync(to, 'utf8'),
- "#!/bin/sh" +
- "\nbasedir=`dirname \"$0\"`" +
- "\n" +
- "\ncase `uname` in" +
- "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +
- "\nesac" +
- "\n" +
- "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +
- "\n \"$basedir//usr/bin/sh\" -x \"$basedir/from.sh.args\" \"$@\"" +
- "\n ret=$?" +
- "\nelse " +
- "\n /usr/bin/sh -x \"$basedir/from.sh.args\" \"$@\"" +
- "\n ret=$?" +
- "\nfi" +
- "\nexit $ret" +
- "\n")
-
- t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
- "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +
- "\n \"%~dp0\\/usr/bin/sh.exe\" -x \"%~dp0\\from.sh.args\" %*\r" +
- "\n) ELSE (\r" +
- "\n /usr/bin/sh -x \"%~dp0\\from.sh.args\" %*\r" +
- "\n)")
- t.end()
- })
-})
+var test = require('tap').test\r
+var mkdirp = require('mkdirp')\r
+var fs = require('fs')\r
+var path = require('path')\r
+var fixtures = path.resolve(__dirname, 'fixtures')\r
+\r
+var cmdShim = require('../')\r
+\r
+test('no shebang', function (t) {\r
+ var from = path.resolve(fixtures, 'from.exe')\r
+ var to = path.resolve(fixtures, 'exe.shim')\r
+ cmdShim(from, to, function(er) {\r
+ if (er)\r
+ throw er\r
+ t.equal(fs.readFileSync(to, 'utf8'),\r
+ "\"$basedir/from.exe\" \"$@\"\nexit $?\n")\r
+ t.equal(fs.readFileSync(to + '.cmd', 'utf8'),\r
+ "\"%~dp0\\from.exe\" %*\r\n")\r
+ t.end()\r
+ })\r
+})\r
+\r
+test('env shebang', function (t) {\r
+ var from = path.resolve(fixtures, 'from.env')\r
+ var to = path.resolve(fixtures, 'env.shim')\r
+ cmdShim(from, to, function(er) {\r
+ if (er)\r
+ throw er\r
+ console.error('%j', fs.readFileSync(to, 'utf8'))\r
+ console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))\r
+\r
+ t.equal(fs.readFileSync(to, 'utf8'),\r
+ "#!/bin/sh"+\r
+ "\nbasedir=`dirname \"$0\"`"+\r
+ "\n"+\r
+ "\ncase `uname` in"+\r
+ "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+\r
+ "\nesac"+\r
+ "\n"+\r
+ "\nif [ -x \"$basedir/node\" ]; then"+\r
+ "\n \"$basedir/node\" \"$basedir/from.env\" \"$@\""+\r
+ "\n ret=$?"+\r
+ "\nelse "+\r
+ "\n node \"$basedir/from.env\" \"$@\""+\r
+ "\n ret=$?"+\r
+ "\nfi"+\r
+ "\nexit $ret"+\r
+ "\n")\r
+ t.equal(fs.readFileSync(to + '.cmd', 'utf8'),\r
+ "@IF EXIST \"%~dp0\\node.exe\" (\r"+\r
+ "\n \"%~dp0\\node.exe\" \"%~dp0\\from.env\" %*\r"+\r
+ "\n) ELSE (\r"+\r
+ "\n node \"%~dp0\\from.env\" %*\r"+\r
+ "\n)")\r
+ t.end()\r
+ })\r
+})\r
+\r
+test('env shebang with args', function (t) {\r
+ var from = path.resolve(fixtures, 'from.env.args')\r
+ var to = path.resolve(fixtures, 'env.args.shim')\r
+ cmdShim(from, to, function(er) {\r
+ if (er)\r
+ throw er\r
+ console.error('%j', fs.readFileSync(to, 'utf8'))\r
+ console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))\r
+\r
+ t.equal(fs.readFileSync(to, 'utf8'),\r
+ "#!/bin/sh"+\r
+ "\nbasedir=`dirname \"$0\"`"+\r
+ "\n"+\r
+ "\ncase `uname` in"+\r
+ "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+\r
+ "\nesac"+\r
+ "\n"+\r
+ "\nif [ -x \"$basedir/node\" ]; then"+\r
+ "\n \"$basedir/node\" --expose_gc \"$basedir/from.env.args\" \"$@\""+\r
+ "\n ret=$?"+\r
+ "\nelse "+\r
+ "\n node --expose_gc \"$basedir/from.env.args\" \"$@\""+\r
+ "\n ret=$?"+\r
+ "\nfi"+\r
+ "\nexit $ret"+\r
+ "\n")\r
+ t.equal(fs.readFileSync(to + '.cmd', 'utf8'),\r
+ "@IF EXIST \"%~dp0\\node.exe\" (\r"+\r
+ "\n \"%~dp0\\node.exe\" --expose_gc \"%~dp0\\from.env.args\" %*\r"+\r
+ "\n) ELSE (\r"+\r
+ "\n node --expose_gc \"%~dp0\\from.env.args\" %*\r"+\r
+ "\n)")\r
+ t.end()\r
+ })\r
+})\r
+\r
+test('explicit shebang', function (t) {\r
+ var from = path.resolve(fixtures, 'from.sh')\r
+ var to = path.resolve(fixtures, 'sh.shim')\r
+ cmdShim(from, to, function(er) {\r
+ if (er)\r
+ throw er\r
+ console.error('%j', fs.readFileSync(to, 'utf8'))\r
+ console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))\r
+\r
+ t.equal(fs.readFileSync(to, 'utf8'),\r
+ "#!/bin/sh" +\r
+ "\nbasedir=`dirname \"$0\"`" +\r
+ "\n" +\r
+ "\ncase `uname` in" +\r
+ "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +\r
+ "\nesac" +\r
+ "\n" +\r
+ "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +\r
+ "\n \"$basedir//usr/bin/sh\" \"$basedir/from.sh\" \"$@\"" +\r
+ "\n ret=$?" +\r
+ "\nelse " +\r
+ "\n /usr/bin/sh \"$basedir/from.sh\" \"$@\"" +\r
+ "\n ret=$?" +\r
+ "\nfi" +\r
+ "\nexit $ret" +\r
+ "\n")\r
+\r
+ t.equal(fs.readFileSync(to + '.cmd', 'utf8'),\r
+ "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +\r
+ "\n \"%~dp0\\/usr/bin/sh.exe\" \"%~dp0\\from.sh\" %*\r" +\r
+ "\n) ELSE (\r" +\r
+ "\n /usr/bin/sh \"%~dp0\\from.sh\" %*\r" +\r
+ "\n)")\r
+ t.end()\r
+ })\r
+})\r
+\r
+test('explicit shebang with args', function (t) {\r
+ var from = path.resolve(fixtures, 'from.sh.args')\r
+ var to = path.resolve(fixtures, 'sh.args.shim')\r
+ cmdShim(from, to, function(er) {\r
+ if (er)\r
+ throw er\r
+ console.error('%j', fs.readFileSync(to, 'utf8'))\r
+ console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))\r
+\r
+ t.equal(fs.readFileSync(to, 'utf8'),\r
+ "#!/bin/sh" +\r
+ "\nbasedir=`dirname \"$0\"`" +\r
+ "\n" +\r
+ "\ncase `uname` in" +\r
+ "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +\r
+ "\nesac" +\r
+ "\n" +\r
+ "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +\r
+ "\n \"$basedir//usr/bin/sh\" -x \"$basedir/from.sh.args\" \"$@\"" +\r
+ "\n ret=$?" +\r
+ "\nelse " +\r
+ "\n /usr/bin/sh -x \"$basedir/from.sh.args\" \"$@\"" +\r
+ "\n ret=$?" +\r
+ "\nfi" +\r
+ "\nexit $ret" +\r
+ "\n")\r
+\r
+ t.equal(fs.readFileSync(to + '.cmd', 'utf8'),\r
+ "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +\r
+ "\n \"%~dp0\\/usr/bin/sh.exe\" -x \"%~dp0\\from.sh.args\" %*\r" +\r
+ "\n) ELSE (\r" +\r
+ "\n /usr/bin/sh -x \"%~dp0\\from.sh.args\" %*\r" +\r
+ "\n)")\r
+ t.end()\r
+ })\r
+})\r
-var test = require('tap').test
-var path = require('path')
-var fixtures = path.resolve(__dirname, 'fixtures')
-var rimraf = require('rimraf')
-
-test('cleanup', function(t) {
- rimraf(fixtures, function(er) {
- if (er)
- throw er
- t.pass('cleaned up')
- t.end()
- })
-})
+var test = require('tap').test\r
+var path = require('path')\r
+var fixtures = path.resolve(__dirname, 'fixtures')\r
+var rimraf = require('rimraf')\r
+\r
+test('cleanup', function(t) {\r
+ rimraf(fixtures, function(er) {\r
+ if (er)\r
+ throw er\r
+ t.pass('cleaned up')\r
+ t.end()\r
+ })\r
+})\r
--- /dev/null
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "editor",
- "version": "0.0.4",
+ "version": "0.0.5",
"description": "launch $EDITOR in your program",
"main": "index.js",
- "bin": {},
"directories": {
"example": "example",
"test": "test"
},
"dependencies": {},
"devDependencies": {
- "tap": "~0.2.5"
+ "tap": "~0.4.4"
},
"scripts": {
"test": "tap test/*.js"
"bugs": {
"url": "https://github.com/substack/node-editor/issues"
},
- "_id": "editor@0.0.4",
- "_from": "editor@"
+ "_id": "editor@0.0.5",
+ "_from": "editor@latest"
}
// since it's *not* a symbolic link, if we're *already* in a bundle,
// then we should include everything.
- if (pp && pp.package) {
+ if (pp && pp.package && pp.basename === "node_modules") {
return true
}
"url": "https://github.com/isaacs/fstream-ignore/issues"
},
"_id": "fstream-ignore@0.0.7",
- "_from": "fstream-ignore@~0.0.5"
+ "dist": {
+ "shasum": "eea3033f0c3728139de7b57ab1b0d6d89c353c63"
+ },
+ "_from": "fstream-ignore@~0.0.5",
+ "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.7.tgz"
}
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "0.1.5",
+ "version": "0.1.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-npm.git"
"bugs": {
"url": "https://github.com/isaacs/fstream-npm/issues"
},
- "_id": "fstream-npm@0.1.5",
- "_from": "fstream-npm@~0.1.3"
+ "_id": "fstream-npm@0.1.6",
+ "_from": "fstream-npm@latest"
}
--- /dev/null
+*.swp
+.*.swp
+
+.DS_Store
+*~
+.project
+.settings
+npm-debug.log
+coverage.html
+.idea
+lib-cov
+
+node_modules
\ No newline at end of file
--- /dev/null
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
\ No newline at end of file
--- /dev/null
+Copyright (c) Robert Kowalski ("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.
\ No newline at end of file
--- /dev/null
+[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)
+[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)
+
+
+# github-url-from-username-repo
+
+## Usage
+
+```javascript
+
+var getUrl = require("github-url-from-username-repo")
+getUrl("visionmedia/express") // git://github.com/visionmedia/express
+
+```
\ No newline at end of file
--- /dev/null
+module.exports = getUrl
+
+function getUrl (r) {
+ if (!r) return
+ if (/^[\w-]+\/[\w-]+$/.test(r))
+ return "git://github.com/" + r
+ else
+ return null
+}
\ No newline at end of file
--- /dev/null
+{
+ "name": "github-url-from-username-repo",
+ "version": "0.0.2",
+ "description": "Create urls from username/repo",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "devDependencies": {
+ "mocha": "~1.13.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:robertkowalski/github-url-from-username-repo.git"
+ },
+ "author": {
+ "name": "Robert Kowalski",
+ "email": "rok@kowalski.gd"
+ },
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/robertkowalski/github-url-from-username-repo/issues"
+ },
+ "keywords": [
+ "git",
+ "github",
+ "repo"
+ ],
+ "readme": "[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)\n[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)\n\n\n# github-url-from-username-repo\n\n## Usage\n\n```javascript\n\nvar getUrl = require(\"github-url-from-username-repo\")\ngetUrl(\"visionmedia/express\") // git://github.com/visionmedia/express\n\n```",
+ "readmeFilename": "README.md",
+ "_id": "github-url-from-username-repo@0.0.2",
+ "_from": "github-url-from-username-repo@"
+}
--- /dev/null
+var assert = require("assert")
+var getUrl = require("../")
+
+describe("github url from username/repo", function () {
+ it("returns a github url for the username/repo", function () {
+ var url = getUrl("visionmedia/express")
+ assert.equal("git://github.com/visionmedia/express", url)
+ })
+ it("works with -", function () {
+ var url = getUrl("vision-media/express-package")
+ assert.equal("git://github.com/vision-media/express-package", url)
+ })
+ it("returns null if it does not match", function () {
+ var url = getUrl("package")
+ assert.deepEqual(null, url)
+ })
+ it("returns undefined if no repo/user was given", function () {
+ var url = getUrl()
+ assert.deepEqual(undefined, url)
+ })
+})
\ No newline at end of file
"license": "MIT",
"readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n",
"readmeFilename": "readme.markdown",
- "_id": "mkdirp@0.3.5",
- "dist": {
- "shasum": "35715a113218b4fa49dc9b69326afcf7f9b2948e"
+ "bugs": {
+ "url": "https://github.com/substack/node-mkdirp/issues"
},
- "_from": "mkdirp@0.3.5",
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
+ "_id": "mkdirp@0.3.5",
+ "_from": "mkdirp@latest"
}
if (where) {
where = this.sources[where]
if (where) where = where.data
- if (where && where.hasOwnProperty(key)) return where[key]
+ if (where && Object.hasOwnProperty.call(where, key)) return where[key]
return undefined
}
return this.list[0][key]
"bugs": {
"url": "https://github.com/isaacs/proto-list/issues"
},
+ "homepage": "https://github.com/isaacs/proto-list",
"_id": "proto-list@1.2.2",
"_from": "proto-list@~1.2.1"
}
{
"name": "config-chain",
- "version": "1.1.7",
+ "version": "1.1.8",
"description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
"homepage": "http://github.com/dominictarr/config-chain",
"repository": {
"bugs": {
"url": "https://github.com/dominictarr/config-chain/issues"
},
- "_id": "config-chain@1.1.7",
- "_from": "config-chain@~1.1.1"
+ "_id": "config-chain@1.1.8",
+ "_from": "config-chain@~1.1.8"
}
--- /dev/null
+var cc = require("../");
+
+var chain = cc()
+ , name = "forFun";
+
+chain
+ .add({
+ __sample:"for fun only"
+ }, name)
+ .on("load", function() {
+ //It throw exception here
+ console.log(chain.get("__sample", name));
+ //But if I drop the name param, it run normally and return as expected: "for fun only"
+ //console.log(chain.get("__sample"));
+ });
{
"name": "npmconf",
- "version": "0.1.3",
+ "version": "0.1.5",
"description": "The config thing npm uses",
"main": "npmconf.js",
"directories": {
"test": "test"
},
"dependencies": {
- "config-chain": "~1.1.1",
+ "config-chain": "~1.1.8",
"inherits": "~2.0.0",
- "once": "~1.1.1",
+ "once": "~1.3.0",
"mkdirp": "~0.3.3",
"osenv": "0.0.3",
"nopt": "2",
"bugs": {
"url": "https://github.com/isaacs/npmconf/issues"
},
- "_id": "npmconf@0.1.3",
+ "homepage": "https://github.com/isaacs/npmconf",
+ "_id": "npmconf@0.1.5",
"_from": "npmconf@latest"
}
},
"name": "npmlog",
"description": "logger for npm",
- "version": "0.0.4",
+ "version": "0.0.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/npmlog.git"
"test": "tap test/*.js"
},
"dependencies": {
- "ansi": "~0.1.2"
+ "ansi": "~0.2.1"
},
"devDependencies": {
"tap": ""
"bugs": {
"url": "https://github.com/isaacs/npmlog/issues"
},
- "_id": "npmlog@0.0.4",
+ "_id": "npmlog@0.0.6",
"_from": "npmlog@latest"
}
var util = require('util')
var resultExpect =
-[ '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[7m',
- 'sill',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'silly prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[34m',
- '\u001b[40m',
- 'verb',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'verbose prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- '\u001b[7m',
- 'info',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'info prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- 'http',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'http prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[30m',
- '\u001b[41m',
- 'WARN',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[33m',
- 'warn prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'error prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- '\u001b[7m',
- 'info',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'info prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- 'http',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'http prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[30m',
- '\u001b[41m',
- 'WARN',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'warn prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'error prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' This is a longer\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' message, with some details\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' and maybe a stack.\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' \n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u0007',
- 'noise',
- '\u001b[0m',
- '\u001b[35m',
- '',
- '\u001b[0m',
- ' LOUD NOISES\n',
+[ '\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[7msill\u001b[0m \u001b[0m\u001b[35msilly prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[34m\u001b[40mverb\u001b[0m \u001b[0m\u001b[35mverbose prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m This is a longer\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m message, with some details\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m and maybe a stack.\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m \n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m\u001b[35m\u001b[0m LOUD NOISES\n',
'\u001b[0m' ]
var logPrefixEventsExpect =
log.addLevel('noise', 10000, {beep: true})
log.noise(false, 'LOUD NOISES')
- t.deepEqual(result, resultExpect, 'result')
+ t.deepEqual(result.join('').trim(), resultExpect.join('').trim(), 'result')
t.deepEqual(log.record, logEventsExpect, 'record')
t.deepEqual(logEvents, logEventsExpect, 'logEvents')
t.deepEqual(logInfoEvents, logInfoEventsExpect, 'logInfoEvents')
Ironically, the prototype feature makes this module twice as
complicated as necessary.
+
+To check whether you function has been called, use `fn.called`. Once the
+function is called for the first time the return value of the original
+function is saved in `fn.value` and subsequent calls will continue to
+return this value.
+
+```javascript
+var once = require('once')
+
+function load (cb) {
+ cb = once(cb)
+ var stream = createStream()
+ stream.once('data', cb)
+ stream.once('end', function () {
+ if (!cb.called) cb(new Error('not found'))
+ })
+}
+```
})
function once (fn) {
- var called = false
- return function () {
- if (called) return
- called = true
- return fn.apply(this, arguments)
+ var f = function () {
+ if (f.called) return f.value
+ f.called = true
+ return f.value = fn.apply(this, arguments)
}
+ f.called = false
+ return f
}
{
"name": "once",
- "version": "1.1.1",
+ "version": "1.3.0",
"description": "Run a function exactly one time",
"main": "once.js",
"directories": {
"url": "http://blog.izs.me/"
},
"license": "BSD",
- "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n",
- "_id": "once@1.1.1",
- "_from": "once"
+ "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/once/issues"
+ },
+ "_id": "once@1.3.0",
+ "_from": "once@latest"
}
f ++
return f + g + this
})
+ t.notOk(foo.called)
for (var i = 0; i < 1E3; i++) {
t.same(f, i === 0 ? 0 : 1)
var g = foo.call(1, 1)
- t.same(g, i === 0 ? 3 : undefined)
+ t.ok(foo.called)
+ t.same(g, 3)
t.same(f, 1)
}
t.end()
# Names sorted by how much code was originally theirs.
Isaac Z. Schlueter <i@izs.me>
-Meryn Stol <merynstol@gmail.com>
\ No newline at end of file
+Meryn Stol <merynstol@gmail.com>
+Robert Kowalski <rok@kowalski.gd>
\ No newline at end of file
* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
+* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]
* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
* If `homepage` field is not a string, it will be removed.
* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
+* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
### Rules for name field
--- /dev/null
+[
+"http",
+"events",
+"util",
+"domain",
+"cluster",
+"buffer",
+"stream",
+"crypto",
+"tls",
+"fs",
+"string_decoder",
+"path",
+"net",
+"dgram",
+"dns",
+"https",
+"url",
+"punycode",
+"readline",
+"repl",
+"vm",
+"child_process",
+"assert",
+"zlib",
+"tty",
+"os",
+"querystring"
+]
// Extracts description from contents of a readme file in markdown format
function extractDescription (d) {
if (!d) return;
+ if (d === "ERROR: No README data found!") return;
// the first block of text before the first heading
// that isn't the first line heading
d = d.trim().split('\n')
var extractDescription = require("./extract_description")
var url = require("url")
var typos = require("./typos")
+var coreModuleNames = require("./core_module_names")
var fixer = module.exports = {
// default warning function
, fixPeople: function(data) {
modifyPeople(data, unParsePerson)
- modifyPeople(data, parsePerson)
- }
+ modifyPeople(data, parsePerson)
+ }
, fixNameField: function(data, strict) {
if (!data.name && !strict) {
if (!strict)
data.name = data.name.trim()
ensureValidName(data.name, strict)
+ if (coreModuleNames.indexOf(data.name) !== -1)
+ this.warn(data.name + " is also the name of a node core module.")
}
-
+
, fixDescriptionField: function (data) {
if (data.description && typeof data.description !== 'string') {
}
if (data.readme && !data.description)
data.description = extractDescription(data.readme)
+ if(data.description === undefined) delete data.description;
if (!data.description) this.warn('No description')
}
-
+
, fixReadmeField: function (data) {
if (!data.readme) {
this.warn("No README data")
data.readme = "ERROR: No README data found!"
}
}
-
+
, fixBugsField: function(data) {
if (!data.bugs && data.repository && data.repository.url) {
var gh = parseGitHubURL(data.repository.url)
}
}
-, fixHomepageField: function(data) {
- if(!data.homepage) return true;
+, fixHomepageField: function(data) {
+ if (!data.homepage && data.repository && data.repository.url) {
+ var gh = parseGitHubURL(data.repository.url)
+ if (gh)
+ data.homepage = gh
+ else
+ return true
+ } else if (!data.homepage)
+ return true
+
if(typeof data.homepage !== "string") {
this.warn("homepage field must be a string url. Deleted.")
return delete data.homepage
Object.keys(o).forEach(function (k) {
d[k] = o[k]
})
- data.dependencies = d
+ data.dependencies = d
}
-function depObjectify (deps) {
+function depObjectify (deps, type, warn) {
if (!deps) return {}
if (typeof deps === "string") {
deps = deps.trim().split(/[\n\r\s\t ,]+/)
}
if (!Array.isArray(deps)) return deps
+ warn("specifying " + type + " as array is deprecated")
var o = {}
deps.filter(function (d) {
return typeof d === "string"
- }).forEach(function(d) {
+ }).forEach(function(d) {
d = d.trim().split(/(:?[@\s><=])/)
var dn = d.shift()
var dv = d.join("")
function objectifyDeps (data, warn) {
depTypes.forEach(function (type) {
if (!data[type]) return;
- data[type] = depObjectify(data[type])
+ data[type] = depObjectify(data[type], type, warn)
})
}
{
"name": "normalize-package-data",
- "version": "0.2.2",
+ "version": "0.2.6",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
{
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
+ },
+ {
+ "name": "Robert Kowalski",
+ "email": "rok@kowalski.gd"
}
],
- "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
+ "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
- "_id": "normalize-package-data@0.2.2",
- "dist": {
- "shasum": "ff276c97296154b99ca2af9cefbe3a6a3bde07bb"
- },
- "_from": "normalize-package-data@~0.2",
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.2.2.tgz"
+ "_id": "normalize-package-data@0.2.6",
+ "_from": "normalize-package-data@~0.2"
}
clonedData = _.clone(data)
normalize(data, warn)
t.deepEqual(clonedData, data,
- "Normalization of " + entryName + "is consistent.")
+ "Normalization of " + entryName + " is consistent.")
next(null)
}) // fs.readFile
} // verifyConsistency
--- /dev/null
+{
+ "name": "foo-bar-package",
+ "version": "0.0.1"
+}
\ No newline at end of file
t.end()
})
+tap.test("core module name", function(t) {
+ var warnings = []
+ function warn(m) {
+ warnings.push(m)
+ }
+ var a
+ normalize(a={
+ name: "http",
+ readme: "read yourself how about",
+ homepage: 123,
+ bugs: "what is this i don't even",
+ repository: "Hello."
+ }, warn)
+
+ var expect = [
+ "http is also the name of a node core module.",
+ "Bug string field must be url, email, or {email,url}",
+ "Normalized value of bugs field is an empty object. Deleted.",
+ "homepage field must be a string url. Deleted."
+ ]
+ t.same(warnings, expect)
+ t.end()
+})
+
tap.test("urls required", function(t) {
var warnings = []
function warn(w) {
t.end()
});
+tap.test("homepage field will set to github url if repository is a github repo", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "git://github.com/isaacs/node-graceful-fs" }
+ })
+ t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs')
+ t.end()
+})
+
+tap.test("homepage field will set to github gist url if repository is a gist", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "git@gist.github.com:123456.git" }
+ })
+ t.same(a.homepage, 'https://gist.github.com/123456')
+ t.end()
+})
+
+tap.test("homepage field will set to github gist url if repository is a shorthand reference", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "sindresorhus/chalk" }
+ })
+ t.same(a.homepage, 'https://github.com/sindresorhus/chalk')
+ t.end()
+})
+
+tap.test("deprecation warning for array in dependencies fields", function(t) {
+ var a
+ var warnings = []
+ function warn(w) {
+ warnings.push(w)
+ }
+ normalize(a={
+ dependencies: [],
+ devDependencies: [],
+ optionalDependencies: []
+ }, warn)
+ t.ok(~warnings.indexOf("specifying dependencies as array is deprecated"), "deprecation warning")
+ t.ok(~warnings.indexOf("specifying devDependencies as array is deprecated"), "deprecation warning")
+ t.ok(~warnings.indexOf("specifying optionalDependencies as array is deprecated"), "deprecation warning")
+ t.end()
+})
+
tap.test('no new globals', function(t) {
t.same(Object.keys(global), globals)
t.end()
"url": "https://github.com/isaacs/read-package-json/issues"
},
"_id": "read-package-json@1.1.3",
- "dist": {
- "shasum": "0c2fbf428e324026e29812eebdfbacfe729a4c71"
- },
- "_from": "read-package-json@~1.1.3",
- "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.1.3.tgz"
+ "_from": "read-package-json@latest"
}
"url": "https://github.com/isaacs/slide-flow-control/issues"
},
"_id": "slide@1.1.5",
- "_from": "slide@~1.1.4"
+ "_from": "slide@latest"
}
{
- "version": "1.3.11",
+ "version": "1.3.12",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
"tar": "~0.1.18",
"fstream": "~0.1.23",
"block-stream": "0.0.7",
- "mkdirp": "~0.3.3",
+ "mkdirp": "~0.3.5",
"read": "~1.0.4",
"lru-cache": "~2.3.1",
"node-gyp": "~0.10.10",
- "fstream-npm": "~0.1.3",
+ "fstream-npm": "~0.1.6",
"uid-number": "0",
"archy": "0",
"chownr": "0",
- "npmlog": "0.0.4",
- "ansi": "~0.1.2",
+ "npmlog": "0.0.6",
+ "ansi": "~0.2.1",
"npm-registry-client": "~0.2.28",
"read-package-json": "~1.1.3",
"read-installed": "~0.2.2",
"osenv": "0",
"lockfile": "~0.4.0",
"retry": "~0.6.0",
- "once": "~1.1.1",
- "npmconf": "~0.1.2",
+ "once": "~1.3.0",
+ "npmconf": "~0.1.5",
"opener": "~1.3.0",
"chmodr": "~0.1.0",
- "cmd-shim": "~1.0.1",
+ "cmd-shim": "~1.1.1",
"sha": "~1.2.1",
- "editor": "0.0.4",
+ "editor": "0.0.5",
"child-process-close": "~0.1.1",
"npm-user-validate": "0.0.3",
- "github-url-from-git": "1.1.1"
+ "github-url-from-git": "1.1.1",
+ "github-url-from-username-repo": "0.0.2"
},
"bundleDependencies": [
"semver",
"child-process-close",
"editor",
"npm-user-validate",
- "github-url-from-git"
+ "github-url-from-git",
+ "github-url-from-username-repo"
],
"devDependencies": {
"ronn": "~0.3.6",
"tap": "~0.4.0",
- "npm-registry-mock": "~0.3.0"
+ "npm-registry-mock": "~0.5.3"
},
"engines": {
"node": ">=0.6",
"scripts": {
"test": "node ./test/run.js && tap test/tap/*.js",
"tap": "tap test/tap/*.js",
- "prepublish": "node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
+ "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rm -rf test/*/*/node_modules && make -j4 doc",
"dumpconf": "env | grep npm | sort | uniq",
"echo": "node bin/npm-cli.js"
},
{
"npm-test-peer-deps-file": {
"version": "1.2.3",
- "from": "https://raw.github.com/gist/3971128/3f6aa37b4fa1186c2f47da9b77dcc4ec496e3483/index.js",
- "resolved": "https://raw.github.com/gist/3971128/3f6aa37b4fa1186c2f47da9b77dcc4ec496e3483/index.js",
+ "from": "https://gist.github.com/domenic/3971128/raw/7472b26a013ceb174c2d726314e9fa97465729bb/index.js",
+ "resolved": "https://gist.github.com/domenic/3971128/raw/7472b26a013ceb174c2d726314e9fa97465729bb/index.js",
"dependencies": {
"opener": {
"version": "1.3.0",
"name": "npm-test-peer-deps",
"version": "0.0.0",
"dependencies": {
- "npm-test-peer-deps-file": "https://raw.github.com/gist/3971128/3f6aa37b4fa1186c2f47da9b77dcc4ec496e3483/index.js"
+ "npm-test-peer-deps-file": "https://gist.github.com/domenic/3971128/raw/7472b26a013ceb174c2d726314e9fa97465729bb/index.js"
},
"scripts": {
"test": "node test.js"
"dependencies": {
"npm-test-single-file": {
"version": "1.2.3",
- "resolved": "https://raw.github.com/gist/1837112/index.js"
+ "resolved": "https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js"
},
"glob": {
"version": "3.1.5",
"name": "npm-test-shrinkwrap",
"version": "0.0.0",
"dependencies": {
- "npm-test-single-file": "https://raw.github.com/gist/1837112/index.js",
+ "npm-test-single-file": "https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js",
"glob": "git://github.com/isaacs/node-glob.git#npm-test",
"minimatch": "~0.1.0"
},
+++ /dev/null
-{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}
\ No newline at end of file
+++ /dev/null
-{"_id":"underscore","_rev":"119-a5be0bcbbb6f45bd345730eca56c65e9","name":"underscore","description":"JavaScript's functional programming helper library.","dist-tags":{"latest":"1.4.4","stable":"1.4.4"},"versions":{"1.0.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.3","_id":"underscore@1.0.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.3.tgz","shasum":"7793a6f776dffa491d224eaf1d819824d4dc288a"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.0.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.4","_id":"underscore@1.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.4.tgz","shasum":"563141126b4e412f6c12c2ae2fb44ef0edd23fb2"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.0":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.0","_id":"underscore@1.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.0.tgz","shasum":"8bf44d9cc8c3a614d7940035522e1f95b682b071"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.1":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.1","_id":"underscore@1.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.1.tgz","shasum":"65dddb8cd0ee3f0094f46db72ea269d5a4f5fca4"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.2":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.2","_id":"underscore@1.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.2.tgz","shasum":"8cf4ae3900c32f3e3f06579d473a45ad768251e8"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.3","_id":"underscore@1.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.8-1","_nodeVersion":"v0.2.5","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.3.tgz","shasum":"6bd1969042a65bd3966d8924c14909f2284631dd"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore.js","version":"1.1.4","_id":"underscore@1.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.9","_nodeVersion":"v0.5.0-pre","dist":{"shasum":"9e82274902865625b3a6d4c315a38ffd80047dae","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.4.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.1.5":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.5","_id":"underscore@1.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.16","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"23601d62c75619998b2f0db24938102793336a56","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.5.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.6":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.6","_id":"underscore@1.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"6868da1bdd72d75285be0b4e50f228e70d001a2c","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.7":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.7","devDependencies":{},"_id":"underscore@1.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"40bab84bad19d230096e8d6ef628bff055d83db0","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz"},"scripts":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.0","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"b32ce32c8c118caa8031c10b54c7f65ab3b557fd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.0.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.1","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"74dd40e9face84e724eb2edae945b8aedc233ba3","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.2.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"11b874da70f4683d7d48bba2b44be1e600d2f6cf","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.3.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.4","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e8da6241aa06f64df2473bb2590b8c17c84c3c7e","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.4.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.0","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"253b2d79b7bb67943ced0fc744eb18267963ede8","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.0.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.1","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.1.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"1b4e455089ab1d1d38ab6794ffe6cf08f764394a","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.2.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.0","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.0","dist":{"shasum":"caaf510c272cbb53748a225dcfd906e5f5a5ccdd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.0.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.1","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.1","dist":{"shasum":"f6a25ffe5d6d3ed4fe8fef37c3a9bfe689b16bb9","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.1.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.2","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.2","dist":{"shasum":"cb2aae6a7999a89fd55aaee75bce0311698cebfb","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.2.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.3","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.3","dist":{"shasum":"b3d0aaa1ee74d886ea4f2648021a4f8ad779ed1d","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.3.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.4","devDependencies":{"phantomjs":"0.2.2"},"scripts":{"test":"phantomjs test/vendor/runner.js test/index.html?noglobals=true"},"readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.4","dist":{"shasum":"61a6a32010622afa07963bf325203cf12239d604","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"time":{"1.0.3":"2011-12-07T15:12:18.045Z","1.0.4":"2011-12-07T15:12:18.045Z","1.1.0":"2011-12-07T15:12:18.045Z","1.1.1":"2011-12-07T15:12:18.045Z","1.1.2":"2011-12-07T15:12:18.045Z","1.1.3":"2011-12-07T15:12:18.045Z","1.1.4":"2011-12-07T15:12:18.045Z","1.1.5":"2011-12-07T15:12:18.045Z","1.1.6":"2011-12-07T15:12:18.045Z","1.1.7":"2011-12-07T15:12:18.045Z","1.2.0":"2011-12-07T15:12:18.045Z","1.2.1":"2011-12-07T15:12:18.045Z","1.2.2":"2011-11-14T20:28:47.115Z","1.2.3":"2011-12-07T15:12:18.045Z","1.2.4":"2012-01-09T17:23:14.818Z","1.3.0":"2012-01-11T16:41:38.459Z","1.3.1":"2012-01-23T22:57:36.474Z","1.3.2":"2012-04-09T18:38:14.345Z","1.3.3":"2012-04-10T14:43:48.089Z","1.4.0":"2012-09-27T22:02:55.267Z","1.4.1":"2012-10-01T17:20:22.595Z","1.4.2":"2012-10-07T03:05:02.986Z","1.4.3":"2012-12-04T18:47:36.401Z","1.4.4":"2013-01-30T02:12:42.969Z"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"users":{"vesln":true,"mvolkmann":true,"lancehunt":true,"mikl":true,"linus":true,"vasc":true,"bat":true,"dmalam":true,"mbrevoort":true,"danielr":true,"rsimoes":true,"thlorenz":true,"jharding":true,"tellnes":true,"fgribreau":true,"pid":true,"tylerstalder":true,"graemef":true,"gillesruppert":true,"travishorn":true,"m42am":true,"af":true,"bencevans":true,"Scryptonite":true,"konklone":true,"esp":true,"bryanburgers":true,"ehershey":true,"freethenation":true,"dannydulai":true,"megadrive":true,"lupomontero":true,"cj.nichols":true,"dbrockman":true,"maxmaximov":true,"hyqhyq_3":true,"zonetti":true,"cparker15":true,"lemulot":true,"mlowe":true,"chilts":true},"_attachments":{"underscore-1.4.4.tgz":{"content_type":"application/octet-stream","revpos":104,"digest":"md5-s/MrjCiRarwh7tZ9DX+RyA==","length":41763,"stub":true},"underscore-1.4.3.tgz":{"content_type":"application/octet-stream","revpos":97,"digest":"md5-SbGx702k/T8yuag+j/VjCg==","length":62294,"stub":true},"underscore-1.4.2.tgz":{"content_type":"application/octet-stream","revpos":91,"digest":"md5-vSAO6RpJID3UCJkAWMEIjg==","length":61836,"stub":true},"underscore-1.4.1.tgz":{"content_type":"application/octet-stream","revpos":88,"digest":"md5-O72hIvWp7cVwkiA/2eF6rg==","length":61692,"stub":true},"underscore-1.4.0.tgz":{"content_type":"application/octet-stream","revpos":85,"digest":"md5-26PeH3uwZlxMzfzwS4LmMg==","length":61579,"stub":true},"underscore-1.3.3.tgz":{"content_type":"application/octet-stream","revpos":69,"digest":"md5-lRWlaQvCPiUt9CVTCTbZqQ==","length":58692,"stub":true},"underscore-1.3.2.tgz":{"content_type":"application/octet-stream","revpos":66,"digest":"md5-yS3kcu5U31CO0KAJcBJ9yA==","length":58699,"stub":true},"underscore-1.3.1.tgz":{"content_type":"application/octet-stream","revpos":60,"digest":"md5-Y4Z1Vvv7gZoZtJ9mTz0zSQ==","length":61440,"stub":true},"underscore-1.3.0.tgz":{"content_type":"application/octet-stream","revpos":56,"digest":"md5-eIPIVGdK7Fzup3CU/AMO4g==","length":61440,"stub":true},"underscore-1.2.4.tgz":{"content_type":"application/octet-stream","revpos":54,"digest":"md5-jCUzsaWc+tlE/lQNsuLQBA==","length":61440,"stub":true},"underscore-1.2.3.tgz":{"content_type":"application/octet-stream","revpos":41,"digest":"md5-bP9hXPsRRpFAWlmUNIY+jA==","length":40960,"stub":true},"underscore-1.2.2.tgz":{"content_type":"application/octet-stream","revpos":38,"digest":"md5-78/kFlhnF2WL94pdo/dfww==","length":40960,"stub":true},"underscore-1.2.1.tgz":{"content_type":"application/octet-stream","revpos":35,"digest":"md5-gNzWgJppZn3xUj8LCQcJ+Q==","length":31879,"stub":true},"underscore-1.2.0.tgz":{"content_type":"application/octet-stream","revpos":33,"digest":"md5-WYSTx/McoA2yFB6GmQ5KnA==","length":31310,"stub":true},"underscore-1.1.7.tgz":{"content_type":"application/octet-stream","revpos":29,"digest":"md5-BxaNPc3JexY2qLOK3gDhgw==","length":29052,"stub":true},"underscore-1.1.6.tgz":{"content_type":"application/octet-stream","revpos":27,"digest":"md5-U11VsMTDu6BEZDKJlZidTw==","length":25592,"stub":true},"underscore-1.1.5.tgz":{"content_type":"application/octet-stream","revpos":25,"digest":"md5-rpLusI4XejA3uVROFAZg1A==","length":25038,"stub":true},"underscore-1.1.4.tgz":{"content_type":"application/octet-stream","revpos":23,"digest":"md5-VrXC+bUYmxwzr2CQH4oq0w==","length":86233,"stub":true},"underscore-1.1.3.tgz":{"content_type":"application/octet-stream","revpos":17,"digest":"md5-sdTV7zbtYfhAAanQLEcziw==","length":86107,"stub":true},"underscore-1.1.2.tgz":{"content_type":"application/octet-stream","revpos":11,"digest":"md5-SSm/3w/usRqR+0SrSyCr8A==","length":85482,"stub":true},"underscore-1.1.1.tgz":{"content_type":"application/octet-stream","revpos":9,"digest":"md5-UW8pTfPbkrRFTiwM6AFlVA==","length":85214,"stub":true},"underscore-1.1.0.tgz":{"content_type":"application/octet-stream","revpos":7,"digest":"md5-YJcA44Oj1Dm2imfD7dHLag==","length":71266,"stub":true},"underscore-1.0.4.tgz":{"content_type":"application/octet-stream","revpos":5,"digest":"md5-nRJu+q0L17u8DZqPxVvQKQ==","length":71018,"stub":true},"underscore-1.0.3.tgz":{"content_type":"application/octet-stream","revpos":3,"digest":"md5-pwgll4db7l4cg7fPTrgVTw==","length":70285,"stub":true}}}
\ No newline at end of file
--- /dev/null
+var test = require('tap').test
+var spawn = require('child_process').spawn
+var node = process.execPath
+var npm = require.resolve('../../')
+var args = [ npm, 'ls', 'ceci n’est pas une package' ]
+test('ls exits non-zero when nothing found', function (t) {
+ var child = spawn(node, args)
+ child.on('exit', function (code) {
+ t.notEqual(code, 0)
+ t.end()
+ })
+})
--- /dev/null
+var test = require("tap").test
+var npm = require("../../")
+
+var mr = require("npm-registry-mock")
+
+// config
+var port = 1331
+var address = "http://localhost:" + port
+var pkg = __dirname + '/outdated-include-devdependencies'
+
+
+test("includes devDependencies in outdated", function (t) {
+ process.chdir(pkg)
+ mr(port, function (s) {
+ npm.load({registry: address}, function () {
+ npm.outdated(function (er, d) {
+ t.equal("1.5.1", d[0][3])
+ s.close()
+ t.end()
+ })
+ })
+ })
+})
\ No newline at end of file
--- /dev/null
+{
+ "author": "Rocko Artischocko",
+ "name": "ignore-shrinkwrap",
+ "version": "0.0.0",
+ "devDependencies": {
+ "underscore": ">=1.3.1"
+ }
+}
\ No newline at end of file
--- /dev/null
+var test = require("tap").test
+var npm = require("../../")
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+
+
+var mr = require("npm-registry-mock")
+
+// config
+var port = 1331
+var address = "http://localhost:" + port
+var pkg = __dirname + "/outdated-new-versions"
+mkdirp.sync(pkg + "/cache")
+
+
+test("dicovers new versions in outdated", function (t) {
+ process.chdir(pkg)
+ t.plan(2)
+ mr(port, function (s) {
+ npm.load({cache: pkg + "/cache", registry: address}, function () {
+ npm.outdated(function (er, d) {
+ for (var i = 0; i < d.length; i++) {
+ if (d[i][1] === "underscore")
+ t.equal("1.5.1", d[i][4])
+ if (d[i][1] === "request")
+ t.equal("2.27.0", d[i][4])
+ }
+ s.close()
+ t.end()
+ })
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ rimraf.sync(pkg + "/cache")
+ t.end()
+})
--- /dev/null
+{
+ "name": "new-versions-with-outdated",
+ "author": "Rockbert",
+ "version": "0.0.0",
+ "dependencies": {
+ "underscore": "~1.3.1"
+ },
+ "devDependencies": {
+ "request": "~0.9.0"
+ }
+}
--- /dev/null
+// verify that prepublish runs on pack and publish
+var test = require('tap').test
+var npm = require('../../')
+var fs = require('fs')
+var pkg = __dirname + '/prepublish_package'
+var tmp = pkg + '/tmp'
+var cache = pkg + '/cache'
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var path = require('path')
+var os = require('os')
+
+test('setup', function (t) {
+ var n = 0
+ mkdirp(pkg, then())
+ mkdirp(cache, then())
+ mkdirp(tmp, then())
+ function then (er) {
+ n ++
+ return function (er) {
+ if (er)
+ throw er
+ if (--n === 0)
+ next()
+ }
+ }
+
+ function next () {
+ fs.writeFile(pkg + '/package.json', JSON.stringify({
+ name: 'npm-test-prepublish',
+ version: '1.2.5',
+ scripts: { prepublish: 'echo ok' }
+ }), 'ascii', function (er) {
+ if (er)
+ throw er
+ t.pass('setup done')
+ t.end()
+ })
+ }
+})
+
+test('test', function (t) {
+ var spawn = require('child_process').spawn
+ var node = process.execPath
+ var npm = path.resolve(__dirname, '../../cli.js')
+ var env = {
+ npm_config_cache: cache,
+ npm_config_tmp: tmp,
+ npm_config_prefix: pkg,
+ npm_config_global: 'false'
+ }
+ for (var i in process.env) {
+ if (!/^npm_config_/.test(i))
+ env[i] = process.env[i]
+ }
+ var child = spawn(node, [npm, 'pack'], {
+ cwd: pkg,
+ env: env
+ })
+ child.stdout.setEncoding('utf8')
+ child.stderr.on('data', function(chunk) {
+ throw new Error('got stderr data: ' + JSON.stringify('' + chunk))
+ })
+ child.stdout.on('data', ondata)
+ child.on('close', onend)
+ var c = ''
+ function ondata (chunk) {
+ c += chunk
+ }
+ function onend () {
+ c = c.trim()
+ t.equal( c
+ , '> npm-test-prepublish@1.2.5 prepublish .' + os.EOL
+ + '> echo ok' + os.EOL
+ + os.EOL
+ + 'ok' + os.EOL
+ + 'npm-test-prepublish-1.2.5.tgz')
+ t.end()
+ }
+})
+
+test('cleanup', function (t) {
+ rimraf(pkg, function(er) {
+ if (er)
+ throw er
+ t.pass('cleaned up')
+ t.end()
+ })
+})
+
var test = require('tap').test
var fs = require('fs')
+var osenv = require('osenv')
var pkg = process.env.npm_config_tmp || '/tmp'
pkg += '/npm-test-publish-config'
npm_config_cache_lock_wait: 1000,
HOME: process.env.HOME,
Path: process.env.PATH,
- PATH: process.env.PATH
+ PATH: process.env.PATH,
+ USERPROFILE: osenv.home()
}
})
})
--- /dev/null
+var test = require("tap").test
+ , npm = require("../../")
+
+test("returns a list of removed items", function (t) {
+ t.plan(1)
+
+ setup(function () {
+ npm.install(".", function (err) {
+ if (err) return t.fail(err)
+ npm.uninstall("once", "ini", "lala", function (err, d) {
+ if (err) return t.fail(err)
+ t.same(d.sort(), ["once", "ini"].sort())
+ t.end()
+ })
+ })
+ })
+})
+
+function setup (cb) {
+ process.chdir(__dirname + "/uninstall-package")
+ npm.load(function () {
+ cb()
+ })
+}
--- /dev/null
+{
+ "name": "beep",
+ "version": "0.0.0",
+ "main": "index.js",
+ "dependencies": {
+ "once": "*",
+ "ini": "*"
+ }
+}