@@ -25,7 +25,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">build &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
<p id="footer">bundle &mdash; npm@1.1.0-beta-4</p>
<p id="footer">bundle &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -66,7 +66,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">cache &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -34,7 +34,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">changelog &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -191,7 +191,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">coding-style &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -33,7 +33,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">completion &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -615,7 +615,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">config &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -29,7 +29,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">deprecate &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -150,7 +150,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">developers &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -37,7 +37,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">docs &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -37,7 +37,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">edit &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -40,7 +40,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">explore &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -215,7 +215,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
<p id="footer">faq &mdash; npm@1.1.0-beta-4</p>
<p id="footer">faq &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -205,7 +205,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">folders &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -38,7 +38,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">help-search &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -36,7 +36,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">help &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -372,7 +372,7 @@ <h2 id="npm-whoami-3"><a href="../api/whoami.html">whoami(3)</a></h2>

<p> Display npm username</p>
</div>
<p id="footer">index &mdash; npm@1.1.0-beta-4</p>
<p id="footer">index &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -29,7 +29,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">init &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -134,7 +134,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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></ul>
</div>
<p id="footer">install &mdash; npm@1.1.0-beta-4</p>
<p id="footer">install &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -436,7 +436,7 @@ <h2 id="SEE-ALSO">SEE ALSO</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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">json &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -58,7 +58,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">link &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -52,7 +52,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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">list &mdash; npm@1.1.0-beta-4</p>
<p id="footer">list &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -14,7 +14,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2>

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

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

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

@@ -135,7 +135,7 @@ <h2 id="SEE-ALSO">SEE ALSO</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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">npm &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -21,7 +21,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">outdated &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -34,7 +34,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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></ul>
</div>
<p id="footer">owner &mdash; npm@1.1.0-beta-4</p>
<p id="footer">owner &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -29,7 +29,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">pack &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">prefix &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -25,7 +25,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">prune &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -29,7 +29,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">publish &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -25,7 +25,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">rebuild &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -97,7 +97,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li></ul>
</div>
<p id="footer">registry &mdash; npm@1.1.0-beta-4</p>
<p id="footer">registry &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -58,7 +58,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">removing-npm &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -24,7 +24,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">restart &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">root &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -23,7 +23,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">run-script &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -164,7 +164,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">scripts &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -24,7 +24,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">search &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -104,7 +104,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
<p id="footer">semver &mdash; npm@1.1.0-beta-4</p>
<p id="footer">semver &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -26,7 +26,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">star &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">start &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">stop &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -33,7 +33,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
<p id="footer">submodule &mdash; npm@1.1.0-beta-4</p>
<p id="footer">submodule &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -21,7 +21,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">tag &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -23,7 +23,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">test &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -22,7 +22,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">uninstall &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -34,7 +34,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">unpublish &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -23,7 +23,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">update &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -31,7 +31,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">version &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -88,7 +88,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">view &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -20,7 +20,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<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 &mdash; npm@1.1.0-beta-4</p>
<p id="footer">whoami &mdash; npm@1.1.0-beta-7</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -137,7 +137,7 @@ function test (file, excludeList) {
&& rf.slice(-1) === "/"
&& excludes.indexOf(ex + "/**") === -1) {
// log.warn(ex + "/**", "adding dir-matching exclude pattern")
excludes.push(ex + "/**")
excludes.splice(ii, 1, ex, ex + "/**")
ll ++
}
}
@@ -205,7 +205,8 @@ function parseField (f, k, emptyIsFalse) {
f = envReplace(f)

if (isPath) {
if (f.substr(0, 2) === "~/" && process.env.HOME) {
var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//
if (f.match(homePattern) && process.env.HOME) {
f = path.resolve(process.env.HOME, f.substr(2))
}
f = path.resolve(f)
@@ -14,7 +14,7 @@ npm <command> [args]
.fi
.
.SH "VERSION"
1.1.0-beta-4
1.1.0-beta-7
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
@@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) {
.fi
.
.SH "VERSION"
1.1.0-beta-4
1.1.0-beta-7
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
@@ -2,7 +2,7 @@
, "publishConfig": { "tag": "alpha", "proprietary-attribs": false }
, "description": "A package manager for node"
, "keywords": [ "package manager", "modules", "install", "package.json" ]
, "version": "1.1.0-beta-4"
, "version": "1.1.0-beta-7"
, "preferGlobal": true
, "config": { "publishtest": false }
, "homepage": "http://npmjs.org/"
@@ -75,7 +75,7 @@
{ "ronn": "https://github.com/isaacs/ronnjs/tarball/master" }

, "engines": { "node": "0.6 || 0.7 || 0.8", "npm": "1" }
, "scripts": { "test": "./test/run"
, "scripts": { "test": "node ./test/run.js"
, "prepublish": "make -j4 doc"
, "dumpconf": "env | grep npm | sort | uniq"
}
@@ -0,0 +1,7 @@
/sub/ignore1
./sub/include2
ignore3
./include4
ignoredir1
ignoredir2/
*.tgz
Empty file.
@@ -0,0 +1,9 @@
{ "name":"npm-test-files"
, "version":"1.2.5"
, "files":
[ "include4"
, "sub/include"
, "sub/include2"
, "sub/include4"
, "test.sh" ]
, "scripts":{"test":"bash test.sh"}}
Empty file.
Empty file.
@@ -0,0 +1 @@
This file should be in the package.
@@ -0,0 +1,27 @@
x=`find . | grep ignore | grep -v npmignore`
if [ "$x" != "" ]; then
echo "ignored files included: $x"
exit 1
fi

x=`find . | grep -v ignore | sort`
y=".
./include4
./package.json
./sub
./sub/include
./sub/include2
./sub/include4
./test.sh"
if [ "$x" != "$y" ]; then
echo "missing included files"
echo "got:"
echo "==="
echo "$x"
echo "==="
echo "wanted:"
echo "==="
echo "$y"
echo "==="
exit 1
fi

This file was deleted.

@@ -0,0 +1,209 @@
// Everything in this file uses child processes, because we're
// testing a command line utility.

var chain = require("slide").chain
var child_process = require("child_process")
var path = require("path")
, testdir = __dirname
, fs = require("graceful-fs")
, npmpkg = path.dirname(testdir)
, npmcli = path.join(__dirname, "bin", "npm-cli.js")

var temp = process.env.TMPDIR
|| process.env.TMP
|| process.env.TEMP
|| ( process.platform === "win32"
? "c:\\windows\\temp"
: "/tmp" )

temp = path.resolve(temp, "npm-test-" + process.pid)

var root = path.resolve(temp, "root")

var failures = 0
, mkdir = require("mkdirp")
, rimraf = require("rimraf")

var pathEnvSplit = process.platform === "win32" ? ";" : ":"
, pathEnv = process.env.PATH.split(pathEnvSplit)
, npmPath = process.platform === "win32" ? root : path.join(root, "bin")

pathEnv.unshift(npmPath, path.join(root, "node_modules", ".bin"))

// lastly, make sure that we get the same node that is being used to do
// run this script. That's very important, especially when running this
// test file from in the node source folder.
pathEnv.unshift(path.dirname(process.execPath))

// the env for all the test installs etc.
var env = {}
Object.keys(process.env).forEach(function (i) {
env[i] = process.env[i]
})
env.npm_config_prefix = root
env.npm_config_color = "always"
env.npm_config_global = "true"
// have to set this to false, or it'll try to test itself forever
env.npm_config_npat = "false"
env.PATH = pathEnv.join(pathEnvSplit)
env.NODE_PATH = path.join(root, "node_modules")



function cleanup (cb) {
if (failures !== 0) return
rimraf(root, function (er) {
if (er) cb(er)
mkdir(root, 0755, cb)
})
}

function prefix (content, pref) {
return pref + (content.trim().split(/\r?\n/).join("\n" + pref))
}

var execCount = 0
function exec (cmd, shouldFail, cb) {
if (typeof shouldFail === "function") {
cb = shouldFail, shouldFail = false
}
console.error("\n+"+cmd + (shouldFail ? " (expect failure)" : ""))

// special: replace 'node' with the current execPath,
// and 'npm' with the thing we installed.
cmd = cmd.replace(/^npm /, path.resolve(npmPath, "npm") + " ")
cmd = cmd.replace(/^node /, process.execPath + " ")

child_process.exec(cmd, {env: env}, function (er, stdout, stderr) {
if (stdout) {
console.error(prefix(stdout, " 1> "))
}
if (stderr) {
console.error(prefix(stderr, " 2> "))
}

execCount ++
if (!shouldFail && !er || shouldFail && er) {
// stdout = (""+stdout).trim()
console.log("ok " + execCount + " " + cmd)
return cb()
} else {
console.log("not ok " + execCount + " " + cmd)
cb(new Error("failed "+cmd))
}
})
}

function execChain (cmds, cb) {
chain(cmds.reduce(function (l, r) {
return l.concat(r)
}, []).map(function (cmd) {
return [exec, cmd]
}), cb)
}

function flatten (arr) {
return arr.reduce(function (l, r) {
return l.concat(r)
}, [])
}

function setup (cb) {
cleanup(function (er) {
if (er) return cb(er)
execChain([ "node \""+path.resolve(npmpkg, "bin", "npm-cli.js")
+ "\" install \""+npmpkg+"\""
, "npm config set package-config:foo boo"
], cb)
})
}

function main (cb) {
console.log("# testing in %s", temp)
console.log("# global prefix = %s", root)



failures = 0

process.chdir(testdir)

// get the list of packages
var packages = fs.readdirSync(path.resolve(testdir, "packages"))
packages = packages.filter(function (p) {
return p && !p.match(/^\./)
})

installAllThenTestAll()

function installAllThenTestAll () {
chain
( [ setup
, [ exec, "npm install "+npmpkg ]
, [ execChain, packages.map(function (p) {
return "npm install packages/"+p
}) ]
, [ execChain, packages.map(function (p) {
return "npm test "+p
}) ]
, [ execChain, packages.concat("npm").map(function (p) {
return "npm rm " + p
}) ]
, installAndTestEach
]
, cb
)
}

function installAndTestEach (cb) {
chain
( [ setup
, [ execChain, packages.map(function (p) {
return [ "npm install packages/"+p
, "npm test "+p
, "npm rm "+p ]
}) ]
, [exec, "npm rm npm"]
, publishTest
], cb )
}

function publishTest (cb) {
if (process.env.npm_package_config_publishtest !== "true") {
console.error("To test publishing: "+
"npm config set npm:publishtest true")
return cb()
}

chain
( [ setup
, [ execChain, packages.filter(function (p) {
return !p.match(/private/)
}).map(function (p) {
return [ "npm publish packages/"+p
, "npm install "+p
, "npm unpublish "+p+" --force"
]
}) ]
, publishPrivateTest
], cb )

}

function publishPrivateTest (cb) {
exec("npm publish packages/npm-test-private -s", true, function (er) {
if (er) {
exec( "npm unpublish npm-test-private --force"
, function (e2) {
cb(er || e2)
})
}
cleanup(cb)
})
}
}

main(function (er) {
console.log("1.." + execCount)
if (er) throw er
})
@@ -1313,7 +1313,8 @@ UV_EXTERN uv_err_t uv_dlopen(const char* filename, uv_lib_t* library);
UV_EXTERN uv_err_t uv_dlclose(uv_lib_t library);

/*
* Retrieves a data pointer from a dynamic library.
* Retrieves a data pointer from a dynamic library. It is legal for a symbol to
* map to NULL.
*/
UV_EXTERN uv_err_t uv_dlsym(uv_lib_t library, const char* name, void** ptr);

@@ -25,11 +25,17 @@
#include <dlfcn.h>
#include <errno.h>

/* The dl family of functions don't set errno. We need a good way to communicate
* errors to the caller but there is only dlerror() and that returns a string -
* a string that may or may not be safe to keep a reference to...
*/
static const uv_err_t uv_inval_ = { UV_EINVAL, EINVAL };


uv_err_t uv_dlopen(const char* filename, uv_lib_t* library) {
void* handle = dlopen(filename, RTLD_LAZY);
if (handle == NULL) {
return uv__new_sys_error(errno);
return uv_inval_;
}

*library = handle;
@@ -39,17 +45,23 @@ uv_err_t uv_dlopen(const char* filename, uv_lib_t* library) {

uv_err_t uv_dlclose(uv_lib_t library) {
if (dlclose(library) != 0) {
return uv__new_sys_error(errno);
return uv_inval_;
}

return uv_ok_;
}


uv_err_t uv_dlsym(uv_lib_t library, const char* name, void** ptr) {
void* address = dlsym(library, name);
if (address == NULL) {
return uv__new_sys_error(errno);
void* address;

/* Reset error status. */
dlerror();

address = dlsym(library, name);

if (dlerror()) {
return uv_inval_;
}

*ptr = (void*) address;
@@ -20,7 +20,9 @@
</head>
<body>
<div id="intro">
<img id="logo" src="../logo.png" alt="node.js">
<a href="/" title="Go back to the home page">
<img id="logo" src="../logo.png" alt="node.js">
</a>
</div>
<div id="content" class="clearfix">
<div id="column1" class="interior">
@@ -241,6 +241,14 @@ server, you unauthorized connections may be accepted.
SNI.


### Event: 'clientError'

`function (exception) { }`

When a client connection emits an 'error' event before secure connection is
established - it will be forwarded here.


#### server.listen(port, [host], [callback])

Begin accepting connections on the specified `port` and `host`. If the
@@ -23,7 +23,9 @@
</head>
<body>
<div id="intro">
<img id="logo" src="../logo.png" alt="node.js">
<a href="/" title="Go back to the home page">
<img id="logo" src="../logo.png" alt="node.js">
</a>
</div>
<div id="content" class="clearfix">
<div id="column1" class="interior">
@@ -86,6 +86,8 @@ <h2>Node.js in the Industry</h2>
<li><a href="http://nodejs.org/dist/v0.6.6">Other release files</a></li>
<li><a href="https://raw.github.com/joyent/node/v0.6.6/LICENSE">License</a></li>
<li><a href="https://github.com/joyent/node">Git Repository</a></li>
<li><a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">Installing
with a Package Manager</a>
</ul>
</div>

@@ -23,7 +23,9 @@
</head>
<body>
<div id="intro">
<img id="logo" src="../logo.png" alt="node.js">
<a href="/" title="Go back to the home page">
<img id="logo" src="../logo.png" alt="node.js">
</a>
</div>
<div id="content" class="clearfix">
<div id="column1" class="interior">
@@ -111,7 +111,11 @@ function setupChannel(target, channel) {
};

target.send = function(message, sendHandle) {
if (!target._channel) throw new Error('channel closed');
if (typeof message === 'undefined') {
throw new TypeError('message cannot be undefined');
}

if (!target._channel) throw new Error("channel closed");

// For overflow protection don't write if channel queue is too deep.
if (channel.writeQueueSize > 1024 * 1024) {
@@ -148,6 +148,7 @@ Socket.prototype.setTimeout = function(msecs, callback) {


Socket.prototype._onTimeout = function() {
debug("_onTimeout");
this.emit('timeout');
};

@@ -222,7 +222,6 @@ if (isWindows) {
return arr.slice(start, end - start + 1);
}

var fromParts = trim(from.split('\\'));
var toParts = trim(to.split('\\'));

var lowerFromParts = trim(lowerFrom.split('\\'));
@@ -108,6 +108,8 @@ var unenroll = exports.unenroll = function(item) {
list.close();
delete lists[item._idleTimeout];
}
//if active is called later, then we want to make sure not to insert again
delete item._idleTimeout;
};


@@ -151,7 +153,10 @@ exports.setTimeout = function(callback, after) {
timer = new Timer();

if (arguments.length <= 2) {
timer._onTimeout = callback;
timer._onTimeout = function() {
callback();
timer.close();
}
} else {
var args = Array.prototype.slice.call(arguments, 2);
timer._onTimeout = function() {
@@ -576,7 +576,6 @@ function SecurePair(credentials, isServer, requestCert, rejectUnauthorized,
requestCert = true;
}

this._secureEstablished = false;
this._rejectUnauthorized = rejectUnauthorized ? true : false;
this._requestCert = requestCert ? true : false;

@@ -721,6 +720,7 @@ SecurePair.prototype.maybeInitFinished = function() {

SecurePair.prototype.destroy = function() {
var self = this;
var error = this.ssl.error;

if (!this._doneFlag) {
this._doneFlag = true;
@@ -736,6 +736,14 @@ SecurePair.prototype.destroy = function() {
self.encrypted.emit('close');
self.cleartext.emit('close');
});

if (!this._secureEstablished) {
if (!error) {
error = new Error('socket hang up');
error.code = 'ECONNRESET';
}
this.emit('error', error);
}
}
};

@@ -905,6 +913,9 @@ function Server(/* [options], listener */) {
}
}
});
pair.on('error', function(err) {
self.emit('clientError', err);
});
});

if (listener) {
@@ -1061,6 +1072,9 @@ exports.connect = function(port /* host, options, cb */) {
cleartext.emit('secureConnect');
}
});
pair.on('error', function(err) {
cleartext.emit('error', err);
});

cleartext._controlReleased = true;
return cleartext;
@@ -1687,7 +1687,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
if (err.code == UV_ENOENT)
message = "Module entry point not found.";
else
message = "Out of memory.";
message = uv_strerror(err);

return ThrowException(Exception::Error(String::New(message)));
}
@@ -115,15 +115,17 @@ using namespace v8;


#define HTTP_CB(name) \
static int name(http_parser* p_) { \
Parser* self = container_of(p_, Parser, parser_); \
return self->name##_(); \
} \
int always_inline name##_()
static int name(http_parser* p_) { \
HandleScope scope; \
Parser* self = container_of(p_, Parser, parser_); \
return self->name##_(); \
} \
int always_inline name##_()


#define HTTP_DATA_CB(name) \
static int name(http_parser* p_, const char* at, size_t length) { \
HandleScope scope; \
Parser* self = container_of(p_, Parser, parser_); \
return self->name##_(at, length); \
} \
@@ -208,10 +210,12 @@ struct StringPtr {


Handle<String> ToString() const {
if (str_)
return String::New(str_, size_);
else
return String::Empty();
HandleScope scope;
if (str_) {
return scope.Close(String::New(str_, size_));
} else {
return scope.Close(String::Empty());
}
}


@@ -509,6 +513,8 @@ class Parser : public ObjectWrap {
private:

Local<Array> CreateHeaders() {
HandleScope scope;

// num_values_ is either -1 or the entry # of the last header
// so num_values_ == 0 means there's a single header
Local<Array> headers = Array::New(2 * (num_values_ + 1));
@@ -518,7 +524,7 @@ class Parser : public ObjectWrap {
headers->Set(2 * i + 1, values_[i].ToString());
}

return headers;
return scope.Close(headers);
}


@@ -35,6 +35,11 @@ n.on('message', function(m) {
messageCount++;
});

// https://github.com/joyent/node/issues/2355 - JSON.stringify(undefined)
// returns "undefined" but JSON.parse() cannot parse that...
assert.throws(function() { n.send(undefined); }, TypeError);
assert.throws(function() { n.send(); }, TypeError);

n.send({ hello: 'world' });

var childExitCode = -1;
@@ -0,0 +1,62 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.

if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
process.exit(0);
}

var common = require('../common');
var assert = require('assert');
var https = require('https');
var fs = require('fs');
var path = require('path');

var options = {
key: fs.readFileSync(path.join(common.fixturesDir, 'keys/agent1-key.pem')),
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
};
var serverErrorHappened = false;
var clientErrorHappened = false;

var server = https.Server(options, function(req, res) {
assert(false);
});
server.on('clientError', function(err) {
serverErrorHappened = true;
common.debug('Server: ' + err);
server.close();
});

server.listen(common.PORT, function() {
var req = https.get({port: common.PORT}, function(res) {
assert(false);
});
req.on('error', function(err) {
clientErrorHappened = true;
common.debug('Client: ' + err);
});
});

process.on('exit', function() {
assert(serverErrorHappened);
assert(clientErrorHappened);
});
@@ -32,9 +32,9 @@ server.on('close', function() {
assert.equal(0, listeners.length);
});

server.listen(3000, function() {
server.listen(common.PORT, function() {
server.close();
server.listen(3001, function() {
server.listen(common.PORT + 1, function() {
server.close();
});
});
@@ -0,0 +1,50 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.

// This example sets a timeout then immediately attempts to disable the timeout
// https://github.com/joyent/node/pull/2245

var common = require('../common');
var net = require('net');
var assert = require('assert');

var T = 100;

var server = net.createServer(function(c) {
c.write('hello');
});
server.listen(common.PORT);

var socket = net.createConnection(common.PORT, 'localhost');

socket.setTimeout(T, function() {
socket.destroy();
server.close();
assert.ok(false);
});

socket.setTimeout(0);

setTimeout(function() {
socket.destroy();
server.close();
assert.ok(true);
}, T*2);
@@ -27,6 +27,7 @@ var assert = require('assert');
var ncalled = 0;

setTimeout(f, 0, 'foo', 'bar', 'baz');
var timer = setTimeout(function(){}, 0);

function f(a, b, c) {
assert.equal(a, 'foo');
@@ -37,6 +38,8 @@ var assert = require('assert');

process.on('exit', function() {
assert.equal(ncalled, 1);
// timer should be already closed
assert.equal(timer.close(), -1);
});
})();

@@ -0,0 +1,62 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.

if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
process.exit(0);
}

var common = require('../common');
var assert = require('assert');
var tls = require('tls');
var fs = require('fs');
var path = require('path');

var options = {
key: fs.readFileSync(path.join(common.fixturesDir, 'keys/agent1-key.pem')),
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
};
var serverErrorHappened = false;
var clientErrorHappened = false;

var server = tls.Server(options, function(socket) {
assert(false);
});
server.on('clientError', function(err) {
serverErrorHappened = true;
common.debug('Server: ' + err);
server.close();
});

server.listen(common.PORT, function() {
var client = tls.connect(common.PORT, function() {
assert(false);
});
client.on('error', function(err) {
clientErrorHappened = true;
common.debug('Client: ' + err);
});
});

process.on('exit', function() {
assert(serverErrorHappened);
assert(clientErrorHappened);
});