*.swp
+.*.swp
npm-debug.log
/test/bin
/test/output.log
!.npmignore
/npm-*.tgz
+
+*.pyc
No. This will never happen. This question comes up sometimes,
because it seems silly from the outside that npm couldn't just be
configured to put stuff somewhere else, and then npm could load them
-from there. It's an arbitrary spelling choice, right? What's the bg
+from there. It's an arbitrary spelling choice, right? What's the big
deal?
At the time of this writing, the string `'node_modules'` appears 151
If a url is provided, it will be used by the `npm bugs` command.
+## license
+
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.
+
+The simplest way, assuming you're using a common license such as BSD or MIT, is
+to just specify the name of the license you're using, like this:
+
+ { "license" : "BSD" }
+
+If you have more complex licensing terms, or you want to provide more detail
+in your package.json file, you can use the more verbose plural form, like this:
+
+ "licenses" : [
+ { "type" : "MyLicense"
+ , "url" : "http://github.com/owner/project/path/to/license"
+ }
+ ]
+
+It's also a good idea to include a license file at the top level in your package.
+
## people fields: author, contributors
The "author" is one person. "contributors" is an array of people. A "person"
`devDependencies` hash.
These things will be installed whenever the `--dev` configuration flag
-is set. This flag is set automatically when doing `npm link`, and can
-be managed like any other npm configuration param. See `npm-config(1)`
-for more on the topic.
+is set. This flag is set automatically when doing `npm link` or when doing
+`npm install` from the root of a package, and can be managed like any other npm
+configuration param. See `npm-config(1)` for more on the topic.
## bundledDependencies
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin — npm@1.2.14</p>
+<p id="footer">bin — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs — npm@1.2.14</p>
+<p id="footer">bugs — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands — npm@1.2.14</p>
+<p id="footer">commands — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">config — npm@1.2.14</p>
+<p id="footer">config — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.2.14</p>
+<p id="footer">deprecate — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">docs — npm@1.2.14</p>
+<p id="footer">docs — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">edit — npm@1.2.14</p>
+<p id="footer">edit — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">explore — npm@1.2.14</p>
+<p id="footer">explore — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">help-search — npm@1.2.14</p>
+<p id="footer">help-search — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init — npm@1.2.14</p>
+<p id="footer">init — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">install — npm@1.2.14</p>
+<p id="footer">install — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">link — npm@1.2.14</p>
+<p id="footer">link — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">load — npm@1.2.14</p>
+<p id="footer">load — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">ls — npm@1.2.14</p>
+<p id="footer">ls — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.2.14</p>
+<p>1.2.15</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.2.14</p>
+<p id="footer">npm — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">outdated — npm@1.2.14</p>
+<p id="footer">outdated — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.2.14</p>
+<p id="footer">owner — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">pack — npm@1.2.14</p>
+<p id="footer">pack — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix — npm@1.2.14</p>
+<p id="footer">prefix — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">prune — npm@1.2.14</p>
+<p id="footer">prune — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.2.14</p>
+<p id="footer">publish — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild — npm@1.2.14</p>
+<p id="footer">rebuild — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.2.14</p>
+<p id="footer">restart — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root — npm@1.2.14</p>
+<p id="footer">root — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.2.14</p>
+<p id="footer">run-script — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">search — npm@1.2.14</p>
+<p id="footer">search — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">shrinkwrap — npm@1.2.14</p>
+<p id="footer">shrinkwrap — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">start — npm@1.2.14</p>
+<p id="footer">start — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">stop — npm@1.2.14</p>
+<p id="footer">stop — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.2.14</p>
+<p id="footer">submodule — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">tag — npm@1.2.14</p>
+<p id="footer">tag — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">test — npm@1.2.14</p>
+<p id="footer">test — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">uninstall — npm@1.2.14</p>
+<p id="footer">uninstall — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">unpublish — npm@1.2.14</p>
+<p id="footer">unpublish — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">update — npm@1.2.14</p>
+<p id="footer">update — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">version — npm@1.2.14</p>
+<p id="footer">version — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view — npm@1.2.14</p>
+<p id="footer">view — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami — npm@1.2.14</p>
+<p id="footer">whoami — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@1.2.14</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser — npm@1.2.14</p>
+<p id="footer">adduser — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin — npm@1.2.14</p>
+<p id="footer">bin — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs — npm@1.2.14</p>
+<p id="footer">bugs — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build — npm@1.2.14</p>
+<p id="footer">build — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle — npm@1.2.14</p>
+<p id="footer">bundle — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache — npm@1.2.14</p>
+<p id="footer">cache — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog — npm@1.2.14</p>
+<p id="footer">changelog — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style — npm@1.2.14</p>
+<p id="footer">coding-style — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion — npm@1.2.14</p>
+<p id="footer">completion — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">config — npm@1.2.14</p>
+<p id="footer">config — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">dedupe — npm@1.2.14</p>
+<p id="footer">dedupe — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.2.14</p>
+<p id="footer">deprecate — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers — npm@1.2.14</p>
+<p id="footer">developers — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">disputes — npm@1.2.14</p>
+<p id="footer">disputes — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs — npm@1.2.14</p>
+<p id="footer">docs — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit — npm@1.2.14</p>
+<p id="footer">edit — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore — npm@1.2.14</p>
+<p id="footer">explore — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>No. This will never happen. This question comes up sometimes,
because it seems silly from the outside that npm couldn't just be
configured to put stuff somewhere else, and then npm could load them
-from there. It's an arbitrary spelling choice, right? What's the bg
+from there. It's an arbitrary spelling choice, right? What's the big
deal?</p>
<p>At the time of this writing, the string <code>'node_modules'</code> appears 151
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq — npm@1.2.14</p>
+<p id="footer">faq — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders — npm@1.2.14</p>
+<p id="footer">folders — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">global — npm@1.2.14</p>
+<p id="footer">global — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search — npm@1.2.14</p>
+<p id="footer">help-search — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help — npm@1.2.14</p>
+<p id="footer">help — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p> Display npm username</p>
</div>
-<p id="footer">index — npm@1.2.14</p>
+<p id="footer">index — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init — npm@1.2.14</p>
+<p id="footer">init — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">install — npm@1.2.14</p>
+<p id="footer">install — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If a url is provided, it will be used by the <code>npm bugs</code> command.</p>
+<h2 id="license">license</h2>
+
+<p>You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.</p>
+
+<p>The simplest way, assuming you're using a common license such as BSD or MIT, is
+to just specify the name of the license you're using, like this:</p>
+
+<pre><code>{ "license" : "BSD" }</code></pre>
+
+<p>If you have more complex licensing terms, or you want to provide more detail
+in your package.json file, you can use the more verbose plural form, like this:</p>
+
+<pre><code>"licenses" : [
+ { "type" : "MyLicense"
+ , "url" : "http://github.com/owner/project/path/to/license"
+ }
+]</code></pre>
+
+<p>It's also a good idea to include a license file at the top level in your package.</p>
+
<h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
<p>The "author" is one person. "contributors" is an array of people. A "person"
<code>devDependencies</code> hash.</p>
<p>These things will be installed whenever the <code>--dev</code> configuration flag
-is set. This flag is set automatically when doing <code>npm link</code>, and can
-be managed like any other npm configuration param. See <code><a href="../doc/config.html">config(1)</a></code>
-for more on the topic.</p>
+is set. This flag is set automatically when doing <code>npm link</code> or when doing
+<code>npm install</code> from the root of a package, and can be managed like any other npm
+configuration param. See <code><a href="../doc/config.html">config(1)</a></code> for more on the topic.</p>
<h2 id="bundledDependencies">bundledDependencies</h2>
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json — npm@1.2.14</p>
+<p id="footer">json — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link — npm@1.2.14</p>
+<p id="footer">link — npm@1.2.15</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.2.14 /path/to/npm
+<pre><code>npm@1.2.15 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">ls — npm@1.2.14</p>
+<p id="footer">ls — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.2.14</p>
+<p>1.2.15</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.2.14</p>
+<p id="footer">npm — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated — npm@1.2.14</p>
+<p id="footer">outdated — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.2.14</p>
+<p id="footer">owner — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack — npm@1.2.14</p>
+<p id="footer">pack — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix — npm@1.2.14</p>
+<p id="footer">prefix — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune — npm@1.2.14</p>
+<p id="footer">prune — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.2.14</p>
+<p id="footer">publish — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild — npm@1.2.14</p>
+<p id="footer">rebuild — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry — npm@1.2.14</p>
+<p id="footer">registry — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.2.14</p>
+<p id="footer">removing-npm — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.2.14</p>
+<p id="footer">restart — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">rm — npm@1.2.14</p>
+<p id="footer">rm — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root — npm@1.2.14</p>
+<p id="footer">root — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.2.14</p>
+<p id="footer">run-script — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts — npm@1.2.14</p>
+<p id="footer">scripts — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search — npm@1.2.14</p>
+<p id="footer">search — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver — npm@1.2.14</p>
+<p id="footer">semver — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap — npm@1.2.14</p>
+<p id="footer">shrinkwrap — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star — npm@1.2.14</p>
+<p id="footer">star — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/star.html">star(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">stars — npm@1.2.14</p>
+<p id="footer">stars — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start — npm@1.2.14</p>
+<p id="footer">start — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop — npm@1.2.14</p>
+<p id="footer">stop — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.2.14</p>
+<p id="footer">submodule — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag — npm@1.2.14</p>
+<p id="footer">tag — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test — npm@1.2.14</p>
+<p id="footer">test — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall — npm@1.2.14</p>
+<p id="footer">uninstall — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish — npm@1.2.14</p>
+<p id="footer">unpublish — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update — npm@1.2.14</p>
+<p id="footer">update — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version — npm@1.2.14</p>
+<p id="footer">version — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view — npm@1.2.14</p>
+<p id="footer">view — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami — npm@1.2.14</p>
+<p id="footer">whoami — npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
})
}
-function addNameTag (name, tag, data, cb) {
- if (typeof cb !== "function") cb = data, data = null
+function addNameTag (name, tag, data, cb_) {
+ if (typeof cb_ !== "function") cb_ = data, data = null
log.info("addNameTag", [name, tag])
var explicit = true
if (!tag) {
tag = npm.config.get("tag")
}
+ function cb(er, data) {
+ // might be username/project
+ // in that case, try it as a github url.
+ if (er && tag.split("/").length === 2) {
+ return maybeGithub(tag, name, er, cb_)
+ }
+ return cb_(er, data)
+ }
+
registry.get(name, function (er, data, json, response) {
if (er) return cb(er)
engineFilter(data)
}
er = installTargetsError(tag, data)
-
- // might be username/project
- // in that case, try it as a github url.
- if (tag.split("/").length === 2) {
- return maybeGithub(tag, name, er, cb)
- }
-
return cb(er)
})
}
if (data && !data._from) data._from = what
- return cb(er, data)
+ return cb(er, data || [])
})
}
}
}
function cleanBuild (folders, set, cb) {
- // https://github.com/isaacs/npm/issues/1872
- // If there's a wscript, try 'node-waf clean'
- // But don't die on either of those if they fail.
- // Just a best-effort kind of deal.
- asyncMap(folders, function (f, cb) {
- fs.readdir(f, function (er, files) {
- // everything should be a dir.
- if (er) return cb(er)
- if (files.indexOf("wscript") !== -1) {
- exec("node-waf", ["clean"], null, false, f, thenBuild)
- } else thenBuild()
- })
- function thenBuild (er) {
- // ignore error, just continue
- // it could be that it's not configured yet or whatever.
- cb()
- }
- }, function (er) {
+ npm.commands.build(folders, function (er) {
if (er) return cb(er)
- npm.commands.build(folders, function (er) {
- if (er) return cb(er)
- console.log(folders.map(function (f) {
- return set[f] + " " + f
- }).join("\n"))
- cb()
- })
+ console.log(folders.map(function (f) {
+ return set[f] + " " + f
+ }).join("\n"))
+ cb()
})
}
, isRoot = process.getuid && myUID === 0
, constants = require("constants")
, uidNumber = require("uid-number")
+ , once = require("once")
function exec (cmd, args, env, takeOver, cwd, uid, gid, cb) {
if (typeof cb !== "function") cb = gid, gid = null
var stdout = ""
, stderr = ""
, cp = spawn(cmd, args, env, takeOver, cwd, uid, gid)
+ cb = once(cb)
+ cp.on("error", cb)
cp.stdout && cp.stdout.on("data", function (chunk) {
if (chunk) stdout += chunk
})
, mkdir = require("mkdirp")
, chownr = require("chownr")
, regHost
+ , once = require("once")
module.exports = fetch
function fetch (remote, local, headers, cb) {
if (typeof cb !== "function") cb = headers, headers = {}
+ cb = once(cb)
log.verbose("fetch", "to=", local)
mkdir(path.dirname(local), function (er, made) {
if (er) return cb(er)
function fetch_ (remote, local, headers, cb) {
var fstr = fs.createWriteStream(local, { mode : npm.modes.file })
var response = null
- var calledback = false
+
fstr.on("error", function (er) {
- fs.close(fstr.fd, function () {})
- if (calledback) return
- calledback = true
- cb(fstr._ERROR = er)
+ cb(er)
+ fstr.close()
})
- fstr.on("open", function () {
- var req = makeRequest(remote, fstr, headers)
- req.on("response", function (res) {
- log.http(res.statusCode, remote)
- response = res
- })
+
+ var req = makeRequest(remote, fstr, headers)
+ req.on("response", function (res) {
+ log.http(res.statusCode, remote)
+ response = res
+ response.resume()
+ // Work around bug in node v0.10.0 where the CryptoStream
+ // gets stuck and never starts reading again.
+ if (process.version === "v0.10.0") {
+ response.resume = function (orig) { return function() {
+ var ret = orig.apply(response, arguments)
+ if (response.socket.encrypted)
+ response.socket.encrypted.read(0)
+ return ret
+ }}(response.resume)
+ }
})
+
fstr.on("close", function () {
- if (calledback) return
- calledback = true
+ var er
if (response && response.statusCode && response.statusCode >= 400) {
- var er = new Error(response.statusCode + " "
- + require("http").STATUS_CODES[response.statusCode])
- cb(fstr._ERROR = er, response)
- } else {
- cb(null, response)
+ er = new Error(response.statusCode + " "
+ + require("http").STATUS_CODES[response.statusCode])
}
+ cb(er, response)
})
}
var opts = { url: remote
, proxy: proxy
, strictSSL: npm.config.get("strict-ssl")
+ , rejectUnauthorized: npm.config.get("strict-ssl")
, ca: remote.host === regHost ? npm.config.get("ca") : undefined
, headers: { "user-agent": npm.config.get("user-agent") }}
var req = request(opts)
fstr.emit("error", er)
})
req.pipe(fstr)
- return req;
+ return req
}
No\. This will never happen\. This question comes up sometimes,
because it seems silly from the outside that npm couldn\'t just be
configured to put stuff somewhere else, and then npm could load them
-from there\. It\'s an arbitrary spelling choice, right? What\'s the bg
+from there\. It\'s an arbitrary spelling choice, right? What\'s the big
deal?
.
.P
.P
If a url is provided, it will be used by the \fBnpm bugs\fR command\.
.
+.SH "license"
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you\'re placing on it\.
+.
+.P
+The simplest way, assuming you\'re using a common license such as BSD or MIT, is
+to just specify the name of the license you\'re using, like this:
+.
+.IP "" 4
+.
+.nf
+{ "license" : "BSD" }
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you have more complex licensing terms, or you want to provide more detail
+in your package\.json file, you can use the more verbose plural form, like this:
+.
+.IP "" 4
+.
+.nf
+"licenses" : [
+ { "type" : "MyLicense"
+ , "url" : "http://github\.com/owner/project/path/to/license"
+ }
+]
+.
+.fi
+.
+.IP "" 0
+.
+.P
+It\'s also a good idea to include a license file at the top level in your package\.
+.
.SH "people fields: author, contributors"
The "author" is one person\. "contributors" is an array of people\. A "person"
is an object with a "name" field and optionally "url" and "email", like this:
.
.P
These things will be installed whenever the \fB\-\-dev\fR configuration flag
-is set\. This flag is set automatically when doing \fBnpm link\fR, and can
-be managed like any other npm configuration param\. See \fBnpm help config\fR
-for more on the topic\.
+is set\. This flag is set automatically when doing \fBnpm link\fR or when doing \fBnpm install\fR from the root of a package, and can be managed like any other npm
+configuration param\. See \fBnpm help config\fR for more on the topic\.
.
.SH "bundledDependencies"
Array of package names that will be bundled when publishing the package\.
.IP "" 4
.
.nf
-npm@1.2.14 /path/to/npm
+npm@1.2.15 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
.fi
.
.SH "VERSION"
-1.2.14
+1.2.15
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.fi
.
.SH "VERSION"
-1.2.14
+1.2.15
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
try {
var p = this.package = JSON.parse(buf)
} catch (er) {
- er.file = path.resolve(this.path, e)
- this.error(er)
- return
+ // just pretend it's a normal old file, not magic at all.
+ return []
}
if (this === this.root) {
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "0.1.3",
+ "version": "0.1.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-npm.git"
"license": "BSD",
"readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n",
"readmeFilename": "README.md",
- "_id": "fstream-npm@0.1.3",
- "_from": "fstream-npm@~0.1.3"
+ "_id": "fstream-npm@0.1.4",
+ "_from": "fstream-npm@latest"
}
{
"name": "read-package-json",
- "version": "0.2.2",
+ "version": "0.3.0",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
},
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
"readmeFilename": "README.md",
- "_id": "read-package-json@0.2.2",
+ "_id": "read-package-json@0.3.0",
"_from": "read-package-json@latest"
}
// put more stuff on here to customize.
readJson.extraSet = [
gypfile,
- wscript,
serverjs,
authors,
readme,
function gypfile (file, data, cb) {
var dir = path.dirname(file)
var s = data.scripts || {}
- if (s.install || s.preinstall) {
+ if (s.install === "node-gyp rebuild" && !s.preinstall)
+ data.gypfile = true
+ if (s.install || s.preinstall)
return cb(null, data);
- }
glob("*.gyp", { cwd: dir }, function (er, files) {
if (er) return cb(er);
gypfile_(file, data, files, cb)
return cb(null, data);
}
-function wscript (file, data, cb) {
- var dir = path.dirname(file)
- var s = data.scripts || {}
- if (s.install || s.preinstall) {
- return cb(null, data);
- }
- glob("wscript", { cwd: dir }, function (er, files) {
- if (er) return cb(er);
- wscript_(file, data, files, cb)
- })
-}
-function wscript_ (file, data, files, cb) {
- if (!files.length || data.gypfile) return cb(null, data);
- var s = data.scripts || {}
- s.install = "node-waf clean ; node-waf configure build"
- data.scripts = s
- return cb(null, data);
-}
-
function serverjs (file, data, cb) {
var dir = path.dirname(file)
var s = data.scripts || {}
if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) {
response.connection.once('error', self._parserErrorHandler)
}
- if (self._aborted) return
+ if (self._aborted) return response.resume()
if (self._paused) response.pause()
+ else response.resume()
self.response = response
response.request = self
{
- "version": "1.2.14",
+ "version": "1.2.15",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
"npmlog": "0",
"ansi": "~0.1.2",
"npm-registry-client": "~0.2.18",
- "read-package-json": "~0.2.2",
+ "read-package-json": "~0.3.0",
"read-installed": "0",
"glob": "~3.1.21",
"init-package-json": "0.0.6",
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")
+var http = require("http")
+
+var okFile = new Buffer(
+'/**package\n' +
+' * { "name": "npm-test-peer-deps-file"\n' +
+' * , "main": "index.js"\n' +
+' * , "version": "1.2.3"\n' +
+' * , "description":"No package.json in sight!"\n' +
+' * , "peerDependencies": { "dict": "1.1.0" }\n' +
+' * , "dependencies": { "opener": "1.3.0" }\n' +
+' * }\n' +
+' **/\n' +
+'\n' +
+'module.exports = "I\'m just a lonely index, naked as the day I was born."\n'
+)
+
+var failFile = new Buffer(
+'/**package\n' +
+' * { "name": "npm-test-peer-deps-file-invalid"\n' +
+' * , "main": "index.js"\n' +
+' * , "version": "1.2.3"\n' +
+' * , "description":"This one should conflict with the other one"\n' +
+' * , "peerDependencies": { "dict": "1.0.0" }\n' +
+' * }\n' +
+' **/\n' +
+'\n' +
+'module.exports = "I\'m just a lonely index, naked as the day I was born."\n'
+)
+
+var server
+test("setup", function(t) {
+ server = http.createServer(function (req, res) {
+ res.setHeader('content-type', 'application/javascript')
+ switch (req.url) {
+ case "/ok.js":
+ return res.end(okFile)
+ default:
+ return res.end(failFile)
+ }
+ })
+ server.listen(1337, function() {
+ t.pass("listening")
+ t.end()
+ })
+})
-test("installing dependencies that having conflicting peerDependencies", function (t) {
- t.plan(1)
+
+test("installing dependencies that having conflicting peerDependencies", function (t) {
rimraf.sync(__dirname + "/peer-deps-invalid/node_modules")
process.chdir(__dirname + "/peer-deps-invalid")
npm.load(function () {
+ console.error('back from load')
npm.commands.install([], function (err) {
+ console.error('back from install')
if (!err) {
t.fail("No error!")
- process.exit(1)
- return
+ } else {
+ t.equal(err.code, "EPEERINVALID")
}
-
- t.equal(err.code, "EPEERINVALID")
- process.exit(0)
+ t.end()
})
})
})
+
+test("shutdown", function(t) {
+ server.close(function() {
+ t.pass("closed")
+ t.end()
+ })
+})
"name": "peer-deps-invalid",
"version": "0.0.0",
"dependencies": {
- "npm-test-peer-deps-file": "https://raw.github.com/gist/3971128/3f6aa37b4fa1186c2f47da9b77dcc4ec496e3483/index.js",
- "npm-test-peer-deps-file-invalid": "https://gist.github.com/raw/4303335/861f8d3213061826ab31591840c3cb0ac737f4fc/index.js"
+ "npm-test-peer-deps-file": "http://localhost:1337/ok.js",
+ "npm-test-peer-deps-file-invalid": "http://localhost:1337/invalid.js"
}
}
var rimraf = require("rimraf")
var npm = require("../../")
-var peerDepsTestUrl = "https://gist.github.com/raw/3971128/3f6aa37b4fa1186c2f47da9b77dcc4ec496e3483/index.js"
+var http = require("http")
+
+
+var js = new Buffer(
+'/**package\n' +
+' * { "name": "npm-test-peer-deps-file"\n' +
+' * , "main": "index.js"\n' +
+' * , "version": "1.2.3"\n' +
+' * , "description":"No package.json in sight!"\n' +
+' * , "peerDependencies": { "dict": "1.1.0" }\n' +
+' * , "dependencies": { "opener": "1.3.0" }\n' +
+' * }\n' +
+' **/\n' +
+'\n' +
+'module.exports = "I\'m just a lonely index, naked as the day I was born."\n')
+
+var server
+test("setup", function(t) {
+ server = http.createServer(function (q, s) {
+ s.setHeader('content-type', 'application/javascript')
+ s.end(js)
+ })
+ server.listen(1337, function() {
+ t.pass('listening')
+ t.end()
+ })
+})
test("installing a peerDependencies-using package without a package.json present (GH-3049)", function (t) {
process.chdir(__dirname + "/peer-deps-without-package-json")
npm.load(function () {
- npm.install(peerDepsTestUrl, function (err) {
+ npm.install('http://localhost:1337/', function (err) {
if (err) {
t.fail(err)
- t.end()
- process.exit(1)
- return
+ } else {
+ t.ok(fs.existsSync(__dirname + "/peer-deps-without-package-json/node_modules/npm-test-peer-deps-file"))
+ t.ok(fs.existsSync(__dirname + "/peer-deps-without-package-json/node_modules/dict"))
}
-
- t.ok(fs.existsSync(__dirname + "/peer-deps-without-package-json/node_modules/npm-test-peer-deps-file"))
- t.ok(fs.existsSync(__dirname + "/peer-deps-without-package-json/node_modules/dict"))
t.end()
- process.exit(0)
})
})
})
+
+test("cleanup", function (t) {
+ server.close(function() {
+ t.pass("closed")
+ t.end()
+ })
+})