Note that no purging is done unless the `npm cache clean` command is
explicitly used, and that only GET requests use the cache.
+### cert
+
+* Default: `null`
+* Type: String
+
+A client certificate to pass when accessing the registry.
+
### color
* Default: true on Posix, false on Windows
If false, never shows colors. If `"always"` then always shows colors.
If true, then only prints color codes for tty file descriptors.
-### coverage
-
-* Default: false
-* Type: Boolean
-
-A flag to tell test-harness to run with their coverage options enabled,
-if they respond to the `npm_config_coverage` environment variable.
-
### depth
* Default: Infinity
The command to run for `npm edit` or `npm config edit`.
+### email
+
+The email of the logged-in user.
+
+Set by the `npm adduser` command. Should not be set explicitly.
+
### engine-strict
* Default: false
computer, but is not in the `PATH`, then set this to the full path to
the git binary.
+### git-tag-version
+
+* Default: `true`
+* Type: Boolean
+
+Tag the commit when using the `npm version` command.
+
### global
* Default: false
The config file to read for global config options.
-### globalignorefile
-
-* Default: {prefix}/etc/npmignore
-* Type: path
-
-The config file to read for global ignore patterns to apply to all users
-and all projects.
-
-If not found, but there is a "gitignore" file in the
-same directory, then that will be used instead.
-
### group
* Default: GID of the current process
The group to use when running package scripts in global mode as the root
user.
+### heading
+
+* Default: `"npm"`
+* Type: String
+
+The string that starts all the debugging log output.
+
### https-proxy
* Default: the `HTTPS_PROXY` or `https_proxy` or `HTTP_PROXY` or
A proxy to use for outgoing https requests.
-### user-agent
-
-* Default: node/{process.version} {process.platform} {process.arch}
-* Type: String
+### ignore-scripts
-Sets a User-Agent to the request header
-
-### ignore
-
-* Default: ""
-* Type: string
+* Default: false
+* Type: Boolean
-A white-space separated list of glob patterns of files to always exclude
-from packages when building tarballs.
+If true, npm does not run scripts specified in package.json files.
### init-module
[init-package-json](https://github.com/isaacs/init-package-json) module
for more information, or npm-init(1).
-### init.version
-
-* Default: "0.0.0"
-* Type: semver
-
-The value `npm init` should use by default for the package version.
-
### init.author.name
* Default: ""
for many commands is either not implemented in JSON yet, or subject to
change. Only the output from `npm ls --json` is currently valid.
+### key
+
+* Default: `null`
+* Type: String
+
+A client key to pass when accessing the registry.
+
### link
* Default: false
* the globally installed version is identical to the version that is
being installed locally.
+### local-address
+
+* Default: undefined
+* Type: IP Address
+
+The IP address of the local interface to use when making connections
+to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
+
### loglevel
* Default: "http"
* Default: false
* Type: Boolean
-Run tests on installation and report results to the
-`npaturl`.
-
-### npaturl
-
-* Default: Not yet implemented
-* Type: url
-
-The url to report npat test results.
+Run tests on installation.
### onload-script
The location of user-level configuration settings.
-### userignorefile
-
-* Default: ~/.npmignore
-* Type: path
-
-The location of a user-level ignore file to apply to all packages.
-
-If not found, but there is a .gitignore file in the same directory, then
-that will be used instead.
-
### umask
* Default: 022
this value. Other files are given a mode which is `0666` masked against
this value. Thus, the defaults are `0755` and `0644` respectively.
+### user-agent
+
+* Default: node/{process.version} {process.platform} {process.arch}
+* Type: String
+
+Sets a User-Agent to the request header
+
### version
* Default: false
Set to `"browser"` to view html help content in the default web browser.
-### yes
-
-* Default: null
-* Type: Boolean or null
-
-If set to `null`, then prompt the user for responses in some
-circumstances.
-
-If set to `true`, then answer "yes" to any prompt. If set to `false`
-then answer "no" to any prompt.
-
## SEE ALSO
* npm-config(1)
<ul><li><a href="cli/npm.html">npm(1)</a></li><li><a href="misc/npm-faq.html">npm-faq(7)</a></li><li><a href="cli/npm-help.html">npm-help(1)</a></li><li><a href="misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.17</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">npm-bin — npm@1.3.17</p>
+<p id="footer">npm-bin — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">npm-bugs — npm@1.3.17</p>
+<p id="footer">npm-bugs — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-commands — npm@1.3.17</p>
+<p id="footer">npm-commands — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.17</p>
+<p id="footer">npm-config — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate — npm@1.3.17</p>
+<p id="footer">npm-deprecate — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">npm-docs — npm@1.3.17</p>
+<p id="footer">npm-docs — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">npm-edit — npm@1.3.17</p>
+<p id="footer">npm-edit — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">npm-explore — npm@1.3.17</p>
+<p id="footer">npm-explore — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">npm-help-search — npm@1.3.17</p>
+<p id="footer">npm-help-search — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../files/package.json.html">package.json(5)</a></p>
</div>
-<p id="footer">npm-init — npm@1.3.17</p>
+<p id="footer">npm-init — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">npm-install — npm@1.3.17</p>
+<p id="footer">npm-install — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">npm-link — npm@1.3.17</p>
+<p id="footer">npm-link — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">npm-load — npm@1.3.17</p>
+<p id="footer">npm-load — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">npm-ls — npm@1.3.17</p>
+<p id="footer">npm-ls — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">npm-outdated — npm@1.3.17</p>
+<p id="footer">npm-outdated — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-owner — npm@1.3.17</p>
+<p id="footer">npm-owner — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">npm-pack — npm@1.3.17</p>
+<p id="footer">npm-pack — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-prefix — npm@1.3.17</p>
+<p id="footer">npm-prefix — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">npm-prune — npm@1.3.17</p>
+<p id="footer">npm-prune — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../api/npm-owner.html">npm-owner(3)</a></li></ul>
</div>
-<p id="footer">npm-publish — npm@1.3.17</p>
+<p id="footer">npm-publish — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">npm-rebuild — npm@1.3.17</p>
+<p id="footer">npm-rebuild — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-restart — npm@1.3.17</p>
+<p id="footer">npm-restart — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">npm-root — npm@1.3.17</p>
+<p id="footer">npm-root — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../api/npm-test.html">npm-test(3)</a></li><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-restart.html">npm-restart(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul>
</div>
-<p id="footer">npm-run-script — npm@1.3.17</p>
+<p id="footer">npm-run-script — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">npm-search — npm@1.3.17</p>
+<p id="footer">npm-search — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">npm-shrinkwrap — npm@1.3.17</p>
+<p id="footer">npm-shrinkwrap — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-start — npm@1.3.17</p>
+<p id="footer">npm-start — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-stop — npm@1.3.17</p>
+<p id="footer">npm-stop — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule — npm@1.3.17</p>
+<p id="footer">npm-submodule — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">npm-tag — npm@1.3.17</p>
+<p id="footer">npm-tag — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">npm-test — npm@1.3.17</p>
+<p id="footer">npm-test — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">npm-uninstall — npm@1.3.17</p>
+<p id="footer">npm-uninstall — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">npm-unpublish — npm@1.3.17</p>
+<p id="footer">npm-unpublish — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">npm-update — npm@1.3.17</p>
+<p id="footer">npm-update — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">npm-version — npm@1.3.17</p>
+<p id="footer">npm-version — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">npm-view — npm@1.3.17</p>
+<p id="footer">npm-view — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">npm-whoami — npm@1.3.17</p>
+<p id="footer">npm-whoami — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.3.17</p>
+<p>1.3.19</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.3.17</p>
+<p id="footer">npm — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">repo — npm@1.3.17</p>
+<p id="footer">repo — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li></ul>
</div>
-<p id="footer">npm-adduser — npm@1.3.17</p>
+<p id="footer">npm-adduser — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-bin — npm@1.3.17</p>
+<p id="footer">npm-bin — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-bugs — npm@1.3.17</p>
+<p id="footer">npm-bugs — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-build — npm@1.3.17</p>
+<p id="footer">npm-build — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-bundle — npm@1.3.17</p>
+<p id="footer">npm-bundle — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li></ul>
</div>
-<p id="footer">npm-cache — npm@1.3.17</p>
+<p id="footer">npm-cache — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-completion — npm@1.3.17</p>
+<p id="footer">npm-completion — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.17</p>
+<p id="footer">npm-config — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-dedupe — npm@1.3.17</p>
+<p id="footer">npm-dedupe — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-deprecate — npm@1.3.17</p>
+<p id="footer">npm-deprecate — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul>
</div>
-<p id="footer">npm-docs — npm@1.3.17</p>
+<p id="footer">npm-docs — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-explore.html">npm-explore(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-edit — npm@1.3.17</p>
+<p id="footer">npm-edit — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-submodule.html">npm-submodule(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-edit.html">npm-edit(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-explore — npm@1.3.17</p>
+<p id="footer">npm-explore — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul>
</div>
-<p id="footer">npm-help-search — npm@1.3.17</p>
+<p id="footer">npm-help-search — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-help-search.html">npm-help-search(1)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul>
</div>
-<p id="footer">npm-help — npm@1.3.17</p>
+<p id="footer">npm-help — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li></ul>
</div>
-<p id="footer">npm-init — npm@1.3.17</p>
+<p id="footer">npm-init — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">npm-install — npm@1.3.17</p>
+<p id="footer">npm-install — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-link — npm@1.3.17</p>
+<p id="footer">npm-link — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre><code>npm@1.3.17 /path/to/npm
+<pre><code>npm@1.3.19 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li></ul>
</div>
-<p id="footer">npm-ls — npm@1.3.17</p>
+<p id="footer">npm-ls — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-outdated — npm@1.3.17</p>
+<p id="footer">npm-outdated — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-owner — npm@1.3.17</p>
+<p id="footer">npm-owner — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-pack — npm@1.3.17</p>
+<p id="footer">npm-pack — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-prefix — npm@1.3.17</p>
+<p id="footer">npm-prefix — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-prune — npm@1.3.17</p>
+<p id="footer">npm-prune — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li></ul>
</div>
-<p id="footer">npm-publish — npm@1.3.17</p>
+<p id="footer">npm-publish — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-rebuild — npm@1.3.17</p>
+<p id="footer">npm-rebuild — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-restart — npm@1.3.17</p>
+<p id="footer">npm-restart — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-rm — npm@1.3.17</p>
+<p id="footer">npm-rm — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-root — npm@1.3.17</p>
+<p id="footer">npm-root — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-run-script — npm@1.3.17</p>
+<p id="footer">npm-run-script — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li></ul>
</div>
-<p id="footer">npm-search — npm@1.3.17</p>
+<p id="footer">npm-search — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-shrinkwrap — npm@1.3.17</p>
+<p id="footer">npm-shrinkwrap — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-star — npm@1.3.17</p>
+<p id="footer">npm-star — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-star.html">npm-star(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-stars — npm@1.3.17</p>
+<p id="footer">npm-stars — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-start — npm@1.3.17</p>
+<p id="footer">npm-start — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li></ul>
</div>
-<p id="footer">npm-stop — npm@1.3.17</p>
+<p id="footer">npm-stop — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/package.json.html">package.json(5)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">npm-submodule — npm@1.3.17</p>
+<p id="footer">npm-submodule — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-dedupe.html">npm-dedupe(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-tag — npm@1.3.17</p>
+<p id="footer">npm-tag — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul>
</div>
-<p id="footer">npm-test — npm@1.3.17</p>
+<p id="footer">npm-test — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul>
</div>
-<p id="footer">npm-uninstall — npm@1.3.17</p>
+<p id="footer">npm-uninstall — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-unpublish — npm@1.3.17</p>
+<p id="footer">npm-unpublish — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul>
</div>
-<p id="footer">npm-update — npm@1.3.17</p>
+<p id="footer">npm-update — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/semver.html">semver(7)</a></li></ul>
</div>
-<p id="footer">npm-version — npm@1.3.17</p>
+<p id="footer">npm-version — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-search.html">npm-search(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li></ul>
</div>
-<p id="footer">npm-view — npm@1.3.17</p>
+<p id="footer">npm-view — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul>
</div>
-<p id="footer">npm-whoami — npm@1.3.17</p>
+<p id="footer">npm-whoami — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.3.17</p>
+<p>1.3.19</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.3.17</p>
+<p id="footer">npm — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li></ul>
</div>
-<p id="footer">repo — npm@1.3.17</p>
+<p id="footer">repo — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders — npm@1.3.17</p>
+<p id="footer">npm-folders — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul>
</div>
-<p id="footer">npm-folders — npm@1.3.17</p>
+<p id="footer">npm-folders — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json — npm@1.3.17</p>
+<p id="footer">package.json — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npmrc — npm@1.3.17</p>
+<p id="footer">npmrc — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul>
</div>
-<p id="footer">package.json — npm@1.3.17</p>
+<p id="footer">package.json — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index — npm@1.3.17</p>
+<p id="footer">npm-index — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-coding-style — npm@1.3.17</p>
+<p id="footer">npm-coding-style — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Note that no purging is done unless the <code>npm cache clean</code> command is
explicitly used, and that only GET requests use the cache.</p>
+<h3 id="cert">cert</h3>
+
+<ul><li>Default: <code>null</code></li><li>Type: String</li></ul>
+
+<p>A client certificate to pass when accessing the registry.</p>
+
<h3 id="color">color</h3>
<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul>
<p>If false, never shows colors. If <code>"always"</code> then always shows colors.
If true, then only prints color codes for tty file descriptors.</p>
-<h3 id="coverage">coverage</h3>
-
-<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-
-<p>A flag to tell test-harness to run with their coverage options enabled,
-if they respond to the <code>npm_config_coverage</code> environment variable.</p>
-
<h3 id="depth">depth</h3>
<ul><li>Default: Infinity</li><li>Type: Number</li></ul>
<p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p>
+<h3 id="email">email</h3>
+
+<p>The email of the logged-in user.</p>
+
+<p>Set by the <code>npm adduser</code> command. Should not be set explicitly.</p>
+
<h3 id="engine-strict">engine-strict</h3>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
computer, but is not in the <code>PATH</code>, then set this to the full path to
the git binary.</p>
+<h3 id="git-tag-version">git-tag-version</h3>
+
+<ul><li>Default: <code>true</code></li><li>Type: Boolean</li></ul>
+
+<p>Tag the commit when using the <code>npm version</code> command.</p>
+
<h3 id="global">global</h3>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
<p>The config file to read for global config options.</p>
-<h3 id="globalignorefile">globalignorefile</h3>
-
-<ul><li>Default: {prefix}/etc/npmignore</li><li>Type: path</li></ul>
-
-<p>The config file to read for global ignore patterns to apply to all users
-and all projects.</p>
-
-<p>If not found, but there is a "gitignore" file in the
-same directory, then that will be used instead.</p>
-
<h3 id="group">group</h3>
<ul><li>Default: GID of the current process</li><li>Type: String or Number</li></ul>
<p>The group to use when running package scripts in global mode as the root
user.</p>
+<h3 id="heading">heading</h3>
+
+<ul><li>Default: <code>"npm"</code></li><li>Type: String</li></ul>
+
+<p>The string that starts all the debugging log output.</p>
+
<h3 id="https-proxy">https-proxy</h3>
<ul><li>Default: the <code>HTTPS_PROXY</code> or <code>https_proxy</code> or <code>HTTP_PROXY</code> or
<p>A proxy to use for outgoing https requests.</p>
-<h3 id="user-agent">user-agent</h3>
-
-<ul><li>Default: node/{process.version} {process.platform} {process.arch}</li><li>Type: String</li></ul>
-
-<p>Sets a User-Agent to the request header</p>
-
-<h3 id="ignore">ignore</h3>
+<h3 id="ignore-scripts">ignore-scripts</h3>
-<ul><li>Default: ""</li><li>Type: string</li></ul>
+<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-<p>A white-space separated list of glob patterns of files to always exclude
-from packages when building tarballs.</p>
+<p>If true, npm does not run scripts specified in package.json files.</p>
<h3 id="init-module">init-module</h3>
<a href="https://github.com/isaacs/init-package-json">init-package-json</a> module
for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>
-<h3 id="init-version">init.version</h3>
-
-<ul><li>Default: "0.0.0"</li><li>Type: semver</li></ul>
-
-<p>The value <code>npm init</code> should use by default for the package version.</p>
-
<h3 id="init-author-name">init.author.name</h3>
<ul><li>Default: ""</li><li>Type: String</li></ul>
for many commands is either not implemented in JSON yet, or subject to
change. Only the output from <code>npm ls --json</code> is currently valid.</p>
+<h3 id="key">key</h3>
+
+<ul><li>Default: <code>null</code></li><li>Type: String</li></ul>
+
+<p>A client key to pass when accessing the registry.</p>
+
<h3 id="link">link</h3>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
<ul><li>The package is not already installed globally, or</li><li>the globally installed version is identical to the version that is
being installed locally.</li></ul>
+<h3 id="local-address">local-address</h3>
+
+<ul><li>Default: undefined</li><li>Type: IP Address</li></ul>
+
+<p>The IP address of the local interface to use when making connections
+to the npm registry. Must be IPv4 in versions of Node prior to 0.12.</p>
+
<h3 id="loglevel">loglevel</h3>
<ul><li>Default: "http"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"</li></ul>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-<p>Run tests on installation and report results to the
-<code>npaturl</code>.</p>
-
-<h3 id="npaturl">npaturl</h3>
-
-<ul><li>Default: Not yet implemented</li><li>Type: url</li></ul>
-
-<p>The url to report npat test results.</p>
+<p>Run tests on installation.</p>
<h3 id="onload-script">onload-script</h3>
<p>The location of user-level configuration settings.</p>
-<h3 id="userignorefile">userignorefile</h3>
-
-<ul><li>Default: ~/.npmignore</li><li>Type: path</li></ul>
-
-<p>The location of a user-level ignore file to apply to all packages.</p>
-
-<p>If not found, but there is a .gitignore file in the same directory, then
-that will be used instead.</p>
-
<h3 id="umask">umask</h3>
<ul><li>Default: 022</li><li>Type: Octal numeric string</li></ul>
this value. Other files are given a mode which is <code>0666</code> masked against
this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p>
+<h3 id="user-agent">user-agent</h3>
+
+<ul><li>Default: node/{process.version} {process.platform} {process.arch}</li><li>Type: String</li></ul>
+
+<p>Sets a User-Agent to the request header</p>
+
<h3 id="version">version</h3>
<ul><li>Default: false</li><li>Type: boolean</li></ul>
<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p>
-<h3 id="yes">yes</h3>
-
-<ul><li>Default: null</li><li>Type: Boolean or null</li></ul>
-
-<p>If set to <code>null</code>, then prompt the user for responses in some
-circumstances.</p>
-
-<p>If set to <code>true</code>, then answer "yes" to any prompt. If set to <code>false</code>
-then answer "no" to any prompt.</p>
-
<h2 id="SEE-ALSO">SEE ALSO</h2>
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">npm-config — npm@1.3.17</p>
+<p id="footer">npm-config — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
-<p id="footer">npm-developers — npm@1.3.17</p>
+<p id="footer">npm-developers — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
-<p id="footer">npm-disputes — npm@1.3.17</p>
+<p id="footer">npm-disputes — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
-<p id="footer">npm-faq — npm@1.3.17</p>
+<p id="footer">npm-faq — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The semantic versioner for npm</p>
</div>
-<p id="footer">npm-index — npm@1.3.17</p>
+<p id="footer">npm-index — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
-<p id="footer">npm-registry — npm@1.3.17</p>
+<p id="footer">npm-registry — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
-<p id="footer">npm-scripts — npm@1.3.17</p>
+<p id="footer">npm-scripts — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.3.17</p>
+<p id="footer">removing-npm — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
range.</li><li>maxSatisfying(versions, range): Return the highest version in the list
that satisfies the range, or null if none of them do.</li></ul>
</div>
-<p id="footer">semver — npm@1.3.17</p>
+<p id="footer">semver — npm@1.3.19</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
if (er) return cb(er)
// bins should always be executable.
// XXX skip chmod on windows?
- fs.chmod(path.resolve(folder, pkg.bin[b]), npm.modes.exec, function (er) {
+ var src = path.resolve(folder, pkg.bin[b])
+ fs.chmod(src, npm.modes.exec, function (er) {
+ if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
+ return cb()
+ }
if (er || !gtop) return cb(er)
var dest = path.resolve(binRoot, b)
- , src = path.resolve(folder, pkg.bin[b])
, out = npm.config.get("parseable")
? dest + "::" + src + ":BINFILE"
: dest + " -> " + src
, chmodr = require("chmodr")
, which = require("which")
, isGitUrl = require("./utils/is-git-url.js")
+ , pathIsInside = require("path-is-inside")
cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
: (data && !data.version) ? new Error("No version provided")
: null
}
-
-function pathIsInside (potentialChild, parent) {
- return path.relative(parent, potentialChild).indexOf('..') === -1
-}
, ancestors: {}
, explicit: false
, parent: data
+ , root: true
, wrap: null }
if (data.name === path.basename(where) &&
, ancestors: {}
, explicit: true
, parent: data
+ , root: true
, wrap: null }
if (data) {
context.family[data.name] = context.ancestors[data.name] = data.version
var newPrev = Object.create(context.family)
, newAnc = Object.create(context.ancestors)
- newAnc[data.name] = data.version
+ if (!context.root) {
+ newAnc[data.name] = data.version
+ }
targets.forEach(function (t) {
newPrev[t.name] = t.version
})
// otherwise, make sure that it's a semver match with what we want.
var bd = parent.bundleDependencies
if (bd && bd.indexOf(d.name) !== -1 ||
- semver.satisfies(d.version, deps[d.name] || "*", true)) {
+ semver.satisfies(d.version, deps[d.name] || "*", true) ||
+ deps[d.name] === d._resolved) {
return cb(null, d.name)
}
family)
var depsTargetFolder = targetFolder
var depsContext = { family: family
- , ancestors: context.ancestors
- , parent: target
- , explicit: false
- , wrap: wrap }
+ , ancestors: context.ancestors
+ , parent: target
+ , explicit: false
+ , wrap: wrap }
var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
Object.defineProperty(npm.commands, c, { get : function () {
if (!loaded) throw new Error(
- "Call npm.load(conf, cb) before using this command.\n"+
+ "Call npm.load(config, cb) before using this command.\n"+
"See the README.md or cli.js for example usage.")
var a = npm.deref(c)
if (c === "la" || c === "ll") {
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
- npmconf.load(cli, builtin, function (er, conf) {
- if (er === conf) er = null
+ npmconf.load(cli, builtin, function (er, config) {
+ if (er === config) er = null
- npm.config = conf
+ npm.config = config
- var color = conf.get("color")
+ var color = config.get("color")
- log.level = conf.get("loglevel")
- log.heading = conf.get("heading") || "npm"
- log.stream = conf.get("logstream")
+ log.level = config.get("loglevel")
+ log.heading = config.get("heading") || "npm"
+ log.stream = config.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
// at this point the configs are all set.
// go ahead and spin up the registry client.
- var token = conf.get("_token")
+ var token = config.get("_token")
if (typeof token === "string") {
try {
token = JSON.parse(token)
- conf.set("_token", token, "user")
- conf.save("user")
+ config.set("_token", token, "user")
+ config.save("user")
} catch (e) { token = null }
}
, umask: umask }
chain([ [ loadPrefix, npm, cli ]
- , [ setUser, conf, conf.root ]
+ , [ setUser, config, config.root ]
, [ loadUid, npm ]
], cb)
})
})
}
-function loadPrefix (npm, conf, cb) {
+function loadPrefix (npm, config, cb) {
// try to guess at a good node_modules location.
var p
, gp
- if (!Object.prototype.hasOwnProperty.call(conf, "prefix")) {
+ if (!Object.prototype.hasOwnProperty.call(config, "prefix")) {
p = process.cwd()
} else {
p = npm.config.get("prefix")
if (!pkg) return cb(new Error("Invalid package data"))
log.info(stage, pkg._id)
- if (!pkg.scripts) pkg.scripts = {}
+ if (!pkg.scripts || npm.config.get('ignore-scripts')) pkg.scripts = {}
validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) {
if (er) return cb(er)
.IP "" 4
.
.nf
-npm@1.3.17 /path/to/npm
+npm@1.3.19 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
.fi
.
.SH "VERSION"
-1.3.17
+1.3.19
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.fi
.
.SH "VERSION"
-1.3.17
+1.3.19
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
Note that no purging is done unless the \fBnpm cache clean\fR command is
explicitly used, and that only GET requests use the cache\.
.
-.SS "color"
+.SS "cert"
.
.IP "\(bu" 4
-Default: true on Posix, false on Windows
+Default: \fBnull\fR
.
.IP "\(bu" 4
-Type: Boolean or \fB"always"\fR
+Type: String
.
.IP "" 0
.
.P
-If false, never shows colors\. If \fB"always"\fR then always shows colors\.
-If true, then only prints color codes for tty file descriptors\.
+A client certificate to pass when accessing the registry\.
.
-.SS "coverage"
+.SS "color"
.
.IP "\(bu" 4
-Default: false
+Default: true on Posix, false on Windows
.
.IP "\(bu" 4
-Type: Boolean
+Type: Boolean or \fB"always"\fR
.
.IP "" 0
.
.P
-A flag to tell test\-harness to run with their coverage options enabled,
-if they respond to the \fBnpm_config_coverage\fR environment variable\.
+If false, never shows colors\. If \fB"always"\fR then always shows colors\.
+If true, then only prints color codes for tty file descriptors\.
.
.SS "depth"
.
.P
The command to run for \fBnpm edit\fR or \fBnpm config edit\fR\|\.
.
+.SS "email"
+The email of the logged\-in user\.
+.
+.P
+Set by the \fBnpm adduser\fR command\. Should not be set explicitly\.
+.
.SS "engine\-strict"
.
.IP "\(bu" 4
computer, but is not in the \fBPATH\fR, then set this to the full path to
the git binary\.
.
+.SS "git\-tag\-version"
+.
+.IP "\(bu" 4
+Default: \fBtrue\fR
+.
+.IP "\(bu" 4
+Type: Boolean
+.
+.IP "" 0
+.
+.P
+Tag the commit when using the \fBnpm version\fR command\.
+.
.SS "global"
.
.IP "\(bu" 4
.P
The config file to read for global config options\.
.
-.SS "globalignorefile"
-.
-.IP "\(bu" 4
-Default: {prefix}/etc/npmignore
-.
-.IP "\(bu" 4
-Type: path
-.
-.IP "" 0
-.
-.P
-The config file to read for global ignore patterns to apply to all users
-and all projects\.
-.
-.P
-If not found, but there is a "gitignore" file in the
-same directory, then that will be used instead\.
-.
.SS "group"
.
.IP "\(bu" 4
The group to use when running package scripts in global mode as the root
user\.
.
-.SS "https\-proxy"
+.SS "heading"
.
.IP "\(bu" 4
-Default: the \fBHTTPS_PROXY\fR or \fBhttps_proxy\fR or \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variables\.
+Default: \fB"npm"\fR
.
.IP "\(bu" 4
-Type: url
+Type: String
.
.IP "" 0
.
.P
-A proxy to use for outgoing https requests\.
+The string that starts all the debugging log output\.
.
-.SS "user\-agent"
+.SS "https\-proxy"
.
.IP "\(bu" 4
-Default: node/{process\.version} {process\.platform} {process\.arch}
+Default: the \fBHTTPS_PROXY\fR or \fBhttps_proxy\fR or \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variables\.
.
.IP "\(bu" 4
-Type: String
+Type: url
.
.IP "" 0
.
.P
-Sets a User\-Agent to the request header
+A proxy to use for outgoing https requests\.
.
-.SS "ignore"
+.SS "ignore\-scripts"
.
.IP "\(bu" 4
-Default: ""
+Default: false
.
.IP "\(bu" 4
-Type: string
+Type: Boolean
.
.IP "" 0
.
.P
-A white\-space separated list of glob patterns of files to always exclude
-from packages when building tarballs\.
+If true, npm does not run scripts specified in package\.json files\.
.
.SS "init\-module"
.
documentation for the init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module
npm help for more information, or npm\-init\.
.
-.SS "init\.version"
-.
-.IP "\(bu" 4
-Default: "0\.0\.0"
-.
-.IP "\(bu" 4
-Type: semver
-.
-.IP "" 0
-.
-.P
-The value \fBnpm init\fR should use by default for the package version\.
-.
.SS "init\.author\.name"
.
.IP "\(bu" 4
for many commands is either not implemented in JSON yet, or subject to
change\. Only the output from \fBnpm ls \-\-json\fR is currently valid\.
.
+.SS "key"
+.
+.IP "\(bu" 4
+Default: \fBnull\fR
+.
+.IP "\(bu" 4
+Type: String
+.
+.IP "" 0
+.
+.P
+A client key to pass when accessing the registry\.
+.
.SS "link"
.
.IP "\(bu" 4
.
.IP "" 0
.
+.SS "local\-address"
+.
+.IP "\(bu" 4
+Default: undefined
+.
+.IP "\(bu" 4
+Type: IP Address
+.
+.IP "" 0
+.
+.P
+The IP address of the local interface to use when making connections
+to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\.
+.
.SS "loglevel"
.
.IP "\(bu" 4
.IP "" 0
.
.P
-Run tests on installation and report results to the \fBnpaturl\fR\|\.
-.
-.SS "npaturl"
-.
-.IP "\(bu" 4
-Default: Not yet implemented
-.
-.IP "\(bu" 4
-Type: url
-.
-.IP "" 0
-.
-.P
-The url to report npat test results\.
+Run tests on installation\.
.
.SS "onload\-script"
.
.P
The location of user\-level configuration settings\.
.
-.SS "userignorefile"
+.SS "umask"
.
.IP "\(bu" 4
-Default: ~/\.npmignore
+Default: 022
.
.IP "\(bu" 4
-Type: path
+Type: Octal numeric string
.
.IP "" 0
.
.P
-The location of a user\-level ignore file to apply to all packages\.
+The "umask" value to use when setting the file creation mode on files
+and folders\.
.
.P
-If not found, but there is a \.gitignore file in the same directory, then
-that will be used instead\.
+Folders and executables are given a mode which is \fB0777\fR masked against
+this value\. Other files are given a mode which is \fB0666\fR masked against
+this value\. Thus, the defaults are \fB0755\fR and \fB0644\fR respectively\.
.
-.SS "umask"
+.SS "user\-agent"
.
.IP "\(bu" 4
-Default: 022
+Default: node/{process\.version} {process\.platform} {process\.arch}
.
.IP "\(bu" 4
-Type: Octal numeric string
+Type: String
.
.IP "" 0
.
.P
-The "umask" value to use when setting the file creation mode on files
-and folders\.
-.
-.P
-Folders and executables are given a mode which is \fB0777\fR masked against
-this value\. Other files are given a mode which is \fB0666\fR masked against
-this value\. Thus, the defaults are \fB0755\fR and \fB0644\fR respectively\.
+Sets a User\-Agent to the request header
.
.SS "version"
.
.P
Set to \fB"browser"\fR to view html help content in the default web browser\.
.
-.SS "yes"
-.
-.IP "\(bu" 4
-Default: null
-.
-.IP "\(bu" 4
-Type: Boolean or null
-.
-.IP "" 0
-.
-.P
-If set to \fBnull\fR, then prompt the user for responses in some
-circumstances\.
-.
-.P
-If set to \fBtrue\fR, then answer "yes" to any prompt\. If set to \fBfalse\fR
-then answer "no" to any prompt\.
-.
.SH "SEE ALSO"
.
.IP "\(bu" 4
--- /dev/null
+node_modules
minimatch("bar.foo", "*.foo") // true!
minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
```
## Features
* `man 3 fnmatch`
* `man 5 gitignore`
-### Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between minimatch and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.1, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not. **Note that this is different from the way that `**` is
-handled by ruby's `Dir` class.**
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then minimatch.match returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
-
-
## Minimatch Class
Create a minimatch object by instanting the `minimatch.Minimatch` class.
Returns from negate expressions the same as if they were not negated.
(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
// normalizes slashes.
var slashSplit = /\/+/
-minimatch.monkeyPatch = monkeyPatch
-function monkeyPatch () {
- var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
- var orig = desc.value
- desc.value = function (p) {
- if (p instanceof Minimatch) return p.match(this)
- return orig.call(this, p)
- }
- Object.defineProperty(String.prototype, desc)
-}
-
minimatch.filter = filter
function filter (pattern, options) {
options = options || {}
this.make()
}
+Minimatch.prototype.debug = function() {}
+
Minimatch.prototype.make = make
function make () {
// don't do it more than once.
// step 2: expand braces
var set = this.globSet = this.braceExpand()
- if (options.debug) console.error(this.pattern, set)
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
// step 3: now we have a set, so turn each one into a series of path-portion
// matching patterns.
return s.split(slashSplit)
})
- if (options.debug) console.error(this.pattern, set)
+ this.debug(this.pattern, set)
// glob --> regexps
set = set.map(function (s, si, set) {
return s.map(this.parse, this)
}, this)
- if (options.debug) console.error(this.pattern, set)
+ this.debug(this.pattern, set)
// filter out everything that didn't compile properly.
set = set.filter(function (s) {
return -1 === s.indexOf(false)
})
- if (options.debug) console.error(this.pattern, set)
+ this.debug(this.pattern, set)
this.set = set
}
// So, we pluck that off, and work with the rest,
// and then prepend it to everything we find.
if (pattern.charAt(0) !== "{") {
- // console.error(pattern)
+ this.debug(pattern)
var prefix = null
for (var i = 0, l = pattern.length; i < l; i ++) {
var c = pattern.charAt(i)
- // console.error(i, c)
+ this.debug(i, c)
if (c === "\\") {
escaping = !escaping
} else if (c === "{" && !escaping) {
// actually no sets, all { were escaped.
if (prefix === null) {
- // console.error("no sets")
+ this.debug("no sets")
return [pattern]
}
- var tail = braceExpand(pattern.substr(i), options)
+ var tail = braceExpand.call(this, pattern.substr(i), options)
return tail.map(function (t) {
return prefix + t
})
// first, handle numeric sets, since they're easier
var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
if (numset) {
- // console.error("numset", numset[1], numset[2])
- var suf = braceExpand(pattern.substr(numset[0].length), options)
+ this.debug("numset", numset[1], numset[2])
+ var suf = braceExpand.call(this, pattern.substr(numset[0].length), options)
, start = +numset[1]
, end = +numset[2]
, inc = start > end ? -1 : 1
member = ""
}
- // console.error("Entering for")
+ this.debug("Entering for")
FOR: for (i = 1, l = pattern.length; i < l; i ++) {
var c = pattern.charAt(i)
- // console.error("", i, c)
+ this.debug("", i, c)
if (escaping) {
escaping = false
// pattern.substr(i), or we have *not* closed the set,
// and need to escape the leading brace
if (depth !== 0) {
- // console.error("didn't close", pattern)
- return braceExpand("\\" + pattern, options)
+ this.debug("didn't close", pattern)
+ return braceExpand.call(this, "\\" + pattern, options)
}
// x{y,z} -> ["xy", "xz"]
- // console.error("set", set)
- // console.error("suffix", pattern.substr(i))
- var suf = braceExpand(pattern.substr(i), options)
+ this.debug("set", set)
+ this.debug("suffix", pattern.substr(i))
+ var suf = braceExpand.call(this, pattern.substr(i), options)
// ["b", "c{d,e}","{f,g}h"] ->
// [["b"], ["cd", "ce"], ["fh", "gh"]]
var addBraces = set.length === 1
- // console.error("set pre-expanded", set)
+ this.debug("set pre-expanded", set)
set = set.map(function (p) {
- return braceExpand(p, options)
- })
- // console.error("set expanded", set)
+ return braceExpand.call(this, p, options)
+ }, this)
+ this.debug("set expanded", set)
// [["b"], ["cd", "ce"], ["fh", "gh"]] ->
// not (start or / followed by . or .. followed by / or end)
: options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
: "(?!\\.)"
+ , self = this
function clearStateChar () {
if (stateChar) {
re += "\\"+stateChar
break
}
+ self.debug('clearStateChar %j %j', stateChar, re)
stateChar = false
}
}
; (i < len) && (c = pattern.charAt(i))
; i ++ ) {
- if (options.debug) {
- console.error("%s\t%s %s %j", pattern, i, re, c)
- }
+ this.debug("%s\t%s %s %j", pattern, i, re, c)
// skip over any that are escaped.
if (escaping && reSpecials[c]) {
case "+":
case "@":
case "!":
- if (options.debug) {
- console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
- }
+ this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
// all of those are literals inside a class, except that
// the glob [!a] means [^a] in regexp
if (inClass) {
+ this.debug(' in class')
if (c === "!" && i === classStart + 1) c = "^"
re += c
continue
// if we already have a stateChar, then it means
// that there was something like ** or +? in there.
// Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
clearStateChar()
stateChar = c
// if extglob is disabled, then +(asdf|foo) isn't a thing.
, reStart: re.length })
// negation is (?:(?!js)[^/]*)
re += stateChar === "!" ? "(?:(?!" : "(?:"
+ this.debug('plType %j %j', stateChar, re)
stateChar = false
continue
continue
}
+ clearStateChar()
hasMagic = true
re += ")"
plType = patternListStack.pop().type
continue
}
+ clearStateChar()
re += "|"
continue
return $1 + $1 + $2 + "|"
})
- // console.error("tail=%j\n %s", tail, tail)
+ this.debug("tail=%j\n %s", tail, tail)
var t = pl.type === "*" ? star
: pl.type === "?" ? qmark
: "\\" + pl.type
Minimatch.prototype.match = match
function match (f, partial) {
- // console.error("match", f, this.pattern)
+ this.debug("match", f, this.pattern)
// short-circuit in the case of busted things.
// comments, etc.
if (this.comment) return false
// treat the test path as a set of pathparts.
f = f.split(slashSplit)
- if (options.debug) {
- console.error(this.pattern, "split", f)
- }
+ this.debug(this.pattern, "split", f)
// just ONE of the pattern sets in this.set needs to match
// in order for it to be valid. If negating, then just one
// Either way, return on the first hit.
var set = this.set
- // console.error(this.pattern, "set", set)
+ this.debug(this.pattern, "set", set)
+
+ var splitFile = path.basename(f.join("/")).split("/")
for (var i = 0, l = set.length; i < l; i ++) {
- var pattern = set[i]
- var hit = this.matchOne(f, pattern, partial)
+ var pattern = set[i], file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = splitFile
+ }
+ var hit = this.matchOne(file, pattern, partial)
if (hit) {
if (options.flipNegate) return true
return !this.negate
Minimatch.prototype.matchOne = function (file, pattern, partial) {
var options = this.options
- if (options.debug) {
- console.error("matchOne",
- { "this": this
- , file: file
- , pattern: pattern })
- }
-
- if (options.matchBase && pattern.length === 1) {
- file = path.basename(file.join("/")).split("/")
- }
+ this.debug("matchOne",
+ { "this": this
+ , file: file
+ , pattern: pattern })
- if (options.debug) {
- console.error("matchOne", file.length, pattern.length)
- }
+ this.debug("matchOne", file.length, pattern.length)
for ( var fi = 0
, pi = 0
; (fi < fl) && (pi < pl)
; fi ++, pi ++ ) {
- if (options.debug) {
- console.error("matchOne loop")
- }
+ this.debug("matchOne loop")
var p = pattern[pi]
, f = file[fi]
- if (options.debug) {
- console.error(pattern, p, f)
- }
+ this.debug(pattern, p, f)
// should be impossible.
// some invalid regexp stuff in the set.
if (p === false) return false
if (p === GLOBSTAR) {
- if (options.debug)
- console.error('GLOBSTAR', [pattern, p, f])
+ this.debug('GLOBSTAR', [pattern, p, f])
// "**"
// a/**/b/**/c would match the following:
var fr = fi
, pr = pi + 1
if (pr === pl) {
- if (options.debug)
- console.error('** at the end')
+ this.debug('** at the end')
// a ** at the end will just swallow the rest.
// We have found a match.
// however, it will not swallow /.x, unless
WHILE: while (fr < fl) {
var swallowee = file[fr]
- if (options.debug) {
- console.error('\nglobstar while',
- file, fr, pattern, pr, swallowee)
- }
+ this.debug('\nglobstar while',
+ file, fr, pattern, pr, swallowee)
// XXX remove this slice. Just pass the start index.
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- if (options.debug)
- console.error('globstar found match!', fr, fl, swallowee)
+ this.debug('globstar found match!', fr, fl, swallowee)
// found a match.
return true
} else {
// can only swallow ".foo" when explicitly asked.
if (swallowee === "." || swallowee === ".." ||
(!options.dot && swallowee.charAt(0) === ".")) {
- if (options.debug)
- console.error("dot detected!", file, fr, pattern, pr)
+ this.debug("dot detected!", file, fr, pattern, pr)
break WHILE
}
// ** swallows a segment, and continue.
- if (options.debug)
- console.error('globstar swallow a segment, and continue')
+ this.debug('globstar swallow a segment, and continue')
fr ++
}
}
// If there's more *pattern* left, then
if (partial) {
// ran out of file
- // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
if (fr === fl) return true
}
return false
} else {
hit = f === p
}
- if (options.debug) {
- console.error("string match", p, f, hit)
- }
+ this.debug("string match", p, f, hit)
} else {
hit = f.match(p)
- if (options.debug) {
- console.error("pattern match", p, f, hit)
- }
+ this.debug("pattern match", p, f, hit)
}
if (!hit) return false
"bugs": {
"url": "https://github.com/isaacs/sigmund/issues"
},
+ "homepage": "https://github.com/isaacs/sigmund",
"_id": "sigmund@1.0.0",
- "dist": {
- "shasum": "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296"
- },
- "_from": "sigmund@~1.0.0",
- "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
+ "_from": "sigmund@~1.0.0"
}
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "0.2.12",
+ "version": "0.2.14",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
},
"main": "minimatch.js",
"scripts": {
- "test": "tap test"
+ "test": "tap test/*.js"
},
"engines": {
"node": "*"
"type": "MIT",
"url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
},
- "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",
+ "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!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\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## 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\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.\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",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/minimatch/issues"
},
- "_id": "minimatch@0.2.12",
+ "homepage": "https://github.com/isaacs/minimatch",
+ "_id": "minimatch@0.2.14",
"_from": "minimatch@latest"
}
--- /dev/null
+var test = require('tap').test
+var minimatch = require('../')
+
+test('extglob ending with statechar', function(t) {
+ t.notOk(minimatch('ax', 'a?(b*)'))
+ t.ok(minimatch('ax', '?(a*|b)'))
+ t.end()
+})
* `tag` {String} The default tag to use when publishing new packages.
Default = `"latest"`
* `ca` {String} Cerficate signing authority certificates to trust.
+* `cert` {String} Client certificate (PEM encoded). Enable access
+ to servers that require client certificates
+* `key` {String} Private key (PEM encoded) for client certificate 'cert'
* `strict-ssl` {Boolean} Whether or not to be strict with SSL
certificates. Default = `true`
* `user-agent` {String} User agent header to send. Default =
Add a user account to the registry, or verify the credentials.
+# client.deprecate(name, version, message, cb)
+
+* `name` {String} The package name
+* `version` {String} Semver version range
+* `message` {String} The message to use as a deprecation warning
+* `cb` {Function}
+
+Deprecate a version of a package in the registry.
+
+# client.bugs(name, cb)
+
+* `name` {String} the name of the package
+* `cb` {Function}
+
+Get the url for bugs of a package
+
# client.get(url, [timeout], [nofollow], [staleOk], cb)
* `url` {String} The url path to fetch
-
// utilities for working with the js-registry site.
module.exports = RegClient
this.couchLogin.proxy = this.conf.get('proxy')
this.couchLogin.strictSSL = this.conf.get('strict-ssl')
this.couchLogin.ca = this.conf.get('ca')
+ this.couchLogin.cert = this.conf.get('cert')
+ this.couchLogin.key = this.conf.get('key')
}
this.log = conf.log || conf.get('log') || npmlog
return cb(er, data, json, response)
}
Object.keys(data).forEach(function (k) {
- if (!userobj[k]) {
+ if (!userobj[k] || k === 'roles') {
userobj[k] = data[k]
}
})
--- /dev/null
+
+module.exports = bugs
+
+function bugs (name, cb) {
+ this.get(name + "/latest", 3600, function (er, d) {
+ if (er) return cb(er)
+ cb(null, d.bugs)
+ })
+}
--- /dev/null
+
+module.exports = deprecate
+
+var semver = require("semver")
+
+function deprecate (name, ver, message, cb) {
+ if (!this.conf.get('username')) {
+ return cb(new Error("Must be logged in to deprecate a package"))
+ }
+
+ if (semver.validRange(ver) === null) {
+ return cb(new Error("invalid version range: "+ver))
+ }
+
+ var users = {}
+
+ this.get(name, function (er, data) {
+ if (er) return cb(er)
+ // filter all the versions that match
+ Object.keys(data.versions).filter(function (v) {
+ return semver.satisfies(v, ver)
+ }).forEach(function (v) {
+ data.versions[v].deprecated = message
+ })
+ // now update the doc on the registry
+ this.request('PUT', data._id, data, cb)
+ }.bind(this))
+}
var path = require("path")
, url = require("url")
+ , semver = require("semver")
+ , crypto = require("crypto")
+ , fs = require("fs")
function publish (data, tarball, cb) {
-
var email = this.conf.get('email')
var auth = this.conf.get('_auth')
var username = this.conf.get('username')
return cb(er)
}
- // add the dist-url to the data, pointing at the tarball.
- // if the {name} isn't there, then create it.
- // if the {version} is already there, then fail.
- // then:
- // PUT the data to {config.registry}/{data.name}/{data.version}
- var registry = this.conf.get('registry')
+ if (data.name !== encodeURIComponent(data.name).toLowerCase())
+ return cb(new Error('invalid name: must be lowercase and url-safe'))
+
+ var ver = semver.clean(data.version)
+ if (!ver)
+ return cb(new Error('invalid semver: ' + data.version))
+ data.version = ver
+
+ var self = this
+ fs.stat(tarball, function(er, s) {
+ if (er) return cb(er)
+ fs.readFile(tarball, 'base64', function(er, tardata) {
+ if (er) return cb(er)
+ putFirst.call(self, data, tardata, s, username, email, cb)
+ })
+ })
+}
- var fullData =
+function putFirst (data, tardata, stat, username, email, cb) {
+ // optimistically try to PUT all in one single atomic thing.
+ // If 409, then GET and merge, try again.
+ // If other error, then fail.
+
+ var root =
{ _id : data.name
, name : data.name
, description : data.description
]
}
+ root.versions[ data.version ] = data
+ var tag = data.tag || this.conf.get('tag') || "latest"
+ root["dist-tags"][tag] = data.version
+
+ var registry = this.conf.get('registry')
var tbName = data.name + "-" + data.version + ".tgz"
, tbURI = data.name + "/-/" + tbName
data._id = data.name+"@"+data.version
data.dist = data.dist || {}
+ data.dist.shasum = crypto.createHash("sha1").update(tardata).digest("hex")
data.dist.tarball = url.resolve(registry, tbURI)
.replace(/^https:\/\//, "http://")
-
- // first try to just PUT the whole fullData, and this will fail if it's
- // already there, because it'll be lacking a _rev, so couch'll bounce it.
- this.request("PUT", encodeURIComponent(data.name), fullData,
- function (er, parsed, json, response) {
- // get the rev and then upload the attachment
- // a 409 is expected here, if this is a new version of an existing package.
- if (er
- && !(response && response.statusCode === 409)
- && !( parsed
- && parsed.reason ===
- "must supply latest _rev to update existing package" )) {
- this.log.error("publish", "Failed PUT response "
- +(response && response.statusCode))
+ root._attachments = {}
+ root._attachments[ tbName ] = {
+ content_type: 'application/octet-stream',
+ data: tardata,
+ length: stat.size
+ };
+
+ this.request("PUT", data.name, root, function (er, parsed, json, res) {
+ var r409 = "must supply latest _rev to update existing package"
+ var r409b = "Document update conflict."
+ var conflict = res && res.statusCode === 409
+ if (parsed && (parsed.reason === r409 || parsed.reason === r409b))
+ conflict = true
+
+ // a 409 is typical here. GET the data and merge in.
+ if (er && !conflict) {
+ this.log.error("publish", "Failed PUT "
+ +(res && res.statusCode))
return cb(er)
}
- var dataURI = encodeURIComponent(data.name)
- + "/" + encodeURIComponent(data.version)
- var tag = data.tag || this.conf.get('tag') || "latest"
- dataURI += "/-tag/" + tag
+ if (!er && !conflict)
+ return cb(er, parsed, json, res)
// let's see what versions are already published.
- // could be that we just need to update the bin dist values.
- this.request("GET", data.name, function (er, fullData) {
- if (er) return cb(er)
-
- function handle(er) {
- if (er.message.indexOf("conflict Document update conflict.") === 0) {
- return cb(conflictError.call(this, data._id));
- }
- this.log.error("publish", "Error uploading package");
+ this.request("GET", data.name, function (er, current) {
+ if (er)
return cb(er)
- }
-
- var exists = fullData.versions && fullData.versions[data.version]
- if (exists) return cb(conflictError.call(this, data._id))
-
- var rev = fullData._rev;
- attach.call(this, data.name, tarball, tbName, rev, function (er) {
- if (er) return handle.call(this, er)
- this.log.verbose("publish", "attached", [data.name, tarball, tbName])
- this.request("PUT", dataURI, data, function (er) {
- if (er) return handle.call(this, er)
- return cb(er)
- }.bind(this))
- }.bind(this))
+ putNext.call(this, data.version, root, current, cb)
}.bind(this))
- }.bind(this)) // pining for fat arrows.
+ }.bind(this))
+}
+
+function putNext(newVersion, root, current, cb) {
+ // already have the tardata on the root object
+ // just merge in existing stuff
+ // if the version already exists, and not a --force, then raise error
+ var force = this.conf.get('force')
+ var curVers = Object.keys(current.versions || {}).map(function (v) {
+ return semver.clean(v, true)
+ })
+
+ if (!force && curVers.indexOf(newVersion) !== -1) {
+ return cb(conflictError(root.name))
+ }
+
+ current.versions[newVersion] = root.versions[newVersion]
+ for (var i in root) {
+ switch (i) {
+ // objects that copy over the new stuffs
+ case 'dist-tags':
+ case 'versions':
+ case '_attachments':
+ for (var j in root[i])
+ current[i][j] = root[i][j]
+ break
+
+ // ignore these
+ case 'maintainers':
+ break;
+
+ // copy
+ default:
+ current[i] = root[i]
+ }
+ }
+
+ this.request("PUT", root.name, current, cb)
}
function conflictError (pkgid) {
- var e = new Error("publish fail")
+ var e = new Error("cannot modify existing version")
e.code = "EPUBLISHCONFLICT"
e.pkgid = pkgid
return e
}
-
-function attach (doc, file, filename, rev, cb) {
- doc = encodeURIComponent(doc)
- var revu = "-rev/"+rev
- , attURI = doc + "/-/" + encodeURIComponent(filename) + "/" + revu
- this.log.verbose("uploading", [attURI, file])
- this.upload(attURI, file, cb)
-}
var opts = { url: remote
, method: method
, ca: this.conf.get('ca')
+ , localAddress: this.conf.get('local-address')
+ , cert: this.conf.get('cert')
+ , key: this.conf.get('key')
, strictSSL: strict }
, headers = opts.headers = {}
if (etag) {
},
"homepage": "https://github.com/isaacs/couch-login",
"_id": "couch-login@0.1.19",
- "dist": {
- "shasum": "5c472f64670dfb43fc381d290629b223edb64afa"
- },
- "_from": "couch-login@~0.1.18",
- "_resolved": "https://registry.npmjs.org/couch-login/-/couch-login-0.1.19.tgz"
+ "_from": "couch-login@~0.1.18"
}
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "0.2.30",
+ "version": "0.3.0",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
"npmlog": ""
},
"license": "BSD",
- "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version} {process.platform} {process.arch}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.stars(username, cb)\n\n* `username` {String} Name of user to fetch starred packages for.\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n",
+ "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `cert` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates\n* `key` {String} Private key (PEM encoded) for client certificate 'cert'\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version} {process.platform} {process.arch}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.deprecate(name, version, message, cb)\n\n* `name` {String} The package name\n* `version` {String} Semver version range\n* `message` {String} The message to use as a deprecation warning\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n# client.bugs(name, cb)\n\n* `name` {String} the name of the package\n* `cb` {Function}\n\nGet the url for bugs of a package\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.stars(username, cb)\n\n* `username` {String} Name of user to fetch starred packages for.\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/npm-registry-client/issues"
},
"homepage": "https://github.com/isaacs/npm-registry-client",
- "_id": "npm-registry-client@0.2.30",
+ "_id": "npm-registry-client@0.3.0",
"_from": "npm-registry-client@latest"
}
, mu = req.method + ' ' + req.url
var k = server._expect[mu] ? mu : server._expect[u] ? u : null
- if (!k) throw Error('unexpected request', req.method, req.url)
+ if (!k) throw Error('unexpected request: ' + req.method + ' ' + req.url)
var fn = server._expect[k].shift()
- if (!fn) throw Error('unexpected request', req.method, req.url)
+ if (!fn) throw Error('unexpected request' + req.method + ' ' + req.url)
var remain = (Object.keys(server._expect).reduce(function (s, k) {
--- /dev/null
+var tap = require('tap')
+var server = require('./fixtures/server.js')
+var RC = require('../')
+var client = new RC(
+ { cache: __dirname + '/fixtures/cache'
+ , registry: 'http://localhost:' + server.port
+ , username: "username"
+ , password: "password"
+ , email: "i@izs.me"
+ , _auth: new Buffer("username:password").toString('base64')
+ , "always-auth": true
+ })
+
+var fs = require("fs")
+
+tap.test("publish again", function (t) {
+ var lastTime = null
+ server.expect("/npm-registry-client", function (req, res) {
+ t.equal(req.method, "PUT")
+ var b = ""
+ req.setEncoding('utf8')
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ var o = lastTime = JSON.parse(b)
+ t.equal(o._id, "npm-registry-client")
+ t.equal(o["dist-tags"].latest, pkg.version)
+ t.has(o.versions[pkg.version], pkg)
+ t.same(o.maintainers, [ { name: 'username', email: 'i@izs.me' } ])
+ var att = o._attachments[ pkg.name + '-' + pkg.version + '.tgz' ]
+ t.same(att.data, pd)
+ res.statusCode = 409
+ res.json({reason: "must supply latest _rev to update existing package"})
+ })
+ })
+
+ server.expect("/npm-registry-client", function (req, res) {
+ t.equal(req.method, "GET")
+ t.ok(lastTime)
+ for (var i in lastTime.versions) {
+ var v = lastTime.versions[i]
+ delete lastTime.versions[i]
+ lastTime.versions["0.0.2"] = v
+ lastTime["dist-tags"] = { latest: "0.0.2" }
+ }
+ lastTime._rev = "asdf"
+ res.json(lastTime)
+ })
+
+ server.expect("/npm-registry-client", function (req, res) {
+ t.equal(req.method, "PUT")
+ t.ok(lastTime)
+
+ var b = ""
+ req.setEncoding('utf8')
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function() {
+ var o = JSON.parse(b)
+ t.equal(o._rev, "asdf")
+ t.deepEqual(o.versions["0.0.2"], o.versions[pkg.version])
+ res.statusCode = 201
+ res.json({created: true})
+ })
+ })
+
+
+ // not really a tarball, but doesn't matter
+ var tarball = require.resolve('../package.json')
+ var pd = fs.readFileSync(tarball, 'base64')
+ var pkg = require('../package.json')
+ client.publish(pkg, tarball, function (er, data, raw, res) {
+ if (er) throw er
+ t.deepEqual(data, { created: true })
+ t.end()
+ })
+})
--- /dev/null
+var tap = require('tap')
+var server = require('./fixtures/server.js')
+var RC = require('../')
+var client = new RC(
+ { cache: __dirname + '/fixtures/cache'
+ , registry: 'http://localhost:' + server.port
+ , username: "username"
+ , password: "password"
+ , email: "i@izs.me"
+ , _auth: new Buffer("username:password").toString('base64')
+ , "always-auth": true
+ })
+
+var fs = require("fs")
+
+tap.test("publish", function (t) {
+ server.expect("/npm-registry-client", function (req, res) {
+ t.equal(req.method, "PUT")
+ var b = ""
+ req.setEncoding('utf8')
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ var o = JSON.parse(b)
+ console.error('PUT req', o)
+ t.equal(o._id, "npm-registry-client")
+ t.equal(o["dist-tags"].latest, pkg.version)
+ t.has(o.versions[pkg.version], pkg)
+ t.same(o.maintainers, [ { name: 'username', email: 'i@izs.me' } ])
+ var att = o._attachments[ pkg.name + '-' + pkg.version + '.tgz' ]
+ t.same(att.data, pd)
+ res.statusCode = 201
+ res.json({created:true})
+ })
+ })
+
+ // not really a tarball, but doesn't matter
+ var tarball = require.resolve('../package.json')
+ var pd = fs.readFileSync(tarball, 'base64')
+ var pkg = require('../package.json')
+ client.publish(pkg, tarball, function (er, data, raw, res) {
+ if (er) throw er
+ t.deepEqual(data, { created: true })
+ t.end()
+ })
+})
, "cache-max": Infinity
, "cache-min": 10
+ , cert: null
+
, color : true
- , coverage: false
, depth: Infinity
, description : true
, dev : false
, editor : osenv.editor()
+ , email: null
, "engine-strict": false
, force : false
, global : false
, globalconfig : path.resolve(globalPrefix, "etc", "npmrc")
- , globalignorefile : path.resolve( globalPrefix, "etc", "npmignore")
, group : process.platform === "win32" ? 0
: process.env.SUDO_GID || (process.getgid && process.getgid())
, heading: "npm"
- , ignore: ""
+ , "ignore-scripts": false
, "init-module": path.resolve(home, '.npm-init.js')
- , "init.version" : "0.0.0"
, "init.author.name" : ""
, "init.author.email" : ""
, "init.author.url" : ""
+ , "init.license": "ISC"
, json: false
+ , key: null
, link: false
, "local-address" : undefined
, loglevel : "http"
, long : false
, message : "%s"
, "node-version" : process.version
- , npaturl : "http://npat.npmjs.org/"
, npat : false
, "onload-script" : false
, optional: true
, parseable : false
- , pre: false
, prefix : globalPrefix
, production: process.env.NODE_ENV === "production"
, "proprietary-attribs": true
, user : process.platform === "win32" ? 0 : "nobody"
, username : ""
, userconfig : path.resolve(home, ".npmrc")
- , userignorefile : path.resolve(home, ".npmignore")
, umask: 022
, version : false
, versions : false
, viewer: process.platform === "win32" ? "browser" : "man"
- , yes: null
, _exit : true
}
, "cache-lock-wait": Number
, "cache-max": Number
, "cache-min": Number
+ , cert: [null, String]
, color : ["always", Boolean]
- , coverage: Boolean
, depth : Number
, description : Boolean
, dev : Boolean
, editor : String
+ , email: [null, String]
, "engine-strict": Boolean
, force : Boolean
, "fetch-retries": Number
, "git-tag-version": Boolean
, global : Boolean
, globalconfig : path
- , globalignorefile: path
, group : [Number, String]
, "https-proxy" : [null, url]
, "user-agent" : String
, "heading": String
- , ignore : String
+ , "ignore-scripts": Boolean
, "init-module": path
- , "init.version" : [null, semver]
, "init.author.name" : String
, "init.author.email" : String
, "init.author.url" : ["", url]
+ , "init.license": String
, json: Boolean
+ , key: [null, String]
, link: Boolean
// local-address must be listed as an IP for a local network interface
// must be IPv4 due to node bug
, long : Boolean
, message: String
, "node-version" : [null, semver]
- , npaturl : url
, npat : Boolean
, "onload-script" : [null, String]
, optional: Boolean
, parseable : Boolean
- , pre: Boolean
, prefix: path
, production: Boolean
, "proprietary-attribs": Boolean
, user : [Number, String]
, username : String
, userconfig : path
- , userignorefile : path
, umask: Octal
, version : Boolean
, versions : Boolean
, viewer: String
- , yes: [false, null, Boolean]
, _exit : Boolean
, _password: String
}
},
"homepage": "https://github.com/isaacs/proto-list",
"_id": "proto-list@1.2.2",
- "dist": {
- "shasum": "48b88798261ec2c4a785720cdfec6200d57d3326"
- },
- "_from": "proto-list@~1.2.1",
- "_resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.2.tgz"
+ "_from": "proto-list@~1.2.1"
}
"url": "https://github.com/dominictarr/config-chain/issues"
},
"_id": "config-chain@1.1.8",
- "dist": {
- "shasum": "a3b9ae699dedb3a7837615001f3cf646ca37c77a"
- },
- "_from": "config-chain@~1.1.8",
- "_resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.8.tgz"
+ "_from": "config-chain@~1.1.8"
}
{
"name": "npmconf",
- "version": "0.1.7",
+ "version": "0.1.9",
"description": "The config thing npm uses",
"main": "npmconf.js",
"directories": {
"url": "https://github.com/isaacs/npmconf/issues"
},
"homepage": "https://github.com/isaacs/npmconf",
- "_id": "npmconf@0.1.7",
- "dist": {
- "shasum": "f0be6f90c672046b562175b6d99c2d152bd9f17c"
- },
- "_from": "npmconf@0.1.7",
- "_resolved": "https://registry.npmjs.org/npmconf/-/npmconf-0.1.7.tgz"
+ "_id": "npmconf@0.1.9",
+ "_from": "npmconf@~0.1.7"
}
--- /dev/null
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2013 Domenic Denicola <domenic@domenicdenicola.com>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
--- /dev/null
+# Is This Path Inside This Other Path?
+
+It turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.
+
+The **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.
+
+## Usage
+
+Pretty simple. First the path being tested; then the potential parent. Like so:
+
+```js
+var pathIsInside = require("path-is-inside");
+
+pathIsInside("/x/y/z", "/x/y") // true
+pathIsInside("/x/y", "/x/y/z") // false
+```
+
+## OS-Specific Behavior
+
+Like Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.
+
+In practice, this means:
+
+```js
+// On Windows
+
+pathIsInside("C:\\X\\Y\\Z", "C:\\x\\y") // true
+
+// On *-nix, including Mac OS X
+
+pathIsInside("/X/Y/Z", "/x/y") // false
+```
+
+[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214
+[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313
--- /dev/null
+"use strict";
+
+var path = require("path");
+
+module.exports = function (thePath, potentialParent) {
+ // For inside-directory checking, we want to allow trailing slashes, so normalize.
+ thePath = stripTrailingSep(thePath);
+ potentialParent = stripTrailingSep(potentialParent);
+
+ // Node treats only Windows as case-insensitive in its path module; we follow those conventions.
+ if (process.platform === "win32") {
+ thePath = thePath.toLowerCase();
+ potentialParent = potentialParent.toLowerCase();
+ }
+
+ return thePath.indexOf(potentialParent) === 0;
+};
+
+function stripTrailingSep(thePath) {
+ if (thePath[thePath.length - 1] === path.sep) {
+ return thePath.slice(0, -1);
+ }
+ return thePath;
+}
--- /dev/null
+{
+ "name": "path-is-inside",
+ "description": "Tests whether one path is inside another path",
+ "keywords": [
+ "path",
+ "directory",
+ "folder",
+ "inside",
+ "relative"
+ ],
+ "version": "1.0.0",
+ "author": {
+ "name": "Domenic Denicola",
+ "email": "domenic@domenicdenicola.com",
+ "url": "http://domenic.me"
+ },
+ "license": "WTFPL",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/domenic/path-is-inside.git"
+ },
+ "bugs": {
+ "url": "http://github.com/domenic/path-is-inside/issues"
+ },
+ "main": "lib/path-is-inside.js",
+ "scripts": {
+ "test": "mocha",
+ "lint": "jshint lib"
+ },
+ "devDependencies": {
+ "jshint": "~2.3.0",
+ "mocha": "~1.15.1"
+ },
+ "readme": "# Is This Path Inside This Other Path?\n\nIt turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.\n\nThe **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.\n\n## Usage\n\nPretty simple. First the path being tested; then the potential parent. Like so:\n\n```js\nvar pathIsInside = require(\"path-is-inside\");\n\npathIsInside(\"/x/y/z\", \"/x/y\") // true\npathIsInside(\"/x/y\", \"/x/y/z\") // false\n```\n\n## OS-Specific Behavior\n\nLike Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.\n\nIn practice, this means:\n\n```js\n// On Windows\n\npathIsInside(\"C:\\\\X\\\\Y\\\\Z\", \"C:\\\\x\\\\y\") // true\n\n// On *-nix, including Mac OS X\n\npathIsInside(\"/X/Y/Z\", \"/x/y\") // false\n```\n\n[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214\n[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313\n",
+ "readmeFilename": "README.md",
+ "homepage": "https://github.com/domenic/path-is-inside",
+ "_id": "path-is-inside@1.0.0",
+ "_from": "path-is-inside@"
+}
// limitations under the License.
var optional = require('./lib/optional')
- , Cookie = optional('tough-cookie')
- , CookieJar = Cookie && Cookie.CookieJar
+ , cookie = optional('tough-cookie')
+ , Cookie = cookie && cookie.Cookie
+ , CookieJar = cookie && cookie.CookieJar
, cookieJar = CookieJar && new CookieJar
, copy = require('./lib/copy')
request.forever = function (agentOptions, optionsArg) {
var options = {}
if (optionsArg) {
- for (option in optionsArg) {
+ for (var option in optionsArg) {
options[option] = optionsArg[option]
}
}
},
"homepage": "https://github.com/mikeal/aws-sign",
"_id": "aws-sign2@0.5.0",
- "dist": {
- "shasum": "1385e609eb089432897b2fb794c40373c78d501f"
- },
- "_from": "aws-sign2@~0.5.0",
- "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
+ "_from": "aws-sign2@~0.5.0"
}
},
"homepage": "https://github.com/mikeal/forever-agent",
"_id": "forever-agent@0.5.0",
- "dist": {
- "shasum": "ad4cf81ff45de88f2bfacf2592b212a87207d346"
- },
- "_from": "forever-agent@~0.5.0",
- "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.0.tgz"
+ "_from": "forever-agent@~0.5.0"
}
"url": "https://github.com/felixge/node-delayed-stream/issues"
},
"_id": "delayed-stream@0.0.5",
- "dist": {
- "shasum": "052618e1471edc6f9affd1d89c0b0503c716f5a4"
- },
- "_from": "delayed-stream@0.0.5",
- "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
+ "_from": "delayed-stream@0.0.5"
}
"url": "https://github.com/felixge/node-combined-stream/issues"
},
"_id": "combined-stream@0.0.4",
- "dist": {
- "shasum": "818920f2e68d41ae5fac5f154dfbed98b675d34f"
- },
- "_from": "combined-stream@~0.0.4",
- "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz"
+ "_from": "combined-stream@~0.0.4"
}
},
"homepage": "https://github.com/felixge/node-form-data",
"_id": "form-data@0.1.2",
- "dist": {
- "shasum": "d02737d14dca53f214486c7da5d42c2aaabf0999"
- },
- "_from": "form-data@~0.1.0",
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz"
+ "_from": "form-data@~0.1.0"
}
},
"homepage": "https://github.com/spumko/boom",
"_id": "boom@0.4.2",
- "dist": {
- "shasum": "f0f4575f078f5fe7a3587dd9f999b6fedd482f4c"
- },
- "_from": "boom@0.4.x",
- "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
+ "_from": "boom@0.4.x"
}
},
"homepage": "https://github.com/hueniverse/cryptiles",
"_id": "cryptiles@0.2.2",
- "dist": {
- "shasum": "f063b421b587cb91b0738de6db92e02b9fc30923"
- },
- "_from": "cryptiles@0.2.x",
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
+ "_from": "cryptiles@0.2.x"
}
},
"homepage": "https://github.com/spumko/hoek",
"_id": "hoek@0.9.1",
- "dist": {
- "shasum": "396f2118033eabc93ae5c2cd6ca75f0a89c03592"
- },
- "_from": "hoek@0.9.x",
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
+ "_from": "hoek@0.9.x"
}
},
"homepage": "https://github.com/hueniverse/sntp",
"_id": "sntp@0.2.4",
- "dist": {
- "shasum": "80612680552b9c47a4ba312d125f366be68ad8f7"
- },
- "_from": "sntp@0.2.x",
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
+ "_from": "sntp@0.2.x"
}
},
"homepage": "https://github.com/hueniverse/hawk",
"_id": "hawk@1.0.0",
- "dist": {
- "shasum": "9de06d5c482e1ef66c4873baf34db19863b1a662"
- },
- "_from": "hawk@~1.0.0",
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz"
+ "_from": "hawk@~1.0.0"
}
},
"homepage": "https://github.com/mcavage/node-asn1",
"_id": "asn1@0.1.11",
- "dist": {
- "shasum": "115275c87b008d39f95650515e8aa3b95b536106"
- },
- "_from": "asn1@0.1.11",
- "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
+ "_from": "asn1@0.1.11"
}
"readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n",
"readmeFilename": "README.md",
"_id": "assert-plus@0.1.2",
- "dist": {
- "shasum": "d4ec5ba2df390500ec8a9867e7e29a742901041c"
- },
- "_from": "assert-plus@0.1.2",
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
+ "_from": "assert-plus@0.1.2"
}
"readme": "Node-CType is a way to read and write binary data in structured and easy to use\nformat. Its name comes from the C header file.\n\nTo get started, simply clone the repository or use npm to install it. Once it is\nthere, simply require it.\n\ngit clone git://github.com/rmustacc/node-ctype\nnpm install ctype\nvar mod_ctype = require('ctype')\n\n\nThere are two APIs that you can use, depending on what abstraction you'd like.\nThe low level API let's you read and write individual integers and floats from\nbuffers. The higher level API let's you read and write structures of these. To\nillustrate this, let's looks look at how we would read and write a binary\nencoded x,y point.\n\nIn C we would define this structure as follows:\n\ntypedef struct point {\n\tuint16_t\tp_x;\n\tuint16_t\tp_y;\n} point_t;\n\nTo read a binary encoded point from a Buffer, we first need to create a CType\nparser (where we specify the endian and other options) and add the typedef.\n\nvar parser = new mod_ctype.Parser({ endian: 'big' });\nparser.typedef('point_t', [\n\t{ x: { type: 'uint16_t' } },\n\t{ y: { type: 'uint16_t' } }\n]);\n\nFrom here, given a buffer buf and an offset into it, we can read a point.\n\nvar out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);\nconsole.log(out);\n{ point: { x: 23, y: 42 } }\n\nAnother way to get the same information would be to use the low level methods.\nNote that these require you to manually deal with the offset. Here's how we'd\nget the same values of x and y from the buffer.\n\nvar x = mod_ctype.ruint16(buf, 'big', 0);\nvar y = mod_ctype.ruint16(buf, 'big', 2);\nconsole.log(x + ', ' + y);\n23, 42\n\nThe true power of this API comes from the ability to define and nest typedefs,\njust as you would in C. By default, the following types are defined by default.\nNote that they return a Number, unless indicated otherwise.\n\n * int8_t\n * int16_t\n * int32_t\n * int64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * uint8_t\n * uint16_t\n * uint32_t\n * uint64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * float\n * double\n * char (either returns a buffer with that character or a uint8_t)\n * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)\n\n\nctf2json integration:\n\nNode-CType supports consuming the output of ctf2json. Once you read in a JSON file,\nall you have to do to add all the definitions it contains is:\n\nvar data, parser;\ndata = JSON.parse(parsedJSONData);\nparser = mod_ctype.parseCTF(data, { endian: 'big' });\n\nFor more documentation, see the file README.old. Full documentation is in the\nprocess of being rewritten as a series of manual pages which will be available\nin the repository and online for viewing.\n\nTo read the ctio manual page simple run, from the root of the workspace:\n\nman -Mman -s 3ctype ctio\n",
"readmeFilename": "README",
"_id": "ctype@0.5.2",
- "dist": {
- "shasum": "47401bce9fafcc4de1e2db98fc3fd6f3b854045d"
- },
- "_from": "ctype@0.5.2",
- "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
+ "_from": "ctype@0.5.2"
}
},
"homepage": "https://github.com/isaacs/json-stringify-safe",
"_id": "json-stringify-safe@5.0.0",
- "dist": {
- "shasum": "4c1f228b5050837eba9d21f50c2e6e320624566e"
- },
- "_from": "json-stringify-safe@~5.0.0",
- "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
+ "_from": "json-stringify-safe@~5.0.0"
}
},
"homepage": "https://github.com/broofa/node-mime",
"_id": "mime@1.2.11",
- "dist": {
- "shasum": "70f951e3276bf9804c66f4ed27321773d71b999c"
- },
- "_from": "mime@~1.2.9",
- "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
+ "_from": "mime@~1.2.9"
}
},
"homepage": "https://github.com/broofa/node-uuid",
"_id": "node-uuid@1.4.1",
- "dist": {
- "shasum": "fc22efd9718e4b371d21ddb90bb3840994e5988a"
- },
- "_from": "node-uuid@~1.4.0",
- "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
+ "_from": "node-uuid@~1.4.0"
}
},
"homepage": "https://github.com/mikeal/oauth-sign",
"_id": "oauth-sign@0.3.0",
- "dist": {
- "shasum": "9afc35fe8d6d035c8373a615fc3a124a6402c9e9"
- },
- "_from": "oauth-sign@~0.3.0",
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
+ "_from": "oauth-sign@~0.3.0"
}
},
"homepage": "https://github.com/visionmedia/node-querystring",
"_id": "qs@0.6.6",
- "dist": {
- "shasum": "d088aac10df771c4602df0812f6ef1e93693f414"
- },
- "_from": "qs@~0.6.0",
- "_resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz"
+ "_from": "qs@~0.6.0"
}
},
"readme": "ERROR: No README data found!",
"_id": "punycode@1.2.3",
- "dist": {
- "shasum": "0af1f294b11513e272c304732a5c1571cfc6f811"
- },
- "_from": "punycode@>=0.2.0",
- "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz"
+ "_from": "punycode@>=0.2.0"
}
"readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n",
"readmeFilename": "README.md",
"_id": "tough-cookie@0.9.15",
- "dist": {
- "shasum": "c25ddc45f36a712a716b9c31af1c0dcc6b2b0091"
- },
- "_from": "tough-cookie@~0.9.15",
- "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz"
+ "_from": "tough-cookie@~0.9.15"
}
},
"homepage": "https://github.com/mikeal/tunnel-agent",
"_id": "tunnel-agent@0.3.0",
- "dist": {
- "shasum": "987d4436dc2264fb29afff470b9b8f3b19600db9"
- },
- "_from": "tunnel-agent@~0.3.0",
- "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz"
+ "_from": "tunnel-agent@~0.3.0"
}
"util",
"utility"
],
- "version": "2.29.0",
+ "version": "2.30.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
"readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from the `http.Client` option, not the `http.ClientRequest` object)\n2. An `http.ClientResponse` object\n3. The third is the `response` body (`String` or `Buffer`)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
"readmeFilename": "README.md",
"homepage": "https://github.com/mikeal/request",
- "_id": "request@2.29.0",
- "dist": {
- "shasum": "919f51c1eec29bfdaa3cadbfbc94e67c9a469e2f"
- },
- "_from": "request@2.29.0",
- "_resolved": "https://registry.npmjs.org/request/-/request-2.29.0.tgz"
+ "_id": "request@2.30.0",
+ "_from": "request@latest"
}
break
case 'Digest':
- // TODO: More complete implementation of RFC 2617. For reference:
+ // TODO: More complete implementation of RFC 2617.
+ // - check challenge.algorithm
+ // - support algorithm="MD5-sess"
+ // - handle challenge.domain
+ // - support qop="auth-int" only
+ // - handle Authentication-Info (not necessarily?)
+ // - check challenge.stale (not necessarily?)
+ // - increase nc (not necessarily?)
+ // For reference:
// http://tools.ietf.org/html/rfc2617#section-3
// https://github.com/bagder/curl/blob/master/lib/http_digest.c
- var matches = authHeader.match(/([a-z0-9_-]+)="([^"]+)"/gi)
var challenge = {}
-
- for (var i = 0; i < matches.length; i++) {
- var eqPos = matches[i].indexOf('=')
- var key = matches[i].substring(0, eqPos)
- var quotedValue = matches[i].substring(eqPos + 1)
- challenge[key] = quotedValue.substring(1, quotedValue.length - 1)
+ var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
+ for (;;) {
+ var match = re.exec(authHeader)
+ if (!match) break
+ challenge[match[1]] = match[2] || match[3];
}
var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
var ha2 = md5(self.method + ':' + self.uri.path)
- var cnonce = uuid().replace(/-/g, '')
- var digestResponse = md5(ha1 + ':' + challenge.nonce + ':1:' + cnonce + ':auth:' + ha2)
+ var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
+ var nc = qop && '00000001'
+ var cnonce = qop && uuid().replace(/-/g, '')
+ var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
var authValues = {
username: self._user,
realm: challenge.realm,
nonce: challenge.nonce,
uri: self.uri.path,
- qop: challenge.qop,
+ qop: qop,
response: digestResponse,
- nc: 1,
- cnonce: cnonce
+ nc: nc,
+ cnonce: cnonce,
+ algorithm: challenge.algorithm,
+ opaque: challenge.opaque
}
authHeader = []
for (var k in authValues) {
- authHeader.push(k + '="' + authValues[k] + '"')
+ if (!authValues[k]) {
+ //ignore
+ } else if (k === 'qop' || k === 'nc' || k === 'algorithm') {
+ authHeader.push(k + '=' + authValues[k])
+ } else {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
}
authHeader = 'Digest ' + authHeader.join(', ')
self.setHeader('authorization', authHeader)
{
- "version": "1.3.17",
+ "version": "1.3.19",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
"slide": "~1.1.5",
"abbrev": "~1.0.4",
"graceful-fs": "~2.0.0",
- "minimatch": "~0.2.12",
+ "minimatch": "~0.2.14",
"nopt": "~2.1.2",
"rimraf": "~2.2.5",
- "request": "~2.29.0",
+ "request": "~2.30.0",
"which": "1",
"tar": "~0.1.19",
"fstream": "~0.1.25",
"chownr": "0",
"npmlog": "0.0.6",
"ansi": "~0.2.1",
- "npm-registry-client": "~0.2.30",
+ "npm-registry-client": "~0.3.0",
"read-package-json": "~1.1.4",
"read-installed": "~0.2.2",
"glob": "~3.2.6",
"github-url-from-username-repo": "0.0.2",
"text-table": "~0.2.0",
"ansicolors": "~0.3.2",
- "ansistyles": "~0.1.3"
+ "ansistyles": "~0.1.3",
+ "path-is-inside": "~1.0.0"
},
"bundleDependencies": [
"semver",
"normalize-package-data",
"text-table",
"ansicolors",
- "ansistyles"
+ "ansistyles",
+ "path-is-inside"
],
"devDependencies": {
"ronn": "~0.3.6",
--- /dev/null
+// this is a weird meta test. It verifies that all the instances of
+// `npm.config.get(...)` are:
+// a) Simple strings, and not variables
+// b) Documented
+// c) Defined in the `npmconf` package.
+
+var test = require("tap").test
+var fs = require("fs")
+var path = require("path")
+var root = path.resolve(__dirname, "..", "..")
+var lib = path.resolve(root, "lib")
+var nm = path.resolve(root, "node_modules")
+var doc = path.resolve(root, "doc/misc/npm-config.md")
+var FILES = []
+var CONFS = {}
+var DOC = {}
+
+var exceptions = [
+ path.resolve(lib, "config.js"),
+ path.resolve(lib, "utils", "lifecycle.js")
+]
+
+test("get files", function (t) {
+ walk(nm)
+ walk(lib)
+ t.pass("got files")
+ t.end()
+
+ function walk(lib) {
+ var files = fs.readdirSync(lib).map(function (f) {
+ return path.resolve(lib, f)
+ })
+ files.forEach(function (f) {
+ if (fs.statSync(f).isDirectory())
+ walk(f)
+ else if (f.match(/\.js$/))
+ FILES.push(f)
+ })
+ }
+})
+
+test("get lines", function (t) {
+ FILES.forEach(function (f) {
+ console.error(f)
+ var lines = fs.readFileSync(f, 'utf8').split('\n')
+ lines.forEach(function (l, i) {
+ var matches = l.split(/conf(?:ig)?\.get\(/g)
+ matches.shift()
+ matches.forEach(function (m) {
+ m = m.split(')').shift()
+ var literal = m.match(/^['"].+['"]$/)
+ if (literal) {
+ m = m.slice(1, -1)
+ if (!m.match(/^\_/) && m !== 'argv')
+ CONFS[m] = {
+ file: f,
+ line: i
+ }
+ } else if (exceptions.indexOf(f) === -1) {
+ t.fail("non-string-literal config used in " + f + ":" + i)
+ }
+ })
+ })
+ })
+ t.pass("got lines")
+ t.end()
+})
+
+test("get docs", function (t) {
+ var d = fs.readFileSync(doc, "utf8").split("\n")
+ // walk down until the "## Config Settings" section
+ for (var i = 0; i < d.length && d[i] !== "## Config Settings"; i++);
+ i++
+ // now gather up all the ^###\s lines until the next ^##\s
+ var doclines = []
+ for (; i < d.length && !d[i].match(/^## /); i++) {
+ if (d[i].match(/^### /))
+ DOC[ d[i].replace(/^### /, '').trim() ] = true
+ }
+ t.pass("read the docs")
+ console.error(DOC)
+ t.end()
+})
+
+test("check configs", function (t) {
+ var defs = require("npmconf/config-defs.js")
+ var types = Object.keys(defs.types)
+ var defaults = Object.keys(defs.defaults)
+
+ for (var c in CONFS) {
+ if (CONFS[c].file.indexOf(lib) === 0) {
+ t.ok(DOC[c], "should be documented " + c + " "
+ + CONFS[c].file + ":" + CONFS[c].line)
+ t.ok(types.indexOf(c) !== -1, "should be defined in npmconf " + c)
+ t.ok(defaults.indexOf(c) !== -1, "should have default in npmconf " + c)
+ }
+ }
+
+ for (var c in DOC) {
+ if (c !== "versions" && c !== "version") {
+ t.ok(CONFS[c], "config in doc should be used somewhere " + c)
+ t.ok(types.indexOf(c) !== -1, "should be defined in npmconf " + c)
+ t.ok(defaults.indexOf(c) !== -1, "should have default in npmconf " + c)
+ }
+ }
+
+ types.forEach(function(c) {
+ if (!c.match(/^\_/) && c !== 'argv' && !c.match(/^versions?$/)) {
+ t.ok(DOC[c], 'defined type should be documented ' + c)
+ t.ok(CONFS[c], 'defined type should be used ' + c)
+ }
+ })
+
+ defaults.forEach(function(c) {
+ if (!c.match(/^\_/) && c !== 'argv' && !c.match(/^versions?$/)) {
+ t.ok(DOC[c], 'defaulted type should be documented ' + c)
+ t.ok(CONFS[c], 'defaulted type should be used ' + c)
+ }
+ })
+
+ t.end()
+})
--- /dev/null
+var test = require("tap").test
+var npm = require.resolve("../../bin/npm-cli.js")
+
+var spawn = require("child_process").spawn
+var node = process.execPath
+
+// ignore-scripts/package.json has scripts that always exit with non-zero error
+// codes. The "install" script is omitted so that npm tries to run node-gyp,
+// which should also fail.
+var pkg = __dirname + "/ignore-scripts"
+
+test("ignore-scripts: install using the option", function(t) {
+ createChild([npm, "install", "--ignore-scripts"]).on("close", function(code) {
+ t.equal(code, 0)
+ t.end()
+ })
+})
+
+test("ignore-scripts: install NOT using the option", function(t) {
+ createChild([npm, "install"]).on("close", function(code) {
+ t.notEqual(code, 0)
+ t.end()
+ })
+})
+
+var scripts = [
+ "prepublish", "publish", "postpublish",
+ "preinstall", "install", "postinstall",
+ "preuninstall", "uninstall", "postuninstall",
+ "preupdate", "update", "postupdate",
+ "pretest", "test", "posttest",
+ "prestop", "stop", "poststop",
+ "prestart", "start", "poststart",
+ "prerestart", "restart", "postrestart"
+]
+
+scripts.forEach(function(script) {
+ test("ignore-scripts: run-script"+script+" using the option", function(t) {
+ createChild([npm, "--ignore-scripts", "run-script", script])
+ .on("close", function(code) {
+ t.equal(code, 0)
+ t.end()
+ })
+ })
+})
+
+scripts.forEach(function(script) {
+ test("ignore-scripts: run-script "+script+" NOT using the option", function(t) {
+ createChild([npm, "run-script", script]).on("close", function(code) {
+ t.notEqual(code, 0)
+ t.end()
+ })
+ })
+})
+
+function createChild (args) {
+ var env = {
+ HOME: process.env.HOME,
+ Path: process.env.PATH,
+ PATH: process.env.PATH
+ }
+
+ if (process.platform === "win32")
+ env.npm_config_cache = "%APPDATA%\\npm-cache"
+
+ return spawn(node, args, {
+ cwd: pkg,
+ stdio: "inherit",
+ env: env
+ })
+}
--- /dev/null
+bad_binding_file
--- /dev/null
+{
+ "author": "Milton the Aussie",
+ "name": "ignore-scripts",
+ "version": "0.0.0",
+ "scripts": {
+ "prepublish": "exit 123",
+ "publish": "exit 123",
+ "postpublish": "exit 123",
+ "preinstall": "exit 123",
+ "postinstall": "exit 123",
+ "preuninstall": "exit 123",
+ "uninstall": "exit 123",
+ "postuninstall": "exit 123",
+ "preupdate": "exit 123",
+ "update": "exit 123",
+ "postupdate": "exit 123",
+ "pretest": "exit 123",
+ "test": "exit 123",
+ "posttest": "exit 123",
+ "prestop": "exit 123",
+ "stop": "exit 123",
+ "poststop": "exit 123",
+ "prestart": "exit 123",
+ "start": "exit 123",
+ "poststart": "exit 123",
+ "prerestart": "exit 123",
+ "restart": "exit 123",
+ "postrestart": "exit 123"
+ }
+}
var common = require('../common-tap')
+ , path = require('path')
, test = require('tap').test
, rimraf = require('rimraf')
, npm = require('../../')
, mr = require('npm-registry-mock')
- , pkg = __dirname + '/outdated-depth'
+ , pkg = path.resolve(__dirname, 'outdated-depth')
function cleanup () {
rimraf.sync(pkg + '/node_modules')
test("cleanup", function (t) {
cleanup()
t.end()
-})
\ No newline at end of file
+})
--- /dev/null
+var test = require("tap").test
+var rimraf = require("rimraf")
+
+var mr = require("npm-registry-mock")
+
+var spawn = require("child_process").spawn
+var npm = require.resolve("../../bin/npm-cli.js")
+var node = process.execPath
+var pkg = "./url-dependencies"
+
+var mockRoutes = {
+ "get": {
+ "/underscore/-/underscore-1.3.1.tgz": [200]
+ }
+}
+
+test("url-dependencies: download first time", function(t) {
+ rimraf.sync(__dirname + "/url-dependencies/node_modules")
+
+ performInstall(function(output){
+ if(!tarballWasFetched(output)){
+ t.fail("Tarball was not fetched")
+ }else{
+ t.pass("Tarball was fetched")
+ }
+ t.end()
+ })
+})
+
+test("url-dependencies: do not download subsequent times", function(t) {
+ rimraf.sync(__dirname + "/url-dependencies/node_modules")
+
+ performInstall(function(){
+ performInstall(function(output){
+ if(tarballWasFetched(output)){
+ t.fail("Tarball was fetched second time around")
+ }else{
+ t.pass("Tarball was not fetched")
+ }
+ t.end()
+ })
+ })
+})
+
+function tarballWasFetched(output){
+ return output.indexOf("http GET http://localhost:1337/underscore/-/underscore-1.3.1.tgz") > -1
+}
+
+function performInstall (cb) {
+ mr({port: 1337, mocks: mockRoutes}, function(s){
+ var output = ""
+ , child = spawn(node, [npm, "install"], {
+ cwd: pkg,
+ env: {
+ npm_config_registry: "http://localhost:1337",
+ npm_config_cache_lock_stale: 1000,
+ npm_config_cache_lock_wait: 1000,
+ HOME: process.env.HOME,
+ Path: process.env.PATH,
+ PATH: process.env.PATH
+ }
+ })
+
+ child.stderr.on("data", function(data){
+ output += data.toString()
+ })
+ child.on("close", function () {
+ s.close()
+ cb(output)
+ })
+ })
+}
--- /dev/null
+{
+ "author": "Steve Mason",
+ "name": "url-dependencies",
+ "version": "0.0.0",
+ "dependencies": {
+ "underscore": "http://localhost:1337/underscore/-/underscore-1.3.1.tgz"
+ }
+}
return _cb(null, Boolean(~out.indexOf(tag)))
})
}
-
+
var child = spawn(git, ['init'])
child.stdout.pipe(process.stdout)
child.on('exit', function() {
})
test('cleanup', function(t) {
+ // windows fix for locked files
+ process.chdir(osenv.tmpdir())
+
rimraf.sync(pkg)
t.end()
})
description: "Test for git-tag-version flag"
}), 'utf8')
process.chdir(pkg)
-}
\ No newline at end of file
+}