node scripts/index-build.js > $@
node_modules/.bin/ronn:
- node cli.js install
+ node cli.js install ronn
doc: man
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin — npm@1.1.66</p>
+<p id="footer">bin — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs — npm@1.1.66</p>
+<p id="footer">bugs — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands — npm@1.1.66</p>
+<p id="footer">commands — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">config — npm@1.1.66</p>
+<p id="footer">config — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.1.66</p>
+<p id="footer">deprecate — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">docs — npm@1.1.66</p>
+<p id="footer">docs — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">edit — npm@1.1.66</p>
+<p id="footer">edit — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">explore — npm@1.1.66</p>
+<p id="footer">explore — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">help-search — npm@1.1.66</p>
+<p id="footer">help-search — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init — npm@1.1.66</p>
+<p id="footer">init — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">install — npm@1.1.66</p>
+<p id="footer">install — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">link — npm@1.1.66</p>
+<p id="footer">link — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">load — npm@1.1.66</p>
+<p id="footer">load — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">ls — npm@1.1.66</p>
+<p id="footer">ls — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.66</p>
+<p>1.1.69</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.1.66</p>
+<p id="footer">npm — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">outdated — npm@1.1.66</p>
+<p id="footer">outdated — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.1.66</p>
+<p id="footer">owner — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">pack — npm@1.1.66</p>
+<p id="footer">pack — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix — npm@1.1.66</p>
+<p id="footer">prefix — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">prune — npm@1.1.66</p>
+<p id="footer">prune — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.1.66</p>
+<p id="footer">publish — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild — npm@1.1.66</p>
+<p id="footer">rebuild — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.1.66</p>
+<p id="footer">restart — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root — npm@1.1.66</p>
+<p id="footer">root — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.1.66</p>
+<p id="footer">run-script — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">search — npm@1.1.66</p>
+<p id="footer">search — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">shrinkwrap — npm@1.1.66</p>
+<p id="footer">shrinkwrap — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">start — npm@1.1.66</p>
+<p id="footer">start — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">stop — npm@1.1.66</p>
+<p id="footer">stop — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.1.66</p>
+<p id="footer">submodule — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">tag — npm@1.1.66</p>
+<p id="footer">tag — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">test — npm@1.1.66</p>
+<p id="footer">test — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">uninstall — npm@1.1.66</p>
+<p id="footer">uninstall — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">unpublish — npm@1.1.66</p>
+<p id="footer">unpublish — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">update — npm@1.1.66</p>
+<p id="footer">update — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">version — npm@1.1.66</p>
+<p id="footer">version — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view — npm@1.1.66</p>
+<p id="footer">view — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami — npm@1.1.66</p>
+<p id="footer">whoami — npm@1.1.69</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.1.66</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser — npm@1.1.66</p>
+<p id="footer">adduser — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin — npm@1.1.66</p>
+<p id="footer">bin — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs — npm@1.1.66</p>
+<p id="footer">bugs — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build — npm@1.1.66</p>
+<p id="footer">build — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle — npm@1.1.66</p>
+<p id="footer">bundle — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache — npm@1.1.66</p>
+<p id="footer">cache — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog — npm@1.1.66</p>
+<p id="footer">changelog — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style — npm@1.1.66</p>
+<p id="footer">coding-style — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion — npm@1.1.66</p>
+<p id="footer">completion — npm@1.1.69</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.1.66</p>
+<p id="footer">config — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">dedupe — npm@1.1.66</p>
+<p id="footer">dedupe — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.1.66</p>
+<p id="footer">deprecate — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers — npm@1.1.66</p>
+<p id="footer">developers — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">disputes — npm@1.1.66</p>
+<p id="footer">disputes — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs — npm@1.1.66</p>
+<p id="footer">docs — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit — npm@1.1.66</p>
+<p id="footer">edit — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore — npm@1.1.66</p>
+<p id="footer">explore — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq — npm@1.1.66</p>
+<p id="footer">faq — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders — npm@1.1.66</p>
+<p id="footer">folders — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search — npm@1.1.66</p>
+<p id="footer">help-search — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help — npm@1.1.66</p>
+<p id="footer">help — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p> Display npm username</p>
</div>
-<p id="footer">index — npm@1.1.66</p>
+<p id="footer">index — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init — npm@1.1.66</p>
+<p id="footer">init — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">install — npm@1.1.66</p>
+<p id="footer">install — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json — npm@1.1.66</p>
+<p id="footer">json — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link — npm@1.1.66</p>
+<p id="footer">link — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre><code>npm@1.1.66 /path/to/npm
+<pre><code>npm@1.1.69 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">ls — npm@1.1.66</p>
+<p id="footer">ls — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.1.66</p>
+<p>1.1.69</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.1.66</p>
+<p id="footer">npm — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated — npm@1.1.66</p>
+<p id="footer">outdated — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.1.66</p>
+<p id="footer">owner — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack — npm@1.1.66</p>
+<p id="footer">pack — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix — npm@1.1.66</p>
+<p id="footer">prefix — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune — npm@1.1.66</p>
+<p id="footer">prune — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.1.66</p>
+<p id="footer">publish — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild — npm@1.1.66</p>
+<p id="footer">rebuild — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry — npm@1.1.66</p>
+<p id="footer">registry — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.1.66</p>
+<p id="footer">removing-npm — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.1.66</p>
+<p id="footer">restart — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root — npm@1.1.66</p>
+<p id="footer">root — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.1.66</p>
+<p id="footer">run-script — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts — npm@1.1.66</p>
+<p id="footer">scripts — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search — npm@1.1.66</p>
+<p id="footer">search — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver — npm@1.1.66</p>
+<p id="footer">semver — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap — npm@1.1.66</p>
+<p id="footer">shrinkwrap — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star — npm@1.1.66</p>
+<p id="footer">star — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start — npm@1.1.66</p>
+<p id="footer">start — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop — npm@1.1.66</p>
+<p id="footer">stop — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.1.66</p>
+<p id="footer">submodule — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag — npm@1.1.66</p>
+<p id="footer">tag — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test — npm@1.1.66</p>
+<p id="footer">test — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall — npm@1.1.66</p>
+<p id="footer">uninstall — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish — npm@1.1.66</p>
+<p id="footer">unpublish — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update — npm@1.1.66</p>
+<p id="footer">update — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version — npm@1.1.66</p>
+<p id="footer">version — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view — npm@1.1.66</p>
+<p id="footer">view — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami — npm@1.1.66</p>
+<p id="footer">whoami — npm@1.1.69</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "November 2012" "" ""
+.TH "NPM" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "November 2012" "" ""
+.TH "NPM\-ADDUSER" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "1" "November 2012" "" ""
+.TH "NPM\-BIN" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "1" "November 2012" "" ""
+.TH "NPM\-BUGS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUILD" "1" "November 2012" "" ""
+.TH "NPM\-BUILD" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "November 2012" "" ""
+.TH "NPM\-BUNDLE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "November 2012" "" ""
+.TH "NPM\-CACHE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CHANGELOG" "1" "November 2012" "" ""
+.TH "NPM\-CHANGELOG" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-changelog\fR \-\- Changes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "1" "November 2012" "" ""
+.TH "NPM\-CODING\-STYLE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "November 2012" "" ""
+.TH "NPM\-COMPLETION" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "1" "November 2012" "" ""
+.TH "NPM\-CONFIG" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEDUPE" "1" "November 2012" "" ""
+.TH "NPM\-DEDUPE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-dedupe\fR \-\- Reduce duplication
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "November 2012" "" ""
+.TH "NPM\-DEPRECATE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "1" "November 2012" "" ""
+.TH "NPM\-DEVELOPERS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DISPUTES" "1" "November 2012" "" ""
+.TH "NPM\-DISPUTES" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-disputes\fR \-\- Handling Module Name Disputes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "1" "November 2012" "" ""
+.TH "NPM\-DOCS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "1" "November 2012" "" ""
+.TH "NPM\-EDIT" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "1" "November 2012" "" ""
+.TH "NPM\-EXPLORE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "1" "November 2012" "" ""
+.TH "NPM\-FAQ" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "November 2012" "" ""
+.TH "NPM\-FOLDERS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "November 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP" "1" "November 2012" "" ""
+.TH "NPM\-HELP" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "1" "November 2012" "" ""
+.TH "NPM\-INDEX" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "November 2012" "" ""
+.TH "NPM\-INIT" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "1" "November 2012" "" ""
+.TH "NPM\-INSTALL" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-JSON" "1" "November 2012" "" ""
+.TH "NPM\-JSON" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "November 2012" "" ""
+.TH "NPM\-LINK" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "1" "November 2012" "" ""
+.TH "NPM\-LS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.IP "" 4
.
.nf
-npm@1.1.66 /path/to/npm
+npm@1.1.69 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "November 2012" "" ""
+.TH "NPM" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.66
+1.1.69
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "1" "November 2012" "" ""
+.TH "NPM\-OUTDATED" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "November 2012" "" ""
+.TH "NPM\-OWNER" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "November 2012" "" ""
+.TH "NPM\-PACK" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "1" "November 2012" "" ""
+.TH "NPM\-PREFIX" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "November 2012" "" ""
+.TH "NPM\-PRUNE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "November 2012" "" ""
+.TH "NPM\-PUBLISH" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "November 2012" "" ""
+.TH "NPM\-REBUILD" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "1" "November 2012" "" ""
+.TH "NPM\-REGISTRY" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "November 2012" "" ""
+.TH "NPM\-REMOVAL" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "November 2012" "" ""
+.TH "NPM\-RESTART" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "November 2012" "" ""
+.TH "NPM\-ROOT" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "1" "November 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "November 2012" "" ""
+.TH "NPM\-SCRIPTS" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "November 2012" "" ""
+.TH "NPM\-SEARCH" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEMVER" "1" "November 2012" "" ""
+.TH "NPM\-SEMVER" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-semver\fR \-\- The semantic versioner for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "1" "November 2012" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- Lock down dependency versions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STAR" "1" "November 2012" "" ""
+.TH "NPM\-STAR" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "November 2012" "" ""
+.TH "NPM\-START" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "November 2012" "" ""
+.TH "NPM\-STOP" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "November 2012" "" ""
+.TH "NPM\-SUBMODULE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "1" "November 2012" "" ""
+.TH "NPM\-TAG" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "November 2012" "" ""
+.TH "NPM\-TEST" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "November 2012" "" ""
+.TH "NPM\-RM" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "November 2012" "" ""
+.TH "NPM\-UNPUBLISH" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "1" "November 2012" "" ""
+.TH "NPM\-UPDATE" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "November 2012" "" ""
+.TH "NPM\-VERSION" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "1" "November 2012" "" ""
+.TH "NPM\-VIEW" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "November 2012" "" ""
+.TH "NPM\-WHOAMI" "1" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "November 2012" "" ""
+.TH "NPM\-BIN" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "3" "November 2012" "" ""
+.TH "NPM\-BUGS" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMMANDS" "3" "November 2012" "" ""
+.TH "NPM\-COMMANDS" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "November 2012" "" ""
+.TH "NPM\-CONFIG" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "3" "November 2012" "" ""
+.TH "NPM\-DEPRECATE" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "3" "November 2012" "" ""
+.TH "NPM\-DOCS" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "3" "November 2012" "" ""
+.TH "NPM\-EDIT" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "3" "November 2012" "" ""
+.TH "NPM\-EXPLORE" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "3" "November 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "INIT" "3" "November 2012" "" ""
+.TH "INIT" "3" "December 2012" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "3" "November 2012" "" ""
+.TH "NPM\-INSTALL" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "3" "November 2012" "" ""
+.TH "NPM\-LINK" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LOAD" "3" "November 2012" "" ""
+.TH "NPM\-LOAD" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "November 2012" "" ""
+.TH "NPM\-LS" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "November 2012" "" ""
+.TH "NPM" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.1.66
+1.1.69
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "November 2012" "" ""
+.TH "NPM\-OUTDATED" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "3" "November 2012" "" ""
+.TH "NPM\-OWNER" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "November 2012" "" ""
+.TH "NPM\-PACK" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "3" "November 2012" "" ""
+.TH "NPM\-PREFIX" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "November 2012" "" ""
+.TH "NPM\-PRUNE" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "November 2012" "" ""
+.TH "NPM\-PUBLISH" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "November 2012" "" ""
+.TH "NPM\-REBUILD" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "November 2012" "" ""
+.TH "NPM\-RESTART" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "November 2012" "" ""
+.TH "NPM\-ROOT" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "3" "November 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "3" "November 2012" "" ""
+.TH "NPM\-SEARCH" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "3" "November 2012" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- programmatically generate package shrinkwrap file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "3" "November 2012" "" ""
+.TH "NPM\-START" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "November 2012" "" ""
+.TH "NPM\-STOP" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "November 2012" "" ""
+.TH "NPM\-SUBMODULE" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "3" "November 2012" "" ""
+.TH "NPM\-TAG" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "3" "November 2012" "" ""
+.TH "NPM\-TEST" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "November 2012" "" ""
+.TH "NPM\-UNINSTALL" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "3" "November 2012" "" ""
+.TH "NPM\-UNPUBLISH" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "3" "November 2012" "" ""
+.TH "NPM\-UPDATE" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "November 2012" "" ""
+.TH "NPM\-VERSION" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "3" "November 2012" "" ""
+.TH "NPM\-VIEW" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "November 2012" "" ""
+.TH "NPM\-WHOAMI" "3" "December 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
if (!require) {
require = function (id) {
switch (id) {
+ case "sigmund": return function sigmund (obj) {
+ return JSON.stringify(obj)
+ }
case "path": return { basename: function (f) {
f = f.split(/[\/\\]/)
var e = f.pop()
var LRU = require("lru-cache")
, cache = minimatch.cache = new LRU({max: 100})
, GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , sigmund = require("sigmund")
var path = require("path")
// any single thing other than /
// lru storage.
// these things aren't particularly big, but walking down the string
// and turning it into a regexp can get pretty costly.
- var cacheKey = pattern + "\n" + Object.keys(options).filter(function (k) {
- return options[k]
- }).join(":")
+ var cacheKey = pattern + "\n" + sigmund(options)
var cached = minimatch.cache.get(cacheKey)
if (cached) return cached
minimatch.cache.set(cacheKey, this)
--- /dev/null
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+# sigmund
+
+Quick and dirty signatures for Objects.
+
+This is like a much faster `deepEquals` comparison, which returns a
+string key suitable for caches and the like.
+
+## Usage
+
+```javascript
+function doSomething (someObj) {
+ var key = sigmund(someObj, maxDepth) // max depth defaults to 10
+ var cached = cache.get(key)
+ if (cached) return cached)
+
+ var result = expensiveCalculation(someObj)
+ cache.set(key, result)
+ return result
+}
+```
+
+The resulting key will be as unique and reproducible as calling
+`JSON.stringify` or `util.inspect` on the object, but is much faster.
+In order to achieve this speed, some differences are glossed over.
+For example, the object `{0:'foo'}` will be treated identically to the
+array `['foo']`.
+
+Also, just as there is no way to summon the soul from the scribblings
+of a cocain-addled psychoanalyst, there is no way to revive the object
+from the signature string that sigmund gives you. In fact, it's
+barely even readable.
+
+As with `sys.inspect` and `JSON.stringify`, larger objects will
+produce larger signature strings.
+
+Because sigmund is a bit less strict than the more thorough
+alternatives, the strings will be shorter, and also there is a
+slightly higher chance for collisions. For example, these objects
+have the same signature:
+
+ var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+ var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+Like a good Freudian, sigmund is most effective when you already have
+some understanding of what you're looking for. It can help you help
+yourself, but you must be willing to do some work as well.
+
+Cycles are handled, and cyclical objects are silently omitted (though
+the key is included in the signature output.)
+
+The second argument is the maximum depth, which defaults to 10,
+because that is the maximum object traversal depth covered by most
+insurance carriers.
--- /dev/null
+// different ways to id objects
+// use a req/res pair, since it's crazy deep and cyclical
+
+// sparseFE10 and sigmund are usually pretty close, which is to be expected,
+// since they are essentially the same algorithm, except that sigmund handles
+// regular expression objects properly.
+
+
+var http = require('http')
+var util = require('util')
+var sigmund = require('./sigmund.js')
+var sreq, sres, creq, cres, test
+
+http.createServer(function (q, s) {
+ sreq = q
+ sres = s
+ sres.end('ok')
+ this.close(function () { setTimeout(function () {
+ start()
+ }, 200) })
+}).listen(1337, function () {
+ creq = http.get({ port: 1337 })
+ creq.on('response', function (s) { cres = s })
+})
+
+function start () {
+ test = [sreq, sres, creq, cres]
+ // test = sreq
+ // sreq.sres = sres
+ // sreq.creq = creq
+ // sreq.cres = cres
+
+ for (var i in exports.compare) {
+ console.log(i)
+ var hash = exports.compare[i]()
+ console.log(hash)
+ console.log(hash.length)
+ console.log('')
+ }
+
+ require('bench').runMain()
+}
+
+function customWs (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return customWs(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + customWs(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function custom (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return '' + obj
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return custom(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + custom(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function sparseFE2 (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ })
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparseFE (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k
+ ch(v[k], depth + 1)
+ })
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparse (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k
+ ch(v[k], depth + 1)
+ }
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function noCommas (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+
+function flatten (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ soFar += ','
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+exports.compare =
+{
+ // 'custom 2': function () {
+ // return custom(test, 2, 0)
+ // },
+ // 'customWs 2': function () {
+ // return customWs(test, 2, 0)
+ // },
+ 'JSON.stringify (guarded)': function () {
+ var seen = []
+ return JSON.stringify(test, function (k, v) {
+ if (typeof v !== 'object' || !v) return v
+ if (seen.indexOf(v) !== -1) return undefined
+ seen.push(v)
+ return v
+ })
+ },
+
+ 'flatten 10': function () {
+ return flatten(test, 10)
+ },
+
+ // 'flattenFE 10': function () {
+ // return flattenFE(test, 10)
+ // },
+
+ 'noCommas 10': function () {
+ return noCommas(test, 10)
+ },
+
+ 'sparse 10': function () {
+ return sparse(test, 10)
+ },
+
+ 'sparseFE 10': function () {
+ return sparseFE(test, 10)
+ },
+
+ 'sparseFE2 10': function () {
+ return sparseFE2(test, 10)
+ },
+
+ sigmund: function() {
+ return sigmund(test, 10)
+ },
+
+
+ // 'util.inspect 1': function () {
+ // return util.inspect(test, false, 1, false)
+ // },
+ // 'util.inspect undefined': function () {
+ // util.inspect(test)
+ // },
+ // 'util.inspect 2': function () {
+ // util.inspect(test, false, 2, false)
+ // },
+ // 'util.inspect 3': function () {
+ // util.inspect(test, false, 3, false)
+ // },
+ // 'util.inspect 4': function () {
+ // util.inspect(test, false, 4, false)
+ // },
+ // 'util.inspect Infinity': function () {
+ // util.inspect(test, false, Infinity, false)
+ // }
+}
+
+/** results
+**/
--- /dev/null
+{
+ "name": "sigmund",
+ "version": "1.0.0",
+ "description": "Quick and dirty signatures for Objects.",
+ "main": "sigmund.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "bench": "node bench.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sigmund"
+ },
+ "keywords": [
+ "object",
+ "signature",
+ "key",
+ "data",
+ "psychoanalysis"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
+ "readmeFilename": "README.md",
+ "_id": "sigmund@1.0.0",
+ "_from": "sigmund@~1.0.0"
+}
--- /dev/null
+module.exports = sigmund
+function sigmund (subject, maxSessions) {
+ maxSessions = maxSessions || 10;
+ var notes = [];
+ var analysis = '';
+ var RE = RegExp;
+
+ function psychoAnalyze (subject, session) {
+ if (session > maxSessions) return;
+
+ if (typeof subject === 'function' ||
+ typeof subject === 'undefined') {
+ return;
+ }
+
+ if (typeof subject !== 'object' || !subject ||
+ (subject instanceof RE)) {
+ analysis += subject;
+ return;
+ }
+
+ if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
+
+ notes.push(subject);
+ analysis += '{';
+ Object.keys(subject).forEach(function (issue, _, __) {
+ // pseudo-private values. skip those.
+ if (issue.charAt(0) === '_') return;
+ var to = typeof subject[issue];
+ if (to === 'function' || to === 'undefined') return;
+ analysis += issue;
+ psychoAnalyze(subject[issue], session + 1);
+ });
+ }
+ psychoAnalyze(subject, 0);
+ return analysis;
+}
+
+// vim: set softtabstop=4 shiftwidth=4:
--- /dev/null
+var test = require('tap').test
+var sigmund = require('../sigmund.js')
+
+
+// occasionally there are duplicates
+// that's an acceptable edge-case. JSON.stringify and util.inspect
+// have some collision potential as well, though less, and collision
+// detection is expensive.
+var hash = '{abc/def/g{0h1i2{jkl'
+var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+var obj3 = JSON.parse(JSON.stringify(obj1))
+obj3.c = /def/
+obj3.g[2].cycle = obj3
+var cycleHash = '{abc/def/g{0h1i2{jklcycle'
+
+test('basic', function (t) {
+ t.equal(sigmund(obj1), hash)
+ t.equal(sigmund(obj2), hash)
+ t.equal(sigmund(obj3), cycleHash)
+ t.end()
+})
+
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "0.2.8",
+ "version": "0.2.9",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
"node": "*"
},
"dependencies": {
- "lru-cache": "~2.0.0"
+ "lru-cache": "~2.0.0",
+ "sigmund": "~1.0.0"
},
"devDependencies": {
"tap": ""
},
"readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
"readmeFilename": "README.md",
- "_id": "minimatch@0.2.8",
+ "_id": "minimatch@0.2.9",
"_from": "minimatch@~0.2.8"
}
--- /dev/null
+{
+ "asi": true,
+ "laxcomma": true,
+ "node": true,
+ "strict": false
+}
* On Windows:
* [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is not supported)
* Microsoft Visual C++ ([Express][msvc] version works well)
- * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]
+ * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]
+ * If you get errors that the 64 bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]
How to Use
----------
[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download
[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279
+[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422
'target_conditions': [
['_type=="loadable_module"', {
'product_extension': 'node',
+ 'defines': [ 'BUILDING_NODE_EXTENSION' ],
}]
],
if (win) {
// Turn off the Microsoft logo on Windows
argv.push('/nologo')
-
- // Fix "warning MSB8012: TargetExt(.dll) does not match
- // the Linker's OutputFile property value (.node)"
- argv.push('/property:TargetExt=.node')
}
// Specify the build type, Release by default
var python = gyp.opts.python || process.env.PYTHON || 'python'
, buildDir = path.resolve('build')
, hasVCExpress = false
+ , hasVC2012Express = false
, hasWin71SDK = false
+ , hasWin8SDK = false
, configPath
, nodeDir
+
if (win) {
checkVCExpress(function () {
- if (hasVCExpress) {
- checkWin71SDK(function () {
+ if (hasVCExpress || hasVC2012Express) {
+ checkWinSDK(function () {
checkPython()
})
} else {
}
function failNoPython () {
- callback(new Error('Can\'t find Python executable "' + python
- + '", you can set the PYTHON env variable.'))
+ callback(new Error('Can\'t find Python executable "' + python +
+ '", you can set the PYTHON env variable.'))
}
function failPythonVersion (badVersion) {
- callback(new Error('Python executable "' + python
- + '" is v' + badVersion + ', which is not supported by gyp.\n'
- + 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.'))
+ callback(new Error('Python executable "' + python +
+ '" is v' + badVersion + ', which is not supported by gyp.\n' +
+ 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.'))
+ }
+
+ function checkWinSDK(cb) {
+ checkWin71SDK(function() {
+ checkWin8SDK(cb);
+ })
}
function checkWin71SDK(cb) {
})
}
+ function checkWin8SDK(cb) {
+ var cp = spawn('reg', ['query', 'HKLM\\Software\\Microsoft\\Windows Kits\\Installed Products', '/f', 'Windows Software Development Kit x86', '/reg:32'])
+ cp.on('exit', function (code) {
+ hasWin8SDK = (code === 0)
+ cb()
+ })
+ }
+
+ function checkVC2012Express64(cb) {
+ var cp = spawn('reg', ['query', 'HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC', '/v', 'ProductDir'])
+ cp.on('exit', function (code) {
+ hasVC2012Express = (code === 0)
+ cb()
+ })
+ }
+
+ function checkVC2012Express(cb) {
+ var cp = spawn('reg', ['query', 'HKLM\\SOFTWARE\\Microsoft\\VCExpress\\11.0\\Setup\\VC', '/v', 'ProductDir'])
+ cp.on('exit', function (code) {
+ hasVC2012Express = (code === 0)
+ if (code !== 0) {
+ checkVC2012Express64(cb)
+ } else {
+ cb()
+ }
+ })
+ }
+
function checkVCExpress64(cb) {
var cp = spawn('cmd', ['/C', '%WINDIR%\\SysWOW64\\reg', 'query', 'HKLM\\Software\\Microsoft\\VCExpress\\10.0\\Setup\\VC', '/v', 'ProductDir'])
cp.on('exit', function (code) {
hasVCExpress = (code === 0)
- cb()
+ if (code !== 0) {
+ checkVC2012Express(cb)
+ } else {
+ cb()
+ }
})
}
// set the target_arch variable
variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
- // set the toolset for 64-bit VCExpress users
- if (win && variables.target_arch === 'x64' && hasVCExpress && hasWin71SDK) {
- defaults.msbuild_toolset = 'Windows7.1SDK'
+ // set the toolset for VCExpress users
+ if (win) {
+ if (hasVC2012Express && hasWin8SDK) {
+ defaults.msbuild_toolset = 'v110'
+ } else if (hasVCExpress && hasWin71SDK) {
+ defaults.msbuild_toolset = 'Windows7.1SDK'
+ }
}
// set the node development directory
if ('msvs_version' in gyp.opts) {
argv.push('-G', 'msvs_version=' + gyp.opts.msvs_version)
} else {
- argv.push('-G', 'msvs_version=2010')
+ argv.push('-G', 'msvs_version=auto')
}
}
"bindings",
"gyp"
],
- "version": "0.7.1",
+ "version": "0.7.3",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
"engines": {
"node": ">= 0.6.0"
},
- "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is not supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n",
+ "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is not supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]\n * If you get errors that the 64 bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422\n",
"readmeFilename": "README.md",
- "_id": "node-gyp@0.7.1",
- "dist": {
- "shasum": "2c4c7f711c94bddbc801df5d43698cf0ceb33020"
- },
- "_from": "node-gyp@0.7.1"
+ "_id": "node-gyp@0.7.3",
+ "_from": "node-gyp@~0.7.1"
}
fs.statSync(file)
return file
} catch (err) {
- if(start != '/')
+ if(path.dirname(start) !== start) // root
return find(path.dirname(start), rel)
}
}
"tap": "0"
},
"readme": "A list of objects, bound by their prototype chain.\n\nUsed in npm's config stuff.\n",
+ "readmeFilename": "README.md",
"_id": "proto-list@1.2.2",
- "dist": {
- "shasum": "48b88798261ec2c4a785720cdfec6200d57d3326"
- },
"_from": "proto-list@~1.2.1"
}
{
"name": "config-chain",
- "version": "1.1.2",
+ "version": "1.1.3",
"description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
"homepage": "http://github.com/dominictarr/config-chain",
"repository": {
"test": "tap test/"
},
"readme": "#config-chain\n\nUSE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS\n\n``` js\n\n //npm install config-chain\n\n var cc = require('config-chain')\n , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.\n , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.\n\n // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN\n // EARLIER ITEMS OVERIDE LATER ITEMS\n // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!\n\n //strings are interpereted as filenames.\n //will be loaded synchronously\n\n var conf =\n cc(\n //OVERRIDE SETTINGS WITH COMMAND LINE OPTS\n opts,\n\n //ENV VARS IF PREFIXED WITH 'myApp_'\n\n cc.env('myApp_'), //myApp_foo = 'like this'\n\n //FILE NAMED BY ENV\n path.join(__dirname, 'config.' + env + '.json'),\n\n //IF `env` is PRODUCTION\n env === 'prod'\n ? path.join(__dirname, 'special.json') //load a special file\n : null //NULL IS IGNORED!\n\n //SUBDIR FOR ENV CONFIG\n path.join(__dirname, 'config', env, 'config.json'),\n\n //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE\n cc.find('config.json'),\n\n //PUT DEFAULTS LAST\n {\n host: 'localhost'\n port: 8000\n })\n\n var host = conf.get('host')\n\n // or\n\n var host = conf.store.host\n\n```\n\nFINALLY, EASY FLEXIBLE CONFIGURATIONS!\n\n##see also: [proto-list](https://github.com/isaacs/proto-list/)\n\nWHATS THAT YOU SAY?\n\nYOU WANT A \"CLASS\" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?\n\nEXTEND WITH YOUR OWN FUNCTIONALTY!?\n\n## CONFIGCHAIN LIVES TO SERVE ONLY YOU!\n\n```javascript\nvar cc = require('config-chain')\n\n// all the stuff you did before\nvar config = cc({\n some: 'object'\n },\n cc.find('config.json'),\n cc.env('myApp_')\n )\n // CONFIGS AS A SERVICE, aka \"CaaS\", aka EVERY DEVOPS DREAM OMG!\n .addUrl('http://configurator:1234/my-configs')\n // ASYNC FTW!\n .addFile('/path/to/file.json')\n\n // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT\n // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST\n // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE\n .add({ another: 'object' })\n\n // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!\n .on('error', function (er) {\n // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW\n // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\\\n throw er\n })\n\n // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!\n .on('load', function (config) {\n console.awesome('HOLY SHIT!')\n })\n```\n\n# BORING API DOCS\n\n## cc(...args)\n\nMAKE A CHAIN AND ADD ALL THE ARGS.\n\nIf the arg is a STRING, then it shall be a JSON FILENAME.\n\nSYNC I/O!\n\nRETURN THE CHAIN!\n\n## cc.json(...args)\n\nJoin the args INTO A JSON FILENAME!\n\nSYNC I/O!\n\n## cc.find(relativePath)\n\nSEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.\n\nRETURN THE FOUND PATH!\n\nSYNC I/O!\n\n## cc.parse(content, file, type)\n\nParse the content string, and guess the type from either the\nspecified type or the filename.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.env(prefix, env=process.env)\n\nGet all the keys on the provided env object (or process.env) which are\nprefixed by the specified prefix, and put the values on a new object.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.ConfigChain()\n\nThe ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!\n\nOne of these is returned by the main exported function, as well.\n\nIt inherits (prototypically) from\n[ProtoList](https://github.com/isaacs/proto-list/), and also inherits\n(parasitically) from\n[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)\n\nIt has all the methods from both, and except where noted, they are\nunchanged.\n\n### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.\n\n## chain.sources\n\nA list of all the places where it got stuff. The keys are the names\npassed to addFile or addUrl etc, and the value is an object with some\ninfo about the data source.\n\n## chain.addFile(filename, type, [name=filename])\n\nFilename is the name of the file. Name is an arbitrary string to be\nused later if you desire. Type is either 'ini' or 'json', and will\ntry to guess intelligently if omitted.\n\nLoaded files can be saved later.\n\n## chain.addUrl(url, type, [name=url])\n\nSame as the filename thing, but with a url.\n\nCan't be saved later.\n\n## chain.addEnv(prefix, env, [name='env'])\n\nAdd all the keys from the env object that start with the prefix.\n\n## chain.addString(data, file, type, [name])\n\nParse the string and add it to the set. (Mainly used internally.)\n\n## chain.add(object, [name])\n\nAdd the object to the set.\n\n## chain.root {Object}\n\nThe root from which all the other config objects in the set descend\nprototypically.\n\nPut your defaults here.\n\n## chain.set(key, value, name)\n\nSet the key to the value on the named config object. If name is\nunset, then set it on the first config object in the set. (That is,\nthe one with the highest priority, which was added first.)\n\n## chain.get(key, [name])\n\nGet the key from the named config object explicitly, or from the\nresolved configs if not specified.\n\n## chain.save(name, type)\n\nWrite the named config object back to its origin.\n\nCurrently only supported for env and file config types.\n\nFor files, encode the data according to the type.\n\n## chain.on('save', function () {})\n\nWhen one or more files are saved, emits `save` event when they're all\nsaved.\n\n## chain.on('load', function (chain) {})\n\nWhen the config chain has loaded all the specified files and urls and\nsuch, the 'load' event fires.\n",
- "_id": "config-chain@1.1.2",
- "dist": {
- "shasum": "7c82ca863fcf5d16ff3c62bd8b79400722d48671"
- },
+ "readmeFilename": "readme.markdown",
+ "_id": "config-chain@1.1.3",
"_from": "config-chain@~1.1.1"
}
},
"license": "BSD",
"readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n",
+ "readmeFilename": "README.md",
"_id": "npmconf@0.0.16",
- "_from": "npmconf@latest"
+ "_from": "npmconf@0"
}
{
"name": "read-package-json",
- "version": "0.1.8",
+ "version": "0.1.11",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"graceful-fs": "~1.1.8"
},
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
- "_id": "read-package-json@0.1.8",
- "_from": "read-package-json@~0.1.7"
+ "readmeFilename": "README.md",
+ "_id": "read-package-json@0.1.11",
+ "_from": "read-package-json@~0.1.8"
}
var semver = require("semver")
// put more stuff on here to customize.
-readJson.extraSet = [gypfile, wscript, serverjs, authors, readme, mans, bins]
+readJson.extraSet = [
+ gypfile,
+ wscript,
+ serverjs,
+ authors,
+ readme,
+ mans,
+ bins,
+ githead
+]
var typoWarned = {}
// http://registry.npmjs.org/-/fields
})
}
+
+function stripBOM(content) {
+ // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ // because the buffer-to-string conversion in `fs.readFileSync()`
+ // translates it to FEFF, the UTF-16 BOM.
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+}
+
+
function parseJson (file, er, d, cb) {
if (er && er.code === "ENOENT") {
indexjs(file, er, cb)
}
if (er) return cb(er);
try {
- d = JSON.parse(d)
+ d = JSON.parse(stripBOM(d))
} catch (er) {
d = parseIndex(d)
if (!d) return cb(parseError(er, file));
return cb(null, data)
}
+function githead (file, data, cb) {
+ if (data.gitHead) return cb(null, data);
+ var dir = path.dirname(file)
+ var head = path.resolve(dir, '.git/HEAD')
+ fs.readFile(head, 'utf8', function (er, head) {
+ if (er) return cb(null, data);
+ githead_(file, data, dir, head, cb)
+ })
+}
+function githead_ (file, data, dir, head, cb) {
+ if (!head.match(/^ref: /)) {
+ data.gitHead = head.trim()
+ return cb(null, data)
+ }
+ var headFile = head.replace(/^ref: /, '').trim()
+ headFile = path.resolve(dir, '.git', headFile)
+ fs.readFile(headFile, 'utf8', function (er, head) {
+ head = head.replace(/^ref: /, '').trim()
+ data.gitHead = head
+ return cb(null, data)
+ })
+}
+
function final (file, data, cb) {
var ret = validName(file, data)
if (ret !== true) return cb(ret);
var fs = require("fs")
var readme = fs.readFileSync(path.resolve(__dirname, "../README.md"), "utf8")
var package = require("../package.json")
+var isGit
+try {
+ fs.readFileSync(path.resolve(__dirname, '../.git/HEAD'));
+ isGit = true
+} catch (e) {
+ isGit = false
+}
console.error("basic test")
tap.test("basic test", function (t) {
t.equal(data.main, package.main)
t.equal(data.readmeFilename, 'README.md')
+ if (isGit) t.similar(data.gitHead, /^[a-f0-9]{40}$/);
+
// optional deps are folded in.
t.deepEqual(data.optionalDependencies,
package.optionalDependencies)
--- /dev/null
+// vim: set softtabstop=16 shiftwidth=16:
+var tap = require("tap")
+var readJson = require("../")
+var path = require("path")
+var fs = require("fs")
+
+console.error("BOM test")
+tap.test("BOM test", function (t) {
+ var p = path.resolve(__dirname, "fixtures/bom.json")
+ readJson(p, function (er, data) {
+ if (er) throw er;
+ p = path.resolve(__dirname, "fixtures/nobom.json")
+ readJson(p, function (er, data2) {
+ if (er) throw er;
+ t.deepEqual(data, data2)
+ t.end()
+ })
+ })
+})
--- /dev/null
+{
+ "name": "this",
+ "description": "file",
+ "author": "has <filename>",
+ "version" : "0.0.1"
+}
\ No newline at end of file
--- /dev/null
+{
+ "name": "this",
+ "description": "file",
+ "author": "has <filename>",
+ "version" : "0.0.1"
+}
\ No newline at end of file
$ npm install semver
- semver.valid('1.2.3') // true
- semver.valid('a.b.c') // false
+ semver.valid('1.2.3') // '1.2.3'
+ semver.valid('a.b.c') // null
semver.clean(' =v1.2.3 ') // '1.2.3'
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
}
versions = versions.filter(semver.valid)
+ if (!versions.length) return fail()
for (var i = 0, l = range.length; i < l ; i ++) {
versions = versions.filter(function (v) {
return semver.satisfies(v, range[i])
{
"name": "semver",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
"scripts": {
"bin": {
"semver": "./bin/semver"
},
- "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // true\n semver.valid('a.b.c') // false\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <2.0.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
- "_id": "semver@1.1.0",
- "_from": "semver@latest"
+ "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <2.0.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
+ "readmeFilename": "README.md",
+ "_id": "semver@1.1.1",
+ "_from": "semver@~1.1.0"
}
--- /dev/null
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+var tar = require("../tar.js")
+ , fs = require("fs")
+
+fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
+ .pipe(tar.Extract({ path: __dirname + "/extract" }))
+ .on("error", function (er) {
+ console.error("error here")
+ })
+ .on("end", function () {
+ console.error("done")
+ })
--- /dev/null
+var tar = require("../tar.js")
+ , fs = require("fs")
+
+fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
+ .pipe(tar.Parse())
+ .on("extendedHeader", function (e) {
+ console.error("extended pax header", e.props)
+ e.on("end", function () {
+ console.error("extended pax fields:", e.fields)
+ })
+ })
+ .on("ignoredEntry", function (e) {
+ console.error("ignoredEntry?!?", e.props)
+ })
+ .on("longLinkpath", function (e) {
+ console.error("longLinkpath entry", e.props)
+ e.on("end", function () {
+ console.error("value=%j", e.body.toString())
+ })
+ })
+ .on("longPath", function (e) {
+ console.error("longPath entry", e.props)
+ e.on("end", function () {
+ console.error("value=%j", e.body.toString())
+ })
+ })
+ .on("entry", function (e) {
+ console.error("entry", e.props)
+ e.on("data", function (c) {
+ console.error(" >>>" + c.toString().replace(/\n/g, "\\n"))
+ })
+ e.on("end", function () {
+ console.error(" <<<EOF")
+ })
+ })
+
this._reading = true
// have any data to emit?
- if (this._index < this._queueLen) {
+ while (this._index < this._queueLen && !this._paused) {
var chunk = this._queue[this._index ++]
this.emit("data", chunk)
}
var root = path.dirname((entry.root || entry).path)
var wprops = {}
- Object.keys(entry.props).forEach(function (k) {
+ Object.keys(entry.props || {}).forEach(function (k) {
wprops[k] = entry.props[k]
})
if (me._noProprietary) wprops.noProprietary = true
- wprops.path = path.relative(root, entry.path)
+ wprops.path = path.relative(root, entry.path || '')
// actually not a matter of opinion or taste.
if (process.platform === "win32") {
wprops.path = wprops.path.replace(/\\/g, "/")
}
+ if (!wprops.type)
+ wprops.type = 'Directory'
+
switch (wprops.type) {
// sockets not supported
case "Socket":
wprops.path += "/"
wprops.size = 0
break
+
case "Link":
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
wprops.linkpath = path.relative(root, lp) || "."
wprops.size = 0
break
+
case "SymbolicLink":
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "."
},
"name": "tar",
"description": "tar for node",
- "version": "0.1.13",
+ "version": "0.1.14",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
"tap": "0.x",
"rimraf": "1.x"
},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "tar@0.1.13",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.4",
- "_nodeVersion": "v0.7.6-pre",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "804bdaaacaab928ec1c9bbd8b848a042c3adacb2"
- },
- "_from": "tar@0.1.13"
+ "license": "BSD",
+ "readme": "# node-tar\n\nTar for Node.js.\n\n## Goals of this project\n\n1. Be able to parse and reasonably extract the contents of any tar file\n created by any program that creates tar files, period.\n\n At least, this includes every version of:\n\n * bsdtar\n * gnutar\n * solaris posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n2. Create tar files that can be extracted by any of the following tar\n programs:\n\n * bsdtar/libarchive version 2.6.2\n * gnutar 1.15 and above\n * SunOS Posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n3. 100% test coverage. Speed is important. Correctness is slightly\n more important.\n\n4. Create the kind of tar interface that Node users would want to use.\n\n5. Satisfy npm's needs for a portable tar implementation with a\n JavaScript interface.\n\n6. No excuses. No complaining. No tolerance for failure.\n\n## But isn't there already a tar.js?\n\nYes, there are a few. This one is going to be better, and it will be\nfanatically maintained, because npm will depend on it.\n\nThat's why I need to write it from scratch. Creating and extracting\ntarballs is such a large part of what npm does, I simply can't have it\nbe a black box any longer.\n\n## Didn't you have something already? Where'd it go?\n\nIt's in the \"old\" folder. It's not functional. Don't use it.\n\nIt was a useful exploration to learn the issues involved, but like most\nsoftware of any reasonable complexity, node-tar won't be useful until\nit's been written at least 3 times.\n",
+ "readmeFilename": "README.md",
+ "_id": "tar@0.1.14",
+ "_from": "tar@~0.1.12"
}
--- /dev/null
+// the fixtures have some weird stuff that is painful
+// to include directly in the repo for various reasons.
+//
+// So, unpack the fixtures with the system tar first.
+//
+// This means, of course, that it'll only work if you
+// already have a tar implementation, and some of them
+// will not properly unpack the fixtures anyway.
+//
+// But, since usually those tests will fail on Windows
+// and other systems with less capable filesystems anyway,
+// at least this way we don't cause inconveniences by
+// merely cloning the repo or installing the package.
+
+var tap = require("tap")
+, child_process = require("child_process")
+, rimraf = require("rimraf")
+, test = tap.test
+, path = require("path")
+
+test("clean fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "rimraf ./fixtures/")
+ t.end()
+ })
+})
+
+test("clean tmp", function (t) {
+ rimraf(path.resolve(__dirname, "tmp"), function (er) {
+ t.ifError(er, "rimraf ./tmp/")
+ t.end()
+ })
+})
+
+test("extract fixtures", function (t) {
+ var c = child_process.spawn("tar"
+ ,["xzvf", "fixtures.tgz"]
+ ,{ cwd: __dirname })
+
+ c.stdout.on("data", errwrite)
+ c.stderr.on("data", errwrite)
+ function errwrite (chunk) {
+ process.stderr.write(chunk)
+ }
+
+ c.on("exit", function (code) {
+ t.equal(code, 0, "extract fixtures should exit with 0")
+ if (code) {
+ t.comment("Note, all tests from here on out will fail because of this.")
+ }
+ t.end()
+ })
+})
--- /dev/null
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , fs = require("fs")
+ , path = require("path")
+ , file = path.resolve(__dirname, "fixtures/c.tar")
+ , target = path.resolve(__dirname, "tmp/extract-test")
+ , index = 0
+ , fstream = require("fstream")
+
+ , ee = 0
+ , expectEntries =
+[ { path: 'c.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 513,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'cc.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 513,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 100,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'Ω.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 2,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: 'Ω.txt',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 2,
+ linkpath: '',
+ nlink: 1,
+ dev: 234881026,
+ ino: 51693379 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 200,
+ linkpath: '',
+ nlink: 1,
+ dev: 234881026,
+ ino: 51681874 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 201,
+ linkpath: '',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: '777',
+ type: '2',
+ depth: undefined,
+ size: 0,
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ nlink: undefined,
+ dev: undefined,
+ ino: undefined },
+ { path: '200-hard',
+ mode: '644',
+ type: '0',
+ depth: undefined,
+ size: 200,
+ linkpath: '',
+ nlink: 2,
+ dev: 234881026,
+ ino: 51681874 },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '644',
+ type: '1',
+ depth: undefined,
+ size: 0,
+ linkpath: path.resolve(target, '200-hard'),
+ nlink: 2,
+ dev: 234881026,
+ ino: 51681874 } ]
+
+ , ef = 0
+ , expectFiles =
+[ { path: '',
+ mode: '40755',
+ type: 'Directory',
+ depth: 0,
+ linkpath: undefined },
+ { path: '/200-hard',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 200,
+ linkpath: undefined,
+ nlink: 2 },
+ { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '100644',
+ type: 'Link',
+ depth: 1,
+ size: 200,
+ linkpath: path.join(target, '200-hard'),
+ nlink: 2 },
+ { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: '120777',
+ type: 'SymbolicLink',
+ depth: 1,
+ size: 200,
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ nlink: 1 },
+ { path: '/c.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 513,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/cc.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 513,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/r',
+ mode: '40755',
+ type: 'Directory',
+ depth: 1,
+ linkpath: undefined },
+ { path: '/r/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 2,
+ linkpath: undefined },
+ { path: '/r/e/a',
+ mode: '40755',
+ type: 'Directory',
+ depth: 3,
+ linkpath: undefined },
+ { path: '/r/e/a/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 4,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 5,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y',
+ mode: '40755',
+ type: 'Directory',
+ depth: 6,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 7,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d',
+ mode: '40755',
+ type: 'Directory',
+ depth: 8,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 9,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 10,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p',
+ mode: '40755',
+ type: 'Directory',
+ depth: 11,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 12,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f',
+ mode: '40755',
+ type: 'Directory',
+ depth: 13,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o',
+ mode: '40755',
+ type: 'Directory',
+ depth: 14,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l',
+ mode: '40755',
+ type: 'Directory',
+ depth: 15,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d',
+ mode: '40755',
+ type: 'Directory',
+ depth: 16,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e',
+ mode: '40755',
+ type: 'Directory',
+ depth: 17,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r',
+ mode: '40755',
+ type: 'Directory',
+ depth: 18,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-',
+ mode: '40755',
+ type: 'Directory',
+ depth: 19,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p',
+ mode: '40755',
+ type: 'Directory',
+ depth: 20,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a',
+ mode: '40755',
+ type: 'Directory',
+ depth: 21,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t',
+ mode: '40755',
+ type: 'Directory',
+ depth: 22,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h',
+ mode: '40755',
+ type: 'Directory',
+ depth: 23,
+ linkpath: undefined },
+ { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: '100644',
+ type: 'File',
+ depth: 24,
+ size: 100,
+ linkpath: undefined,
+ nlink: 1 },
+ { path: '/Ω.txt',
+ mode: '100644',
+ type: 'File',
+ depth: 1,
+ size: 2,
+ linkpath: undefined,
+ nlink: 1 } ]
+
+
+
+// The extract class basically just pipes the input
+// to a Reader, and then to a fstream.DirWriter
+
+// So, this is as much a test of fstream.Reader and fstream.Writer
+// as it is of tar.Extract, but it sort of makes sense.
+
+tap.test("extract test", function (t) {
+ var extract = tar.Extract(target)
+ var inp = fs.createReadStream(file)
+
+ // give it a weird buffer size to try to break in odd places
+ inp.bufferSize = 1234
+
+ inp.pipe(extract)
+
+ extract.on("end", function () {
+ t.equal(ee, expectEntries.length, "should see "+ee+" entries")
+
+ // should get no more entries after end
+ extract.removeAllListeners("entry")
+ extract.on("entry", function (e) {
+ t.fail("Should not get entries after end!")
+ })
+
+ next()
+ })
+
+ extract.on("entry", function (entry) {
+ var found =
+ { path: entry.path
+ , mode: entry.props.mode.toString(8)
+ , type: entry.props.type
+ , depth: entry.props.depth
+ , size: entry.props.size
+ , linkpath: entry.props.linkpath
+ , nlink: entry.props.nlink
+ , dev: entry.props.dev
+ , ino: entry.props.ino
+ }
+
+ var wanted = expectEntries[ee ++]
+
+ t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
+ })
+
+ function next () {
+ var r = fstream.Reader({ path: target
+ , type: "Directory"
+ // this is just to encourage consistency
+ , sort: "alpha" })
+
+ r.on("ready", function () {
+ foundEntry(r)
+ })
+
+ r.on("end", finish)
+
+ function foundEntry (entry) {
+ var p = entry.path.substr(target.length)
+ var found =
+ { path: p
+ , mode: entry.props.mode.toString(8)
+ , type: entry.props.type
+ , depth: entry.props.depth
+ , size: entry.props.size
+ , linkpath: entry.props.linkpath
+ , nlink: entry.props.nlink
+ }
+
+ var wanted = expectFiles[ef ++]
+
+ t.has(found, wanted, "unpacked file " + ef + " " + wanted.path)
+
+ entry.on("entry", foundEntry)
+ }
+
+ function finish () {
+ t.equal(ef, expectFiles.length, "should have "+ef+" items")
+ t.end()
+ }
+ }
+})
--- /dev/null
+var tap = require("tap")
+var TarHeader = require("../lib/header.js")
+var tar = require("../tar.js")
+var fs = require("fs")
+
+
+var headers =
+ { "a.txt file header":
+ [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'a.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 257
+ , mtime: 1319493851
+ , cksum: 5417
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "omega pax": // the extended header from omega tar.
+ [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'PaxHeader/Ω.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 120
+ , mtime: 1301254537
+ , cksum: 6697
+ , type: 'x'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' } ]
+
+ , "omega file header":
+ [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'Ω.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 2
+ , mtime: 1301254537
+ , cksum: 5690
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' } ]
+
+ , "foo.js file header":
+ [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'foo.js'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 4
+ , mtime: 1301246433
+ , cksum: 5519
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "b.txt file header":
+ [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true
+ , path: 'b.txt'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 512
+ , mtime: 1319494079
+ , cksum: 5425
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+
+ , "deep nested file":
+ [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ , { cksumValid: true,
+ path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
+ , mode: 420
+ , uid: 24561
+ , gid: 20
+ , size: 100
+ , mtime: 1319687003
+ , cksum: 18124
+ , type: '0'
+ , linkpath: ''
+ , ustar: 'ustar\0'
+ , ustarver: '00'
+ , uname: 'isaacs'
+ , gname: 'staff'
+ , devmaj: 0
+ , devmin: 0
+ , fill: '' }
+ ]
+ }
+
+tap.test("parsing", function (t) {
+ Object.keys(headers).forEach(function (name) {
+ var h = headers[name]
+ , header = new Buffer(h[0], "hex")
+ , expect = h[1]
+ , parsed = new TarHeader(header)
+
+ // console.error(parsed)
+ t.has(parsed, expect, "parse " + name)
+ })
+ t.end()
+})
+
+tap.test("encoding", function (t) {
+ Object.keys(headers).forEach(function (name) {
+ var h = headers[name]
+ , expect = new Buffer(h[0], "hex")
+ , encoded = TarHeader.encode(h[1])
+
+ // might have slightly different bytes, since the standard
+ // isn't very strict, but should have the same semantics
+ // checkSum will be different, but cksumValid will be true
+
+ var th = new TarHeader(encoded)
+ delete h[1].block
+ delete h[1].needExtended
+ delete h[1].cksum
+ t.has(th, h[1], "fields "+name)
+ })
+ t.end()
+})
+
+// test these manually. they're a bit rare to find in the wild
+tap.test("parseNumeric tests", function (t) {
+ var parseNumeric = TarHeader.parseNumeric
+ , numbers =
+ { "303737373737373700": 2097151
+ , "30373737373737373737373700": 8589934591
+ , "303030303036343400": 420
+ , "800000ffffffffffff": 281474976710655
+ , "ffffff000000000001": -281474976710654
+ , "ffffff000000000000": -281474976710655
+ , "800000000000200000": 2097152
+ , "8000000000001544c5": 1393861
+ , "ffffffffffff1544c5": -15383354 }
+ Object.keys(numbers).forEach(function (n) {
+ var b = new Buffer(n, "hex")
+ t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n])
+ })
+ t.end()
+})
--- /dev/null
+// This is exactly like test/pack.js, except that it's excluding
+// any proprietary headers.
+//
+// This loses some information about the filesystem, but creates
+// tarballs that are supported by more versions of tar, especially
+// old non-spec-compliant copies of gnutar.
+
+// the symlink file is excluded from git, because it makes
+// windows freak the hell out.
+var fs = require("fs")
+ , path = require("path")
+ , symlink = path.resolve(__dirname, "fixtures/symlink")
+try { fs.unlinkSync(symlink) } catch (e) {}
+fs.symlinkSync("./hardlink-1", symlink)
+process.on("exit", function () {
+ fs.unlinkSync(symlink)
+})
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , pkg = require("../package.json")
+ , Pack = tar.Pack
+ , fstream = require("fstream")
+ , Reader = fstream.Reader
+ , Writer = fstream.Writer
+ , input = path.resolve(__dirname, "fixtures/")
+ , target = path.resolve(__dirname, "tmp/pack.tar")
+ , uid = process.getuid ? process.getuid() : 0
+ , gid = process.getgid ? process.getgid() : 0
+
+ , entries =
+
+ // the global header and root fixtures/ dir are going to get
+ // a different date each time, so omit that bit.
+ // Also, dev/ino values differ across machines, so that's not
+ // included.
+ [ [ 'entry',
+ { path: 'fixtures/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ uid: uid,
+ gid: gid,
+ size: 200 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/a.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 257,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/b.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 512,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/c.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/cc.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/foo.js',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 4,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-1',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-2',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '1',
+ linkpath: 'fixtures/hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/star.4.html',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 54081,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/packtest/Ω.txt',
+ uid: uid,
+ gid: gid,
+ size: 2 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 100,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/symlink',
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '2',
+ linkpath: 'hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: "fixtures/Ω.txt"
+ , uid: uid
+ , gid: gid
+ , size: 2 } ]
+
+ , [ 'entry',
+ { path: 'fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+ ]
+
+
+// first, make sure that the hardlinks are actually hardlinks, or this
+// won't work. Git has a way of replacing them with a copy.
+var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
+ , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
+ , fs = require("fs")
+
+try { fs.unlinkSync(hard2) } catch (e) {}
+fs.linkSync(hard1, hard2)
+
+tap.test("with global header", { timeout: 10000 }, function (t) {
+ runTest(t, true)
+})
+
+tap.test("without global header", { timeout: 10000 }, function (t) {
+ runTest(t, false)
+})
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+
+function runTest (t, doGH) {
+ var reader = Reader({ path: input
+ , filter: function () {
+ return !this.path.match(/\.(tar|hex)$/)
+ }
+ , sort: alphasort
+ })
+
+ var props = doGH ? pkg : {}
+ props.noProprietary = true
+ var pack = Pack(props)
+ var writer = Writer(target)
+
+ // global header should be skipped regardless, since it has no content.
+ var entry = 0
+
+ t.ok(reader, "reader ok")
+ t.ok(pack, "pack ok")
+ t.ok(writer, "writer ok")
+
+ pack.pipe(writer)
+
+ var parse = tar.Parse()
+ t.ok(parse, "parser should be ok")
+
+ pack.on("data", function (c) {
+ // console.error("PACK DATA")
+ if (c.length !== 512) {
+ // this one is too noisy, only assert if it'll be relevant
+ t.equal(c.length, 512, "parser should emit data in 512byte blocks")
+ }
+ parse.write(c)
+ })
+
+ pack.on("end", function () {
+ // console.error("PACK END")
+ t.pass("parser ends")
+ parse.end()
+ })
+
+ pack.on("error", function (er) {
+ t.fail("pack error", er)
+ })
+
+ parse.on("error", function (er) {
+ t.fail("parse error", er)
+ })
+
+ writer.on("error", function (er) {
+ t.fail("writer error", er)
+ })
+
+ reader.on("error", function (er) {
+ t.fail("reader error", er)
+ })
+
+ parse.on("*", function (ev, e) {
+ var wanted = entries[entry++]
+ if (!wanted) {
+ t.fail("unexpected event: "+ev)
+ return
+ }
+ t.equal(ev, wanted[0], "event type should be "+wanted[0])
+
+ if (ev !== wanted[0] || e.path !== wanted[1].path) {
+ console.error(wanted)
+ console.error([ev, e.props])
+ e.on("end", function () {
+ console.error(e.fields)
+ throw "break"
+ })
+ }
+
+ t.has(e.props, wanted[1], "properties "+wanted[1].path)
+ if (wanted[2]) {
+ e.on("end", function () {
+ if (!e.fields) {
+ t.ok(e.fields, "should get fields")
+ } else {
+ t.has(e.fields, wanted[2], "should get expected fields")
+ }
+ })
+ }
+ })
+
+ reader.pipe(pack)
+
+ writer.on("close", function () {
+ t.equal(entry, entries.length, "should get all expected entries")
+ t.pass("it finished")
+ t.end()
+ })
+
+}
--- /dev/null
+
+// the symlink file is excluded from git, because it makes
+// windows freak the hell out.
+var fs = require("fs")
+ , path = require("path")
+ , symlink = path.resolve(__dirname, "fixtures/symlink")
+try { fs.unlinkSync(symlink) } catch (e) {}
+fs.symlinkSync("./hardlink-1", symlink)
+process.on("exit", function () {
+ fs.unlinkSync(symlink)
+})
+
+
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , pkg = require("../package.json")
+ , Pack = tar.Pack
+ , fstream = require("fstream")
+ , Reader = fstream.Reader
+ , Writer = fstream.Writer
+ , input = path.resolve(__dirname, "fixtures/")
+ , target = path.resolve(__dirname, "tmp/pack.tar")
+ , uid = process.getuid ? process.getuid() : 0
+ , gid = process.getgid ? process.getgid() : 0
+
+ , entries =
+
+ // the global header and root fixtures/ dir are going to get
+ // a different date each time, so omit that bit.
+ // Also, dev/ino values differ across machines, so that's not
+ // included.
+ [ [ 'globalExtendedHeader',
+ { path: 'PaxHeader/',
+ mode: 438,
+ uid: 0,
+ gid: 0,
+ type: 'g',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { "NODETAR.author": pkg.author,
+ "NODETAR.name": pkg.name,
+ "NODETAR.description": pkg.description,
+ "NODETAR.version": pkg.version,
+ "NODETAR.repository.type": pkg.repository.type,
+ "NODETAR.repository.url": pkg.repository.url,
+ "NODETAR.main": pkg.main,
+ "NODETAR.scripts.test": pkg.scripts.test,
+ "NODETAR.engines.node": pkg.engines.node } ]
+
+ , [ 'entry',
+ { path: 'fixtures/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/a.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 257,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/b.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 512,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/c.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/cc.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 513,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/foo.js',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 4,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-1',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 200,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/hardlink-2',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '1',
+ linkpath: 'fixtures/hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/omega.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/star.4.html',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 54081,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'fixtures/packtest/Ω.txt',
+ 'NODETAR.depth': '2',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/packtest/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '2',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
+ mode: 493,
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '5',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 100,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'entry',
+ { path: 'fixtures/symlink',
+ uid: uid,
+ gid: gid,
+ size: 0,
+ type: '2',
+ linkpath: 'hardlink-1',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' } ]
+
+ , [ 'extendedHeader',
+ { path: 'PaxHeader/fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: "fixtures/Ω.txt"
+ , "NODETAR.depth": "1"
+ , "NODETAR.type": "File"
+ , nlink: 1
+ , uid: uid
+ , gid: gid
+ , size: 2
+ , "NODETAR.blksize": "4096"
+ , "NODETAR.blocks": "8" } ]
+
+ , [ 'entry',
+ { path: 'fixtures/Ω.txt',
+ mode: 420,
+ uid: uid,
+ gid: gid,
+ size: 2,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\u0000',
+ ustarver: '00',
+ uname: '',
+ gname: '',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ 'NODETAR.depth': '1',
+ 'NODETAR.type': 'File',
+ nlink: 1,
+ 'NODETAR.blksize': '4096',
+ 'NODETAR.blocks': '8' } ]
+ ]
+
+
+// first, make sure that the hardlinks are actually hardlinks, or this
+// won't work. Git has a way of replacing them with a copy.
+var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
+ , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
+ , fs = require("fs")
+
+try { fs.unlinkSync(hard2) } catch (e) {}
+fs.linkSync(hard1, hard2)
+
+tap.test("with global header", { timeout: 10000 }, function (t) {
+ runTest(t, true)
+})
+
+tap.test("without global header", { timeout: 10000 }, function (t) {
+ runTest(t, false)
+})
+
+function alphasort (a, b) {
+ return a === b ? 0
+ : a.toLowerCase() > b.toLowerCase() ? 1
+ : a.toLowerCase() < b.toLowerCase() ? -1
+ : a > b ? 1
+ : -1
+}
+
+
+function runTest (t, doGH) {
+ var reader = Reader({ path: input
+ , filter: function () {
+ return !this.path.match(/\.(tar|hex)$/)
+ }
+ , sort: alphasort
+ })
+
+ var pack = Pack(doGH ? pkg : null)
+ var writer = Writer(target)
+
+ // skip the global header if we're not doing that.
+ var entry = doGH ? 0 : 1
+
+ t.ok(reader, "reader ok")
+ t.ok(pack, "pack ok")
+ t.ok(writer, "writer ok")
+
+ pack.pipe(writer)
+
+ var parse = tar.Parse()
+ t.ok(parse, "parser should be ok")
+
+ pack.on("data", function (c) {
+ // console.error("PACK DATA")
+ if (c.length !== 512) {
+ // this one is too noisy, only assert if it'll be relevant
+ t.equal(c.length, 512, "parser should emit data in 512byte blocks")
+ }
+ parse.write(c)
+ })
+
+ pack.on("end", function () {
+ // console.error("PACK END")
+ t.pass("parser ends")
+ parse.end()
+ })
+
+ pack.on("error", function (er) {
+ t.fail("pack error", er)
+ })
+
+ parse.on("error", function (er) {
+ t.fail("parse error", er)
+ })
+
+ writer.on("error", function (er) {
+ t.fail("writer error", er)
+ })
+
+ reader.on("error", function (er) {
+ t.fail("reader error", er)
+ })
+
+ parse.on("*", function (ev, e) {
+ var wanted = entries[entry++]
+ if (!wanted) {
+ t.fail("unexpected event: "+ev)
+ return
+ }
+ t.equal(ev, wanted[0], "event type should be "+wanted[0])
+
+ // if (ev !== wanted[0] || e.path !== wanted[1].path) {
+ // console.error(wanted)
+ // console.error([ev, e.props])
+ // throw "break"
+ // }
+
+ t.has(e.props, wanted[1], "properties "+wanted[1].path)
+ if (wanted[2]) {
+ e.on("end", function () {
+ if (!e.fields) {
+ t.ok(e.fields, "should get fields")
+ } else {
+ t.has(e.fields, wanted[2], "should get expected fields")
+ }
+ })
+ }
+ })
+
+ reader.pipe(pack)
+
+ writer.on("close", function () {
+ t.equal(entry, entries.length, "should get all expected entries")
+ t.pass("it finished")
+ t.end()
+ })
+
+}
--- /dev/null
+var tap = require("tap")
+ , tar = require("../tar.js")
+ , fs = require("fs")
+ , path = require("path")
+ , file = path.resolve(__dirname, "fixtures/c.tar")
+ , index = 0
+
+ , expect =
+[ [ 'entry',
+ { path: 'c.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 513,
+ mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'),
+ cksum: 5422,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'cc.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 513,
+ mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'),
+ cksum: 5525,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 100,
+ mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'),
+ cksum: 18124,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'entry',
+ { path: 'Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 2,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 5695,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 120,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 6702,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: 'Ω.txt',
+ ctime: 1319737909,
+ atime: 1319739061,
+ dev: 234881026,
+ ino: 51693379,
+ nlink: 1 } ],
+ [ 'entry',
+ { path: 'Ω.txt',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 2,
+ mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ cksum: 5695,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
+ atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'),
+ dev: 234881026,
+ ino: 51693379,
+ nlink: 1 },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 353,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14488,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ctime: 1319686868,
+ atime: 1319741254,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 1 } ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 200,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14570,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 1 },
+ undefined ],
+ [ 'longPath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4976,
+ type: 'L',
+ linkpath: '',
+ ustar: false },
+ '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 1000,
+ gid: 1000,
+ size: 201,
+ mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'),
+ cksum: 14086,
+ type: '0',
+ linkpath: '',
+ ustar: false },
+ undefined ],
+ [ 'longLinkpath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4975,
+ type: 'K',
+ linkpath: '',
+ ustar: false },
+ '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
+ [ 'longPath',
+ { path: '././@LongLink',
+ mode: 0,
+ uid: 0,
+ gid: 0,
+ size: 201,
+ mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
+ cksum: 4976,
+ type: 'L',
+ linkpath: '',
+ ustar: false },
+ '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ],
+ [ 'entry',
+ { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
+ mode: 511,
+ uid: 1000,
+ gid: 1000,
+ size: 0,
+ mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'),
+ cksum: 21603,
+ type: '2',
+ linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ustar: false },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200-hard',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 143,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 6533,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { ctime: 1320617144,
+ atime: 1320617232,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 } ],
+ [ 'entry',
+ { path: '200-hard',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 200,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 5526,
+ type: '0',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
+ atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 },
+ undefined ],
+ [ 'extendedHeader',
+ { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 353,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 14488,
+ type: 'x',
+ linkpath: '',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '' },
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ ctime: 1320617144,
+ atime: 1320617406,
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 } ],
+ [ 'entry',
+ { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
+ mode: 420,
+ uid: 24561,
+ gid: 20,
+ size: 0,
+ mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
+ cksum: 15173,
+ type: '1',
+ linkpath: '200-hard',
+ ustar: 'ustar\0',
+ ustarver: '00',
+ uname: 'isaacs',
+ gname: 'staff',
+ devmaj: 0,
+ devmin: 0,
+ fill: '',
+ ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
+ atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'),
+ 'LIBARCHIVE.creationtime': '1319686852',
+ dev: 234881026,
+ ino: 51681874,
+ nlink: 2 },
+ undefined ] ]
+
+
+tap.test("parser test", function (t) {
+ var parser = tar.Parse()
+
+ parser.on("end", function () {
+ t.equal(index, expect.length, "saw all expected events")
+ t.end()
+ })
+
+ fs.createReadStream(file)
+ .pipe(parser)
+ .on("*", function (ev, entry) {
+ var wanted = expect[index]
+ if (!wanted) {
+ return t.fail("Unexpected event: " + ev)
+ }
+ var result = [ev, entry.props]
+ entry.on("end", function () {
+ result.push(entry.fields || entry.body)
+
+ t.equal(ev, wanted[0], index + " event type")
+ t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties")
+ if (wanted[2]) {
+ t.equivalent(result[2], wanted[2], "metadata values")
+ }
+ index ++
+ })
+ })
+})
--- /dev/null
+// clean up the fixtures
+
+var tap = require("tap")
+, rimraf = require("rimraf")
+, test = tap.test
+, path = require("path")
+
+test("clean fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "fixtures"), function (er) {
+ t.ifError(er, "rimraf ./fixtures/")
+ t.end()
+ })
+})
+
+test("clean tmp", function (t) {
+ rimraf(path.resolve(__dirname, "tmp"), function (er) {
+ t.ifError(er, "rimraf ./tmp/")
+ t.end()
+ })
+})
{
- "version": "1.1.66",
+ "version": "1.1.69",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
},
"scripts": {
"test": "node ./test/run.js && tap test/tap/*.js",
- "prepublish": "npm prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
+ "prepublish": "node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
"dumpconf": "env | grep npm | sort | uniq",
"echo": "node bin/npm-cli.js"
},
-var c = require('child_process').spawn('array-bin', [], {
- env: process.env }).on('close', function (code) {
- if (code) throw new Error('exited badly with code = ' + code)
+require('child_process').exec('array-bin', { env: process.env },
+ function (err) {
+ if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})
-c.stdout.pipe(process.stdout)
-c.stderr.pipe(process.stderr)
-require('child_process').spawn('dir-bin', [], {
- env: process.env }).on('exit', function (code) {
- if (code) throw new Error('exited badly with code = ' + code)
+require('child_process').exec('dir-bin', { stdio: 'pipe',
+ env: process.env }, function (err) {
+ if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})
-
"minimatch": "~0.1.0"
},
"scripts": {
- "test": "bash test.sh"
+ "test": "node test.js"
}
}
--- /dev/null
+var path = require("path")
+var assert = require("assert")
+
+process.env.npm_config_prefix = process.cwd()
+delete process.env.npm_config_global
+delete process.env.npm_config_depth
+
+var npm = process.platform === "win32"
+ ? path.resolve(process.env.npm_config_prefix, "../../npm")
+ : path.resolve(process.env.npm_config_prefix, "../../../bin/npm")
+
+require("child_process").exec(npm + " ls --json", {
+ stdio: "pipe", env: process.env, cwd: process.cwd() },
+ function (err, stdout, stderr) {
+ if (err) throw err
+
+ var actual = JSON.parse(stdout).dependencies
+ var expected = require("./npm-shrinkwrap.json").dependencies
+
+ assert.deepEqual(actual, expected)
+})
+++ /dev/null
-#!/bin/bash
-
-# ensure that we get the npm being tested, not some global thing.
-npmbin=$npm_config_prefix/bin/npm
-npm () {
- node $npmbin "$@"
-}
-
-# work around the weird env we're in, as part of npm's test
-export npm_config_prefix=$PWD
-unset npm_config_global
-unset npm_config_depth
-
-out=$(diff <(npm ls --json) npm-shrinkwrap.json)
-if [ "$out" != "" ]; then
- echo "Didn't get expected packages" >&2
- echo "$out" >&2
- exit 1
-fi
-echo "ok"
// special: replace 'node' with the current execPath,
// and 'npm' with the thing we installed.
var cmdShow = cmd
- cmd = cmd.replace(/^npm /, path.resolve(npmPath, "npm") + " ")
- cmd = cmd.replace(/^node /, process.execPath + " ")
+ var npmReplace = path.resolve(npmPath, "npm")
+ var nodeReplace = process.execPath
+ if (process.platform === "win32") {
+ npmReplace = '"' + npmReplace + '"'
+ nodeReplace = '"' + nodeReplace + '"'
+ }
+ cmd = cmd.replace(/^npm /, npmReplace + " ")
+ cmd = cmd.replace(/^node /, nodeReplace + " ")
child_process.exec(cmd, {env: env}, function (er, stdout, stderr) {
if (stdout) {
installAllThenTestAll()
function installAllThenTestAll () {
+ var packagesToRm = packages.slice(0)
+ if (process.platform !== "win32") {
+ // Windows can't handle npm rm npm due to file-in-use issues.
+ packagesToRm.push("npm")
+ }
+
chain
( [ setup
, [ exec, "npm install "+npmpkg ]
, [ execChain, packages.map(function (p) {
return "npm test "+p
}) ]
- , [ execChain, packages.concat("npm").map(function (p) {
+ , [ execChain, packagesToRm.map(function (p) {
return "npm rm " + p
}) ]
, installAndTestEach
}
function installAndTestEach (cb) {
- chain
- ( [ setup
+ var thingsToChain = [
+ setup
, [ execChain, packages.map(function (p) {
return [ "npm install packages/"+p
, "npm test "+p
, "npm rm "+p ]
}) ]
- , [exec, "npm rm npm"]
- , publishTest
- ], cb )
+ ]
+ if (process.platform !== "win32") {
+ // Windows can't handle npm rm npm due to file-in-use issues.
+ thingsToChain.push([exec, "npm rm npm"])
+ }
+ thingsToChain.push(publishTest)
+
+ chain(thingsToChain, cb)
}
function publishTest (cb) {