From: Timothy J Fontaine
Date: Tue, 4 Nov 2014 23:08:12 +0000 (-0800)
Subject: npm: Upgrade to v2.1.6
X-Git-Tag: v0.11.15~90
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28ae70ebad8debd8aa7b521a693aa3de89ad84d6;p=platform%2Fupstream%2Fnodejs.git
npm: Upgrade to v2.1.6
---
diff --git a/deps/npm/.eslintrc b/deps/npm/.eslintrc
new file mode 100644
index 0000000..ba33150
--- /dev/null
+++ b/deps/npm/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "env" : {
+ "node" : true
+ },
+ "rules" : {
+ "semi": [2, "never"],
+ "strict": 0,
+ "quotes": [1, "double", "avoid-escape"],
+ "no-use-before-define": 0,
+ "curly": 0,
+ "no-underscore-dangle": 0,
+ "no-lonely-if": 1,
+ "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
+ "no-mixed-requires": 0,
+ "space-infix-ops": 0
+ }
+}
diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore
index 7232cea..a128c9b 100644
--- a/deps/npm/.npmignore
+++ b/deps/npm/.npmignore
@@ -25,3 +25,5 @@ html/*.png
/npm-*.tgz
*.pyc
+
+/test/tap/builtin-config
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index a8afe8a..e67cd29 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,318 @@
+### v2.1.6 (2014-10-23):
+
+* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8)
+ [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc
+ ([@KenanY](https://github.com/KenanY))
+* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926)
+ [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in
+ a git directory without git ([@terinjokes](https://github.com/terinjokes))
+* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076)
+ [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`:
+ Properly pick up default values from environment variables.
+ ([@othiym23](https://github.com/othiym23))
+* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442)
+ perl 5.18.x doesn't like -pi without filenames
+ ([@othiym23](https://github.com/othiym23))
+* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977)
+ `request@2.46.0`: Tests and cleanup.
+ ([@othiym23](https://github.com/othiym23))
+* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7)
+ `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`,
+ `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`.
+ ([@jonathanong](https://github.com/jonathanong))
+
+### v2.1.5 (2014-10-16):
+
+* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204)
+ [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into
+ npm. ([@othiym23](https://github.com/othiym23))
+* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8)
+ [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies`
+ from top. ([@othiym23](https://github.com/othiym23))
+* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89)
+ [#6498](https://github.com/npm/npm/issues/6498) Better error messages on
+ malformed `.npmrc` properties. ([@nicks](https://github.com/nicks))
+* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e)
+ [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash'
+ with 'object' in documentation. ([@zeke](https://github.com/zeke))
+* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da)
+ [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths
+ should be used. ([@KenanY](https://github.com/KenanY))
+* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242)
+ [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked.
+ ([@othiym23](https://github.com/othiym23))
+
+OUTDATED DEPENDENCY CLEANUP JAMBOREE
+
+* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255)
+ `realize-package-specifier@1.2.0`: Handle names and rawSpecs more
+ consistently. ([@iarna](https://github.com/iarna))
+* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe)
+ `sha@1.3.0`: Change line endings?
+ ([@ForbesLindesay](https://github.com/ForbesLindesay))
+* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e)
+ `request@2.45.0`: Dependency updates, better proxy support, better compressed
+ response handling, lots of 'use strict'.
+ ([@mikeal](https://github.com/mikeal))
+* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65)
+ `opener@1.4.0`: Added gratuitous return.
+ ([@Domenic](https://github.com/Domenic))
+* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3)
+ `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership.
+ ([@tim-kos](https://github.com/tim-kos))
+* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39)
+ `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs))
+* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f)
+ `npm-user-validate@0.1.1`: Correct repository URL.
+ ([@robertkowalski](https://github.com/robertkowalski))
+* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2)
+ `glob@4.0.6`: Now absolutely requires `graceful-fs`.
+ ([@isaacs](https://github.com/isaacs))
+* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0)
+ `ini@1.3.0`: Tighten up whitespace handling.
+ ([@isaacs](https://github.com/isaacs))
+* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d)
+ `archy@1.0.0` ([@substack](https://github.com/substack))
+* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9)
+ `semver@4.1.0`: Add support for prerelease identifiers.
+ ([@bromanko](https://github.com/bromanko))
+* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703)
+ `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate
+ complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs))
+
+### v2.1.4 (2014-10-09):
+
+* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248)
+ [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO`
+ ([@wmertens](https://github.com/wmertens))
+* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264)
+ [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any
+ global npm install ([@isaacs](https://github.com/isaacs))
+* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc)
+ [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to
+ pre & post scripts ([@TheLudd](https://github.com/TheLudd))
+* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4)
+ [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight
+ installs, prevent `peerDependency` problems
+ ([@othiym23](https://github.com/othiym23))
+* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577)
+ [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight
+ caching by URL rather than semver range
+ ([@othiym23](https://github.com/othiym23))
+* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809)
+ `inflight@1.0.4`: callback can take arbitrary number of parameters
+ ([@othiym23](https://github.com/othiym23))
+* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a)
+ [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression
+ for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu))
+* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984)
+ [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if
+ package is specified ([@evanlucas](https://github.com/evanlucas))
+* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23)
+ [#6388](https://github.com/npm/npm/issues/6388) npm-publish â
+ npm-developers(7) ([@kennydude](https://github.com/kennydude))
+
+TEST CLEANUP EXTRAVAGANZA:
+
+* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6)
+ tap tests run with no system-wide side effects
+ ([@chrismeyersfsu](https://github.com/chrismeyersfsu))
+* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef)
+ added npm cache cleanup script
+ ([@chrismeyersfsu](https://github.com/chrismeyersfsu))
+* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c)
+ stripped out dead test code (othiym23)
+* replace spawn with common.npm (@chrismeyersfsu):
+ * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42)
+ test/tap/cache-shasum-fork.js
+ * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a)
+ test/tap/false_name.js
+ * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801)
+ test/tap/git-cache-locking.js
+ * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6)
+ test/tap/pack-scoped.js
+ * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d)
+ test/tap/scripts-whitespace-windows.js
+ * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9)
+ test/tap/prepublish.js
+ * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23)
+ test/tap/prune.js
+
+### v2.1.3 (2014-10-02):
+
+BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`:
+
+* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d)
+ `rm -rf npm submodule` command, which has been broken since the Carter
+ Administration ([@isaacs](https://github.com/isaacs))
+
+BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD
+NOT BE DOING THAT CAN YOU NOT:
+
+* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d)
+ [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye
+ customFds, hello stdio ([@othiym23](https://github.com/othiym23))
+
+Other changes:
+
+* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9)
+ [#6372](https://github.com/npm/npm/issues/6372) noisily error (without
+ aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23))
+* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0)
+ [#6372](https://github.com/npm/npm/issues/6372) only make cache creation
+ requests in flight ([@othiym23](https://github.com/othiym23))
+* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb)
+ [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in
+ flight until normalized ([@othiym23](https://github.com/othiym23))
+* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071)
+ [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in
+ flight ([@othiym23](https://github.com/othiym23))
+* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062)
+ `inflight@1.0.3`: fix largely theoretical race condition, because we really
+ really hate race conditions ([@isaacs](https://github.com/isaacs))
+* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182)
+ [#6363](https://github.com/npm/npm/issues/6363)
+ `realize-package-specifier@1.1.0`: handle local dependencies better
+ ([@iarna](https://github.com/iarna))
+* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e)
+ `realize-package-specifier@1.0.2`: dependency realization! in its own module!
+ ([@iarna](https://github.com/iarna))
+* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964)
+ `npm-package-arg@2.1.3`: simplified semver, better tests
+ ([@iarna](https://github.com/iarna))
+* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352)
+ `readable-stream@1.0.32`: for some reason
+ ([@rvagg](https://github.com/rvagg))
+* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763)
+ `dezalgo@1.0.1`: use wrappy for instrumentability
+ ([@isaacs](https://github.com/isaacs))
+
+### v2.1.2 (2014-09-29):
+
+* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed)
+ [#6282](https://github.com/npm/npm/issues/6282)
+ `normalize-package-data@1.0.3`: don't prune bundledDependencies
+ ([@isaacs](https://github.com/isaacs))
+* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357)
+ move locks back into cache, now path-aware
+ ([@othiym23](https://github.com/othiym23))
+* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a)
+ convert lib/utils/tar.js to use atomic streams
+ ([@othiym23](https://github.com/othiym23))
+* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b)
+ `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams.
+ ([@isaacs](https://github.com/isaacs))
+* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6)
+ logging cleanup ([@othiym23](https://github.com/othiym23))
+* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0)
+ [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp
+ tarballs safely ([@othiym23](https://github.com/othiym23))
+
+### v2.1.1 (2014-09-26):
+
+* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6)
+ [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix
+ lockfile with "." ([@othiym23](https://github.com/othiym23))
+* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44)
+ [#6318](https://github.com/npm/npm/issues/6318) remove locking code around
+ tarball packing and unpacking ([@othiym23](https://github.com/othiym23))
+
+### v2.1.0 (2014-09-25):
+
+NEW FEATURE:
+
+* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7)
+ [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`.
+ ([@evanlucas](https://github.com/evanlucas))
+
+Other changes:
+
+* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a)
+ [#6294](https://github.com/npm/npm/issues/6294) Lock cache â lock cache
+ target. ([@othiym23](https://github.com/othiym23))
+* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e)
+ [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log
+ file is created when rollbacks are done.
+ ([@isaacs](https://github.com/isaacs))
+* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca)
+ docs: Default loglevel "http" â "warn".
+ ([@othiym23](https://github.com/othiym23))
+* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336)
+ Skip installation of installed scoped packages.
+ ([@timoxley](https://github.com/timoxley))
+* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735)
+ Ensure cleanup executes for scripts-whitespace-windows test.
+ ([@timoxley](https://github.com/timoxley))
+* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4)
+ Ensure cleanup executes for packed-scope test.
+ ([@timoxley](https://github.com/timoxley))
+* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398)
+ `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition
+ fixer. ([@isaacs](https://github.com/isaacs))
+* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718)
+ [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the
+ default prefix is. ([@othiym23](https://github.com/othiym23))
+* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de)
+ Fix development dependency is preferred over dependency.
+ ([@andersjanmyr](https://github.com/andersjanmyr))
+* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7)
+ [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes
+ [#3265](https://github.com/npm/npm/issues/3265) again, with a test!
+ ([@glasser](https://github.com/glasser))
+* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf)
+ `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs.
+ ([@kapouer](https://github.com/kapouer))
+* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77)
+ [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template
+ dir when cloning to prevent copying hooks.
+ ([@boneskull](https://github.com/boneskull))
+
+### v2.0.2 (2014-09-19):
+
+* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8)
+ [#5920](https://github.com/npm/npm/issues/5920)
+ `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs))
+* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78)
+ [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic
+ ([@isaacs](https://github.com/isaacs))
+* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b)
+ [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached
+ tarballs ([@isaacs](https://github.com/isaacs))
+* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4)
+ `write-file-atomic@1.1.0`: use graceful-fs
+ ([@iarna](https://github.com/iarna))
+
+### v2.0.1 (2014-09-18):
+
+* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261)
+ [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope
+ always-auth to registry URI ([@othiym23](https://github.com/othiym23))
+* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294)
+ [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`:
+ use scoped always-auth settings ([@othiym23](https://github.com/othiym23))
+* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583)
+ [#6201](https://github.com/npm/npm/issues/6201) support saving
+ `--always-auth` when logging in ([@othiym23](https://github.com/othiym23))
+* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba)
+ [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic`
+ instead of `fs.writeFile()` ([@fiws](https://github.com/fiws))
+* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337)
+ [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm
+ init` to run without prompting
+ ([@michaelnisi](https://github.com/michaelnisi))
+* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8)
+ [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when
+ running `npm install --production`
+ ([@jussi](https://github.com/jussi)-kalliokoski)
+* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4)
+ attach the node version used when publishing a package to its registry
+ metadata ([@othiym23](https://github.com/othiym23))
+* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f)
+ seriously, don't use `npm -g update npm`
+ ([@thomblake](https://github.com/thomblake))
+* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3)
+ `request@2.44.0` ([@othiym23](https://github.com/othiym23))
+
### v2.0.0 (2014-09-12):
BREAKING CHANGES:
diff --git a/deps/npm/Makefile b/deps/npm/Makefile
index fe2d963..34d4b62 100644
--- a/deps/npm/Makefile
+++ b/deps/npm/Makefile
@@ -31,6 +31,28 @@ misc_mandocs = $(shell find doc/misc -name '*.md' \
|sed 's|doc/misc/|man/man7/|g' ) \
man/man7/npm-index.7
+
+cli_partdocs = $(shell find doc/cli -name '*.md' \
+ |sed 's|.md|.html|g' \
+ |sed 's|doc/cli/|html/partial/doc/cli/|g' ) \
+ html/partial/doc/README.html
+
+api_partdocs = $(shell find doc/api -name '*.md' \
+ |sed 's|.md|.html|g' \
+ |sed 's|doc/api/|html/partial/doc/api/|g' )
+
+files_partdocs = $(shell find doc/files -name '*.md' \
+ |sed 's|.md|.html|g' \
+ |sed 's|doc/files/|html/partial/doc/files/|g' ) \
+ html/partial/doc/files/npm-json.html \
+ html/partial/doc/files/npm-global.html
+
+misc_partdocs = $(shell find doc/misc -name '*.md' \
+ |sed 's|.md|.html|g' \
+ |sed 's|doc/misc/|html/partial/doc/misc/|g' ) \
+ html/partial/doc/index.html
+
+
cli_htmldocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/doc/cli/|g' ) \
@@ -53,6 +75,8 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \
mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
+partdocs = $(api_partdocs) $(cli_partdocs) $(files_partdocs) $(misc_partdocs)
+
htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)
all: doc
@@ -63,7 +87,7 @@ latest:
@echo "in this folder that you're looking at right now."
node cli.js install -g -f npm
-install: docclean all
+install: all
node cli.js install -g -f
# backwards compat
@@ -79,7 +103,7 @@ clean: markedclean marked-manclean doc-clean uninstall
uninstall:
node cli.js rm npm -g -f
-doc: $(mandocs) $(htmldocs)
+doc: $(mandocs) $(htmldocs) $(partdocs)
markedclean:
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
@@ -119,43 +143,73 @@ man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json
@[ -d man/man5 ] || mkdir -p man/man5
scripts/doc-build.sh $< $@
+man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
+ @[ -d man/man7 ] || mkdir -p man/man7
+ scripts/doc-build.sh $< $@
+
+
doc/misc/npm-index.md: scripts/index-build.js package.json
node scripts/index-build.js > $@
-html/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
- @[ -d html/doc ] || mkdir -p html/doc
- scripts/doc-build.sh $< $@
-man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
- @[ -d man/man7 ] || mkdir -p man/man7
+# html/doc depends on html/partial/doc
+html/doc/%.html: html/partial/doc/%.html
+ @[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
-html/doc/README.html: README.md $(html_docdeps)
+html/doc/README.html: html/partial/doc/README.html
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
-html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
+html/doc/cli/%.html: html/partial/doc/cli/%.html
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
scripts/doc-build.sh $< $@
-html/doc/api/%.html: doc/api/%.md $(html_docdeps)
+html/doc/misc/%.html: html/partial/doc/misc/%.html
+ @[ -d html/doc/misc ] || mkdir -p html/doc/misc
+ scripts/doc-build.sh $< $@
+
+html/doc/files/%.html: html/partial/doc/files/%.html
+ @[ -d html/doc/files ] || mkdir -p html/doc/files
+ scripts/doc-build.sh $< $@
+
+html/doc/api/%.html: html/partial/doc/api/%.html
@[ -d html/doc/api ] || mkdir -p html/doc/api
scripts/doc-build.sh $< $@
-html/doc/files/npm-json.html: html/doc/files/package.json.html
+
+html/partial/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
+ @[ -d html/partial/doc ] || mkdir -p html/partial/doc
+ scripts/doc-build.sh $< $@
+
+html/partial/doc/README.html: README.md $(html_docdeps)
+ @[ -d html/partial/doc ] || mkdir -p html/partial/doc
+ scripts/doc-build.sh $< $@
+
+html/partial/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
+ @[ -d html/partial/doc/cli ] || mkdir -p html/partial/doc/cli
+ scripts/doc-build.sh $< $@
+
+html/partial/doc/api/%.html: doc/api/%.md $(html_docdeps)
+ @[ -d html/partial/doc/api ] || mkdir -p html/partial/doc/api
+ scripts/doc-build.sh $< $@
+
+html/partial/doc/files/npm-json.html: html/partial/doc/files/package.json.html
cp $< $@
-html/doc/files/npm-global.html: html/doc/files/npm-folders.html
+html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html
cp $< $@
-html/doc/files/%.html: doc/files/%.md $(html_docdeps)
- @[ -d html/doc/files ] || mkdir -p html/doc/files
+html/partial/doc/files/%.html: doc/files/%.md $(html_docdeps)
+ @[ -d html/partial/doc/files ] || mkdir -p html/partial/doc/files
scripts/doc-build.sh $< $@
-html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
- @[ -d html/doc/misc ] || mkdir -p html/doc/misc
+html/partial/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
+ @[ -d html/partial/doc/misc ] || mkdir -p html/partial/doc/misc
scripts/doc-build.sh $< $@
+
+
marked: node_modules/.bin/marked
node_modules/.bin/marked:
diff --git a/deps/npm/README.md b/deps/npm/README.md
index 19ced3a..ecb3f29 100644
--- a/deps/npm/README.md
+++ b/deps/npm/README.md
@@ -154,7 +154,7 @@ use npm itself to do.
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
- npm.on("log", function (message) { .... })
+ npm.registry.log.on("log", function (message) { .... })
})
The `load` function takes an object hash of the command-line configs.
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js
index ed81a98..ace40ca 100755
--- a/deps/npm/bin/npm-cli.js
+++ b/deps/npm/bin/npm-cli.js
@@ -21,7 +21,7 @@ log.info("it worked if it ends with", "ok")
var path = require("path")
, npm = require("../lib/npm.js")
- , npmconf = require("npmconf")
+ , npmconf = require("../lib/config/core.js")
, errorHandler = require("../lib/utils/error-handler.js")
, configDefs = npmconf.defs
diff --git a/deps/npm/doc/api/npm-bin.md b/deps/npm/doc/api/npm-bin.md
index f3dc482..bd27af2 100644
--- a/deps/npm/doc/api/npm-bin.md
+++ b/deps/npm/doc/api/npm-bin.md
@@ -10,4 +10,4 @@ npm-bin(3) -- Display npm bin folder
Print the folder where npm will install executables.
This function should not be used programmatically. Instead, just refer
-to the `npm.bin` member.
+to the `npm.bin` property.
diff --git a/deps/npm/doc/api/npm-help-search.md b/deps/npm/doc/api/npm-help-search.md
index 5c00cfc..01b235c 100644
--- a/deps/npm/doc/api/npm-help-search.md
+++ b/deps/npm/doc/api/npm-help-search.md
@@ -27,4 +27,4 @@ array of results is returned. Each result is an object with these properties:
* file:
Name of the file that matched
-The silent parameter is not neccessary not used, but it may in the future.
+The silent parameter is not necessary not used, but it may in the future.
diff --git a/deps/npm/doc/api/npm-load.md b/deps/npm/doc/api/npm-load.md
index a95a6b2..de412af 100644
--- a/deps/npm/doc/api/npm-load.md
+++ b/deps/npm/doc/api/npm-load.md
@@ -10,9 +10,9 @@ npm-load(3) -- Load config settings
npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.
-The first parameter is an object hash of command-line config params, and the
-second parameter is a callback that will be called when npm is loaded and
-ready to serve.
+The first parameter is an object containing command-line config params, and the
+second parameter is a callback that will be called when npm is loaded and ready
+to serve.
The first parameter should follow a similar structure as the package.json
config object.
diff --git a/deps/npm/doc/api/npm-submodule.md b/deps/npm/doc/api/npm-submodule.md
deleted file mode 100644
index 2d8bafa..0000000
--- a/deps/npm/doc/api/npm-submodule.md
+++ /dev/null
@@ -1,28 +0,0 @@
-npm-submodule(3) -- Add a package as a git submodule
-====================================================
-
-## SYNOPSIS
-
- npm.commands.submodule(packages, callback)
-
-## DESCRIPTION
-
-For each package specified, npm will check if it has a git repository url
-in its package.json description then add it as a git submodule at
-`node_modules/`.
-
-This is a convenience only. From then on, it's up to you to manage
-updates by using the appropriate git commands. npm will stubbornly
-refuse to update, modify, or remove anything with a `.git` subfolder
-in it.
-
-This command also does not install missing dependencies, if the package
-does not include them in its git repository. If `npm ls` reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do `npm explore -- npm install` to install the
-dependencies into the submodule folder.
-
-## SEE ALSO
-
-* npm help json
-* git help submodule
diff --git a/deps/npm/doc/api/npm.md b/deps/npm/doc/api/npm.md
index d05684e..4b4dfca 100644
--- a/deps/npm/doc/api/npm.md
+++ b/deps/npm/doc/api/npm.md
@@ -25,13 +25,12 @@ This is the API documentation for npm.
To find documentation of the command line
client, see `npm(1)`.
-Prior to using npm's commands, `npm.load()` must be called.
-If you provide `configObject` as an object hash of top-level
-configs, they override the values stored in the various config
-locations. In the npm command line client, this set of configs
-is parsed from the command line options. Additional configuration
-params are loaded from two configuration files. See `npm-config(1)`,
-`npm-config(7)`, and `npmrc(5)` for more information.
+Prior to using npm's commands, `npm.load()` must be called. If you provide
+`configObject` as an object map of top-level configs, they override the values
+stored in the various config locations. In the npm command line client, this
+set of configs is parsed from the command line options. Additional
+configuration params are loaded from two configuration files. See
+`npm-config(1)`, `npm-config(7)`, and `npmrc(5)` for more information.
After that, each of the functions are accessible in the
commands object: `npm.commands.`. See `npm-index(7)` for a list of
@@ -88,9 +87,9 @@ command.
## MAGIC
-For each of the methods in the `npm.commands` hash, a method is added to
-the npm object, which takes a set of positional string arguments rather
-than an array and a callback.
+For each of the methods in the `npm.commands` object, a method is added to the
+npm object, which takes a set of positional string arguments rather than an
+array and a callback.
If the last argument is a callback, then it will use the supplied
callback. However, if no callback is provided, then it will print out
diff --git a/deps/npm/doc/cli/npm-adduser.md b/deps/npm/doc/cli/npm-adduser.md
index d60d6e9..54e785b 100644
--- a/deps/npm/doc/cli/npm-adduser.md
+++ b/deps/npm/doc/cli/npm-adduser.md
@@ -3,7 +3,7 @@ npm-adduser(1) -- Add a registry user account
## SYNOPSIS
- npm adduser [--registry=url] [--scope=@orgname]
+ npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
## DESCRIPTION
@@ -45,6 +45,21 @@ e.g.
This will set a registry for the given scope and login or create a user for
that registry at the same time.
+### always-auth
+
+Default: false
+
+If specified, save configuration indicating that all requests to the given
+registry should include authorization information. Useful for private
+registries. Can be used with `--registry` and / or `--scope`, e.g.
+
+ npm adduser --registry=http://private-registry.example.com --always-auth
+
+This will ensure that all requests to that registry (including for tarballs)
+include an authorization header. See `always-auth` in `npm-config(7)` for more
+details on always-auth. Registry-specific configuaration of `always-auth` takes
+precedence over any global configuration.
+
## SEE ALSO
* npm-registry(7)
diff --git a/deps/npm/doc/cli/npm-explore.md b/deps/npm/doc/cli/npm-explore.md
index 3642d73..fded534 100644
--- a/deps/npm/doc/cli/npm-explore.md
+++ b/deps/npm/doc/cli/npm-explore.md
@@ -32,7 +32,6 @@ The shell to run for the `npm explore` command.
## SEE ALSO
-* npm-submodule(1)
* npm-folders(5)
* npm-edit(1)
* npm-rebuild(1)
diff --git a/deps/npm/doc/cli/npm-init.md b/deps/npm/doc/cli/npm-init.md
index bd63a88..08e517d 100644
--- a/deps/npm/doc/cli/npm-init.md
+++ b/deps/npm/doc/cli/npm-init.md
@@ -3,7 +3,7 @@ npm-init(1) -- Interactively create a package.json file
## SYNOPSIS
- npm init
+ npm init [-f|--force|-y|--yes]
## DESCRIPTION
@@ -18,6 +18,9 @@ the options in there.
It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.
+If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
+defaults and not prompt you for any options.
+
## SEE ALSO
*
diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md
index 8860b88..30e816c 100644
--- a/deps/npm/doc/cli/npm-publish.md
+++ b/deps/npm/doc/cli/npm-publish.md
@@ -9,7 +9,9 @@ npm-publish(1) -- Publish a package
## DESCRIPTION
-Publishes a package to the registry so that it can be installed by name.
+Publishes a package to the registry so that it can be installed by name. See
+`npm-developers(7)` for details on what's included in the published package, as
+well as details on how the package is built.
By default npm will publish to the public registry. This can be overridden by
specifying a different default registry or using a `npm-scope(7)` in the name
diff --git a/deps/npm/doc/cli/npm-restart.md b/deps/npm/doc/cli/npm-restart.md
index 7b039a8..6d594a2 100644
--- a/deps/npm/doc/cli/npm-restart.md
+++ b/deps/npm/doc/cli/npm-restart.md
@@ -7,11 +7,8 @@ npm-restart(1) -- Start a package
## DESCRIPTION
-This runs a package's "restart" script, if one was provided.
-Otherwise it runs package's "stop" script, if one was provided, and then
-the "start" script.
-
-If no version is specified, then it restarts the "active" version.
+This runs a package's "restart" script, if one was provided. Otherwise it runs
+package's "stop" script, if one was provided, and then the "start" script.
## SEE ALSO
diff --git a/deps/npm/doc/cli/npm-run-script.md b/deps/npm/doc/cli/npm-run-script.md
index 09a546b..74f416e 100644
--- a/deps/npm/doc/cli/npm-run-script.md
+++ b/deps/npm/doc/cli/npm-run-script.md
@@ -16,6 +16,16 @@ is provided, it will list the available top level scripts.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.
+As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
+use custom arguments when executing scripts. The special option `--` is used by
+[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
+all the arguments after the `--` directly to your script:
+
+ npm run test -- --grep="pattern"
+
+The arguments will only be passed to the script specified after ```npm run```
+and not to any pre or post script.
+
## SEE ALSO
* npm-scripts(7)
diff --git a/deps/npm/doc/cli/npm-submodule.md b/deps/npm/doc/cli/npm-submodule.md
deleted file mode 100644
index 7f0fbfc..0000000
--- a/deps/npm/doc/cli/npm-submodule.md
+++ /dev/null
@@ -1,28 +0,0 @@
-npm-submodule(1) -- Add a package as a git submodule
-====================================================
-
-## SYNOPSIS
-
- npm submodule
-
-## DESCRIPTION
-
-If the specified package has a git repository url in its package.json
-description, then this command will add it as a git submodule at
-`node_modules/`.
-
-This is a convenience only. From then on, it's up to you to manage
-updates by using the appropriate git commands. npm will stubbornly
-refuse to update, modify, or remove anything with a `.git` subfolder
-in it.
-
-This command also does not install missing dependencies, if the package
-does not include them in its git repository. If `npm ls` reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do `npm explore -- npm install` to install the
-dependencies into the submodule folder.
-
-## SEE ALSO
-
-* package.json(5)
-* git help submodule
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index 82b9405..1138bc2 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -219,7 +219,7 @@ will create entries for `man foo` and `man 2 foo`
The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a
few ways that you can indicate the structure of your package using a `directories`
-hash. If you look at [npm's package.json](http://registry.npmjs.org/npm/latest),
+object. If you look at [npm's package.json](http://registry.npmjs.org/npm/latest),
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
@@ -231,10 +231,10 @@ with the lib folder in any way, but it's useful meta info.
### directories.bin
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash.
+If you specify a `bin` directory, then all the files in that folder will
+be added as children of the `bin` path.
-If you have a "bin" hash already, then this has no effect.
+If you have a `bin` path already, then this has no effect.
### directories.man
@@ -274,7 +274,7 @@ html project page that you put in your browser. It's for computers.
## scripts
-The "scripts" member is an object hash of script commands that are run
+The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
@@ -282,9 +282,9 @@ See `npm-scripts(7)` to find out more about writing package scripts.
## config
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
@@ -298,13 +298,13 @@ configs.
## dependencies
-Dependencies are specified with a simple hash of package name to
+Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
-space-separated descriptors. Dependencies can also be identified with
-a tarball or git URL.
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
**Please do not put test harnesses or transpilers in your
-`dependencies` hash.** See `devDependencies`, below.
+`dependencies` object.** See `devDependencies`, below.
See semver(7) for more details about specifying version ranges.
@@ -340,7 +340,7 @@ For example, these are all valid:
, "two" : "2.x"
, "thr" : "3.3.x"
, "lat" : "latest"
- , "dyl" : "~/projects/dyl"
+ , "dyl" : "file:../dyl"
}
}
@@ -378,14 +378,25 @@ As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-proj
## Local Paths
-As of version 2.0.0 you can provide a path to a local directory that
-contains a package. Local paths can be in the form:
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using `npm install --save`, using any of
+these forms:
../foo/bar
~/foo/bar
./foo/bar
/foo/bar
+in which case they will be normalized to a relative path and added to your
+`package.json`. For example:
+
+ {
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+ }
+
This feature is helpful for local offline development and creating
tests that require npm installing where you don't want to hit an
external server, but should not be used when publishing packages
@@ -397,8 +408,8 @@ If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
-In this case, it's best to list these additional items in a
-`devDependencies` hash.
+In this case, it's best to map these additional items in a `devDependencies`
+object.
These things will be installed when doing `npm link` or `npm install`
from the root of a package, and can be managed like any other npm
@@ -469,11 +480,11 @@ If this is spelled `"bundleDependencies"`, then that is also honorable.
## optionalDependencies
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-`optionalDependencies` hash. This is a map of package name to version
-or url, just like the `dependencies` hash. The difference is that
-failure is tolerated.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the `optionalDependencies`
+object. This is a map of package name to version or url, just like the
+`dependencies` object. The difference is that build failures do not cause
+installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
@@ -521,12 +532,12 @@ field is advisory only.
## engineStrict
If you are sure that your module will *definitely not* run properly on
-versions of Node/npm other than those specified in the `engines` hash,
+versions of Node/npm other than those specified in the `engines` object,
then you can set `"engineStrict": true` in your package.json file.
This will override the user's `engine-strict` config setting.
Please do not do this unless you are really very very sure. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
@@ -575,11 +586,11 @@ does help prevent some confusion if it doesn't work as expected.
If you set `"private": true` in your package.json, then npm will refuse
to publish it.
-This is a way to prevent accidental publication of private repositories.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the `publishConfig` hash described below
-to override the `registry` config param at publish-time.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+`publishConfig` dictionary described below to override the `registry` config
+param at publish-time.
## publishConfig
diff --git a/deps/npm/doc/misc/npm-coding-style.md b/deps/npm/doc/misc/npm-coding-style.md
index b6a4a62..80609f4 100644
--- a/deps/npm/doc/misc/npm-coding-style.md
+++ b/deps/npm/doc/misc/npm-coding-style.md
@@ -147,7 +147,7 @@ Use appropriate log levels. See `npm-config(7)` and search for
## Case, naming, etc.
Use `lowerCamelCase` for multiword identifiers when they refer to objects,
-functions, methods, members, or anything not specified in this section.
+functions, methods, properties, or anything not specified in this section.
Use `UpperCamelCase` for class names (things that you'd pass to "new").
diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md
index 8b5ae12..6e7d995 100644
--- a/deps/npm/doc/misc/npm-config.md
+++ b/deps/npm/doc/misc/npm-config.md
@@ -384,35 +384,35 @@ documentation for the
[init-package-json](https://github.com/isaacs/init-package-json) module
for more information, or npm-init(1).
-### init.author.name
+### init-author-name
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's name.
-### init.author.email
+### init-author-email
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's email.
-### init.author.url
+### init-author-url
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's homepage.
-### init.license
+### init-license
* Default: "ISC"
* Type: String
The value `npm init` should use by default for the package license.
-### init.version
+### init-version
* Default: "0.0.0"
* Type: semver
@@ -464,7 +464,7 @@ to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
### loglevel
-* Default: "http"
+* Default: "warn"
* Type: String
* Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
@@ -472,7 +472,7 @@ What level of logs to report. On failure, *all* logs are written to
`npm-debug.log` in the current working directory.
Any logs of a higher level than the setting are shown.
-The default is "http", which shows http, warn, and error output.
+The default is "warn", which shows warn and error output.
### logstream
@@ -510,7 +510,7 @@ Any "%s" in the message will be replaced with the version number.
* Default: process.version
* Type: semver or false
-The node version to use when checking package's "engines" hash.
+The node version to use when checking a package's `engines` map.
### npat
@@ -532,7 +532,7 @@ usage.
* Default: true
* Type: Boolean
-Attempt to install packages in the `optionalDependencies` hash. Note
+Attempt to install packages in the `optionalDependencies` object. Note
that if these packages fail to install, the overall installation
process is not aborted.
@@ -610,8 +610,8 @@ Remove failed installs.
Save installed packages to a package.json file as dependencies.
-When used with the `npm rm` command, it removes it from the dependencies
-hash.
+When used with the `npm rm` command, it removes it from the `dependencies`
+object.
Only works if there is already a package.json file present.
@@ -632,10 +632,10 @@ bundledDependencies list.
* Default: false
* Type: Boolean
-Save installed packages to a package.json file as devDependencies.
+Save installed packages to a package.json file as `devDependencies`.
When used with the `npm rm` command, it removes it from the
-devDependencies hash.
+`devDependencies` object.
Only works if there is already a package.json file present.
@@ -657,7 +657,7 @@ Save installed packages to a package.json file as
optionalDependencies.
When used with the `npm rm` command, it removes it from the
-devDependencies hash.
+`devDependencies` object.
Only works if there is already a package.json file present.
@@ -848,8 +848,8 @@ Only relevant when specified explicitly on the command line.
* Default: false
* Type: boolean
-If true, output the npm version as well as node's `process.versions`
-hash, and exit successfully.
+If true, output the npm version as well as node's `process.versions` map, and
+exit successfully.
Only relevant when specified explicitly on the command line.
diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md
index 5e53301..f6ea011 100644
--- a/deps/npm/doc/misc/npm-developers.md
+++ b/deps/npm/doc/misc/npm-developers.md
@@ -76,7 +76,7 @@ least, you need:
* scripts:
If you have a special compilation or installation script, then you
- should put it in the `scripts` hash. You should definitely have at
+ should put it in the `scripts` object. You should definitely have at
least a basic smoke-test command as the "scripts.test" field.
See npm-scripts(7).
@@ -86,8 +86,8 @@ least, you need:
then you need to specify that in the "main" field.
* directories:
- This is a hash of folders. The best ones to include are "lib" and
- "doc", but if you specify a folder full of man pages in "man", then
+ This is an object mapping names to folders. The best ones to include are
+ "lib" and "doc", but if you use "man" to specify a folder full of man pages,
they'll get installed just like these ones.
You can use `npm init` in the root of your package in order to get you
diff --git a/deps/npm/doc/misc/npm-faq.md b/deps/npm/doc/misc/npm-faq.md
index 4dca3cd..7289127 100644
--- a/deps/npm/doc/misc/npm-faq.md
+++ b/deps/npm/doc/misc/npm-faq.md
@@ -135,7 +135,7 @@ Arguments are greps. `npm search jsdom` shows jsdom packages.
## How do I update npm?
- npm update npm -g
+ npm install npm -g
You can also update all outdated local packages by doing `npm update` without
any arguments, or global packages by doing `npm update -g`.
diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md
index cf96986..9c804bf 100644
--- a/deps/npm/doc/misc/npm-index.md
+++ b/deps/npm/doc/misc/npm-index.md
@@ -161,10 +161,6 @@ Start a package
Stop a package
-### npm-submodule(1)
-
-Add a package as a git submodule
-
### npm-tag(1)
Tag a published version
@@ -325,10 +321,6 @@ Start a package
Stop a package
-### npm-submodule(3)
-
-Add a package as a git submodule
-
### npm-tag(3)
Tag a published version
diff --git a/deps/npm/doc/misc/npm-scope.md b/deps/npm/doc/misc/npm-scope.md
index a4ee1a0..66a9255 100644
--- a/deps/npm/doc/misc/npm-scope.md
+++ b/deps/npm/doc/misc/npm-scope.md
@@ -25,8 +25,8 @@ scoped modules will be in `node_modules/@myorg/packagename`. The scope folder
(`@myorg`) is simply the name of the scope preceded by an @-symbol, and can
contain any number of scoped packages.
-A scoped package is install by referencing it by name, preceded by an @-symbol,
-in `npm install`:
+A scoped package is installed by referencing it by name, preceded by an
+@-symbol, in `npm install`:
npm install @myorg/mypackage
diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md
index 7ef8fb1..054886b 100644
--- a/deps/npm/doc/misc/npm-scripts.md
+++ b/deps/npm/doc/misc/npm-scripts.md
@@ -3,7 +3,7 @@ npm-scripts(7) -- How npm handles the "scripts" field
## DESCRIPTION
-npm supports the "scripts" member of the package.json script, for the
+npm supports the "scripts" property of the package.json script, for the
following scripts:
* prepublish:
@@ -33,9 +33,10 @@ following scripts:
Run by the `npm restart` command. Note: `npm restart` will run the
stop and start scripts if no `restart` script is provided.
-Additionally, arbitrary scripts can be executed by running `npm run-script
- `. *Pre* and *post* commands with matching names will be run for
-those as well (e.g. `premyscript`, `myscript`, `postmyscript`).
+Additionally, arbitrary scripts can be executed by running `npm
+run-script `. *Pre* and *post* commands with matching
+names will be run for those as well (e.g. `premyscript`, `myscript`,
+`postmyscript`).
## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
@@ -136,7 +137,7 @@ Configuration parameters are put in the environment with the
`npm_config_` prefix. For instance, you can view the effective `root`
config by checking the `npm_config_root` environment variable.
-### Special: package.json "config" hash
+### Special: package.json "config" object
The package.json "config" keys are overwritten in the environment if
there is a config param of `[@]:`. For example,
diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md
index af83d71..bd697d9 100644
--- a/deps/npm/doc/misc/semver.md
+++ b/deps/npm/doc/misc/semver.md
@@ -140,7 +140,7 @@ numeric values in the `[major, minor, patch]` tuple.
A partial version range is treated as an X-Range, so the special
character is in fact optional.
-* `` (empty string) := `*` := `>=0.0.0`
+* `""` (empty string) := `*` := `>=0.0.0`
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index 64bb15f..96bc064 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -108,7 +108,7 @@ npm.load(myConfigObject, function (er) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
- npm.on("log", function (message) { .... })
+ npm.registry.log.on("log", function (message) { .... })
})
The load
function takes an object hash of the command-line configs.
The various npm.commands.<cmd>
functions take an array of
@@ -141,7 +141,7 @@ specific purpose, or lack of malice in any given npm package.
If you have a complaint about a package in the public npm registry,
and cannot resolve it with the package
owner , please email
-support@npmjs.com and explain the situation.
+support@npmjs.com and explain the situation.
Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators.
@@ -161,7 +161,7 @@ ban your account in extreme cases. So don't do that.
web:
https://github.com/npm/npm/issues
email:
-npm-@googlegroups.com
+npm-@googlegroups.com
Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
@@ -169,10 +169,10 @@ as expected. The npm-debug.log
file is also helpful to provide.
SEE ALSO
@@ -186,5 +186,5 @@ will no doubt tell you to put the output in a gist or email.
-
+
diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html
index ec77534..a256124 100644
--- a/deps/npm/html/doc/api/npm-bin.html
+++ b/deps/npm/html/doc/api/npm-bin.html
@@ -15,7 +15,7 @@
DESCRIPTION
Print the folder where npm will install executables.
This function should not be used programmatically. Instead, just refer
-to the npm.bin
member.
+to the npm.bin
property.
@@ -28,5 +28,5 @@ to the npm.bin
member.
-
+
diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html
index cc941e0..9cf2cc4 100644
--- a/deps/npm/html/doc/api/npm-bugs.html
+++ b/deps/npm/html/doc/api/npm-bugs.html
@@ -33,5 +33,5 @@ friendly for programmatic use.
-
+
diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html
index 2bd5bb5..6dfc4a0 100644
--- a/deps/npm/html/doc/api/npm-cache.html
+++ b/deps/npm/html/doc/api/npm-cache.html
@@ -18,7 +18,7 @@ npm.commands.cache.clean([args], callback)
npm.commands.cache.add([args], callback)
npm.commands.cache.read(name, version, forceBypass, callback)
DESCRIPTION
-This acts much the same ways as the npm-cache(1) command line
+
This acts much the same ways as the npm-cache(1) command line
functionality.
The callback is called with the package.json data of the thing that is
eventually added to or read from the cache.
@@ -42,5 +42,5 @@ incrementation.
-
+
diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html
index 577eae8..3f3ae54 100644
--- a/deps/npm/html/doc/api/npm-commands.html
+++ b/deps/npm/html/doc/api/npm-commands.html
@@ -22,7 +22,7 @@ commands are special and take other optional arguments.
usage, or man 3 npm-<command>
for programmatic usage.
SEE ALSO
@@ -36,5 +36,5 @@ usage, or man 3 npm-<command>
for programmatic usage.
-
+
diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html
index 37313a9..3767a46 100644
--- a/deps/npm/html/doc/api/npm-config.html
+++ b/deps/npm/html/doc/api/npm-config.html
@@ -43,7 +43,7 @@ the duration of a program, use the npm.config.set
and npm.con
functions instead.
SEE ALSO
@@ -57,5 +57,5 @@ functions instead.
-
+
diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html
index dda8857..a235c2b 100644
--- a/deps/npm/html/doc/api/npm-deprecate.html
+++ b/deps/npm/html/doc/api/npm-deprecate.html
@@ -31,9 +31,9 @@ a deprecation warning to all who attempt to install it.
To un-deprecate a package, specify an empty string (""
) for the message
argument.
SEE ALSO
@@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.
-
+
diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html
index 076e9b4..222b90e 100644
--- a/deps/npm/html/doc/api/npm-docs.html
+++ b/deps/npm/html/doc/api/npm-docs.html
@@ -33,5 +33,5 @@ friendly for programmatic use.
-
+
diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html
index c9702a0..aa3d7bd 100644
--- a/deps/npm/html/doc/api/npm-edit.html
+++ b/deps/npm/html/doc/api/npm-edit.html
@@ -36,5 +36,5 @@ and how this is used.
-
+
diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html
index be85566..fbfd0cc 100644
--- a/deps/npm/html/doc/api/npm-explore.html
+++ b/deps/npm/html/doc/api/npm-explore.html
@@ -31,5 +31,5 @@ sure to use npm rebuild <pkg>
if you make any changes.
-
+
diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html
index 852f0bc..886d0c5 100644
--- a/deps/npm/html/doc/api/npm-help-search.html
+++ b/deps/npm/html/doc/api/npm-help-search.html
@@ -31,7 +31,7 @@ An array of all matching lines (and some adjacent lines).
file:
Name of the file that matched
-The silent parameter is not neccessary not used, but it may in the future.
+The silent parameter is not necessary not used, but it may in the future.
@@ -44,5 +44,5 @@ Name of the file that matched
-
+
diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html
index dac576d..80b14a4 100644
--- a/deps/npm/html/doc/api/npm-init.html
+++ b/deps/npm/html/doc/api/npm-init.html
@@ -26,7 +26,7 @@ JavaScript makes it stupid simple to output formatted JSON, that is the
preferred method. If you're sure you want to handle command-line prompting,
then go ahead and use this programmatically.
SEE ALSO
-package.json(5)
+package.json(5)
@@ -39,5 +39,5 @@ then go ahead and use this programmatically.
-
+
diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html
index 204f1df..43cf4f1 100644
--- a/deps/npm/html/doc/api/npm-install.html
+++ b/deps/npm/html/doc/api/npm-install.html
@@ -32,5 +32,5 @@ installed or when an error has been encountered.
-
+
diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html
index 4eef789..c41a31c 100644
--- a/deps/npm/html/doc/api/npm-link.html
+++ b/deps/npm/html/doc/api/npm-link.html
@@ -42,5 +42,5 @@ the package in the current working directory
-
+
diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html
index 64a9bd4..fbf2299 100644
--- a/deps/npm/html/doc/api/npm-load.html
+++ b/deps/npm/html/doc/api/npm-load.html
@@ -15,9 +15,9 @@
DESCRIPTION
npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.
-The first parameter is an object hash of command-line config params, and the
-second parameter is a callback that will be called when npm is loaded and
-ready to serve.
+The first parameter is an object containing command-line config params, and the
+second parameter is a callback that will be called when npm is loaded and ready
+to serve.
The first parameter should follow a similar structure as the package.json
config object.
For example, to emulate the --dev flag, pass an object that looks like this:
@@ -37,5 +37,5 @@ config object.
-
+
diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html
index a3807d8..e221bab 100644
--- a/deps/npm/html/doc/api/npm-ls.html
+++ b/deps/npm/html/doc/api/npm-ls.html
@@ -63,5 +63,5 @@ dependency will only be output once.
-
+
diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html
index c566630..91fafce 100644
--- a/deps/npm/html/doc/api/npm-outdated.html
+++ b/deps/npm/html/doc/api/npm-outdated.html
@@ -28,5 +28,5 @@ currently outdated.
-
+
diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html
index d2b336b..878a9e5 100644
--- a/deps/npm/html/doc/api/npm-owner.html
+++ b/deps/npm/html/doc/api/npm-owner.html
@@ -32,8 +32,8 @@ or you can't. Future versions may contain more fine-grained access levels,
that is not implemented at this time.
SEE ALSO
@@ -47,5 +47,5 @@ that is not implemented at this time.
-
+
diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html
index 1adb049..1e146e4 100644
--- a/deps/npm/html/doc/api/npm-pack.html
+++ b/deps/npm/html/doc/api/npm-pack.html
@@ -33,5 +33,5 @@ overwritten the second time.
-
+
diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html
index 605bc49..bd40600 100644
--- a/deps/npm/html/doc/api/npm-prefix.html
+++ b/deps/npm/html/doc/api/npm-prefix.html
@@ -29,5 +29,5 @@
-
+
diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html
index d85c01e..0e446c2 100644
--- a/deps/npm/html/doc/api/npm-prune.html
+++ b/deps/npm/html/doc/api/npm-prune.html
@@ -30,5 +30,5 @@ package's dependencies list.
-
+
diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html
index ae352eb..0e41c2a 100644
--- a/deps/npm/html/doc/api/npm-publish.html
+++ b/deps/npm/html/doc/api/npm-publish.html
@@ -30,9 +30,9 @@ current working directory.
the registry. Overwrites when the "force" environment variable is set.
SEE ALSO
@@ -46,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set
-
+
diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html
index 1cb5fff..f5d2e6a 100644
--- a/deps/npm/html/doc/api/npm-rebuild.html
+++ b/deps/npm/html/doc/api/npm-rebuild.html
@@ -30,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil
-
+
diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html
index 2c40c8e..024e727 100644
--- a/deps/npm/html/doc/api/npm-repo.html
+++ b/deps/npm/html/doc/api/npm-repo.html
@@ -33,5 +33,5 @@ friendly for programmatic use.
-
+
diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html
index 382d44a..29d1a56 100644
--- a/deps/npm/html/doc/api/npm-restart.html
+++ b/deps/npm/html/doc/api/npm-restart.html
@@ -21,8 +21,8 @@ the "start" script.
in the packages
parameter.
SEE ALSO
@@ -36,5 +36,5 @@ in the packages
parameter.
-
+
diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html
index c9d4b17..b639a33 100644
--- a/deps/npm/html/doc/api/npm-root.html
+++ b/deps/npm/html/doc/api/npm-root.html
@@ -29,5 +29,5 @@
-
+
diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html
index b5ef687..2670780 100644
--- a/deps/npm/html/doc/api/npm-run-script.html
+++ b/deps/npm/html/doc/api/npm-run-script.html
@@ -23,11 +23,11 @@ one element, then the first is assumed to be the package and the second is
assumed to be the command to run. All other elements are ignored.
SEE ALSO
@@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.
-
+
diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html
index a4484a3..903aa52 100644
--- a/deps/npm/html/doc/api/npm-search.html
+++ b/deps/npm/html/doc/api/npm-search.html
@@ -53,5 +53,5 @@ like).
-
+
diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html
index e5bf33a..eed523c 100644
--- a/deps/npm/html/doc/api/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/api/npm-shrinkwrap.html
@@ -33,5 +33,5 @@ been saved.
-
+
diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html
index fa8a3db..23678bc 100644
--- a/deps/npm/html/doc/api/npm-start.html
+++ b/deps/npm/html/doc/api/npm-start.html
@@ -28,5 +28,5 @@ in the packages
parameter.
-
+
diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html
index bdcf72b..ed3b714 100644
--- a/deps/npm/html/doc/api/npm-stop.html
+++ b/deps/npm/html/doc/api/npm-stop.html
@@ -28,5 +28,5 @@ in the packages
parameter.
-
+
diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html
index f7dfcca..d70ee36 100644
--- a/deps/npm/html/doc/api/npm-submodule.html
+++ b/deps/npm/html/doc/api/npm-submodule.html
@@ -42,5 +42,5 @@ dependencies into the submodule folder.
-
+
diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html
index 2f94ed7..b4a3261 100644
--- a/deps/npm/html/doc/api/npm-tag.html
+++ b/deps/npm/html/doc/api/npm-tag.html
@@ -36,5 +36,5 @@ used. For more information about how to set this config, check
-
+
diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html
index 3247238..7816808 100644
--- a/deps/npm/html/doc/api/npm-test.html
+++ b/deps/npm/html/doc/api/npm-test.html
@@ -30,5 +30,5 @@ in the packages
parameter.
-
+
diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html
index ffd317e..962ff87 100644
--- a/deps/npm/html/doc/api/npm-uninstall.html
+++ b/deps/npm/html/doc/api/npm-uninstall.html
@@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.
-
+
diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html
index e35acac..2b9a5c5 100644
--- a/deps/npm/html/doc/api/npm-unpublish.html
+++ b/deps/npm/html/doc/api/npm-unpublish.html
@@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.
-
+
diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html
index 18da44c..f60e83d 100644
--- a/deps/npm/html/doc/api/npm-update.html
+++ b/deps/npm/html/doc/api/npm-update.html
@@ -27,5 +27,5 @@
-
+
diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html
index 376d8b9..c4ce078 100644
--- a/deps/npm/html/doc/api/npm-version.html
+++ b/deps/npm/html/doc/api/npm-version.html
@@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.
-
+
diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html
index 482d912..75c75fd 100644
--- a/deps/npm/html/doc/api/npm-view.html
+++ b/deps/npm/html/doc/api/npm-view.html
@@ -81,5 +81,5 @@ the field name.
-
+
diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html
index 1a41af4..4ed6d79 100644
--- a/deps/npm/html/doc/api/npm-whoami.html
+++ b/deps/npm/html/doc/api/npm-whoami.html
@@ -29,5 +29,5 @@
-
+
diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html
index 72265ec..67ff3d3 100644
--- a/deps/npm/html/doc/api/npm.html
+++ b/deps/npm/html/doc/api/npm.html
@@ -23,20 +23,19 @@ npm.load([configObject, ]function (er, npm) {
npm.commands.install(["package"], cb)
})
VERSION
-2.0.0
+2.1.6
DESCRIPTION
This is the API documentation for npm.
To find documentation of the command line
-client, see npm(1)
.
-Prior to using npm's commands, npm.load()
must be called.
-If you provide configObject
as an object hash of top-level
-configs, they override the values stored in the various config
-locations. In the npm command line client, this set of configs
-is parsed from the command line options. Additional configuration
-params are loaded from two configuration files. See npm-config(1)
,
-npm-config(7)
, and npmrc(5)
for more information.
+client, see npm(1)
.
+Prior to using npm's commands, npm.load()
must be called. If you provide
+configObject
as an object map of top-level configs, they override the values
+stored in the various config locations. In the npm command line client, this
+set of configs is parsed from the command line options. Additional
+configuration params are loaded from two configuration files. See
+npm-config(1)
, npm-config(7)
, and npmrc(5)
for more information.
After that, each of the functions are accessible in the
-commands object: npm.commands.<cmd>
. See npm-index(7)
for a list of
+commands object: npm.commands.<cmd>
. See npm-index(7)
for a list of
all possible commands.
All commands on the command object take an array of positional argument
strings . The last argument to any function is a callback. Some
@@ -80,9 +79,9 @@ command.
MAGIC
-For each of the methods in the npm.commands
hash, a method is added to
-the npm object, which takes a set of positional string arguments rather
-than an array and a callback.
+For each of the methods in the npm.commands
object, a method is added to the
+npm object, which takes a set of positional string arguments rather than an
+array and a callback.
If the last argument is a callback, then it will use the supplied
callback. However, if no callback is provided, then it will print out
the error or results.
@@ -110,5 +109,5 @@ method names. Use the npm.deref
method to find the real name.
-
+
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 9c2b20b..84f0ac3 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -11,11 +11,11 @@
Add a registry user account
SYNOPSIS
-npm adduser [--registry=url] [--scope=@orgname]
+npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
DESCRIPTION
Create or verify a user named <username>
in the specified registry, and
save the credentials to the .npmrc
file. If no registry is specified,
-the default registry will be used (see npm-config(7)
).
+the default registry will be used (see npm-config(7)
).
The username, password, and email are read in from prompts.
You may use this command to change your email address, but not username
or password.
@@ -27,23 +27,33 @@ authorize on a new machine.
registry
Default: http://registry.npmjs.org/
The base URL of the npm package registry. If scope
is also specified,
-this registry will only be used for packages with that scope. See npm-scope(7)
.
+this registry will only be used for packages with that scope. See npm-scope(7)
.
scope
Default: none
If specified, the user and login credentials given will be associated
-with the specified scope. See npm-scope(7)
. You can use both at the same time,
+with the specified scope. See npm-scope(7)
. You can use both at the same time,
e.g.
npm adduser --registry=http://myregistry.example.com --scope=@myco
This will set a registry for the given scope and login or create a user for
that registry at the same time.
+always-auth
+Default: false
+If specified, save configuration indicating that all requests to the given
+registry should include authorization information. Useful for private
+registries. Can be used with --registry
and / or --scope
, e.g.
+npm adduser --registry=http://private-registry.example.com --always-auth
+
This will ensure that all requests to that registry (including for tarballs)
+include an authorization header. See always-auth
in npm-config(7)
for more
+details on always-auth. Registry-specific configuaration of always-auth
takes
+precedence over any global configuration.
SEE ALSO
@@ -57,5 +67,5 @@ that registry at the same time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index e3c993f..7f6e3a5 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -16,12 +16,12 @@
Print the folder where npm will install executables.
SEE ALSO
@@ -35,5 +35,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index e7ce93b..7758efa 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -33,14 +33,14 @@ a package.json
in the current folder and use the name
The base URL of the npm package registry.
SEE ALSO
@@ -54,5 +54,5 @@ a package.json
in the current folder and use the name
-
+
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index e2f60bb..ca62cb2 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -21,10 +21,10 @@ A folder containing a package.json
file in its root.
It should generally not be called directly.
SEE ALSO
@@ -38,5 +38,5 @@ A folder containing a package.json
file in its root.
-
+
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 0bdbb1e..9b833d0 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -17,7 +17,7 @@ install packages into the local space.
Just use npm install
now to do what npm bundle
used to do.
SEE ALSO
@@ -31,5 +31,5 @@ install packages into the local space.
-
+
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index a384b71..53835b3 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -61,13 +61,13 @@ they do not make an HTTP request to the registry.
The root cache folder.
SEE ALSO
@@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.
-
+
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 2d0dae8..5a678ba 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -26,9 +26,9 @@ environment, npm completion
acts in "plumbing mode", and
completions based on the arguments.
SEE ALSO
@@ -42,5 +42,5 @@ completions based on the arguments.
-
+
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index cf19f65..d97845e 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -22,8 +22,8 @@ npm set <key> <value> [--global]
DESCRIPTION
npm gets its config settings from the command line, environment
variables, npmrc
files, and in some cases, the package.json
file.
-See npmrc(5) for more information about the npmrc files.
-See npm-config(7)
for a more thorough discussion of the mechanisms
+
See npmrc(5) for more information about the npmrc files.
+See npm-config(7)
for a more thorough discussion of the mechanisms
involved.
The npm config
command can be used to update and edit the contents
of the user and global npmrc files.
@@ -48,11 +48,11 @@ of the user and global npmrc files.
global config.
SEE ALSO
@@ -66,5 +66,5 @@ global config.
-
+
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index 0e40c7e..bf6c997 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -23,7 +23,7 @@ be more effectively shared by multiple dependent packages.
| `-- c@1.0.3
`-- d <-- depends on c@~1.0.9
`-- c@1.0.10
-In this case, npm-dedupe(1)
will transform the tree to:
+In this case, npm-dedupe(1)
will transform the tree to:
a
+-- b
+-- d
@@ -47,9 +47,9 @@ tag with the given name exists, the tagged version is preferred over newer
versions.
SEE ALSO
@@ -63,5 +63,5 @@ versions.
-
+
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index f4c568c..8182c6e 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -23,8 +23,8 @@ something like this:
To un-deprecate a package, specify an empty string (""
) for the message
argument.
SEE ALSO
@@ -38,5 +38,5 @@ something like this:
-
+
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 14f4479..e9f2c9e 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -36,13 +36,13 @@ the current folder and use the name
property.
The base URL of the npm package registry.
SEE ALSO
@@ -56,5 +56,5 @@ the current folder and use the name
property.
-
+
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 542404c..24a70fe 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -14,7 +14,7 @@
npm edit <name>[@<version>]
DESCRIPTION
Opens the package folder in the default editor (or whatever you've
-configured as the npm editor
config -- see npm-config(7)
.)
+configured as the npm editor
config -- see npm-config(7)
.)
After it has been edited, the package is rebuilt so as to pick up any
changes in compiled packages.
For instance, you can do npm install connect
to install connect
@@ -30,12 +30,12 @@ or "notepad"
on Windows.
The command to run for npm edit
or npm config edit
.
SEE ALSO
@@ -49,5 +49,5 @@ or "notepad"
on Windows.
-
+
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 15d7761..eeb4906 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -31,12 +31,11 @@ Windows
The shell to run for the npm explore
command.
SEE ALSO
@@ -50,5 +49,5 @@ Windows
-
+
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 22ddb9d..2cf7506 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -30,9 +30,9 @@ where the terms were found in the documentation.
If false, then help-search will just list out the help topics found.
SEE ALSO
@@ -46,5 +46,5 @@ where the terms were found in the documentation.
-
+
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 52096aa..12c6c0e 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -29,16 +29,16 @@ matches are equivalent to specifying a topic name.
Set to "browser"
to view html help content in the default web browser.
SEE ALSO
@@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.
-
+
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 6b4bfe1..e7640ea 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -11,7 +11,7 @@
Interactively create a package.json file
SYNOPSIS
-npm init
+npm init [-f|--force|-y|--yes]
DESCRIPTION
This will ask you a bunch of questions, and then write a package.json for you.
It attempts to make reasonable guesses about what you want things to be set to,
@@ -20,11 +20,13 @@ and then writes a package.json file with the options you've selected.
the options in there.
It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.
+If you invoke it with -f
, --force
, -y
, or --yes
, it will use only
+defaults and not prompt you for any options.
SEE ALSO
@@ -38,5 +40,5 @@ without a really good reason to do so.
-
+
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 38d160f..3759f01 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -23,13 +23,13 @@ npm i (with any of the previous argument usage)
DESCRIPTION
This command installs a package, and any packages that it depends on. If the
package has a shrinkwrap file, the installation of dependencies will be driven
-by that. See npm-shrinkwrap(1) .
+by that. See npm-shrinkwrap(1) .
A package
is:
a) a folder containing a program described by a package.json file
b) a gzipped tarball containing (a)
c) a url that resolves to (b)
-d) a <name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
+d) a <name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
e) a <name>@<tag>
that points to (d)
f) a <name>
that has a "latest" tag satisfying (e)
g) a <git remote url>
that resolves to (b)
@@ -66,7 +66,7 @@ after packing it up into a tarball (b).
npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]
:
Do a <name>@<tag>
install, where <tag>
is the "tag" config. (See
- npm-config(7)
.)
+ npm-config(7)
.)
In most cases, this will install the latest version
of the module published on npm.
Example:
@@ -87,7 +87,7 @@ exact version rather than using npm's default semver range
operator.
<scope>
is optional. The package will be downloaded from the registry
associated with the specified scope. If no registry is associated with
-the given scope the default registry is assumed. See npm-scope(7)
.
+the given scope the default registry is assumed. See npm-scope(7)
.
Note: if you do not include the @-symbol on your scope name, npm will
interpret this as a GitHub repository instead, see below. Scopes names
must also be followed by a slash.
@@ -123,7 +123,7 @@ fetch the package by name if it is not valid.
npm install [@<scope>/]<name>@<version range>
:
Install a version of the package matching the specified version range. This
- will follow the same rules for resolving dependencies described in package.json(5)
.
+ will follow the same rules for resolving dependencies described in package.json(5)
.
Note that most version ranges must be put in quotes so that your shell will
treat it as a single argument.
Example:
@@ -161,7 +161,7 @@ versions.
local copy exists on disk.
npm install sax --force
The --global
argument will cause npm to install the package globally
-rather than locally. See npm-folders(5)
.
+rather than locally. See npm-folders(5)
.
The --link
argument will cause npm to link global installs into the
local space in some cases.
The --no-bin-links
argument will prevent npm from creating symlinks for
@@ -172,7 +172,7 @@ being installed.
shrinkwrap file and use the package.json instead.
The --nodedir=/path/to/node/source
argument will allow npm to find the
node source code so that npm can compile native modules.
-See npm-config(7)
. Many of the configuration params have some
+
See npm-config(7)
. Many of the configuration params have some
effect on installation, since that's most of what npm does.
ALGORITHM
To install a package, npm uses the following algorithm:
@@ -193,7 +193,7 @@ this algorithm produces:
`-- D
That is, the dependency from B to C is satisfied by the fact that A
already caused C to be installed at a higher level.
-See npm-folders(5) for a more detailed description of the specific
+
See npm-folders(5) for a more detailed description of the specific
folder structures that npm creates.
Limitations of npm's Install Algorithm
There are some very rare and pathological edge-cases where a cycle can
@@ -213,19 +213,19 @@ to symlink the existing version into the new location. If this ever
affects a real use-case, it will be investigated.
SEE ALSO
@@ -239,5 +239,5 @@ affects a real use-case, it will be investigated.
-
+
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 0d28a7d..8d08589 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -18,12 +18,12 @@ npm ln (with any of the previous argument usage)
Package linking is a two-step process.
First, npm link
in a package folder will create a globally-installed
symbolic link from prefix/package-name
to the current folder (see
-npm-config(7)
for the value of prefix
).
+npm-config(7)
for the value of prefix
).
Next, in some other location, npm link package-name
will create a
symlink from the local node_modules
folder to the global symlink.
Note that package-name
is taken from package.json
,
not from directory name.
-The package name can be optionally prefixed with a scope. See npm-scope(7)
.
+
The package name can be optionally prefixed with a scope. See npm-scope(7)
.
The scope must by preceded by an @-symbol and followed by a slash.
When creating tarballs for npm publish
, the linked packages are
"snapshotted" to their current state by resolving the symbolic links.
@@ -45,19 +45,19 @@ npm link ../node-redis # link the dir of your dependency
npm link redis
That is, it first creates a global link, and then links the global
installation target into your project's node_modules
folder.
-If your linked package is scoped (see npm-scope(7)
) your link command must
+
If your linked package is scoped (see npm-scope(7)
) your link command must
include that scope, e.g.
npm link @myorg/privatepackage
SEE ALSO
@@ -71,5 +71,5 @@ include that scope, e.g.
-
+
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index a52b117..30419bd 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.
limit the results to only the paths to the packages named. Note that
nested packages will also show the paths to the specified packages.
For example, running npm ls promzard
in npm's source tree will show:
-npm@2.0.0 /path/to/npm
+npm@2.1.6 /path/to/npm
ââ⬠init-package-json@0.0.4
âââ promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -63,15 +63,15 @@ project.
Max display depth of the dependency tree.
SEE ALSO
@@ -85,5 +85,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 6d12d1a..07a0a93 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -51,9 +51,9 @@ project.
Max depth for checking dependency tree.
SEE ALSO
@@ -67,5 +67,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index b2f8f84..3600e08 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -32,10 +32,10 @@ or you can't. Future versions may contain more fine-grained access levels,
that is not implemented at this time.
SEE ALSO
@@ -49,5 +49,5 @@ that is not implemented at this time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 5518eb1..987ba3f 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -23,11 +23,11 @@ overwritten the second time.
If no arguments are supplied, then npm packs the current package folder.
SEE ALSO
@@ -41,5 +41,5 @@ overwritten the second time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index 95780b9..7b6a3c5 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -16,15 +16,15 @@
Print the local prefix to standard out. This is the closest parent directory
to contain a package.json file unless -g
is also specified.
If -g
is specified, this will be the value of the global prefix. See
-npm-config(7)
for more detail.
+npm-config(7)
for more detail.
SEE ALSO
@@ -38,5 +38,5 @@ to contain a package.json file unless -g
is also specified.
-
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 49bb31e..dea291b 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -23,9 +23,9 @@ package's dependencies list.
packages specified in your devDependencies
.
SEE ALSO
@@ -39,5 +39,5 @@ packages specified in your devDependencies
.
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 3969f35..e1b46d2 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -14,10 +14,12 @@
npm publish <tarball> [--tag <tag>]
npm publish <folder> [--tag <tag>]
DESCRIPTION
-Publishes a package to the registry so that it can be installed by name.
+Publishes a package to the registry so that it can be installed by name. See
+npm-developers(7)
for details on what's included in the published package, as
+well as details on how the package is built.
By default npm will publish to the public registry. This can be overridden by
-specifying a different default registry or using a npm-scope(7)
in the name
-(see package.json(5)
).
+specifying a different default registry or using a npm-scope(7)
in the name
+(see package.json(5)
).
<folder>
:
A folder containing a package.json file
@@ -36,14 +38,14 @@ and npm install
installs the latest
tag.
the specified registry.
Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
-it is removed with npm-unpublish(1) .
+it is removed with npm-unpublish(1) .
SEE ALSO
@@ -57,5 +59,5 @@ it is removed with npm-unpublish(1) .
-
+
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 01d0f33..4da97a7 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -23,8 +23,8 @@ when you install a new version of node, and must recompile all your C++ addons w
the new binary.
SEE ALSO
@@ -38,5 +38,5 @@ the new binary.
-
+
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 350f2fd..02335b4 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -27,8 +27,8 @@ a package.json
in the current folder and use the name
The browser that is called by the npm repo
command to open websites.
SEE ALSO
@@ -42,5 +42,5 @@ a package.json
in the current folder and use the name
-
+
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index c4a0ace..d7536f8 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -13,17 +13,15 @@
SYNOPSIS
npm restart [-- <args>]
DESCRIPTION
-This runs a package's "restart" script, if one was provided.
-Otherwise it runs package's "stop" script, if one was provided, and then
-the "start" script.
-If no version is specified, then it restarts the "active" version.
+This runs a package's "restart" script, if one was provided. Otherwise it runs
+package's "stop" script, if one was provided, and then the "start" script.
SEE ALSO
@@ -37,5 +35,5 @@ the "start" script.
-
+
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index 188cb51..3b28aaa 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -20,12 +20,12 @@ npm un <name>
on its behalf.
SEE ALSO
@@ -39,5 +39,5 @@ on its behalf.
-
+
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 4eeb0ae..f6b8b22 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -16,12 +16,12 @@
Print the effective node_modules
folder to standard out.
SEE ALSO
@@ -35,5 +35,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index dec511c..8ca2ea2 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -20,13 +20,20 @@ in the current folder and use its "scripts"
object. If no
is provided, it will list the available top level scripts.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.
+As of npm@2.0.0
, you can
+use custom arguments when executing scripts. The special option --
is used by
+getopt to delimit the end of the options. npm will pass
+all the arguments after the --
directly to your script:
+npm run test -- --grep="pattern"
+
The arguments will only be passed to the script specified after npm run
+and not to any pre or post script.
SEE ALSO
@@ -40,5 +47,5 @@ called directly, as well.
-
+
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index fac2fac..f5fe720 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -31,11 +31,11 @@ neatly on a single line. Modules with extremely long names will
fall on multiple lines.
SEE ALSO
@@ -49,5 +49,5 @@ fall on multiple lines.
-
+
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index ec54bc8..fbfaa6c 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -120,7 +120,7 @@ dependencies.
Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
publish your package.
-You can use npm-outdated(1) to view dependencies with newer versions
+
You can use npm-outdated(1) to view dependencies with newer versions
available.
Other Notes
A shrinkwrap file must be consistent with the package's package.json
@@ -148,9 +148,9 @@ source control, or pursue some other mechanism that can verify
contents rather than versions.
SEE ALSO
@@ -164,5 +164,5 @@ contents rather than versions.
-
+
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index 9b70357..d3bbde5 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -20,9 +20,9 @@ a vaguely positive way to show that you care.
It's a boolean thing. Starring repeatedly has no additional effect.
SEE ALSO
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.
-
+
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index 9c3b24d..7873880 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -20,10 +20,10 @@ quickly this command lets you do just that.
you will most certainly enjoy this command.
SEE ALSO
@@ -37,5 +37,5 @@ you will most certainly enjoy this command.
-
+
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index 8e98cc3..0a3134b 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -16,11 +16,11 @@
This runs a package's "start" script, if one was provided.
SEE ALSO
@@ -34,5 +34,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 9526880..01638ee 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -16,11 +16,11 @@
This runs a package's "stop" script, if one was provided.
SEE ALSO
@@ -34,5 +34,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html
index 899005f..4ac55a8 100644
--- a/deps/npm/html/doc/cli/npm-submodule.html
+++ b/deps/npm/html/doc/cli/npm-submodule.html
@@ -27,7 +27,7 @@ or you can do npm explore <pkgname> -- npm install
to install
dependencies into the submodule folder.
SEE ALSO
@@ -42,5 +42,5 @@ dependencies into the submodule folder.
-
+
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index 7dfbd18..946d5fa 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -24,13 +24,13 @@ of using a specific version number:
Publishing a package always sets the "latest" tag to the published version.
SEE ALSO
@@ -44,5 +44,5 @@ of using a specific version number:
-
+
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index 4d9779e..6c5467d 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -19,11 +19,11 @@
true.
SEE ALSO
@@ -37,5 +37,5 @@ true.
-
+
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index c4e7858..2a3c12c 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -30,7 +30,7 @@ the package version in your main package.json:
--save-optional
: Package will be removed from your optionalDependencies
.
-Scope is optional and follows the usual rules for npm-scope(7)
.
+Scope is optional and follows the usual rules for npm-scope(7)
.
Examples:
npm uninstall sax --save
npm uninstall @myorg/privatepackage --save
@@ -38,12 +38,12 @@ npm uninstall node-tap --save-dev
npm uninstall dtrace-provider --save-optional
SEE ALSO
@@ -57,5 +57,5 @@ npm uninstall dtrace-provider --save-optional
-
+
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index eb17592..59b278e 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -26,14 +26,14 @@ the root package entry is removed from the registry entirely.
Even if a package version is unpublished, that specific name and
version combination can never be reused. In order to publish the
package again, a new version number must be used.
-The scope is optional and follows the usual rules for npm-scope(7)
.
+The scope is optional and follows the usual rules for npm-scope(7)
.
SEE ALSO
@@ -47,5 +47,5 @@ package again, a new version number must be used.
-
+
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 0c2d19e..5fa7846 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -22,11 +22,11 @@ packages.
or local) will be updated.
SEE ALSO
@@ -40,5 +40,5 @@ or local) will be updated.
-
+
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index de67a1b..6477726 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -39,9 +39,9 @@ user: "isaacs (http://blog.izs.me/) <i@izs.me>"
Enter passphrase:
SEE ALSO
@@ -55,5 +55,5 @@ Enter passphrase:
-
+
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index bc134c9..3b87ba0 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -46,7 +46,7 @@ can do this:
npm view express contributors.name contributors.email
"Person" fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of npm contributors in
-the shortened string format. (See package.json(5)
for more on this.)
+the shortened string format. (See package.json(5)
for more on this.)
npm view npm contributors
If a version range is provided, then data will be printed for every
matching version of the package. This will show which version of jsdom
@@ -63,12 +63,12 @@ will be prefixed with the version it applies to.
the field name.
SEE ALSO
@@ -82,5 +82,5 @@ the field name.
-
+
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index 2cd0f27..a2705c4 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -16,10 +16,10 @@
Print the username
config to standard output.
SEE ALSO
@@ -33,5 +33,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index 66b8753..3bd3849 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@
SYNOPSIS
npm <command> [args]
VERSION
-2.0.0
+2.1.6
DESCRIPTION
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -25,7 +25,7 @@ programs.
INTRODUCTION
You probably got npm because you want to install stuff.
Use npm install blerg
to install the latest version of "blerg". Check out
-npm-install(1)
for more info. It can do a lot of stuff.
+npm-install(1)
for more info. It can do a lot of stuff.
Use the npm search
command to show everything that's available.
Use npm ls
to show everything you've installed.
DEPENDENCIES
@@ -42,7 +42,7 @@ For more information visit
the node-gyp repository and
the node-gyp Wiki .
DIRECTORIES
-See npm-folders(5)
to learn about where npm puts stuff.
+See npm-folders(5)
to learn about where npm puts stuff.
In particular, npm has two modes of operation:
global mode: npm installs packages into the install prefix at
@@ -58,7 +58,7 @@ operate in global mode instead.
following help topics:
link:
For linking your current working code into Node's path, so that you
don't have to reinstall every time you make a change. Use
@@ -93,12 +93,12 @@ then that file is parsed instead.
Defaults: npm's default configuration options are defined in
lib/utils/config-defs.js. These must not be changed.
-See npm-config(7)
for much much more information.
+See npm-config(7)
for much much more information.
CONTRIBUTIONS
Patches welcome!
Be sure to include all of the output from the npm command that didn't work
as expected. The npm-debug.log
file is also helpful to provide.
@@ -128,19 +128,19 @@ will no doubt tell you to put the output in a gist or email.
Isaac Z. Schlueter ::
isaacs ::
@izs ::
-i@izs.me
+i@izs.me
SEE ALSO
@@ -154,5 +154,5 @@ will no doubt tell you to put the output in a gist or email.
-
+
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index cb2b56c..ec32039 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -44,7 +44,7 @@ Global installs on Windows go to {prefix}/node_modules
(that is, no
Scoped packages are installed the same way, except they are grouped together
in a sub-folder of the relevant node_modules
folder with the name of that
scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
-the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
more details.
If you wish to require()
a package, then install it locally.
Executables
@@ -59,7 +59,7 @@ when you run npm test
.)
When in local mode, man pages are not installed.
Man pages are not installed on Windows systems.
Cache
-See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+
See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
~/npm-cache
on Windows.
This is controlled by the cache
configuration param.
Temp Files
@@ -159,18 +159,18 @@ the items there are not in the bundledDependencies
array, then they
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json(5)
for more information.
+cannot be found elsewhere. See package.json(5)
for more information.
SEE ALSO
@@ -184,5 +184,5 @@ cannot be found elsewhere. See packa
-
+
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index cb2b56c..90e5dca 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -1,9 +1,9 @@
- npm-folders
+ npm-global
-
+
@@ -44,7 +44,7 @@ Global installs on Windows go to {prefix}/node_modules
(that is, no
Scoped packages are installed the same way, except they are grouped together
in a sub-folder of the relevant node_modules
folder with the name of that
scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
-the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
more details.
If you wish to require()
a package, then install it locally.
Executables
@@ -59,7 +59,7 @@ when you run npm test
.)
When in local mode, man pages are not installed.
Man pages are not installed on Windows systems.
Cache
-See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+
See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
~/npm-cache
on Windows.
This is controlled by the cache
configuration param.
Temp Files
@@ -159,18 +159,18 @@ the items there are not in the bundledDependencies
array, then they
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
-cannot be found elsewhere. See package.json(5)
for more information.
+cannot be found elsewhere. See package.json(5)
for more information.
SEE ALSO
@@ -184,5 +184,5 @@ cannot be found elsewhere. See packa
-
+
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index b00032d..ade4fd0 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -1,9 +1,9 @@
- package.json
+ npm-json
-
+
@@ -14,7 +14,7 @@
This document is all you need to know about what's required in your package.json
file. It must be actual JSON, not just a JavaScript object literal.
A lot of the behavior described in this document is affected by the config
-settings described in npm-config(7)
.
+settings described in npm-config(7)
.
name
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -35,7 +35,7 @@ be something short, but also reasonably descriptive.
already, before you get too attached to it. http://registry.npmjs.org/
A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
-npm-scope(7)
for more detail.
+npm-scope(7)
for more detail.
version
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -45,7 +45,7 @@ changes to the version.
Version must be parseable by
node-semver , which is bundled
with npm as a dependency. (npm install semver
to use it yourself.)
-More on version numbers and ranges at semver(7) .
+More on version numbers and ranges at semver(7) .
description
Put a description in it. It's a string. This helps people discover your
package, as it's listed in npm search
.
@@ -161,16 +161,16 @@ compressed. The number dictates which man section the file is installed into.
directories
The CommonJS Packages spec details a
few ways that you can indicate the structure of your package using a directories
-hash. If you look at npm's package.json ,
+object. If you look at npm's package.json ,
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
directories.lib
Tell people where the bulk of your library is. Nothing special is done
with the lib folder in any way, but it's useful meta info.
directories.bin
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash.
-If you have a "bin" hash already, then this has no effect.
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
directories.man
A folder that is full of man pages. Sugar to generate a "man" array by
walking the folder.
@@ -197,37 +197,37 @@ command will be able to find you.
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
scripts
-The "scripts" member is an object hash of script commands that are run
+
The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
-See npm-scripts(7)
to find out more about writing package scripts.
+See npm-scripts(7)
to find out more about writing package scripts.
config
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
and then had a "start" command that then referenced the
npm_package_config_port
environment variable, then the user could
override that by doing npm config set foo:port 8001
.
-See npm-config(7)
and npm-scripts(7)
for more on package
+
See npm-config(7)
and npm-scripts(7)
for more on package
configs.
dependencies
-Dependencies are specified with a simple hash of package name to
+
Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
-space-separated descriptors. Dependencies can also be identified with
-a tarball or git URL.
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
Please do not put test harnesses or transpilers in your
-dependencies
hash. See devDependencies
, below.
-See semver(7) for more details about specifying version ranges.
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
version
Must match version
exactly
>version
Must be greater than version
>=version
etc
<version
<=version
-~version
"Approximately equivalent to version" See semver(7)
-^version
"Compatible with version" See semver(7)
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
http://...
See 'URLs as Dependencies' below
*
Matches any version
@@ -236,7 +236,7 @@ a tarball or git URL.
range1 || range2
Passes if either range1 or range2 are satisfied.
git...
See 'Git URLs as Dependencies' below
user/repo
See 'GitHub URLs' below
-tag
A specific version tagged and published as tag
See npm-tag(1)
+tag
A specific version tagged and published as tag
See npm-tag(1)
path/path/path
See Local Paths below
For example, these are all valid:
@@ -252,7 +252,7 @@ a tarball or git URL.
, "two" : "2.x"
, "thr" : "3.3.x"
, "lat" : "latest"
- , "dyl" : "~/projects/dyl"
+ , "dyl" : "file:../dyl"
}
}
URLs as Dependencies
@@ -278,12 +278,21 @@ an argument to git checkout
. The default is master
.
}
}
Local Paths
-As of version 2.0.0 you can provide a path to a local directory that
-contains a package. Local paths can be in the form:
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
../foo/bar
~/foo/bar
./foo/bar
/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
This feature is helpful for local offline development and creating
tests that require npm installing where you don't want to hit an
external server, but should not be used when publishing packages
@@ -292,11 +301,11 @@ to the public registry.
If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
-In this case, it's best to list these additional items in a
-devDependencies
hash.
+In this case, it's best to map these additional items in a devDependencies
+object.
These things will be installed when doing npm link
or npm install
from the root of a package, and can be managed like any other npm
-configuration param. See npm-config(7)
for more on the topic.
+configuration param. See npm-config(7)
for more on the topic.
For build steps that are not platform-specific, such as compiling
CoffeeScript or other languages to JavaScript, use the prepublish
script to do this, and make the required package a devDependency.
@@ -346,11 +355,11 @@ this. If you depend on features introduced in 1.5.2, use ">= 1.5.2
Array of package names that will be bundled when publishing the package.
If this is spelled "bundleDependencies"
, then that is also honorable.
optionalDependencies
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-optionalDependencies
hash. This is a map of package name to version
-or url, just like the dependencies
hash. The difference is that
-failure is tolerated.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
try {
@@ -385,11 +394,11 @@ are capable of properly installing your program. For example:
field is advisory only.
engineStrict
If you are sure that your module will definitely not run properly on
-versions of Node/npm other than those specified in the engines
hash,
+versions of Node/npm other than those specified in the engines
object,
then you can set "engineStrict": true
in your package.json file.
This will override the user's engine-strict
config setting.
Please do not do this unless you are really very very sure. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
@@ -419,11 +428,11 @@ does help prevent some confusion if it doesn't work as expected.
private
If you set "private": true
in your package.json, then npm will refuse
to publish it.
-This is a way to prevent accidental publication of private repositories.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the publishConfig
hash described below
-to override the registry
config param at publish-time.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
publishConfig
This is a set of config values that will be used at publish-time. It's
especially handy if you want to set the tag or registry, so that you can
@@ -431,7 +440,7 @@ ensure that a given package is not tagged with "latest" or published t
the global public registry by default.
Any config values can be overridden, but of course only "tag" and
"registry" probably matter for the purposes of publishing.
-See npm-config(7)
to see the list of config options that can be
+
See npm-config(7)
to see the list of config options that can be
overridden.
DEFAULT VALUES
npm will default some values based on package contents.
@@ -453,16 +462,16 @@ ignored.
SEE ALSO
@@ -476,5 +485,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index f1f4817..9f37900 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -15,7 +15,7 @@
variables, and npmrc
files.
The npm config
command can be used to update and edit the contents
of the user and global npmrc files.
-For a list of available configuration options, see npm-config(7) .
+For a list of available configuration options, see npm-config(7) .
FILES
The four relevant files are:
@@ -55,11 +55,11 @@ maintainers to override default configs in a standard and consistent
manner.
SEE ALSO
@@ -73,5 +73,5 @@ manner.
-
+
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index b00032d..183ad8e 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -14,7 +14,7 @@
This document is all you need to know about what's required in your package.json
file. It must be actual JSON, not just a JavaScript object literal.
A lot of the behavior described in this document is affected by the config
-settings described in npm-config(7)
.
+settings described in npm-config(7)
.
name
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -35,7 +35,7 @@ be something short, but also reasonably descriptive.
already, before you get too attached to it. http://registry.npmjs.org/
A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
-npm-scope(7)
for more detail.
+npm-scope(7)
for more detail.
version
The most important things in your package.json are the name and version fields.
Those are actually required, and your package won't install without
@@ -45,7 +45,7 @@ changes to the version.
Version must be parseable by
node-semver , which is bundled
with npm as a dependency. (npm install semver
to use it yourself.)
-More on version numbers and ranges at semver(7) .
+More on version numbers and ranges at semver(7) .
description
Put a description in it. It's a string. This helps people discover your
package, as it's listed in npm search
.
@@ -161,16 +161,16 @@ compressed. The number dictates which man section the file is installed into.
directories
The CommonJS Packages spec details a
few ways that you can indicate the structure of your package using a directories
-hash. If you look at npm's package.json ,
+object. If you look at npm's package.json ,
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
directories.lib
Tell people where the bulk of your library is. Nothing special is done
with the lib folder in any way, but it's useful meta info.
directories.bin
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash.
-If you have a "bin" hash already, then this has no effect.
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
directories.man
A folder that is full of man pages. Sugar to generate a "man" array by
walking the folder.
@@ -197,37 +197,37 @@ command will be able to find you.
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
scripts
-The "scripts" member is an object hash of script commands that are run
+
The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
-See npm-scripts(7)
to find out more about writing package scripts.
+See npm-scripts(7)
to find out more about writing package scripts.
config
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
and then had a "start" command that then referenced the
npm_package_config_port
environment variable, then the user could
override that by doing npm config set foo:port 8001
.
-See npm-config(7)
and npm-scripts(7)
for more on package
+
See npm-config(7)
and npm-scripts(7)
for more on package
configs.
dependencies
-Dependencies are specified with a simple hash of package name to
+
Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
-space-separated descriptors. Dependencies can also be identified with
-a tarball or git URL.
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
Please do not put test harnesses or transpilers in your
-dependencies
hash. See devDependencies
, below.
-See semver(7) for more details about specifying version ranges.
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
version
Must match version
exactly
>version
Must be greater than version
>=version
etc
<version
<=version
-~version
"Approximately equivalent to version" See semver(7)
-^version
"Compatible with version" See semver(7)
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
http://...
See 'URLs as Dependencies' below
*
Matches any version
@@ -236,7 +236,7 @@ a tarball or git URL.
range1 || range2
Passes if either range1 or range2 are satisfied.
git...
See 'Git URLs as Dependencies' below
user/repo
See 'GitHub URLs' below
-tag
A specific version tagged and published as tag
See npm-tag(1)
+tag
A specific version tagged and published as tag
See npm-tag(1)
path/path/path
See Local Paths below
For example, these are all valid:
@@ -252,7 +252,7 @@ a tarball or git URL.
, "two" : "2.x"
, "thr" : "3.3.x"
, "lat" : "latest"
- , "dyl" : "~/projects/dyl"
+ , "dyl" : "file:../dyl"
}
}
URLs as Dependencies
@@ -278,12 +278,21 @@ an argument to git checkout
. The default is master
.
}
}
Local Paths
-As of version 2.0.0 you can provide a path to a local directory that
-contains a package. Local paths can be in the form:
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
../foo/bar
~/foo/bar
./foo/bar
/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
This feature is helpful for local offline development and creating
tests that require npm installing where you don't want to hit an
external server, but should not be used when publishing packages
@@ -292,11 +301,11 @@ to the public registry.
If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
-In this case, it's best to list these additional items in a
-devDependencies
hash.
+In this case, it's best to map these additional items in a devDependencies
+object.
These things will be installed when doing npm link
or npm install
from the root of a package, and can be managed like any other npm
-configuration param. See npm-config(7)
for more on the topic.
+configuration param. See npm-config(7)
for more on the topic.
For build steps that are not platform-specific, such as compiling
CoffeeScript or other languages to JavaScript, use the prepublish
script to do this, and make the required package a devDependency.
@@ -346,11 +355,11 @@ this. If you depend on features introduced in 1.5.2, use ">= 1.5.2
Array of package names that will be bundled when publishing the package.
If this is spelled "bundleDependencies"
, then that is also honorable.
optionalDependencies
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-optionalDependencies
hash. This is a map of package name to version
-or url, just like the dependencies
hash. The difference is that
-failure is tolerated.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
try {
@@ -385,11 +394,11 @@ are capable of properly installing your program. For example:
field is advisory only.
engineStrict
If you are sure that your module will definitely not run properly on
-versions of Node/npm other than those specified in the engines
hash,
+versions of Node/npm other than those specified in the engines
object,
then you can set "engineStrict": true
in your package.json file.
This will override the user's engine-strict
config setting.
Please do not do this unless you are really very very sure. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
@@ -419,11 +428,11 @@ does help prevent some confusion if it doesn't work as expected.
private
If you set "private": true
in your package.json, then npm will refuse
to publish it.
-This is a way to prevent accidental publication of private repositories.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the publishConfig
hash described below
-to override the registry
config param at publish-time.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
publishConfig
This is a set of config values that will be used at publish-time. It's
especially handy if you want to set the tag or registry, so that you can
@@ -431,7 +440,7 @@ ensure that a given package is not tagged with "latest" or published t
the global public registry by default.
Any config values can be overridden, but of course only "tag" and
"registry" probably matter for the purposes of publishing.
-See npm-config(7)
to see the list of config options that can be
+
See npm-config(7)
to see the list of config options that can be
overridden.
DEFAULT VALUES
npm will default some values based on package contents.
@@ -453,16 +462,16 @@ ignored.
SEE ALSO
@@ -476,5 +485,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index bae8566..6c68895 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -1,6 +1,6 @@
- npm-index
+ index
@@ -10,217 +10,213 @@
Index of all npm documentation
-
+
node package manager
Command Line Documentation
Using npm on the command line
-
+
node package manager
-
+
Add a registry user account
-
+
Display npm bin folder
-
+
Bugs for a package in a web browser maybe
-
+
Build a package
-
+
REMOVED
-
+
Manipulates packages cache
-
+
Tab Completion for npm
-
+
Manage the npm configuration files
-
+
Reduce duplication
-
+
Deprecate a version of a package
-
+
Docs for a package in a web browser maybe
-
+
Edit an installed package
-
+
Browse an installed package
-
+
Search npm help documentation
-
+
Get help on npm
-
+
Interactively create a package.json file
-
+
Install a package
-
+
Symlink a package folder
-
+
List installed packages
-
+
Check for outdated packages
-
+
Manage package owners
-
+
Create a tarball from a package
-
+
Display prefix
-
+
Remove extraneous packages
-
+
Publish a package
-
+
Rebuild a package
-
+
Open package repository page in the browser
-
+
Start a package
-
+
Remove a package
-
+
Display npm root
-
+
Run arbitrary package scripts
-
+
Search for packages
-
+
Lock down dependency versions
-
+
Mark your favorite packages
-
+
View packages marked as favorites
-
+
Start a package
-
+
Stop a package
-
-
Add a package as a git submodule
-
+
Tag a published version
-
+
Test a package
-
+
Remove a package
-
+
Remove a package from the registry
-
+
Update a package
-
+
Bump a package version
-
+
View registry info
-
+
Display npm username
API Documentation
Using npm in your Node programs
-
+
node package manager
-
+
Display npm bin folder
-
+
Bugs for a package in a web browser maybe
-
+
manage the npm cache programmatically
-
+
npm commands
-
+
Manage the npm configuration files
-
+
Deprecate a version of a package
-
+
Docs for a package in a web browser maybe
-
+
Edit an installed package
-
+
Browse an installed package
-
+
Search the help pages
-
+
Interactively create a package.json file
-
+
install a package programmatically
-
+
Symlink a package folder
-
+
Load config settings
-
+
List installed packages
-
+
Check for outdated packages
-
+
Manage package owners
-
+
Create a tarball from a package
-
+
Display prefix
-
+
Remove extraneous packages
-
+
Publish a package
-
+
Rebuild a package
-
+
Open package repository page in the browser
-
+
Start a package
-
+
Display npm root
-
+
Run arbitrary package scripts
-
+
Search for packages
-
+
programmatically generate package shrinkwrap file
-
+
Start a package
-
+
Stop a package
-
-
Add a package as a git submodule
-
+
Tag a published version
-
+
Test a package
-
+
uninstall a package programmatically
-
+
Remove a package from the registry
-
+
Update a package
-
+
Bump a package version
-
+
View registry info
-
+
Display npm username
Files
File system structures npm uses
-
+
Folder Structures Used by npm
-
+
The npm config files
-
+
Specifics of npm's package.json handling
Misc
Various other bits and bobs
-
+
npm's "funny" coding style
-
+
More than you probably want to know about npm configuration
-
+
Developer Guide
-
+
Handling Module Name Disputes
-
+
Frequently Asked Questions
-
+
Index of all npm documentation
-
+
The JavaScript Package Registry
-
+
Scoped packages
-
+
How npm handles the "scripts" field
-
+
Cleaning the Slate
-
+
The semantic versioner for npm
@@ -234,5 +230,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index 5d94f84..30d3e07 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -109,11 +109,11 @@ utility.
logging the same object over and over again is not helpful. Logs should
report what's happening so that it's easier to track down where a fault
occurs.
-Use appropriate log levels. See npm-config(7)
and search for
+
Use appropriate log levels. See npm-config(7)
and search for
"loglevel".
Case, naming, etc.
Use lowerCamelCase
for multiword identifiers when they refer to objects,
-functions, methods, members, or anything not specified in this section.
+functions, methods, properties, or anything not specified in this section.
Use UpperCamelCase
for class names (things that you'd pass to "new").
Use all-lower-hyphen-css-case
for multiword filenames and config keys.
Use named functions. They make stack traces easier to follow.
@@ -131,9 +131,9 @@ set to anything."
Boolean objects are verboten.
SEE ALSO
@@ -147,5 +147,5 @@ set to anything."
-
+
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index e7696f4..249d593 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -33,7 +33,7 @@ same.
global config file ($PREFIX/npmrc)
npm builtin config file (/path/to/npm/npmrc)
-See npmrc(5) for more details.
+See npmrc(5) for more details.
Default Configs
A set of configuration parameters that are internal to npm, and are
defaults if nothing else is specified.
@@ -79,7 +79,7 @@ example:
# same as:
npm ls --global --parseable --long --loglevel info
Per-Package Config Settings
-When running scripts (see npm-scripts(7)
) the package.json "config"
+
When running scripts (see npm-scripts(7)
) the package.json "config"
keys are overwritten in the environment if there is a config param of
<name>[@<version>]:<key>
. For example, if the package.json has
this:
@@ -90,7 +90,7 @@ this:
http.createServer(...).listen(process.env.npm_package_config_port)
then the user could change the behavior by doing:
npm config set foo:port 80
-
See package.json(5) for more information.
+
See package.json(5) for more information.
Config Settings
always-auth
@@ -138,7 +138,7 @@ well as for the CA information to be stored in a file on disk.
Default: Windows: %AppData%\npm-cache
, Posix: ~/.npm
Type: path
-The location of npm's cache directory. See npm-cache(1)
+The location of npm's cache directory. See npm-cache(1)
cache-lock-stale
Default: 60000 (1 minute)
@@ -285,7 +285,7 @@ the git binary.
Operates in "global" mode, so that packages are installed into the
prefix
folder instead of the current working directory. See
-npm-folders(5)
for more on the differences in behavior.
+npm-folders(5)
for more on the differences in behavior.
packages are installed into the {prefix}/lib/node_modules
folder, instead of the
current working directory.
@@ -332,32 +332,32 @@ user.
A module that will be loaded by the npm init
command. See the
documentation for the
init-package-json module
-for more information, or npm-init(1) .
-init.author.name
+for more information, or npm-init(1) .
+init-author-name
The value npm init
should use by default for the package author's name.
-init.author.email
+init-author-email
The value npm init
should use by default for the package author's email.
-init.author.url
+init-author-url
The value npm init
should use by default for the package author's homepage.
-init.license
+init-license
Default: "ISC"
Type: String
The value npm init
should use by default for the package license.
-init.version
+init-version
Default: "0.0.0"
Type: semver
@@ -403,14 +403,14 @@ being installed locally.
to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
loglevel
-Default: "http"
+Default: "warn"
Type: String
Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
What level of logs to report. On failure, all logs are written to
npm-debug.log
in the current working directory.
Any logs of a higher level than the setting are shown.
-The default is "http", which shows http, warn, and error output.
+The default is "warn", which shows warn and error output.
logstream
Default: process.stderr
@@ -441,7 +441,7 @@ colored output if it is a TTY.
Default: process.version
Type: semver or false
-The node version to use when checking package's "engines" hash.
+The node version to use when checking a package's engines
map.
npat
Default: false
@@ -460,7 +460,7 @@ usage.
Default: true
Type: Boolean
-Attempt to install packages in the optionalDependencies
hash. Note
+
Attempt to install packages in the optionalDependencies
object. Note
that if these packages fail to install, the overall installation
process is not aborted.
parseable
@@ -472,7 +472,7 @@ process is not aborted.
standard output.
prefix
The location to install global items. If set on the command line, then
@@ -528,8 +528,8 @@ this as true.
Type: Boolean
Save installed packages to a package.json file as dependencies.
-When used with the npm rm
command, it removes it from the dependencies
-hash.
+When used with the npm rm
command, it removes it from the dependencies
+object.
Only works if there is already a package.json file present.
save-bundle
@@ -546,9 +546,9 @@ bundledDependencies list.
Default: false
Type: Boolean
-Save installed packages to a package.json file as devDependencies.
+Save installed packages to a package.json file as devDependencies
.
When used with the npm rm
command, it removes it from the
-devDependencies hash.
+devDependencies
object.
Only works if there is already a package.json file present.
save-exact
@@ -566,7 +566,7 @@ using npm's default semver range operator.
Save installed packages to a package.json file as
optionalDependencies.
When used with the npm rm
command, it removes it from the
-devDependencies hash.
+devDependencies
object.
Only works if there is already a package.json file present.
save-prefix
@@ -687,7 +687,7 @@ will fail.
Type: Boolean
Set to show short usage output (like the -H output)
-instead of complete help when doing npm-help(1)
.
+instead of complete help when doing npm-help(1)
.
user
Default: "nobody"
@@ -728,8 +728,8 @@ this value. Thus, the defaults are 0755
and 0644
resp
Default: false
Type: boolean
-If true, output the npm version as well as node's process.versions
-hash, and exit successfully.
+If true, output the npm version as well as node's process.versions
map, and
+exit successfully.
Only relevant when specified explicitly on the command line.
viewer
@@ -740,12 +740,12 @@ hash, and exit successfully.
Set to "browser"
to view html help content in the default web browser.
SEE ALSO
@@ -759,5 +759,5 @@ hash, and exit successfully.
-
+
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index 1734785..b4190a1 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -45,7 +45,7 @@ an argument to git checkout
. The default is master
.
The package.json File
You need to have a package.json
file in the root of your project to do
much of anything with npm. That is basically the whole interface.
-See package.json(5)
for details about what goes in that file. At the very
+
See package.json(5)
for details about what goes in that file. At the very
least, you need:
name:
@@ -70,9 +70,9 @@ Take some credit.
scripts:
If you have a special compilation or installation script, then you
-should put it in the scripts
hash. You should definitely have at
+should put it in the scripts
object. You should definitely have at
least a basic smoke-test command as the "scripts.test" field.
-See npm-scripts(7) .
+See npm-scripts(7) .
main:
If you have a single module that serves as the entry point to your
@@ -80,13 +80,13 @@ program (like what the "foo" package gives you at require("foo&qu
then you need to specify that in the "main" field.
directories:
-This is a hash of folders. The best ones to include are "lib" and
-"doc", but if you specify a folder full of man pages in "man", then
+This is an object mapping names to folders. The best ones to include are
+"lib" and "doc", but if you use "man" to specify a folder full of man pages,
they'll get installed just like these ones.
You can use npm init
in the root of your package in order to get you
-started with a pretty basic package.json file. See npm-init(1)
for
+started with a pretty basic package.json file. See npm-init(1)
for
more info.
Keeping files out of your package
Use a .npmignore
file to keep stuff out of your package. If there's
@@ -115,14 +115,14 @@ bother adding node_modules
to .npmignore
.
.npmignore
is pointless:
Link Packages
npm link
is designed to install a development package and see the
changes in real time without having to keep re-installing it. (You do
need to either re-link or npm rebuild -g
to update compiled packages,
of course.)
-More info at npm-link(1)
.
+More info at npm-link(1)
.
Before Publishing: Make Sure Your Package Installs and Works
This is important.
If you can not install it locally, you'll have
@@ -145,7 +145,7 @@ bring in your module's main module.
Create a user with the adduser command. It works like this:
npm adduser
and then follow the prompts.
-This is documented better in npm-adduser(1) .
+This is documented better in npm-adduser(1) .
Publish your package
This part's easy. IN the root of your folder, do this:
npm publish
@@ -160,14 +160,14 @@ from a fresh checkout.
Tell the world how easy it is to install your program!
SEE ALSO
@@ -181,5 +181,5 @@ from a fresh checkout.
-
+
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index e6bc9a6..f59921e 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -13,7 +13,7 @@
SYNOPSIS
Get the author email with npm owner ls <pkgname>
-Email the author, CC support@npmjs.com
+Email the author, CC support@npmjs.com
After a few weeks, if there's no resolution, we'll sort it out.
Don't squat on package names. Publish code or move out of the way.
@@ -51,12 +51,12 @@ Joe's appropriate course of action in each case is the same.
owner (Bob).
Joe emails Bob, explaining the situation as respectfully as
possible , and what he would like to do with the module name. He
-adds the npm support staff support@npmjs.com to the CC list of
+adds the npm support staff support@npmjs.com to the CC list of
the email. Mention in the email that Bob can run npm owner add
joe foo
to add Joe as an owner of the foo
package.
After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can't come to any sort of resolution, email support
-support@npmjs.com and we'll sort it out. ("Reasonable" is
+support@npmjs.com and we'll sort it out. ("Reasonable" is
usually at least 4 weeks, but extra time is allowed around common
holidays.)
@@ -97,8 +97,8 @@ things into it.
If you see bad behavior like this, please report it right away.
SEE ALSO
@@ -112,5 +112,5 @@ things into it.
-
+
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index 85536d6..08c8eaf 100644
--- a/deps/npm/html/doc/misc/npm-faq.html
+++ b/deps/npm/html/doc/misc/npm-faq.html
@@ -21,7 +21,7 @@
Read the error output, and if you can't figure out what it means,
do what it says and post a bug with all the information it asks for.
Where does npm put stuff?
-See npm-folders(5)
+See npm-folders(5)
tl;dr:
Use the npm root
command to see where modules go, and the npm bin
@@ -48,7 +48,7 @@ not going to happen, because it's a terrible idea that causes more
problems than it solves.
It is much harder to avoid dependency conflicts without nesting
dependencies. This is fundamental to the way that npm works, and has
-proven to be an extremely successful approach. See npm-folders(5)
for
+proven to be an extremely successful approach. See npm-folders(5)
for
more details.
If you want a package to be installed in one place, and have all your
programs reference the same copy of it, then use the npm link
command.
@@ -100,7 +100,7 @@ lower-case, though it starts most sentences it is a part of.
npm search
Arguments are greps. npm search jsdom
shows jsdom packages.
How do I update npm?
-npm update npm -g
+npm install npm -g
You can also update all outdated local packages by doing npm update
without
any arguments, or global packages by doing npm update -g
.
Occasionally, the version of npm will progress such that the current
@@ -217,18 +217,18 @@ of Node 0.3.
https://github.com/nanjingboy/nvmw
How can I use npm for development?
-See npm-developers(7)
and package.json(5)
.
+See npm-developers(7)
and package.json(5)
.
You'll most likely want to npm link
your development folder. That's
awesomely handy.
-To set up your own private registry, check out npm-registry(7)
.
+To set up your own private registry, check out npm-registry(7)
.
Can I list a url as a dependency?
Yes. It should be a url to a gzipped tarball containing a single folder
that has a package.json in its root, or a git url.
(See "what is a package?" above.)
How do I symlink to a dev folder so I don't have to keep re-installing?
-See npm-link(1)
+See npm-link(1)
The package registry website. What is that exactly?
-See npm-registry(7)
.
+See npm-registry(7)
.
I forgot my password, and can't publish. How do I reset it?
Go to https://npmjs.org/forgot .
I get ECONNREFUSED a lot. What's up?
@@ -236,7 +236,7 @@ that has a package.json in its root, or a git url.
To check if the registry is down, open up
https://registry.npmjs.org/ in a web browser. This will also tell
you if you are just unable to access the internet for some reason.
-If the registry IS down, let us know by emailing support@npmjs.com
+
If the registry IS down, let us know by emailing support@npmjs.com
or posting an issue at https://github.com/npm/npm/issues . If it's
down for the world (and not just on your local network) then we're
probably already being pinged about it.
@@ -263,14 +263,14 @@ good folks at npm, Inc.
npm is not capable of hatred. It loves everyone, especially you.
SEE ALSO
@@ -284,5 +284,5 @@ good folks at npm, Inc.
-
+
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 6de20ca..1ca7d75 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -10,217 +10,213 @@
Index of all npm documentation
-
+
node package manager
Command Line Documentation
Using npm on the command line
-
+
node package manager
-
+
Add a registry user account
-
+
Display npm bin folder
-
+
Bugs for a package in a web browser maybe
-
+
Build a package
-
+
REMOVED
-
+
Manipulates packages cache
-
+
Tab Completion for npm
-
+
Manage the npm configuration files
-
+
Reduce duplication
-
+
Deprecate a version of a package
-
+
Docs for a package in a web browser maybe
-
+
Edit an installed package
-
+
Browse an installed package
-
+
Search npm help documentation
-
+
Get help on npm
-
+
Interactively create a package.json file
-
+
Install a package
-
+
Symlink a package folder
-
+
List installed packages
-
+
Check for outdated packages
-
+
Manage package owners
-
+
Create a tarball from a package
-
+
Display prefix
-
+
Remove extraneous packages
-
+
Publish a package
-
+
Rebuild a package
-
+
Open package repository page in the browser
-
+
Start a package
-
+
Remove a package
-
+
Display npm root
-
+
Run arbitrary package scripts
-
+
Search for packages
-
+
Lock down dependency versions
-
+
Mark your favorite packages
-
+
View packages marked as favorites
-
+
Start a package
-
+
Stop a package
-
-
Add a package as a git submodule
-
+
Tag a published version
-
+
Test a package
-
+
Remove a package
-
+
Remove a package from the registry
-
+
Update a package
-
+
Bump a package version
-
+
View registry info
-
+
Display npm username
API Documentation
Using npm in your Node programs
-
+
node package manager
-
+
Display npm bin folder
-
+
Bugs for a package in a web browser maybe
-
+
manage the npm cache programmatically
-
+
npm commands
-
+
Manage the npm configuration files
-
+
Deprecate a version of a package
-
+
Docs for a package in a web browser maybe
-
+
Edit an installed package
-
+
Browse an installed package
-
+
Search the help pages
-
+
Interactively create a package.json file
-
+
install a package programmatically
-
+
Symlink a package folder
-
+
Load config settings
-
+
List installed packages
-
+
Check for outdated packages
-
+
Manage package owners
-
+
Create a tarball from a package
-
+
Display prefix
-
+
Remove extraneous packages
-
+
Publish a package
-
+
Rebuild a package
-
+
Open package repository page in the browser
-
+
Start a package
-
+
Display npm root
-
+
Run arbitrary package scripts
-
+
Search for packages
-
+
programmatically generate package shrinkwrap file
-
+
Start a package
-
+
Stop a package
-
-
Add a package as a git submodule
-
+
Tag a published version
-
+
Test a package
-
+
uninstall a package programmatically
-
+
Remove a package from the registry
-
+
Update a package
-
+
Bump a package version
-
+
View registry info
-
+
Display npm username
Files
File system structures npm uses
-
+
Folder Structures Used by npm
-
+
The npm config files
-
+
Specifics of npm's package.json handling
Misc
Various other bits and bobs
-
+
npm's "funny" coding style
-
+
More than you probably want to know about npm configuration
-
+
Developer Guide
-
+
Handling Module Name Disputes
-
+
Frequently Asked Questions
-
+
Index of all npm documentation
-
+
The JavaScript Package Registry
-
+
Scoped packages
-
+
How npm handles the "scripts" field
-
+
Cleaning the Slate
-
+
The semantic versioner for npm
@@ -234,5 +230,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 530e350..d746316 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -22,9 +22,9 @@ is powered by a CouchDB database, of which there is a public mirror at
http://skimdb.npmjs.com/registry . The code for the couchapp is
available at http://github.com/npm/npm-registry-couchapp .
The registry URL used is determined by the scope of the package (see
-npm-scope(7)
). If no scope is specified, the default registry is used, which is
-supplied by the registry
config parameter. See npm-config(1)
,
-npmrc(5)
, and npm-config(7)
for more on managing npm's configuration.
+npm-scope(7)
). If no scope is specified, the default registry is used, which is
+supplied by the registry
config parameter. See npm-config(1)
,
+npmrc(5)
, and npm-config(7)
for more on managing npm's configuration.
Can I run my own private registry?
Yes!
The easiest way is to replicate the couch database, and use the same (or
@@ -40,7 +40,7 @@ package for the whole world to see, you can simply override the
published at all, or
"publishConfig":{"registry":"http://my-internal-registry.local"}
to force it to be published only to your internal registry.
-See package.json(5)
for more info on what goes in the package.json file.
+See package.json(5)
for more info on what goes in the package.json file.
Will you replicate from my registry into the public one?
No. If you want things to be public, then publish them into the public
registry using npm. What little security there is would be for nought
@@ -52,11 +52,11 @@ effectively implement the entire CouchDB API anyway.
Yes, head over to https://npmjs.org/
SEE ALSO
@@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index 91ac0ae..9fed0bb 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -27,15 +27,15 @@ folder, e.g. if your other packages are installed in node_modules/packagen
scoped modules will be in node_modules/@myorg/packagename
. The scope folder
(@myorg
) is simply the name of the scope preceded by an @-symbol, and can
contain any number of scoped packages.
-A scoped package is install by referencing it by name, preceded by an @-symbol,
-in npm install
:
+A scoped package is installed by referencing it by name, preceded by an
+@-symbol, in npm install
:
npm install @myorg/mypackage
Or in package.json
:
"dependencies": {
"@myorg/mypackage": "^1.3.0"
}
Note that if the @-symbol is omitted in either case npm will instead attempt to
-install from GitHub; see npm-install(1)
.
+install from GitHub; see npm-install(1)
.
Requiring scoped packages
Because scoped packages are installed into a scope folder, you have to
include the name of the scope when requiring them in your code, e.g.
@@ -63,8 +63,8 @@ with that scope will request packages from that registry instead. Any
that registry instead.
SEE ALSO
@@ -78,5 +78,5 @@ that registry instead.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 8b65e87..b2a3dbd 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -11,7 +11,7 @@
How npm handles the "scripts" field
DESCRIPTION
-npm supports the "scripts" member of the package.json script, for the
+
npm supports the "scripts" property of the package.json script, for the
following scripts:
prepublish:
@@ -41,9 +41,10 @@ Run by the npm start
command.
Run by the npm restart
command. Note: npm restart
will run the
stop and start scripts if no restart
script is provided.
-Additionally, arbitrary scripts can be executed by running `npm run-script
- . *Pre* and *post* commands with matching names will be run for
-those as well (e.g.
premyscript,
myscript,
postmyscript`).
+Additionally, arbitrary scripts can be executed by running npm
+run-script <pkg> <stage>
. Pre and post commands with matching
+names will be run for those as well (e.g. premyscript
, myscript
,
+postmyscript
).
NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
tl;dr Don't use install
. Use a .gyp
file for compilation, and
prepublish
for anything else.
@@ -123,7 +124,7 @@ package.json file, then your package scripts would have the
Configuration parameters are put in the environment with the
npm_config_
prefix. For instance, you can view the effective root
config by checking the npm_config_root
environment variable.
-Special: package.json "config" hash
+Special: package.json "config" object
The package.json "config" keys are overwritten in the environment if
there is a config param of <name>[@<version>]:<key>
. For example,
if the package.json has this:
@@ -189,7 +190,7 @@ fail, and potentially be rolled back. If the failure is minor or
only will prevent some optional features, then it's better to just
print a warning and exit successfully.
Try not to use scripts to do what npm can do for you. Read through
-package.json(5)
to see all the things that you can specify and enable
+package.json(5)
to see all the things that you can specify and enable
by simply describing your package appropriately. In general, this
will lead to a more robust and consistent state.
Inspect the env to determine where to put things. For instance, if
@@ -202,10 +203,10 @@ the user will sudo the npm command in question.
SEE ALSO
@@ -219,5 +220,5 @@ the user will sudo the npm command in question.
-
+
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 576c734..3028625 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -38,12 +38,12 @@ around:
Prior to version 0.3, npm used shim files for executables and node
modules. To track those down, you can do the following:
find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
-
(This is also in the README file.)
+(This is also in the README file.)
SEE ALSO
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:
-
+
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index 2a360ea..eeea8fb 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -125,7 +125,7 @@ numeric values in the [major, minor, patch]
tuple.
A partial version range is treated as an X-Range, so the special
character is in fact optional.
-` (empty string) :=
*:=
>=0.0.0`
+""
(empty string) := *
:= >=0.0.0
1
:= 1.x.x
:= >=1.0.0 <2.0.0
1.2
:= 1.2.x
:= >=1.2.0 <1.3.0
@@ -263,5 +263,5 @@ range, use the satisfies(version, range)
function.
-
+
diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html
new file mode 100644
index 0000000..13ff98d
--- /dev/null
+++ b/deps/npm/html/partial/doc/README.html
@@ -0,0 +1,166 @@
+ node package manager
+
+SYNOPSIS
+This is just enough info to get you up and running.
+Much more info available via npm help
once it's installed.
+IMPORTANT
+You need node v0.8 or higher to run this program.
+To install an old and unsupported version of npm that works on node 0.3
+and prior, clone the git repo and dig through the old tags and branches.
+Super Easy Install
+npm comes with node now.
+Windows Computers
+Get the MSI . npm is in it.
+Apple Macintosh Computers
+Get the pkg . npm is in it.
+Other Sorts of Unices
+Run make install
. npm will be installed with node.
+If you want a more fancy pants install (a different version, customized
+paths, etc.) then read on.
+Fancy Install (Unix)
+There's a pretty robust install script at
+https://www.npmjs.org/install.sh . You can download that and run it.
+Here's an example using curl:
+curl -L https://npmjs.org/install.sh | sh
+
Slightly Fancier
+You can set any npm configuration params with that script:
+npm_config_prefix=/some/path sh install.sh
+
Or, you can run it in uber-debuggery mode:
+npm_debug=1 sh install.sh
+
Even Fancier
+Get the code with git. Use make
to build the docs and do other stuff.
+If you plan on hacking on npm, make link
is your friend.
+If you've got the npm source code, you can also semi-permanently set
+arbitrary config keys using the ./configure --key=val ...
, and then
+run npm commands by doing node cli.js <cmd> <args>
. (This is helpful
+for testing, or running stuff without actually installing npm itself.)
+Fancy Windows Install
+You can download a zip file from https://npmjs.org/dist/ , and unpack it
+in the same folder where node.exe lives.
+If that's not fancy enough for you, then you can fetch the code with
+git, and mess with it directly.
+Installing on Cygwin
+No.
+Permissions when Using npm to Install Other Stuff
+tl;dr
+
+Use sudo
for greater safety. Or don't, if you prefer not to.
+npm will downgrade permissions if it's root before running any build
+scripts that package authors specified.
+
+More details...
+As of version 0.3, it is recommended to run npm as root.
+This allows npm to change the user identifier to the nobody
user prior
+to running any package build or test commands.
+If you are not the root user, or if you are on a platform that does not
+support uid switching, then npm will not attempt to change the userid.
+If you would like to ensure that npm always runs scripts as the
+"nobody" user, and have it fail if it cannot downgrade permissions, then
+set the following configuration param:
+npm config set unsafe-perm false
+
This will prevent running in unsafe mode, even as non-root users.
+Uninstalling
+So sad to see you go.
+sudo npm uninstall npm -g
+
Or, if that fails,
+sudo make uninstall
+
More Severe Uninstalling
+Usually, the above instructions are sufficient. That will remove
+npm, but leave behind anything you've installed.
+If you would like to remove all the packages that you have installed,
+then you can use the npm ls
command to find them, and then npm rm
to
+remove them.
+To remove cruft left behind by npm 0.x, you can use the included
+clean-old.sh
script file. You can run it conveniently like this:
+npm explore npm -g -- sh scripts/clean-old.sh
+
npm uses two configuration files, one for per-user configs, and another
+for global (every-user) configs. You can view them by doing:
+npm config get userconfig # defaults to ~/.npmrc
+npm config get globalconfig # defaults to /usr/local/etc/npmrc
+
Uninstalling npm does not remove configuration files by default. You
+must remove them yourself manually if you want them gone. Note that
+this means that future npm installs will not remember the settings that
+you have chosen.
+Using npm Programmatically
+If you would like to use npm programmatically, you can do that.
+It's not very well documented, but it is rather simple.
+Most of the time, unless you actually want to do all the things that
+npm does, you should try using one of npm's dependencies rather than
+using npm itself, if possible.
+Eventually, npm will be just a thin cli wrapper around the modules
+that it depends on, but for now, there are some things that you must
+use npm itself to do.
+var npm = require("npm")
+npm.load(myConfigObject, function (er) {
+ if (er) return handlError(er)
+ npm.commands.install(["some", "args"], function (er, data) {
+ if (er) return commandFailed(er)
+ // command succeeded, and data might have some info
+ })
+ npm.registry.log.on("log", function (message) { .... })
+})
+
The load
function takes an object hash of the command-line configs.
+The various npm.commands.<cmd>
functions take an array of
+positional argument strings . The last argument to any
+npm.commands.<cmd>
function is a callback. Some commands take other
+optional arguments. Read the source.
+You cannot set configs individually for any single npm function at this
+time. Since npm
is a singleton, any call to npm.config.set
will
+change the value for all npm commands in that process.
+See ./bin/npm-cli.js
for an example of pulling config values off of the
+command line arguments using nopt. You may also want to check out npm
+help config
to learn about all the options you can set there.
+More Docs
+Check out the docs ,
+especially the faq .
+You can use the npm help
command to read any of them.
+If you're a developer, and you want to use npm to publish your program,
+you should read this
+Legal Stuff
+"npm" and "The npm Registry" are owned by npm, Inc.
+All rights reserved. See the included LICENSE file for more details.
+"Node.js" and "node" are trademarks owned by Joyent, Inc.
+Modules published on the npm registry are not officially endorsed by
+npm, Inc. or the Node.js project.
+Data published to the npm registry is not part of npm itself, and is
+the sole property of the publisher. While every effort is made to
+ensure accountability, there is absolutely no guarantee, warrantee, or
+assertion expressed or implied as to the quality, fitness for a
+specific purpose, or lack of malice in any given npm package.
+If you have a complaint about a package in the public npm registry,
+and cannot resolve it with the package
+owner , please email
+support@npmjs.com and explain the situation.
+Any data published to The npm Registry (including user account
+information) may be removed or modified at the sole discretion of the
+npm server administrators.
+In plainer english
+npm is the property of npm, Inc.
+If you publish something, it's yours, and you are solely accountable
+for it.
+If other people publish something, it's theirs.
+Users can publish Bad Stuff. It will be removed promptly if reported.
+But there is no vetting process for published modules, and you use
+them at your own risk. Please inspect the source.
+If you publish Bad Stuff, we may delete it from the registry, or even
+ban your account in extreme cases. So don't do that.
+BUGS
+When you find issues, please report them:
+
+Be sure to include all of the output from the npm command that didn't work
+as expected. The npm-debug.log
file is also helpful to provide.
+You can also look for isaacs in #node.js on irc://irc.freenode.net. He
+will no doubt tell you to put the output in a gist or email.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-bin.html b/deps/npm/html/partial/doc/api/npm-bin.html
new file mode 100644
index 0000000..54f8955
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-bin.html
@@ -0,0 +1,8 @@
+ Display npm bin folder
+SYNOPSIS
+npm.commands.bin(args, cb)
+
DESCRIPTION
+Print the folder where npm will install executables.
+This function should not be used programmatically. Instead, just refer
+to the npm.bin
property.
+
diff --git a/deps/npm/html/partial/doc/api/npm-bugs.html b/deps/npm/html/partial/doc/api/npm-bugs.html
new file mode 100644
index 0000000..e9ff2a5
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-bugs.html
@@ -0,0 +1,13 @@
+ Bugs for a package in a web browser maybe
+SYNOPSIS
+npm.commands.bugs(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+bug tracker URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-cache.html b/deps/npm/html/partial/doc/api/npm-cache.html
new file mode 100644
index 0000000..b837a68
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-cache.html
@@ -0,0 +1,22 @@
+ manage the npm cache programmatically
+SYNOPSIS
+npm.commands.cache([args], callback)
+
+// helpers
+npm.commands.cache.clean([args], callback)
+npm.commands.cache.add([args], callback)
+npm.commands.cache.read(name, version, forceBypass, callback)
+
DESCRIPTION
+This acts much the same ways as the npm-cache(1) command line
+functionality.
+The callback is called with the package.json data of the thing that is
+eventually added to or read from the cache.
+The top level npm.commands.cache(...)
functionality is a public
+interface, and like all commands on the npm.commands
object, it will
+match the command line behavior exactly.
+However, the cache folder structure and the cache helper functions are
+considered internal API surface, and as such, may change in future
+releases of npm, potentially without warning or significant version
+incrementation.
+Use at your own risk.
+
diff --git a/deps/npm/html/partial/doc/api/npm-commands.html b/deps/npm/html/partial/doc/api/npm-commands.html
new file mode 100644
index 0000000..eaf57af
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-commands.html
@@ -0,0 +1,16 @@
+ npm commands
+SYNOPSIS
+npm.commands[<command>](args, callback)
+
DESCRIPTION
+npm comes with a full set of commands, and each of the commands takes a
+similar set of arguments.
+In general, all commands on the command object take an array of positional
+argument strings . The last argument to any function is a callback. Some
+commands are special and take other optional arguments.
+All commands have their own man page. See man npm-<command>
for command-line
+usage, or man 3 npm-<command>
for programmatic usage.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-config.html b/deps/npm/html/partial/doc/api/npm-config.html
new file mode 100644
index 0000000..b34c021
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-config.html
@@ -0,0 +1,37 @@
+ Manage the npm configuration files
+SYNOPSIS
+npm.commands.config(args, callback)
+var val = npm.config.get(key)
+npm.config.set(key, val)
+
DESCRIPTION
+This function acts much the same way as the command-line version. The first
+element in the array tells config what to do. Possible values are:
+
+set
+ Sets a config parameter. The second element in args
is interpreted as the
+ key, and the third element is interpreted as the value.
+
+get
+ Gets the value of a config parameter. The second element in args
is the
+ key to get the value of.
+
+delete
(rm
or del
)
+ Deletes a parameter from the config. The second element in args
is the
+ key to delete.
+
+list
(ls
)
+ Show all configs that aren't secret. No parameters necessary.
+
+edit
:
+ Opens the config file in the default editor. This command isn't very useful
+ programmatically, but it is made available.
+
+
+To programmatically access npm configuration settings, or set them for
+the duration of a program, use the npm.config.set
and npm.config.get
+functions instead.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-deprecate.html b/deps/npm/html/partial/doc/api/npm-deprecate.html
new file mode 100644
index 0000000..f0ef298
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-deprecate.html
@@ -0,0 +1,27 @@
+ Deprecate a version of a package
+SYNOPSIS
+npm.commands.deprecate(args, callback)
+
DESCRIPTION
+This command will update the npm registry entry for a package, providing
+a deprecation warning to all who attempt to install it.
+The 'args' parameter must have exactly two elements:
+
+package[@version]
+ The version
portion is optional, and may be either a range, or a
+ specific version, or a tag.
+
+message
+ The warning message that will be printed whenever a user attempts to
+ install the package.
+
+
+Note that you must be the package owner to deprecate something. See the
+owner
and adduser
help topics.
+To un-deprecate a package, specify an empty string (""
) for the message
argument.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-docs.html b/deps/npm/html/partial/doc/api/npm-docs.html
new file mode 100644
index 0000000..dde3892
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-docs.html
@@ -0,0 +1,13 @@
+ Docs for a package in a web browser maybe
+SYNOPSIS
+npm.commands.docs(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+documentation URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-edit.html b/deps/npm/html/partial/doc/api/npm-edit.html
new file mode 100644
index 0000000..ef49f94
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-edit.html
@@ -0,0 +1,16 @@
+ Edit an installed package
+SYNOPSIS
+npm.commands.edit(package, callback)
+
DESCRIPTION
+Opens the package folder in the default editor (or whatever you've
+configured as the npm editor
config -- see npm help config
.)
+After it has been edited, the package is rebuilt so as to pick up any
+changes in compiled packages.
+For instance, you can do npm install connect
to install connect
+into your package, and then npm.commands.edit(["connect"], callback)
+to make a few changes to your locally installed copy.
+The first parameter is a string array with a single element, the package
+to open. The package can optionally have a version number attached.
+Since this command opens an editor in a new process, be careful about where
+and how this is used.
+
diff --git a/deps/npm/html/partial/doc/api/npm-explore.html b/deps/npm/html/partial/doc/api/npm-explore.html
new file mode 100644
index 0000000..60f3ac1
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-explore.html
@@ -0,0 +1,11 @@
+ Browse an installed package
+SYNOPSIS
+npm.commands.explore(args, callback)
+
DESCRIPTION
+Spawn a subshell in the directory of the installed package specified.
+If a command is specified, then it is run in the subshell, which then
+immediately terminates.
+Note that the package is not automatically rebuilt afterwards, so be
+sure to use npm rebuild <pkg>
if you make any changes.
+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.
+
diff --git a/deps/npm/html/partial/doc/api/npm-help-search.html b/deps/npm/html/partial/doc/api/npm-help-search.html
new file mode 100644
index 0000000..7818b6b
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-help-search.html
@@ -0,0 +1,24 @@
+ Search the help pages
+SYNOPSIS
+npm.commands.helpSearch(args, [silent,] callback)
+
DESCRIPTION
+This command is rarely useful, but it exists in the rare case that it is.
+This command takes an array of search terms and returns the help pages that
+match in order of best match.
+If there is only one match, then npm displays that help section. If there
+are multiple results, the results are printed to the screen formatted and the
+array of results is returned. Each result is an object with these properties:
+
+hits:
+A map of args to number of hits on that arg. For example, {"npm": 3}
+found:
+Total number of unique args that matched.
+totalHits:
+Total number of hits.
+lines:
+An array of all matching lines (and some adjacent lines).
+file:
+Name of the file that matched
+
+The silent parameter is not necessary not used, but it may in the future.
+
diff --git a/deps/npm/html/partial/doc/api/npm-init.html b/deps/npm/html/partial/doc/api/npm-init.html
new file mode 100644
index 0000000..723fbde
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-init.html
@@ -0,0 +1,19 @@
+ Interactively create a package.json file
+SYNOPSIS
+npm.commands.init(args, callback)
+
DESCRIPTION
+This will ask you a bunch of questions, and then write a package.json for you.
+It attempts to make reasonable guesses about what you want things to be set to,
+and then writes a package.json file with the options you've selected.
+If you already have a package.json file, it'll read that first, and default to
+the options in there.
+It is strictly additive, so it does not delete options from your package.json
+without a really good reason to do so.
+Since this function expects to be run on the command-line, it doesn't work very
+well as a programmatically. The best option is to roll your own, and since
+JavaScript makes it stupid simple to output formatted JSON, that is the
+preferred method. If you're sure you want to handle command-line prompting,
+then go ahead and use this programmatically.
+SEE ALSO
+package.json(5)
+
diff --git a/deps/npm/html/partial/doc/api/npm-install.html b/deps/npm/html/partial/doc/api/npm-install.html
new file mode 100644
index 0000000..bfbd566
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-install.html
@@ -0,0 +1,12 @@
+ install a package programmatically
+SYNOPSIS
+npm.commands.install([where,] packages, callback)
+
DESCRIPTION
+This acts much the same ways as installing on the command-line.
+The 'where' parameter is optional and only used internally, and it specifies
+where the packages should be installed to.
+The 'packages' parameter is an array of strings. Each element in the array is
+the name of a package to be installed.
+Finally, 'callback' is a function that will be called when all packages have been
+installed or when an error has been encountered.
+
diff --git a/deps/npm/html/partial/doc/api/npm-link.html b/deps/npm/html/partial/doc/api/npm-link.html
new file mode 100644
index 0000000..e2efe3e
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-link.html
@@ -0,0 +1,22 @@
+ Symlink a package folder
+SYNOPSIS
+npm.commands.link(callback)
+npm.commands.link(packages, callback)
+
DESCRIPTION
+Package linking is a two-step process.
+Without parameters, link will create a globally-installed
+symbolic link from prefix/package-name
to the current folder.
+With a parameters, link will create a symlink from the local node_modules
+folder to the global symlink.
+When creating tarballs for npm publish
, the linked packages are
+"snapshotted" to their current state by resolving the symbolic links.
+This is
+handy for installing your own stuff, so that you can work on it and test it
+iteratively without having to continually rebuild.
+For example:
+npm.commands.link(cb) # creates global link from the cwd
+ # (say redis package)
+npm.commands.link('redis', cb) # link-install the package
+
Now, any changes to the redis package will be reflected in
+the package in the current working directory
+
diff --git a/deps/npm/html/partial/doc/api/npm-load.html b/deps/npm/html/partial/doc/api/npm-load.html
new file mode 100644
index 0000000..0796cac
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-load.html
@@ -0,0 +1,17 @@
+ Load config settings
+SYNOPSIS
+npm.load(conf, cb)
+
DESCRIPTION
+npm.load() must be called before any other function call. Both parameters are
+optional, but the second is recommended.
+The first parameter is an object containing command-line config params, and the
+second parameter is a callback that will be called when npm is loaded and ready
+to serve.
+The first parameter should follow a similar structure as the package.json
+config object.
+For example, to emulate the --dev flag, pass an object that looks like this:
+{
+ "dev": true
+}
+
For a list of all the available command-line configs, see npm help config
+
diff --git a/deps/npm/html/partial/doc/api/npm-ls.html b/deps/npm/html/partial/doc/api/npm-ls.html
new file mode 100644
index 0000000..508003c
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-ls.html
@@ -0,0 +1,43 @@
+ List installed packages
+SYNOPSIS
+npm.commands.ls(args, [silent,] callback)
+
DESCRIPTION
+This command will print to stdout all the versions of packages that are
+installed, as well as their dependencies, in a tree-structure. It will also
+return that data using the callback.
+This command does not take any arguments, but args must be defined.
+Beyond that, if any arguments are passed in, npm will politely warn that it
+does not take positional arguments, though you may set config flags
+like with any other command, such as global
to list global packages.
+It will print out extraneous, missing, and invalid packages.
+If the silent parameter is set to true, nothing will be output to the screen,
+but the data will still be returned.
+Callback is provided an error if one occurred, the full data about which
+packages are installed and which dependencies they will receive, and a
+"lite" data object which just shows which versions are installed where.
+Note that the full data object is a circular structure, so care must be
+taken if it is serialized to JSON.
+CONFIGURATION
+long
+
+Default: false
+Type: Boolean
+
+Show extended information.
+parseable
+
+Default: false
+Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+Default: false
+Type: Boolean
+
+List packages in the global install prefix instead of in the current
+project.
+Note, if parseable is set or long isn't set, then duplicates will be trimmed.
+This means that if a submodule a same dependency as a parent module, then the
+dependency will only be output once.
+
diff --git a/deps/npm/html/partial/doc/api/npm-outdated.html b/deps/npm/html/partial/doc/api/npm-outdated.html
new file mode 100644
index 0000000..16d3150
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-outdated.html
@@ -0,0 +1,8 @@
+ Check for outdated packages
+SYNOPSIS
+npm.commands.outdated([packages,] callback)
+
DESCRIPTION
+This command will check the registry to see if the specified packages are
+currently outdated.
+If the 'packages' parameter is left out, npm will check all packages.
+
diff --git a/deps/npm/html/partial/doc/api/npm-owner.html b/deps/npm/html/partial/doc/api/npm-owner.html
new file mode 100644
index 0000000..20e8b68
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-owner.html
@@ -0,0 +1,27 @@
+ Manage package owners
+SYNOPSIS
+npm.commands.owner(args, callback)
+
DESCRIPTION
+The first element of the 'args' parameter defines what to do, and the subsequent
+elements depend on the action. Possible values for the action are (order of
+parameters are given in parenthesis):
+
+ls (package):
+List all the users who have access to modify a package and push new versions.
+Handy when you need to know who to bug for help.
+add (user, package):
+Add a new user as a maintainer of a package. This user is enabled to modify
+metadata, publish new versions, and add other owners.
+rm (user, package):
+Remove a user from the package owner list. This immediately revokes their
+privileges.
+
+Note that there is only one level of access. Either you can modify a package,
+or you can't. Future versions may contain more fine-grained access levels, but
+that is not implemented at this time.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-pack.html b/deps/npm/html/partial/doc/api/npm-pack.html
new file mode 100644
index 0000000..6417688
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-pack.html
@@ -0,0 +1,13 @@
+ Create a tarball from a package
+SYNOPSIS
+npm.commands.pack([packages,] callback)
+
DESCRIPTION
+For anything that's installable (that is, a package folder, tarball,
+tarball url, name@tag, name@version, or name), this command will fetch
+it to the cache, and then copy the tarball to the current working
+directory as <name>-<version>.tgz
, and then write the filenames out to
+stdout.
+If the same package is specified multiple times, then the file will be
+overwritten the second time.
+If no arguments are supplied, then npm packs the current package folder.
+
diff --git a/deps/npm/html/partial/doc/api/npm-prefix.html b/deps/npm/html/partial/doc/api/npm-prefix.html
new file mode 100644
index 0000000..e9904b1
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-prefix.html
@@ -0,0 +1,9 @@
+ Display prefix
+SYNOPSIS
+npm.commands.prefix(args, callback)
+
DESCRIPTION
+Print the prefix to standard out.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically
+
diff --git a/deps/npm/html/partial/doc/api/npm-prune.html b/deps/npm/html/partial/doc/api/npm-prune.html
new file mode 100644
index 0000000..5835a9b
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-prune.html
@@ -0,0 +1,10 @@
+ Remove extraneous packages
+SYNOPSIS
+npm.commands.prune([packages,] callback)
+
DESCRIPTION
+This command removes "extraneous" packages.
+The first parameter is optional, and it specifies packages to be removed.
+No packages are specified, then all packages will be checked.
+Extraneous packages are packages that are not listed on the parent
+package's dependencies list.
+
diff --git a/deps/npm/html/partial/doc/api/npm-publish.html b/deps/npm/html/partial/doc/api/npm-publish.html
new file mode 100644
index 0000000..f0e5da9
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-publish.html
@@ -0,0 +1,26 @@
+ Publish a package
+SYNOPSIS
+npm.commands.publish([packages,] callback)
+
DESCRIPTION
+Publishes a package to the registry so that it can be installed by name.
+Possible values in the 'packages' array are:
+
+If the package array is empty, npm will try to publish something in the
+current working directory.
+This command could fails if one of the packages specified already exists in
+the registry. Overwrites when the "force" environment variable is set.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-rebuild.html b/deps/npm/html/partial/doc/api/npm-rebuild.html
new file mode 100644
index 0000000..e428728
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-rebuild.html
@@ -0,0 +1,10 @@
+ Rebuild a package
+SYNOPSIS
+npm.commands.rebuild([packages,] callback)
+
DESCRIPTION
+This command runs the npm build
command on each of the matched packages. This is useful
+when you install a new version of node, and must recompile all your C++ addons with
+the new binary. If no 'packages' parameter is specify, every package will be rebuilt.
+CONFIGURATION
+See npm help build
+
diff --git a/deps/npm/html/partial/doc/api/npm-repo.html b/deps/npm/html/partial/doc/api/npm-repo.html
new file mode 100644
index 0000000..9a18976
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-repo.html
@@ -0,0 +1,13 @@
+ Open package repository page in the browser
+SYNOPSIS
+npm.commands.repo(package, callback)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+repository URL, and then tries to open it using the --browser
+config param.
+Like other commands, the first parameter is an array. This command only
+uses the first element, which is expected to be a package name with an
+optional version number.
+This command will launch a browser, so this command may not be the most
+friendly for programmatic use.
+
diff --git a/deps/npm/html/partial/doc/api/npm-restart.html b/deps/npm/html/partial/doc/api/npm-restart.html
new file mode 100644
index 0000000..35db404
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-restart.html
@@ -0,0 +1,16 @@
+ Start a package
+SYNOPSIS
+npm.commands.restart(packages, callback)
+
DESCRIPTION
+This runs a package's "restart" script, if one was provided.
+Otherwise it runs package's "stop" script, if one was provided, and then
+the "start" script.
+If no version is specified, then it restarts the "active" version.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-root.html b/deps/npm/html/partial/doc/api/npm-root.html
new file mode 100644
index 0000000..1549515
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-root.html
@@ -0,0 +1,9 @@
+ Display npm root
+SYNOPSIS
+npm.commands.root(args, callback)
+
DESCRIPTION
+Print the effective node_modules
folder to standard out.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically.
+
diff --git a/deps/npm/html/partial/doc/api/npm-run-script.html b/deps/npm/html/partial/doc/api/npm-run-script.html
new file mode 100644
index 0000000..7cc42b6
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-run-script.html
@@ -0,0 +1,21 @@
+ Run arbitrary package scripts
+SYNOPSIS
+npm.commands.run-script(args, callback)
+
DESCRIPTION
+This runs an arbitrary command from a package's "scripts" object.
+It is used by the test, start, restart, and stop commands, but can be
+called directly, as well.
+The 'args' parameter is an array of strings. Behavior depends on the number
+of elements. If there is only one element, npm assumes that the element
+represents a command to be run on the local repository. If there is more than
+one element, then the first is assumed to be the package and the second is
+assumed to be the command to run. All other elements are ignored.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-search.html b/deps/npm/html/partial/doc/api/npm-search.html
new file mode 100644
index 0000000..13cceb3
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-search.html
@@ -0,0 +1,33 @@
+ Search for packages
+SYNOPSIS
+npm.commands.search(searchTerms, [silent,] [staleness,] callback)
+
DESCRIPTION
+Search the registry for packages matching the search terms. The available parameters are:
+
+searchTerms:
+Array of search terms. These terms are case-insensitive.
+silent:
+If true, npm will not log anything to the console.
+staleness:
+This is the threshold for stale packages. "Fresh" packages are not refreshed
+from the registry. This value is measured in seconds.
+callback:
+Returns an object where each key is the name of a package, and the value
+is information about that package along with a 'words' property, which is
+a space-delimited string of all of the interesting words in that package.
+The only properties included are those that are searched, which generally include:
+
+name
+description
+maintainers
+url
+keywords
+
+
+
+A search on the registry excludes any result that does not match all of the
+search terms. It also removes any items from the results that contain an
+excluded term (the "searchexclude" config). The search is case insensitive
+and doesn't try to read your mind (it doesn't do any verb tense matching or the
+like).
+
diff --git a/deps/npm/html/partial/doc/api/npm-shrinkwrap.html b/deps/npm/html/partial/doc/api/npm-shrinkwrap.html
new file mode 100644
index 0000000..b5f3359
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-shrinkwrap.html
@@ -0,0 +1,13 @@
+ programmatically generate package shrinkwrap file
+SYNOPSIS
+npm.commands.shrinkwrap(args, [silent,] callback)
+
DESCRIPTION
+This acts much the same ways as shrinkwrapping on the command-line.
+This command does not take any arguments, but 'args' must be defined.
+Beyond that, if any arguments are passed in, npm will politely warn that it
+does not take positional arguments.
+If the 'silent' parameter is set to true, nothing will be output to the screen,
+but the shrinkwrap file will still be written.
+Finally, 'callback' is a function that will be called when the shrinkwrap has
+been saved.
+
diff --git a/deps/npm/html/partial/doc/api/npm-start.html b/deps/npm/html/partial/doc/api/npm-start.html
new file mode 100644
index 0000000..2eae8ba
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-start.html
@@ -0,0 +1,8 @@
+ Start a package
+SYNOPSIS
+npm.commands.start(packages, callback)
+
DESCRIPTION
+This runs a package's "start" script, if one was provided.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-stop.html b/deps/npm/html/partial/doc/api/npm-stop.html
new file mode 100644
index 0000000..5b58289
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-stop.html
@@ -0,0 +1,8 @@
+ Stop a package
+SYNOPSIS
+npm.commands.stop(packages, callback)
+
DESCRIPTION
+This runs a package's "stop" script, if one was provided.
+npm can run stop on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-submodule.html b/deps/npm/html/partial/doc/api/npm-submodule.html
new file mode 100644
index 0000000..6698414
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-submodule.html
@@ -0,0 +1,22 @@
+ Add a package as a git submodule
+SYNOPSIS
+npm.commands.submodule(packages, callback)
+
DESCRIPTION
+For each package specified, npm will check if it has a git repository url
+in its package.json description then add it as a git submodule at
+node_modules/<pkg name>
.
+This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
+This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
+SEE ALSO
+
+npm help json
+git help submodule
+
+
diff --git a/deps/npm/html/partial/doc/api/npm-tag.html b/deps/npm/html/partial/doc/api/npm-tag.html
new file mode 100644
index 0000000..f288fc1
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-tag.html
@@ -0,0 +1,16 @@
+ Tag a published version
+SYNOPSIS
+npm.commands.tag(package@version, tag, callback)
+
DESCRIPTION
+Tags the specified version of the package with the specified tag, or the
+--tag
config if not specified.
+The 'package@version' is an array of strings, but only the first two elements are
+currently used.
+The first element must be in the form package@version, where package
+is the package name and version is the version number (much like installing a
+specific version).
+The second element is the name of the tag to tag this version with. If this
+parameter is missing or falsey (empty), the default froom the config will be
+used. For more information about how to set this config, check
+man 3 npm-config
for programmatic usage or man npm-config
for cli usage.
+
diff --git a/deps/npm/html/partial/doc/api/npm-test.html b/deps/npm/html/partial/doc/api/npm-test.html
new file mode 100644
index 0000000..9c35bdc
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-test.html
@@ -0,0 +1,10 @@
+ Test a package
+SYNOPSIS
+ npm.commands.test(packages, callback)
+
DESCRIPTION
+This runs a package's "test" script, if one was provided.
+To run tests as a condition of installation, set the npat
config to
+true.
+npm can run tests on multiple packages. Just specify multiple packages
+in the packages
parameter.
+
diff --git a/deps/npm/html/partial/doc/api/npm-uninstall.html b/deps/npm/html/partial/doc/api/npm-uninstall.html
new file mode 100644
index 0000000..62369e4
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-uninstall.html
@@ -0,0 +1,10 @@
+ uninstall a package programmatically
+SYNOPSIS
+npm.commands.uninstall(packages, callback)
+
DESCRIPTION
+This acts much the same ways as uninstalling on the command-line.
+The 'packages' parameter is an array of strings. Each element in the array is
+the name of a package to be uninstalled.
+Finally, 'callback' is a function that will be called when all packages have been
+uninstalled or when an error has been encountered.
+
diff --git a/deps/npm/html/partial/doc/api/npm-unpublish.html b/deps/npm/html/partial/doc/api/npm-unpublish.html
new file mode 100644
index 0000000..ed9948c
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-unpublish.html
@@ -0,0 +1,13 @@
+ Remove a package from the registry
+SYNOPSIS
+npm.commands.unpublish(package, callback)
+
DESCRIPTION
+This removes a package version from the registry, deleting its
+entry and removing the tarball.
+The package parameter must be defined.
+Only the first element in the package parameter is used. If there is no first
+element, then npm assumes that the package at the current working directory
+is what is meant.
+If no version is specified, or if all versions are removed then
+the root package entry is removed from the registry entirely.
+
diff --git a/deps/npm/html/partial/doc/api/npm-update.html b/deps/npm/html/partial/doc/api/npm-update.html
new file mode 100644
index 0000000..d057711
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-update.html
@@ -0,0 +1,7 @@
+ Update a package
+SYNOPSIS
+npm.commands.update(packages, callback)
+
DESCRIPTION
+Updates a package, upgrading it to the latest version. It also installs any missing packages.
+The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.
+
diff --git a/deps/npm/html/partial/doc/api/npm-version.html b/deps/npm/html/partial/doc/api/npm-version.html
new file mode 100644
index 0000000..c2b8d5e
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-version.html
@@ -0,0 +1,12 @@
+ Bump a package version
+SYNOPSIS
+npm.commands.version(newversion, callback)
+
DESCRIPTION
+Run this in a package directory to bump the version and write the new
+data back to the package.json file.
+If run in a git repo, it will also create a version commit and tag, and
+fail if the repo is not clean.
+Like all other commands, this function takes a string array as its first
+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.
+
diff --git a/deps/npm/html/partial/doc/api/npm-view.html b/deps/npm/html/partial/doc/api/npm-view.html
new file mode 100644
index 0000000..4f5acf6
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-view.html
@@ -0,0 +1,61 @@
+ View registry info
+SYNOPSIS
+npm.commands.view(args, [silent,] callback)
+
DESCRIPTION
+This command shows data about a package and prints it to the stream
+referenced by the outfd
config, which defaults to stdout.
+The "args" parameter is an ordered list that closely resembles the command-line
+usage. The elements should be ordered such that the first element is
+the package and version (package@version). The version is optional. After that,
+the rest of the parameters are fields with optional subfields ("field.subfield")
+which can be used to get only the information desired from the registry.
+The callback will be passed all of the data returned by the query.
+For example, to get the package registry entry for the connect
package,
+you can do this:
+npm.commands.view(["connect"], callback)
+
If no version is specified, "latest" is assumed.
+Field names can be specified after the package descriptor.
+For example, to show the dependencies of the ronn
package at version
+0.3.5, you could do the following:
+npm.commands.view(["ronn@0.3.5", "dependencies"], callback)
+
You can view child field by separating them with a period.
+To view the git repository URL for the latest version of npm, you could
+do this:
+npm.commands.view(["npm", "repository.url"], callback)
+
For fields that are arrays, requesting a non-numeric field will return
+all of the values from the objects in the list. For example, to get all
+the contributor names for the "express" project, you can do this:
+npm.commands.view(["express", "contributors.email"], callback)
+
You may also use numeric indices in square braces to specifically select
+an item in an array field. To just get the email address of the first
+contributor in the list, you can do this:
+npm.commands.view(["express", "contributors[0].email"], callback)
+
Multiple fields may be specified, and will be printed one after another.
+For exampls, to get all the contributor names and email addresses, you
+can do this:
+npm.commands.view(["express", "contributors.name", "contributors.email"], callback)
+
"Person" fields are shown as a string if they would be shown as an
+object. So, for example, this will show the list of npm contributors in
+the shortened string format. (See npm help json
for more on this.)
+npm.commands.view(["npm", "contributors"], callback)
+
If a version range is provided, then data will be printed for every
+matching version of the package. This will show which version of jsdom
+was required by each matching version of yui3:
+npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)
+
OUTPUT
+If only a single string field for a single version is output, then it
+will not be colorized or quoted, so as to enable piping the output to
+another command.
+If the version range matches multiple versions, than each printed value
+will be prefixed with the version it applies to.
+If multiple fields are requested, than each of them are prefixed with
+the field name.
+Console output can be disabled by setting the 'silent' parameter to true.
+RETURN VALUE
+The data returned will be an object in this formation:
+{ <version>:
+ { <field>: <value>
+ , ... }
+, ... }
+
corresponding to the list of fields selected.
+
diff --git a/deps/npm/html/partial/doc/api/npm-whoami.html b/deps/npm/html/partial/doc/api/npm-whoami.html
new file mode 100644
index 0000000..3428a9e
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm-whoami.html
@@ -0,0 +1,9 @@
+ Display npm username
+SYNOPSIS
+npm.commands.whoami(args, callback)
+
DESCRIPTION
+Print the username
config to standard output.
+'args' is never used and callback is never called with data.
+'args' must be present or things will break.
+This function is not useful programmatically
+
diff --git a/deps/npm/html/partial/doc/api/npm.html b/deps/npm/html/partial/doc/api/npm.html
new file mode 100644
index 0000000..dbd481b
--- /dev/null
+++ b/deps/npm/html/partial/doc/api/npm.html
@@ -0,0 +1,89 @@
+ node package manager
+SYNOPSIS
+var npm = require("npm")
+npm.load([configObject, ]function (er, npm) {
+ // use the npm object, now that it's loaded.
+
+ npm.config.set(key, val)
+ val = npm.config.get(key)
+
+ console.log("prefix = %s", npm.prefix)
+
+ npm.commands.install(["package"], cb)
+})
+
VERSION
+2.1.6
+DESCRIPTION
+This is the API documentation for npm.
+To find documentation of the command line
+client, see npm(1)
.
+Prior to using npm's commands, npm.load()
must be called. If you provide
+configObject
as an object map of top-level configs, they override the values
+stored in the various config locations. In the npm command line client, this
+set of configs is parsed from the command line options. Additional
+configuration params are loaded from two configuration files. See
+npm-config(1)
, npm-config(7)
, and npmrc(5)
for more information.
+After that, each of the functions are accessible in the
+commands object: npm.commands.<cmd>
. See npm-index(7)
for a list of
+all possible commands.
+All commands on the command object take an array of positional argument
+strings . The last argument to any function is a callback. Some
+commands take other optional arguments.
+Configs cannot currently be set on a per function basis, as each call to
+npm.config.set will change the value for all npm commands in that process.
+To find API documentation for a specific command, run the npm apihelp
+command.
+METHODS AND PROPERTIES
+
+npm.load(configs, cb)
+ Load the configuration params, and call the cb
function once the
+ globalconfig and userconfig files have been loaded as well, or on
+ nextTick if they've already been loaded.
+
+npm.config
+ An object for accessing npm configuration parameters.
+
+npm.config.get(key)
+npm.config.set(key, val)
+npm.config.del(key)
+
+
+npm.dir
or npm.root
+ The node_modules
directory where npm will operate.
+
+npm.prefix
+ The prefix where npm is operating. (Most often the current working
+ directory.)
+
+npm.cache
+ The place where npm keeps JSON and tarballs it fetches from the
+ registry (or uploads to the registry).
+
+npm.tmp
+ npm's temporary working directory.
+
+npm.deref
+ Get the "real" name for a command that has either an alias or
+ abbreviation.
+
+
+MAGIC
+For each of the methods in the npm.commands
object, a method is added to the
+npm object, which takes a set of positional string arguments rather than an
+array and a callback.
+If the last argument is a callback, then it will use the supplied
+callback. However, if no callback is provided, then it will print out
+the error or results.
+For example, this would work in a node repl:
+> npm = require("npm")
+> npm.load() // wait a sec...
+> npm.install("dnode", "express")
+
Note that that won't work in a node program, since the install
+method will get called before the configuration load is completed.
+ABBREVS
+In order to support npm ins foo
instead of npm install foo
, the
+npm.commands
object has a set of abbreviations as well as the full
+method names. Use the npm.deref
method to find the real name.
+For example:
+var cmd = npm.deref("unp") // cmd === "unpublish"
+
diff --git a/deps/npm/html/partial/doc/cli/npm-adduser.html b/deps/npm/html/partial/doc/cli/npm-adduser.html
new file mode 100644
index 0000000..ac9fa00
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-adduser.html
@@ -0,0 +1,47 @@
+ Add a registry user account
+SYNOPSIS
+npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
+
DESCRIPTION
+Create or verify a user named <username>
in the specified registry, and
+save the credentials to the .npmrc
file. If no registry is specified,
+the default registry will be used (see npm-config(7)
).
+The username, password, and email are read in from prompts.
+You may use this command to change your email address, but not username
+or password.
+To reset your password, go to https://www.npmjs.org/forgot
+You may use this command multiple times with the same user account to
+authorize on a new machine.
+npm login
is an alias to adduser
and behaves exactly the same way.
+CONFIGURATION
+registry
+Default: http://registry.npmjs.org/
+The base URL of the npm package registry. If scope
is also specified,
+this registry will only be used for packages with that scope. See npm-scope(7)
.
+scope
+Default: none
+If specified, the user and login credentials given will be associated
+with the specified scope. See npm-scope(7)
. You can use both at the same time,
+e.g.
+npm adduser --registry=http://myregistry.example.com --scope=@myco
+
This will set a registry for the given scope and login or create a user for
+that registry at the same time.
+always-auth
+Default: false
+If specified, save configuration indicating that all requests to the given
+registry should include authorization information. Useful for private
+registries. Can be used with --registry
and / or --scope
, e.g.
+npm adduser --registry=http://private-registry.example.com --always-auth
+
This will ensure that all requests to that registry (including for tarballs)
+include an authorization header. See always-auth
in npm-config(7)
for more
+details on always-auth. Registry-specific configuaration of always-auth
takes
+precedence over any global configuration.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bin.html b/deps/npm/html/partial/doc/cli/npm-bin.html
new file mode 100644
index 0000000..1485681
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bin.html
@@ -0,0 +1,15 @@
+ Display npm bin folder
+SYNOPSIS
+npm bin
+
DESCRIPTION
+Print the folder where npm will install executables.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bugs.html b/deps/npm/html/partial/doc/cli/npm-bugs.html
new file mode 100644
index 0000000..d40152e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bugs.html
@@ -0,0 +1,34 @@
+ Bugs for a package in a web browser maybe
+SYNOPSIS
+npm bugs <pkgname>
+npm bugs (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+bug tracker URL, and then tries to open it using the --browser
+config param. If no package name is provided, it will search for
+a package.json
in the current folder and use the name
property.
+CONFIGURATION
+browser
+
+Default: OS X: "open"
, Windows: "start"
, Others: "xdg-open"
+Type: String
+
+The browser that is called by the npm bugs
command to open websites.
+registry
+
+The base URL of the npm package registry.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-build.html b/deps/npm/html/partial/doc/cli/npm-build.html
new file mode 100644
index 0000000..51f2e32
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-build.html
@@ -0,0 +1,18 @@
+ Build a package
+SYNOPSIS
+npm build <package-folder>
+
+<package-folder>
:
+A folder containing a package.json
file in its root.
+
+DESCRIPTION
+This is the plumbing command called by npm link
and npm install
.
+It should generally not be called directly.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-bundle.html b/deps/npm/html/partial/doc/cli/npm-bundle.html
new file mode 100644
index 0000000..38bbdd8
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-bundle.html
@@ -0,0 +1,11 @@
+ REMOVED
+DESCRIPTION
+The npm bundle
command has been removed in 1.0, for the simple reason
+that it is no longer necessary, as the default behavior is now to
+install packages into the local space.
+Just use npm install
now to do what npm bundle
used to do.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-cache.html b/deps/npm/html/partial/doc/cli/npm-cache.html
new file mode 100644
index 0000000..f1a3b18
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-cache.html
@@ -0,0 +1,61 @@
+ Manipulates packages cache
+SYNOPSIS
+npm cache add <tarball file>
+npm cache add <folder>
+npm cache add <tarball url>
+npm cache add <name>@<version>
+
+npm cache ls [<path>]
+
+npm cache clean [<path>]
+
DESCRIPTION
+Used to add, list, or clear the npm cache folder.
+
+add:
+Add the specified package to the local cache. This command is primarily
+intended to be used internally by npm, but it can provide a way to
+add data to the local installation cache explicitly.
+
+ls:
+Show the data in the cache. Argument is a path to show in the cache
+folder. Works a bit like the find
program, but limited by the
+depth
config.
+
+clean:
+Delete data out of the cache folder. If an argument is provided, then
+it specifies a subpath to delete. If no argument is provided, then
+the entire cache is cleared.
+
+
+DETAILS
+npm stores cache data in the directory specified in npm config get cache
.
+For each package that is added to the cache, three pieces of information are
+stored in {cache}/{name}/{version}
:
+
+.../package/package.json:
+The package.json file, as npm sees it.
+.../package.tgz:
+The tarball for that version.
+
+Additionally, whenever a registry request is made, a .cache.json
file
+is placed at the corresponding URI, to store the ETag and the requested
+data. This is stored in {cache}/{hostname}/{path}/.cache.json
.
+Commands that make non-essential registry requests (such as search
and
+view
, or the completion scripts) generally specify a minimum timeout.
+If the .cache.json
file is younger than the specified timeout, then
+they do not make an HTTP request to the registry.
+CONFIGURATION
+cache
+Default: ~/.npm
on Posix, or %AppData%/npm-cache
on Windows.
+The root cache folder.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-completion.html b/deps/npm/html/partial/doc/cli/npm-completion.html
new file mode 100644
index 0000000..1c98793
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-completion.html
@@ -0,0 +1,22 @@
+ Tab Completion for npm
+SYNOPSIS
+. <(npm completion)
+
DESCRIPTION
+Enables tab-completion in all npm commands.
+The synopsis above
+loads the completions into your current shell. Adding it to
+your ~/.bashrc or ~/.zshrc will make the completions available
+everywhere.
+You may of course also pipe the output of npm completion to a file
+such as /usr/local/etc/bash_completion.d/npm
if you have a system
+that will read that file for you.
+When COMP_CWORD
, COMP_LINE
, and COMP_POINT
are defined in the
+environment, npm completion
acts in "plumbing mode", and outputs
+completions based on the arguments.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-config.html b/deps/npm/html/partial/doc/cli/npm-config.html
new file mode 100644
index 0000000..3fee266
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-config.html
@@ -0,0 +1,46 @@
+ Manage the npm configuration files
+SYNOPSIS
+npm config set <key> <value> [--global]
+npm config get <key>
+npm config delete <key>
+npm config list
+npm config edit
+npm c [set|get|delete|list]
+npm get <key>
+npm set <key> <value> [--global]
+
DESCRIPTION
+npm gets its config settings from the command line, environment
+variables, npmrc
files, and in some cases, the package.json
file.
+See npmrc(5) for more information about the npmrc files.
+See npm-config(7)
for a more thorough discussion of the mechanisms
+involved.
+The npm config
command can be used to update and edit the contents
+of the user and global npmrc files.
+Sub-commands
+Config supports the following sub-commands:
+set
+npm config set key value
+
Sets the config key to the value.
+If value is omitted, then it sets it to "true".
+get
+npm config get key
+
Echo the config value to stdout.
+list
+npm config list
+
Show all the config settings.
+delete
+npm config delete key
+
Deletes the key from all configuration files.
+edit
+npm config edit
+
Opens the config file in an editor. Use the --global
flag to edit the
+global config.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-dedupe.html b/deps/npm/html/partial/doc/cli/npm-dedupe.html
new file mode 100644
index 0000000..56a37c3
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-dedupe.html
@@ -0,0 +1,43 @@
+ Reduce duplication
+SYNOPSIS
+npm dedupe [package names...]
+npm ddp [package names...]
+
DESCRIPTION
+Searches the local package tree and attempts to simplify the overall
+structure by moving dependencies further up the tree, where they can
+be more effectively shared by multiple dependent packages.
+For example, consider this dependency graph:
+a
++-- b <-- depends on c@1.0.x
+| `-- c@1.0.3
+`-- d <-- depends on c@~1.0.9
+ `-- c@1.0.10
+
In this case, npm-dedupe(1)
will transform the tree to:
+a
++-- b
++-- d
+`-- c@1.0.10
+
Because of the hierarchical nature of node's module lookup, b and d
+will both get their dependency met by the single c package at the root
+level of the tree.
+If a suitable version exists at the target location in the tree
+already, then it will be left untouched, but the other duplicates will
+be deleted.
+If no suitable version can be found, then a warning is printed, and
+nothing is done.
+If any arguments are supplied, then they are filters, and only the
+named packages will be touched.
+Note that this operation transforms the dependency tree, and may
+result in packages getting updated versions, perhaps from the npm
+registry.
+This feature is experimental, and may change in future versions.
+The --tag
argument will apply to all of the affected dependencies. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-deprecate.html b/deps/npm/html/partial/doc/cli/npm-deprecate.html
new file mode 100644
index 0000000..0657fac
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-deprecate.html
@@ -0,0 +1,18 @@
+ Deprecate a version of a package
+SYNOPSIS
+npm deprecate <name>[@<version>] <message>
+
DESCRIPTION
+This command will update the npm registry entry for a package, providing
+a deprecation warning to all who attempt to install it.
+It works on version ranges as well as specific versions, so you can do
+something like this:
+npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
+
Note that you must be the package owner to deprecate something. See the
+owner
and adduser
help topics.
+To un-deprecate a package, specify an empty string (""
) for the message
argument.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-docs.html b/deps/npm/html/partial/doc/cli/npm-docs.html
new file mode 100644
index 0000000..3866ff1
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-docs.html
@@ -0,0 +1,36 @@
+ Docs for a package in a web browser maybe
+SYNOPSIS
+npm docs [<pkgname> [<pkgname> ...]]
+npm docs (with no args in a package dir)
+npm home [<pkgname> [<pkgname> ...]]
+npm home (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+documentation URL, and then tries to open it using the --browser
+config param. You can pass multiple package names at once. If no
+package name is provided, it will search for a package.json
in
+the current folder and use the name
property.
+CONFIGURATION
+browser
+
+Default: OS X: "open"
, Windows: "start"
, Others: "xdg-open"
+Type: String
+
+The browser that is called by the npm docs
command to open websites.
+registry
+
+The base URL of the npm package registry.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-edit.html b/deps/npm/html/partial/doc/cli/npm-edit.html
new file mode 100644
index 0000000..82b75ad
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-edit.html
@@ -0,0 +1,29 @@
+ Edit an installed package
+SYNOPSIS
+npm edit <name>[@<version>]
+
DESCRIPTION
+Opens the package folder in the default editor (or whatever you've
+configured as the npm editor
config -- see npm-config(7)
.)
+After it has been edited, the package is rebuilt so as to pick up any
+changes in compiled packages.
+For instance, you can do npm install connect
to install connect
+into your package, and then npm edit connect
to make a few
+changes to your locally installed copy.
+CONFIGURATION
+editor
+
+Default: EDITOR
environment variable if set, or "vi"
on Posix,
+or "notepad"
on Windows.
+Type: path
+
+The command to run for npm edit
or npm config edit
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-explore.html b/deps/npm/html/partial/doc/cli/npm-explore.html
new file mode 100644
index 0000000..fe2fbd4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-explore.html
@@ -0,0 +1,29 @@
+ Browse an installed package
+SYNOPSIS
+npm explore <name> [ -- <cmd>]
+
DESCRIPTION
+Spawn a subshell in the directory of the installed package specified.
+If a command is specified, then it is run in the subshell, which then
+immediately terminates.
+This is particularly handy in the case of git submodules in the
+node_modules
folder:
+npm explore some-dependency -- git pull origin master
+
Note that the package is not automatically rebuilt afterwards, so be
+sure to use npm rebuild <pkg>
if you make any changes.
+CONFIGURATION
+shell
+
+Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
+Windows
+Type: path
+
+The shell to run for the npm explore
command.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-help-search.html b/deps/npm/html/partial/doc/cli/npm-help-search.html
new file mode 100644
index 0000000..afd8fb4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-help-search.html
@@ -0,0 +1,26 @@
+ Search npm help documentation
+SYNOPSIS
+npm help-search some search terms
+
DESCRIPTION
+This command will search the npm markdown documentation files for the
+terms provided, and then list the results, sorted by relevance.
+If only one result is found, then it will show that help topic.
+If the argument to npm help
is not a known help topic, then it will
+call help-search
. It is rarely if ever necessary to call this
+command directly.
+CONFIGURATION
+long
+
+Type: Boolean
+Default false
+
+If true, the "long" flag will cause help-search to output context around
+where the terms were found in the documentation.
+If false, then help-search will just list out the help topics found.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-help.html b/deps/npm/html/partial/doc/cli/npm-help.html
new file mode 100644
index 0000000..4217b84
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-help.html
@@ -0,0 +1,32 @@
+ Get help on npm
+SYNOPSIS
+npm help <topic>
+npm help some search terms
+
DESCRIPTION
+If supplied a topic, then show the appropriate documentation page.
+If the topic does not exist, or if multiple terms are provided, then run
+the help-search
command to find a match. Note that, if help-search
+finds a single subject, then it will run help
on that topic, so unique
+matches are equivalent to specifying a topic name.
+CONFIGURATION
+viewer
+
+Default: "man" on Posix, "browser" on Windows
+Type: path
+
+The program to use to view help content.
+Set to "browser"
to view html help content in the default web browser.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-init.html b/deps/npm/html/partial/doc/cli/npm-init.html
new file mode 100644
index 0000000..4f41ea8
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-init.html
@@ -0,0 +1,20 @@
+ Interactively create a package.json file
+SYNOPSIS
+npm init [-f|--force|-y|--yes]
+
DESCRIPTION
+This will ask you a bunch of questions, and then write a package.json for you.
+It attempts to make reasonable guesses about what you want things to be set to,
+and then writes a package.json file with the options you've selected.
+If you already have a package.json file, it'll read that first, and default to
+the options in there.
+It is strictly additive, so it does not delete options from your package.json
+without a really good reason to do so.
+If you invoke it with -f
, --force
, -y
, or --yes
, it will use only
+defaults and not prompt you for any options.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-install.html b/deps/npm/html/partial/doc/cli/npm-install.html
new file mode 100644
index 0000000..bd1932e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-install.html
@@ -0,0 +1,219 @@
+ Install a package
+SYNOPSIS
+npm install (with no args in a package dir)
+npm install <tarball file>
+npm install <tarball url>
+npm install <folder>
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
+npm install [@<scope>/]<name>@<tag>
+npm install [@<scope>/]<name>@<version>
+npm install [@<scope>/]<name>@<version range>
+npm i (with any of the previous argument usage)
+
DESCRIPTION
+This command installs a package, and any packages that it depends on. If the
+package has a shrinkwrap file, the installation of dependencies will be driven
+by that. See npm-shrinkwrap(1) .
+A package
is:
+
+a) a folder containing a program described by a package.json file
+b) a gzipped tarball containing (a)
+c) a url that resolves to (b)
+d) a <name>@<version>
that is published on the registry (see npm-registry(7)
) with (c)
+e) a <name>@<tag>
that points to (d)
+f) a <name>
that has a "latest" tag satisfying (e)
+g) a <git remote url>
that resolves to (b)
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+
+npm install
(in package directory, no arguments):
+ Install the dependencies in the local node_modules folder.
+ In global mode (ie, with -g
or --global
appended to the command),
+ it installs the current package context (ie, the current working
+ directory) as a global package.
+ By default, npm install
will install all modules listed as
+ dependencies. With the --production
flag,
+ npm will not install modules listed in devDependencies
.
+
+npm install <folder>
:
+ Install a package that is sitting in a folder on the filesystem.
+
+npm install <tarball file>
:
+ Install a package that is sitting on the filesystem. Note: if you just want
+ to link a dev directory into your npm root, you can do this more easily by
+ using npm link
.
+ Example:
+ npm install ./package.tgz
+
+npm install <tarball url>
:
+ Fetch the tarball url, and then install it. In order to distinguish between
+ this and other options, the argument must start with "http://" or "https://"
+ Example:
+ npm install https://github.com/indexzero/forever/tarball/v0.5.6
+
+npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]
:
+ Do a <name>@<tag>
install, where <tag>
is the "tag" config. (See
+ npm-config(7)
.)
+ In most cases, this will install the latest version
+ of the module published on npm.
+ Example:
+ npm install sax
+
npm install
takes 3 exclusive, optional flags which save or update
+ the package version in your main package.json:
+
+--save
: Package will appear in your dependencies
.
+
+--save-dev
: Package will appear in your devDependencies
.
+
+--save-optional
: Package will appear in your optionalDependencies
.
+When using any of the above options to save dependencies to your
+package.json, there is an additional, optional flag:
+
+--save-exact
: Saved dependencies will be configured with an
+exact version rather than using npm's default semver range
+operator.
+<scope>
is optional. The package will be downloaded from the registry
+associated with the specified scope. If no registry is associated with
+the given scope the default registry is assumed. See npm-scope(7)
.
+Note: if you do not include the @-symbol on your scope name, npm will
+interpret this as a GitHub repository instead, see below. Scopes names
+must also be followed by a slash.
+Examples:
+npm install sax --save
+npm install githubname/reponame
+npm install @myorg/privatepackage
+npm install node-tap --save-dev
+npm install dtrace-provider --save-optional
+npm install readable-stream --save --save-exact
+
+
+
+
+**Note**: If there is a file or folder named `<name>` in the current
+working directory, then it will try to install that, and only try to
+fetch the package by name if it is not valid.
+
+npm install [@<scope>/]<name>@<tag>
:
+ Install the version of the package that is referenced by the specified tag.
+ If the tag does not exist in the registry data for that package, then this
+ will fail.
+ Example:
+ npm install sax@latest
+ npm install @myorg/mypackage@latest
+
+npm install [@<scope>/]<name>@<version>
:
+ Install the specified version of the package. This will fail if the
+ version has not been published to the registry.
+ Example:
+ npm install sax@0.1.1
+ npm install @myorg/privatepackage@1.5.0
+
+npm install [@<scope>/]<name>@<version range>
:
+ Install a version of the package matching the specified version range. This
+ will follow the same rules for resolving dependencies described in package.json(5)
.
+ Note that most version ranges must be put in quotes so that your shell will
+ treat it as a single argument.
+ Example:
+ npm install sax@">=0.1.0 <0.2.0"
+ npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
+
+npm install <githubname>/<githubrepo>
:
+ Install the package at https://github.com/githubname/githubrepo" by
+ attempting to clone it using
git`.
+ Example:
+ npm install mygithubuser/myproject
+
To reference a package in a git repo that is not on GitHub, see git
+ remote urls below.
+
+npm install <git remote url>
:
+ Install a package by cloning a git remote url. The format of the git
+ url is:
+ <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
+
<protocol>
is one of git
, git+ssh
, git+http
, or
+ git+https
. If no <commit-ish>
is specified, then master
is
+ used.
+ Examples:
+ git+ssh://git@github.com:npm/npm.git#v1.0.27
+ git+https://isaacs@github.com/npm/npm.git
+ git://github.com/npm/npm.git#v1.0.27
+
+
+You may combine multiple arguments, and even multiple types of arguments.
+For example:
+npm install sax@">=0.1.0 <0.2.0" bench supervisor
+
The --tag
argument will apply to all of the specified install targets. If a
+tag with the given name exists, the tagged version is preferred over newer
+versions.
+The --force
argument will force npm to fetch remote resources even if a
+local copy exists on disk.
+npm install sax --force
+
The --global
argument will cause npm to install the package globally
+rather than locally. See npm-folders(5)
.
+The --link
argument will cause npm to link global installs into the
+local space in some cases.
+The --no-bin-links
argument will prevent npm from creating symlinks for
+any binaries the package might contain.
+The --no-optional
argument will prevent optional dependencies from
+being installed.
+The --no-shrinkwrap
argument, which will ignore an available
+shrinkwrap file and use the package.json instead.
+The --nodedir=/path/to/node/source
argument will allow npm to find the
+node source code so that npm can compile native modules.
+See npm-config(7)
. Many of the configuration params have some
+effect on installation, since that's most of what npm does.
+ALGORITHM
+To install a package, npm uses the following algorithm:
+install(where, what, family, ancestors)
+fetch what, unpack to <where>/node_modules/<what>
+for each dep in what.dependencies
+ resolve dep to precise version
+for each dep@version in what.dependencies
+ not in <where>/node_modules/<what>/node_modules/*
+ and not in <family>
+ add precise version deps to <family>
+ install(<where>/node_modules/<what>, dep, family)
+
For this package{dep}
structure: A{B,C}, B{C}, C{D}
,
+this algorithm produces:
+A
++-- B
+`-- C
+ `-- D
+
That is, the dependency from B to C is satisfied by the fact that A
+already caused C to be installed at a higher level.
+See npm-folders(5) for a more detailed description of the specific
+folder structures that npm creates.
+Limitations of npm's Install Algorithm
+There are some very rare and pathological edge-cases where a cycle can
+cause npm to try to install a never-ending tree of packages. Here is
+the simplest case:
+A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...
+
where A
is some version of a package, and A'
is a different version
+of the same package. Because B
depends on a different version of A
+than the one that is already in the tree, it must install a separate
+copy. The same is true of A'
, which must install B'
. Because B'
+depends on the original version of A
, which has been overridden, the
+cycle falls into infinite regress.
+To avoid this situation, npm flat-out refuses to install any
+name@version
that is already present anywhere in the tree of package
+folder ancestors. A more correct, but more complex, solution would be
+to symlink the existing version into the new location. If this ever
+affects a real use-case, it will be investigated.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-link.html b/deps/npm/html/partial/doc/cli/npm-link.html
new file mode 100644
index 0000000..3c83239
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-link.html
@@ -0,0 +1,51 @@
+ Symlink a package folder
+SYNOPSIS
+npm link (in package folder)
+npm link [@<scope>/]<pkgname>
+npm ln (with any of the previous argument usage)
+
DESCRIPTION
+Package linking is a two-step process.
+First, npm link
in a package folder will create a globally-installed
+symbolic link from prefix/package-name
to the current folder (see
+npm-config(7)
for the value of prefix
).
+Next, in some other location, npm link package-name
will create a
+symlink from the local node_modules
folder to the global symlink.
+Note that package-name
is taken from package.json
,
+not from directory name.
+The package name can be optionally prefixed with a scope. See npm-scope(7)
.
+The scope must by preceded by an @-symbol and followed by a slash.
+When creating tarballs for npm publish
, the linked packages are
+"snapshotted" to their current state by resolving the symbolic links.
+This is handy for installing your own stuff, so that you can work on it and
+test it iteratively without having to continually rebuild.
+For example:
+cd ~/projects/node-redis # go into the package directory
+npm link # creates global link
+cd ~/projects/node-bloggy # go into some other package directory.
+npm link redis # link-install the package
+
Now, any changes to ~/projects/node-redis will be reflected in
+~/projects/node-bloggy/node_modules/redis/
+You may also shortcut the two steps in one. For example, to do the
+above use-case in a shorter way:
+cd ~/projects/node-bloggy # go into the dir of your main project
+npm link ../node-redis # link the dir of your dependency
+
The second line is the equivalent of doing:
+(cd ../node-redis; npm link)
+npm link redis
+
That is, it first creates a global link, and then links the global
+installation target into your project's node_modules
folder.
+If your linked package is scoped (see npm-scope(7)
) your link command must
+include that scope, e.g.
+npm link @myorg/privatepackage
+
SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html
new file mode 100644
index 0000000..199b600
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-ls.html
@@ -0,0 +1,65 @@
+ List installed packages
+SYNOPSIS
+npm list [[@<scope>/]<pkg> ...]
+npm ls [[@<scope>/]<pkg> ...]
+npm la [[@<scope>/]<pkg> ...]
+npm ll [[@<scope>/]<pkg> ...]
+
DESCRIPTION
+This command will print to stdout all the versions of packages that are
+installed, as well as their dependencies, in a tree-structure.
+Positional arguments are name@version-range
identifiers, which will
+limit the results to only the paths to the packages named. Note that
+nested packages will also show the paths to the specified packages.
+For example, running npm ls promzard
in npm's source tree will show:
+npm@2.1.6 /path/to/npm
+ââ⬠init-package-json@0.0.4
+ âââ promzard@0.1.5
+
It will print out extraneous, missing, and invalid packages.
+If a project specifies git urls for dependencies these are shown
+in parentheses after the name@version to make it easier for users to
+recognize potential forks of a project.
+When run as ll
or la
, it shows extended information by default.
+CONFIGURATION
+json
+
+Default: false
+Type: Boolean
+
+Show information in JSON format.
+long
+
+Default: false
+Type: Boolean
+
+Show extended information.
+parseable
+
+Default: false
+Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+Default: false
+Type: Boolean
+
+List packages in the global install prefix instead of in the current
+project.
+depth
+
+Max display depth of the dependency tree.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-outdated.html b/deps/npm/html/partial/doc/cli/npm-outdated.html
new file mode 100644
index 0000000..ea07e01
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-outdated.html
@@ -0,0 +1,47 @@
+ Check for outdated packages
+SYNOPSIS
+npm outdated [<name> [<name> ...]]
+
DESCRIPTION
+This command will check the registry to see if any (or, specific) installed
+packages are currently outdated.
+The resulting field 'wanted' shows the latest version according to the
+version specified in the package.json, the field 'latest' the very latest
+version of the package.
+CONFIGURATION
+json
+
+Default: false
+Type: Boolean
+
+Show information in JSON format.
+long
+
+Default: false
+Type: Boolean
+
+Show extended information.
+parseable
+
+Default: false
+Type: Boolean
+
+Show parseable output instead of tree view.
+global
+
+Default: false
+Type: Boolean
+
+Check packages in the global install prefix instead of in the current
+project.
+depth
+
+Max depth for checking dependency tree.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-owner.html b/deps/npm/html/partial/doc/cli/npm-owner.html
new file mode 100644
index 0000000..0e0dc92
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-owner.html
@@ -0,0 +1,29 @@
+ Manage package owners
+SYNOPSIS
+npm owner ls <package name>
+npm owner add <user> <package name>
+npm owner rm <user> <package name>
+
DESCRIPTION
+Manage ownership of published packages.
+
+ls:
+List all the users who have access to modify a package and push new versions.
+Handy when you need to know who to bug for help.
+add:
+Add a new user as a maintainer of a package. This user is enabled to modify
+metadata, publish new versions, and add other owners.
+rm:
+Remove a user from the package owner list. This immediately revokes their
+privileges.
+
+Note that there is only one level of access. Either you can modify a package,
+or you can't. Future versions may contain more fine-grained access levels, but
+that is not implemented at this time.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-pack.html b/deps/npm/html/partial/doc/cli/npm-pack.html
new file mode 100644
index 0000000..865f14a
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-pack.html
@@ -0,0 +1,21 @@
+ Create a tarball from a package
+SYNOPSIS
+npm pack [<pkg> [<pkg> ...]]
+
DESCRIPTION
+For anything that's installable (that is, a package folder, tarball,
+tarball url, name@tag, name@version, or name), this command will fetch
+it to the cache, and then copy the tarball to the current working
+directory as <name>-<version>.tgz
, and then write the filenames out to
+stdout.
+If the same package is specified multiple times, then the file will be
+overwritten the second time.
+If no arguments are supplied, then npm packs the current package folder.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-prefix.html b/deps/npm/html/partial/doc/cli/npm-prefix.html
new file mode 100644
index 0000000..bca3f66
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-prefix.html
@@ -0,0 +1,18 @@
+ Display prefix
+SYNOPSIS
+npm prefix [-g]
+
DESCRIPTION
+Print the local prefix to standard out. This is the closest parent directory
+to contain a package.json file unless -g
is also specified.
+If -g
is specified, this will be the value of the global prefix. See
+npm-config(7)
for more detail.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-prune.html b/deps/npm/html/partial/doc/cli/npm-prune.html
new file mode 100644
index 0000000..43dd873
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-prune.html
@@ -0,0 +1,19 @@
+ Remove extraneous packages
+SYNOPSIS
+npm prune [<name> [<name ...]]
+npm prune [<name> [<name ...]] [--production]
+
DESCRIPTION
+This command removes "extraneous" packages. If a package name is
+provided, then only packages matching one of the supplied names are
+removed.
+Extraneous packages are packages that are not listed on the parent
+package's dependencies list.
+If the --production
flag is specified, this command will remove the
+packages specified in your devDependencies
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-publish.html b/deps/npm/html/partial/doc/cli/npm-publish.html
new file mode 100644
index 0000000..8df73e3
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-publish.html
@@ -0,0 +1,39 @@
+ Publish a package
+SYNOPSIS
+npm publish <tarball> [--tag <tag>]
+npm publish <folder> [--tag <tag>]
+
DESCRIPTION
+Publishes a package to the registry so that it can be installed by name. See
+npm-developers(7)
for details on what's included in the published package, as
+well as details on how the package is built.
+By default npm will publish to the public registry. This can be overridden by
+specifying a different default registry or using a npm-scope(7)
in the name
+(see package.json(5)
).
+
+<folder>
:
+A folder containing a package.json file
+
+<tarball>
:
+A url or file path to a gzipped tar archive containing a single folder
+with a package.json file inside.
+
+[--tag <tag>]
+Registers the published package with the given tag, such that npm install
+<name>@<tag>
will install this version. By default, npm publish
updates
+and npm install
installs the latest
tag.
+
+
+Fails if the package name and version combination already exists in
+the specified registry.
+Once a package is published with a given name and version, that
+specific name and version combination can never be used again, even if
+it is removed with npm-unpublish(1) .
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-rebuild.html b/deps/npm/html/partial/doc/cli/npm-rebuild.html
new file mode 100644
index 0000000..b06f070
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-rebuild.html
@@ -0,0 +1,18 @@
+ Rebuild a package
+SYNOPSIS
+npm rebuild [<name> [<name> ...]]
+npm rb [<name> [<name> ...]]
+
+<name>
:
+The package to rebuild
+
+DESCRIPTION
+This command runs the npm build
command on the matched folders. This is useful
+when you install a new version of node, and must recompile all your C++ addons with
+the new binary.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-repo.html b/deps/npm/html/partial/doc/cli/npm-repo.html
new file mode 100644
index 0000000..55fcb5f
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-repo.html
@@ -0,0 +1,22 @@
+ Open package repository page in the browser
+SYNOPSIS
+npm repo <pkgname>
+npm repo (with no args in a package dir)
+
DESCRIPTION
+This command tries to guess at the likely location of a package's
+repository URL, and then tries to open it using the --browser
+config param. If no package name is provided, it will search for
+a package.json
in the current folder and use the name
property.
+CONFIGURATION
+browser
+
+Default: OS X: "open"
, Windows: "start"
, Others: "xdg-open"
+Type: String
+
+The browser that is called by the npm repo
command to open websites.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-restart.html b/deps/npm/html/partial/doc/cli/npm-restart.html
new file mode 100644
index 0000000..267e570
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-restart.html
@@ -0,0 +1,15 @@
+ Start a package
+SYNOPSIS
+npm restart [-- <args>]
+
DESCRIPTION
+This runs a package's "restart" script, if one was provided. Otherwise it runs
+package's "stop" script, if one was provided, and then the "start" script.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-rm.html b/deps/npm/html/partial/doc/cli/npm-rm.html
new file mode 100644
index 0000000..24cd07e
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-rm.html
@@ -0,0 +1,19 @@
+ Remove a package
+SYNOPSIS
+npm rm <name>
+npm r <name>
+npm uninstall <name>
+npm un <name>
+
DESCRIPTION
+This uninstalls a package, completely removing everything npm installed
+on its behalf.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-root.html b/deps/npm/html/partial/doc/cli/npm-root.html
new file mode 100644
index 0000000..e9b5ad0
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-root.html
@@ -0,0 +1,15 @@
+ Display npm root
+SYNOPSIS
+npm root
+
DESCRIPTION
+Print the effective node_modules
folder to standard out.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-run-script.html b/deps/npm/html/partial/doc/cli/npm-run-script.html
new file mode 100644
index 0000000..b9a7cef
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-run-script.html
@@ -0,0 +1,27 @@
+ Run arbitrary package scripts
+SYNOPSIS
+npm run-script [command] [-- <args>]
+npm run [command] [-- <args>]
+
DESCRIPTION
+This runs an arbitrary command from a package's "scripts"
object.
+If no package name is provided, it will search for a package.json
+in the current folder and use its "scripts"
object. If no "command"
+is provided, it will list the available top level scripts.
+It is used by the test, start, restart, and stop commands, but can be
+called directly, as well.
+As of npm@2.0.0
, you can
+use custom arguments when executing scripts. The special option --
is used by
+getopt to delimit the end of the options. npm will pass
+all the arguments after the --
directly to your script:
+npm run test -- --grep="pattern"
+
The arguments will only be passed to the script specified after npm run
+and not to any pre or post script.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-search.html b/deps/npm/html/partial/doc/cli/npm-search.html
new file mode 100644
index 0000000..ae66e47
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-search.html
@@ -0,0 +1,29 @@
+ Search for packages
+SYNOPSIS
+npm search [--long] [search terms ...]
+npm s [search terms ...]
+npm se [search terms ...]
+
DESCRIPTION
+Search the registry for packages matching the search terms.
+If a term starts with /
, then it's interpreted as a regular expression.
+A trailing /
will be ignored in this case. (Note that many regular
+expression characters must be escaped or quoted in most shells.)
+CONFIGURATION
+long
+
+Default: false
+Type: Boolean
+
+Display full package descriptions and other long text across multiple
+lines. When disabled (default) search results are truncated to fit
+neatly on a single line. Modules with extremely long names will
+fall on multiple lines.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
new file mode 100644
index 0000000..45b646c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
@@ -0,0 +1,144 @@
+ Lock down dependency versions
+SYNOPSIS
+npm shrinkwrap
+
DESCRIPTION
+This command locks down the versions of a package's dependencies so
+that you can control exactly which versions of each dependency will be
+used when your package is installed. The "package.json" file is still
+required if you want to use "npm install".
+By default, "npm install" recursively installs the target's
+dependencies (as specified in package.json), choosing the latest
+available version that satisfies the dependency's semver pattern. In
+some situations, particularly when shipping software where each change
+is tightly managed, it's desirable to fully specify each version of
+each dependency recursively so that subsequent builds and deploys do
+not inadvertently pick up newer versions of a dependency that satisfy
+the semver pattern. Specifying specific semver patterns in each
+dependency's package.json would facilitate this, but that's not always
+possible or desirable, as when another author owns the npm package.
+It's also possible to check dependencies directly into source control,
+but that may be undesirable for other reasons.
+As an example, consider package A:
+{
+ "name": "A",
+ "version": "0.1.0",
+ "dependencies": {
+ "B": "<0.1.0"
+ }
+}
+
package B:
+{
+ "name": "B",
+ "version": "0.0.1",
+ "dependencies": {
+ "C": "<0.1.0"
+ }
+}
+
and package C:
+{
+ "name": "C,
+ "version": "0.0.1"
+}
+
If these are the only versions of A, B, and C available in the
+registry, then a normal "npm install A" will install:
+A@0.1.0
+`-- B@0.0.1
+ `-- C@0.0.1
+
However, if B@0.0.2 is published, then a fresh "npm install A" will
+install:
+A@0.1.0
+`-- B@0.0.2
+ `-- C@0.0.1
+
assuming the new version did not modify B's dependencies. Of course,
+the new version of B could include a new version of C and any number
+of new dependencies. If such changes are undesirable, the author of A
+could specify a dependency on B@0.0.1. However, if A's author and B's
+author are not the same person, there's no way for A's author to say
+that he or she does not want to pull in newly published versions of C
+when B hasn't changed at all.
+In this case, A's author can run
+npm shrinkwrap
+
This generates npm-shrinkwrap.json, which will look something like this:
+{
+ "name": "A",
+ "version": "0.1.0",
+ "dependencies": {
+ "B": {
+ "version": "0.0.1",
+ "dependencies": {
+ "C": {
+ "version": "0.1.0"
+ }
+ }
+ }
+ }
+}
+
The shrinkwrap command has locked down the dependencies based on
+what's currently installed in node_modules. When "npm install"
+installs a package with a npm-shrinkwrap.json file in the package
+root, the shrinkwrap file (rather than package.json files) completely
+drives the installation of that package and all of its dependencies
+(recursively). So now the author publishes A@0.1.0, and subsequent
+installs of this package will use B@0.0.1 and C@0.1.0, regardless the
+dependencies and versions listed in A's, B's, and C's package.json
+files.
+Using shrinkwrapped packages
+Using a shrinkwrapped package is no different than using any other
+package: you can "npm install" it by hand, or add a dependency to your
+package.json file and "npm install" it.
+Building shrinkwrapped packages
+To shrinkwrap an existing package:
+
+Run "npm install" in the package root to install the current
+versions of all dependencies.
+Validate that the package works as expected with these versions.
+Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish
+your package.
+
+To add or update a dependency in a shrinkwrapped package:
+
+Run "npm install" in the package root to install the current
+versions of all dependencies.
+Add or update dependencies. "npm install" each new or updated
+package individually and then update package.json. Note that they
+must be explicitly named in order to be installed: running npm
+install
with no arguments will merely reproduce the existing
+shrinkwrap.
+Validate that the package works as expected with the new
+dependencies.
+Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
+publish your package.
+
+You can use npm-outdated(1) to view dependencies with newer versions
+available.
+Other Notes
+A shrinkwrap file must be consistent with the package's package.json
+file. "npm shrinkwrap" will fail if required dependencies are not
+already installed, since that would result in a shrinkwrap that
+wouldn't actually work. Similarly, the command will fail if there are
+extraneous packages (not referenced by package.json), since that would
+indicate that package.json is not correct.
+Since "npm shrinkwrap" is intended to lock down your dependencies for
+production use, devDependencies
will not be included unless you
+explicitly set the --dev
flag when you run npm shrinkwrap
. If
+installed devDependencies
are excluded, then npm will print a
+warning. If you want them to be installed with your module by
+default, please consider adding them to dependencies
instead.
+If shrinkwrapped package A depends on shrinkwrapped package B, B's
+shrinkwrap will not be used as part of the installation of A. However,
+because A's shrinkwrap is constructed from a valid installation of B
+and recursively specifies all dependencies, the contents of B's
+shrinkwrap will implicitly be included in A's shrinkwrap.
+Caveats
+If you wish to lock down the specific bytes included in a package, for
+example to have 100% confidence in being able to reproduce a
+deployment or build, then you ought to check your dependencies into
+source control, or pursue some other mechanism that can verify
+contents rather than versions.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-star.html b/deps/npm/html/partial/doc/cli/npm-star.html
new file mode 100644
index 0000000..7377d9b
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-star.html
@@ -0,0 +1,16 @@
+ Mark your favorite packages
+SYNOPSIS
+npm star <pkgname> [<pkg>, ...]
+npm unstar <pkgname> [<pkg>, ...]
+
DESCRIPTION
+"Starring" a package means that you have some interest in it. It's
+a vaguely positive way to show that you care.
+"Unstarring" is the same thing, but in reverse.
+It's a boolean thing. Starring repeatedly has no additional effect.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-stars.html b/deps/npm/html/partial/doc/cli/npm-stars.html
new file mode 100644
index 0000000..6ffda95
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-stars.html
@@ -0,0 +1,17 @@
+ View packages marked as favorites
+SYNOPSIS
+npm stars
+npm stars [username]
+
DESCRIPTION
+If you have starred a lot of neat things and want to find them again
+quickly this command lets you do just that.
+You may also want to see your friend's favorite packages, in this case
+you will most certainly enjoy this command.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-start.html b/deps/npm/html/partial/doc/cli/npm-start.html
new file mode 100644
index 0000000..bfd673c
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-start.html
@@ -0,0 +1,14 @@
+ Start a package
+SYNOPSIS
+npm start [-- <args>]
+
DESCRIPTION
+This runs a package's "start" script, if one was provided.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-stop.html b/deps/npm/html/partial/doc/cli/npm-stop.html
new file mode 100644
index 0000000..3b974c4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-stop.html
@@ -0,0 +1,14 @@
+ Stop a package
+SYNOPSIS
+npm stop [-- <args>]
+
DESCRIPTION
+This runs a package's "stop" script, if one was provided.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-submodule.html b/deps/npm/html/partial/doc/cli/npm-submodule.html
new file mode 100644
index 0000000..1e259e1
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-submodule.html
@@ -0,0 +1,22 @@
+ Add a package as a git submodule
+SYNOPSIS
+npm submodule <pkg>
+
DESCRIPTION
+If the specified package has a git repository url in its package.json
+description, then this command will add it as a git submodule at
+node_modules/<pkg name>
.
+This is a convenience only. From then on, it's up to you to manage
+updates by using the appropriate git commands. npm will stubbornly
+refuse to update, modify, or remove anything with a .git
subfolder
+in it.
+This command also does not install missing dependencies, if the package
+does not include them in its git repository. If npm ls
reports that
+things are missing, you can either install, link, or submodule them yourself,
+or you can do npm explore <pkgname> -- npm install
to install the
+dependencies into the submodule folder.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-tag.html b/deps/npm/html/partial/doc/cli/npm-tag.html
new file mode 100644
index 0000000..61b1c76
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-tag.html
@@ -0,0 +1,24 @@
+ Tag a published version
+SYNOPSIS
+npm tag <name>@<version> [<tag>]
+
DESCRIPTION
+Tags the specified version of the package with the specified tag, or the
+--tag
config if not specified.
+A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:
+npm install <name>@<tag>
+
When installing dependencies, a preferred tagged version may be specified:
+npm install --tag <tag>
+
This also applies to npm dedupe
.
+Publishing a package always sets the "latest" tag to the published version.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-test.html b/deps/npm/html/partial/doc/cli/npm-test.html
new file mode 100644
index 0000000..4a48e65
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-test.html
@@ -0,0 +1,17 @@
+ Test a package
+SYNOPSIS
+ npm test [-- <args>]
+ npm tst [-- <args>]
+
DESCRIPTION
+This runs a package's "test" script, if one was provided.
+To run tests as a condition of installation, set the npat
config to
+true.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-uninstall.html b/deps/npm/html/partial/doc/cli/npm-uninstall.html
new file mode 100644
index 0000000..5b24740
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-uninstall.html
@@ -0,0 +1,37 @@
+ Remove a package
+SYNOPSIS
+npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
+npm rm (with any of the previous argument usage)
+
DESCRIPTION
+This uninstalls a package, completely removing everything npm installed
+on its behalf.
+Example:
+npm uninstall sax
+
In global mode (ie, with -g
or --global
appended to the command),
+it uninstalls the current package context as a global package.
+npm uninstall
takes 3 exclusive, optional flags which save or update
+the package version in your main package.json:
+
+--save
: Package will be removed from your dependencies
.
+
+--save-dev
: Package will be removed from your devDependencies
.
+
+--save-optional
: Package will be removed from your optionalDependencies
.
+
+
+Scope is optional and follows the usual rules for npm-scope(7)
.
+Examples:
+npm uninstall sax --save
+npm uninstall @myorg/privatepackage --save
+npm uninstall node-tap --save-dev
+npm uninstall dtrace-provider --save-optional
+
SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-unpublish.html b/deps/npm/html/partial/doc/cli/npm-unpublish.html
new file mode 100644
index 0000000..9790cd4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-unpublish.html
@@ -0,0 +1,27 @@
+ Remove a package from the registry
+SYNOPSIS
+npm unpublish [@<scope>/]<name>[@<version>]
+
WARNING
+It is generally considered bad behavior to remove versions of a library
+that others are depending on!
+Consider using the deprecate
command
+instead, if your intent is to encourage users to upgrade.
+There is plenty of room on the registry.
+DESCRIPTION
+This removes a package version from the registry, deleting its
+entry and removing the tarball.
+If no version is specified, or if all versions are removed then
+the root package entry is removed from the registry entirely.
+Even if a package version is unpublished, that specific name and
+version combination can never be reused. In order to publish the
+package again, a new version number must be used.
+The scope is optional and follows the usual rules for npm-scope(7)
.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-update.html b/deps/npm/html/partial/doc/cli/npm-update.html
new file mode 100644
index 0000000..3923be7
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-update.html
@@ -0,0 +1,20 @@
+ Update a package
+SYNOPSIS
+npm update [-g] [<name> [<name> ...]]
+
DESCRIPTION
+This command will update all the packages listed to the latest version
+(specified by the tag
config).
+It will also install missing packages.
+If the -g
flag is specified, this command will update globally installed
+packages.
+If no package name is specified, all packages in the specified location (global
+or local) will be updated.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-version.html b/deps/npm/html/partial/doc/cli/npm-version.html
new file mode 100644
index 0000000..5217f01
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-version.html
@@ -0,0 +1,35 @@
+ Bump a package version
+SYNOPSIS
+npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
+
DESCRIPTION
+Run this in a package directory to bump the version and write the new
+data back to the package.json file.
+The newversion
argument should be a valid semver string, or a
+valid second argument to semver.inc (one of "patch", "minor", "major",
+"prepatch", "preminor", "premajor", "prerelease"). In the second case,
+the existing version will be incremented by 1 in the specified field.
+If run in a git repo, it will also create a version commit and tag, and
+fail if the repo is not clean.
+If supplied with --message
(shorthand: -m
) config option, npm will
+use it as a commit message when creating a version commit. If the
+message
config contains %s
then that will be replaced with the
+resulting version number. For example:
+npm version patch -m "Upgrade to %s for reasons"
+
If the sign-git-tag
config is set, then the tag will be signed using
+the -s
flag to git. Note that you must have a default GPG key set up
+in your git config for this to work properly. For example:
+$ npm config set sign-git-tag true
+$ npm version patch
+
+You need a passphrase to unlock the secret key for
+user: "isaacs (http://blog.izs.me/) <i@izs.me>"
+2048-bit RSA key, ID 6C481CF6, created 2010-08-31
+
+Enter passphrase:
+
SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-view.html b/deps/npm/html/partial/doc/cli/npm-view.html
new file mode 100644
index 0000000..a5b3851
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-view.html
@@ -0,0 +1,62 @@
+ View registry info
+SYNOPSIS
+npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+
DESCRIPTION
+This command shows data about a package and prints it to the stream
+referenced by the outfd
config, which defaults to stdout.
+To show the package registry entry for the connect
package, you can do
+this:
+npm view connect
+
The default version is "latest" if unspecified.
+Field names can be specified after the package descriptor.
+For example, to show the dependencies of the ronn
package at version
+0.3.5, you could do the following:
+npm view ronn@0.3.5 dependencies
+
You can view child field by separating them with a period.
+To view the git repository URL for the latest version of npm, you could
+do this:
+npm view npm repository.url
+
This makes it easy to view information about a dependency with a bit of
+shell scripting. For example, to view all the data about the version of
+opts that ronn depends on, you can do this:
+npm view opts@$(npm view ronn dependencies.opts)
+
For fields that are arrays, requesting a non-numeric field will return
+all of the values from the objects in the list. For example, to get all
+the contributor names for the "express" project, you can do this:
+npm view express contributors.email
+
You may also use numeric indices in square braces to specifically select
+an item in an array field. To just get the email address of the first
+contributor in the list, you can do this:
+npm view express contributors[0].email
+
Multiple fields may be specified, and will be printed one after another.
+For exampls, to get all the contributor names and email addresses, you
+can do this:
+npm view express contributors.name contributors.email
+
"Person" fields are shown as a string if they would be shown as an
+object. So, for example, this will show the list of npm contributors in
+the shortened string format. (See package.json(5)
for more on this.)
+npm view npm contributors
+
If a version range is provided, then data will be printed for every
+matching version of the package. This will show which version of jsdom
+was required by each matching version of yui3:
+npm view yui3@'>0.5.4' dependencies.jsdom
+
OUTPUT
+If only a single string field for a single version is output, then it
+will not be colorized or quoted, so as to enable piping the output to
+another command. If the field is an object, it will be output as a JavaScript object literal.
+If the --json flag is given, the outputted fields will be JSON.
+If the version range matches multiple versions, than each printed value
+will be prefixed with the version it applies to.
+If multiple fields are requested, than each of them are prefixed with
+the field name.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm-whoami.html b/deps/npm/html/partial/doc/cli/npm-whoami.html
new file mode 100644
index 0000000..a0c0dd4
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm-whoami.html
@@ -0,0 +1,13 @@
+ Display npm username
+SYNOPSIS
+npm whoami
+
DESCRIPTION
+Print the username
config to standard output.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html
new file mode 100644
index 0000000..646fffc
--- /dev/null
+++ b/deps/npm/html/partial/doc/cli/npm.html
@@ -0,0 +1,134 @@
+ node package manager
+SYNOPSIS
+npm <command> [args]
+
VERSION
+2.1.6
+DESCRIPTION
+npm is the package manager for the Node JavaScript platform. It puts
+modules in place so that node can find them, and manages dependency
+conflicts intelligently.
+It is extremely configurable to support a wide variety of use cases.
+Most commonly, it is used to publish, discover, install, and develop node
+programs.
+Run npm help
to get a list of available commands.
+INTRODUCTION
+You probably got npm because you want to install stuff.
+Use npm install blerg
to install the latest version of "blerg". Check out
+npm-install(1)
for more info. It can do a lot of stuff.
+Use the npm search
command to show everything that's available.
+Use npm ls
to show everything you've installed.
+DEPENDENCIES
+If a package references to another package with a git URL, npm depends
+on a preinstalled git.
+If one of the packages npm tries to install is a native node module and
+requires compiling of C++ Code, npm will use
+node-gyp for that task.
+For a Unix system, node-gyp
+needs Python, make and a buildchain like GCC. On Windows,
+Python and Microsoft Visual Studio C++ is needed. Python 3 is
+not supported by node-gyp .
+For more information visit
+the node-gyp repository and
+the node-gyp Wiki .
+DIRECTORIES
+See npm-folders(5)
to learn about where npm puts stuff.
+In particular, npm has two modes of operation:
+
+global mode: npm installs packages into the install prefix at
+prefix/lib/node_modules
and bins are installed in prefix/bin
.
+local mode: npm installs packages into the current project directory, which
+defaults to the current working directory. Packages are installed to
+./node_modules
, and bins are installed to ./node_modules/.bin
.
+
+Local mode is the default. Use --global
or -g
on any command to
+operate in global mode instead.
+DEVELOPER USAGE
+If you're using npm to develop and publish your code, check out the
+following help topics:
+
+json:
+Make a package.json file. See package.json(5)
.
+link:
+For linking your current working code into Node's path, so that you
+don't have to reinstall every time you make a change. Use
+npm link
to do this.
+install:
+It's a good idea to install things if you don't need the symbolic link.
+Especially, installing other peoples code from the registry is done via
+npm install
+adduser:
+Create an account or log in. Credentials are stored in the
+user config file.
+publish:
+Use the npm publish
command to upload your code to the registry.
+
+CONFIGURATION
+npm is extremely configurable. It reads its configuration options from
+5 places.
+
+Command line switches: Set a config with --key val
. All keys take a value, even if they
+are booleans (the config parser doesn't know what the options are at
+the time of parsing.) If no value is provided, then the option is set
+to boolean true
.
+Environment Variables: Set any config by prefixing the name in an environment variable with
+npm_config_
. For example, export npm_config_key=val
.
+User Configs: The file at $HOME/.npmrc is an ini-formatted list of configs. If
+present, it is parsed. If the userconfig
option is set in the cli
+or env, then that will be used instead.
+Global Configs: The file found at ../etc/npmrc (from the node executable, by default
+this resolves to /usr/local/etc/npmrc) will be parsed if it is found.
+If the globalconfig
option is set in the cli, env, or user config,
+then that file is parsed instead.
+Defaults: npm's default configuration options are defined in
+lib/utils/config-defs.js. These must not be changed.
+
+See npm-config(7)
for much much more information.
+CONTRIBUTIONS
+Patches welcome!
+
+code:
+Read through npm-coding-style(7)
if you plan to submit code.
+You don't have to agree with it, but you do have to follow it.
+docs:
+If you find an error in the documentation, edit the appropriate markdown
+file in the "doc" folder. (Don't worry about generating the man page.)
+
+Contributors are listed in npm's package.json
file. You can view them
+easily by doing npm view npm contributors
.
+If you would like to contribute, but don't know what to work on, check
+the issues list or ask on the mailing list.
+
+BUGS
+When you find issues, please report them:
+
+Be sure to include all of the output from the npm command that didn't work
+as expected. The npm-debug.log
file is also helpful to provide.
+You can also look for isaacs in #node.js on irc://irc.freenode.net. He
+will no doubt tell you to put the output in a gist or email.
+AUTHOR
+Isaac Z. Schlueter ::
+isaacs ::
+@izs ::
+i@izs.me
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-folders.html b/deps/npm/html/partial/doc/files/npm-folders.html
new file mode 100644
index 0000000..08ea7ed
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-folders.html
@@ -0,0 +1,164 @@
+ Folder Structures Used by npm
+DESCRIPTION
+npm puts various things on your computer. That's its job.
+This document will tell you what it puts where.
+tl;dr
+
+Local install (default): puts stuff in ./node_modules
of the current
+package root.
+Global install (with -g
): puts stuff in /usr/local or wherever node
+is installed.
+Install it locally if you're going to require()
it.
+Install it globally if you're going to run it on the command line.
+If you need both, then install it in both places, or use npm link
.
+
+prefix Configuration
+The prefix
config defaults to the location where node is installed.
+On most systems, this is /usr/local
, and most of the time is the same
+as node's process.installPrefix
.
+On windows, this is the exact location of the node.exe binary. On Unix
+systems, it's one level up, since node is typically installed at
+{prefix}/bin/node
rather than {prefix}/node.exe
.
+When the global
flag is set, npm installs things into this prefix.
+When it is not set, it uses the root of the current package, or the
+current working directory if not in a package already.
+Node Modules
+Packages are dropped into the node_modules
folder under the prefix
.
+When installing locally, this means that you can
+require("packagename")
to load its main module, or
+require("packagename/lib/path/to/sub/module")
to load other modules.
+Global installs on Unix systems go to {prefix}/lib/node_modules
.
+Global installs on Windows go to {prefix}/node_modules
(that is, no
+lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
+If you wish to require()
a package, then install it locally.
+Executables
+When in global mode, executables are linked into {prefix}/bin
on Unix,
+or directly into {prefix}
on Windows.
+When in local mode, executables are linked into
+./node_modules/.bin
so that they can be made available to scripts run
+through npm. (For example, so that a test runner will be in the path
+when you run npm test
.)
+Man Pages
+When in global mode, man pages are linked into {prefix}/share/man
.
+When in local mode, man pages are not installed.
+Man pages are not installed on Windows systems.
+Cache
+See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+~/npm-cache
on Windows.
+This is controlled by the cache
configuration param.
+Temp Files
+Temporary files are stored by default in the folder specified by the
+tmp
config, which defaults to the TMPDIR, TMP, or TEMP environment
+variables, or /tmp
on Unix and c:\windows\temp
on Windows.
+Temp files are given a unique folder under this root for each run of the
+program, and are deleted upon successful exit.
+
+When installing locally, npm first tries to find an appropriate
+prefix
folder. This is so that npm install foo@1.2.3
will install
+to the sensible root of your package, even if you happen to have cd
ed
+into some other folder.
+Starting at the $PWD, npm will walk up the folder tree checking for a
+folder that contains either a package.json
file, or a node_modules
+folder. If such a thing is found, then that is treated as the effective
+"current directory" for the purpose of running npm commands. (This
+behavior is inspired by and similar to git's .git-folder seeking
+logic when running git commands in a working dir.)
+If no package root is found, then the current folder is used.
+When you run npm install foo@1.2.3
, then the package is loaded into
+the cache, and then unpacked into ./node_modules/foo
. Then, any of
+foo's dependencies are similarly unpacked into
+./node_modules/foo/node_modules/...
.
+Any bin files are symlinked to ./node_modules/.bin/
, so that they may
+be found by npm scripts when necessary.
+Global Installation
+If the global
configuration is set to true, then npm will
+install packages "globally".
+For global installation, packages are installed roughly the same way,
+but using the folders described above.
+Cycles, Conflicts, and Folder Parsimony
+Cycles are handled using the property of node's module system that it
+walks up the directories looking for node_modules
folders. So, at every
+stage, if a package is already installed in an ancestor node_modules
+folder, then it is not installed at the current location.
+Consider the case above, where foo -> bar -> baz
. Imagine if, in
+addition to that, baz depended on bar, so you'd have:
+foo -> bar -> baz -> bar -> baz ...
. However, since the folder
+structure is: foo/node_modules/bar/node_modules/baz
, there's no need to
+put another copy of bar into .../baz/node_modules
, since when it calls
+require("bar"), it will get the copy that is installed in
+foo/node_modules/bar
.
+This shortcut is only used if the exact same
+version would be installed in multiple nested node_modules
folders. It
+is still possible to have a/node_modules/b/node_modules/a
if the two
+"a" packages are different versions. However, without repeating the
+exact same package multiple times, an infinite regress will always be
+prevented.
+Another optimization can be made by installing dependencies at the
+highest level possible, below the localized "target" folder.
+Example
+Consider this dependency graph:
+foo
++-- blerg@1.2.5
++-- bar@1.2.3
+| +-- blerg@1.x (latest=1.3.7)
+| +-- baz@2.x
+| | `-- quux@3.x
+| | `-- bar@1.2.3 (cycle)
+| `-- asdf@*
+`-- baz@1.2.3
+ `-- quux@3.x
+ `-- bar
+
In this case, we might expect a folder structure like this:
+foo
++-- node_modules
+ +-- blerg (1.2.5) <---[A]
+ +-- bar (1.2.3) <---[B]
+ | `-- node_modules
+ | +-- baz (2.0.2) <---[C]
+ | | `-- node_modules
+ | | `-- quux (3.2.0)
+ | `-- asdf (2.3.4)
+ `-- baz (1.2.3) <---[D]
+ `-- node_modules
+ `-- quux (3.2.0) <---[E]
+
Since foo depends directly on bar@1.2.3
and baz@1.2.3
, those are
+installed in foo's node_modules
folder.
+Even though the latest copy of blerg is 1.3.7, foo has a specific
+dependency on version 1.2.5. So, that gets installed at [A]. Since the
+parent installation of blerg satisfies bar's dependency on blerg@1.x
,
+it does not install another copy under [B].
+Bar [B] also has dependencies on baz and asdf, so those are installed in
+bar's node_modules
folder. Because it depends on baz@2.x
, it cannot
+re-use the baz@1.2.3
installed in the parent node_modules
folder [D],
+and must install its own copy [C].
+Underneath bar, the baz -> quux -> bar
dependency creates a cycle.
+However, because bar is already in quux's ancestry [B], it does not
+unpack another copy of bar into that folder.
+Underneath foo -> baz
[D], quux's [E] folder tree is empty, because its
+dependency on bar is satisfied by the parent folder copy installed at [B].
+For a graphical breakdown of what is installed where, use npm ls
.
+Publishing
+Upon publishing, npm will look in the node_modules
folder. If any of
+the items there are not in the bundledDependencies
array, then they will
+not be included in the package tarball.
+This allows a package maintainer to install all of their dependencies
+(and dev dependencies) locally, but only re-publish those items that
+cannot be found elsewhere. See package.json(5)
for more information.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-global.html b/deps/npm/html/partial/doc/files/npm-global.html
new file mode 100644
index 0000000..08ea7ed
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-global.html
@@ -0,0 +1,164 @@
+ Folder Structures Used by npm
+DESCRIPTION
+npm puts various things on your computer. That's its job.
+This document will tell you what it puts where.
+tl;dr
+
+Local install (default): puts stuff in ./node_modules
of the current
+package root.
+Global install (with -g
): puts stuff in /usr/local or wherever node
+is installed.
+Install it locally if you're going to require()
it.
+Install it globally if you're going to run it on the command line.
+If you need both, then install it in both places, or use npm link
.
+
+prefix Configuration
+The prefix
config defaults to the location where node is installed.
+On most systems, this is /usr/local
, and most of the time is the same
+as node's process.installPrefix
.
+On windows, this is the exact location of the node.exe binary. On Unix
+systems, it's one level up, since node is typically installed at
+{prefix}/bin/node
rather than {prefix}/node.exe
.
+When the global
flag is set, npm installs things into this prefix.
+When it is not set, it uses the root of the current package, or the
+current working directory if not in a package already.
+Node Modules
+Packages are dropped into the node_modules
folder under the prefix
.
+When installing locally, this means that you can
+require("packagename")
to load its main module, or
+require("packagename/lib/path/to/sub/module")
to load other modules.
+Global installs on Unix systems go to {prefix}/lib/node_modules
.
+Global installs on Windows go to {prefix}/node_modules
(that is, no
+lib
folder.)
+Scoped packages are installed the same way, except they are grouped together
+in a sub-folder of the relevant node_modules
folder with the name of that
+scope prefix by the @ symbol, e.g. npm install @myorg/package
would place
+the package in {prefix}/node_modules/@myorg/package
. See scopes(7)
for
+more details.
+If you wish to require()
a package, then install it locally.
+Executables
+When in global mode, executables are linked into {prefix}/bin
on Unix,
+or directly into {prefix}
on Windows.
+When in local mode, executables are linked into
+./node_modules/.bin
so that they can be made available to scripts run
+through npm. (For example, so that a test runner will be in the path
+when you run npm test
.)
+Man Pages
+When in global mode, man pages are linked into {prefix}/share/man
.
+When in local mode, man pages are not installed.
+Man pages are not installed on Windows systems.
+Cache
+See npm-cache(1)
. Cache files are stored in ~/.npm
on Posix, or
+~/npm-cache
on Windows.
+This is controlled by the cache
configuration param.
+Temp Files
+Temporary files are stored by default in the folder specified by the
+tmp
config, which defaults to the TMPDIR, TMP, or TEMP environment
+variables, or /tmp
on Unix and c:\windows\temp
on Windows.
+Temp files are given a unique folder under this root for each run of the
+program, and are deleted upon successful exit.
+
+When installing locally, npm first tries to find an appropriate
+prefix
folder. This is so that npm install foo@1.2.3
will install
+to the sensible root of your package, even if you happen to have cd
ed
+into some other folder.
+Starting at the $PWD, npm will walk up the folder tree checking for a
+folder that contains either a package.json
file, or a node_modules
+folder. If such a thing is found, then that is treated as the effective
+"current directory" for the purpose of running npm commands. (This
+behavior is inspired by and similar to git's .git-folder seeking
+logic when running git commands in a working dir.)
+If no package root is found, then the current folder is used.
+When you run npm install foo@1.2.3
, then the package is loaded into
+the cache, and then unpacked into ./node_modules/foo
. Then, any of
+foo's dependencies are similarly unpacked into
+./node_modules/foo/node_modules/...
.
+Any bin files are symlinked to ./node_modules/.bin/
, so that they may
+be found by npm scripts when necessary.
+Global Installation
+If the global
configuration is set to true, then npm will
+install packages "globally".
+For global installation, packages are installed roughly the same way,
+but using the folders described above.
+Cycles, Conflicts, and Folder Parsimony
+Cycles are handled using the property of node's module system that it
+walks up the directories looking for node_modules
folders. So, at every
+stage, if a package is already installed in an ancestor node_modules
+folder, then it is not installed at the current location.
+Consider the case above, where foo -> bar -> baz
. Imagine if, in
+addition to that, baz depended on bar, so you'd have:
+foo -> bar -> baz -> bar -> baz ...
. However, since the folder
+structure is: foo/node_modules/bar/node_modules/baz
, there's no need to
+put another copy of bar into .../baz/node_modules
, since when it calls
+require("bar"), it will get the copy that is installed in
+foo/node_modules/bar
.
+This shortcut is only used if the exact same
+version would be installed in multiple nested node_modules
folders. It
+is still possible to have a/node_modules/b/node_modules/a
if the two
+"a" packages are different versions. However, without repeating the
+exact same package multiple times, an infinite regress will always be
+prevented.
+Another optimization can be made by installing dependencies at the
+highest level possible, below the localized "target" folder.
+Example
+Consider this dependency graph:
+foo
++-- blerg@1.2.5
++-- bar@1.2.3
+| +-- blerg@1.x (latest=1.3.7)
+| +-- baz@2.x
+| | `-- quux@3.x
+| | `-- bar@1.2.3 (cycle)
+| `-- asdf@*
+`-- baz@1.2.3
+ `-- quux@3.x
+ `-- bar
+
In this case, we might expect a folder structure like this:
+foo
++-- node_modules
+ +-- blerg (1.2.5) <---[A]
+ +-- bar (1.2.3) <---[B]
+ | `-- node_modules
+ | +-- baz (2.0.2) <---[C]
+ | | `-- node_modules
+ | | `-- quux (3.2.0)
+ | `-- asdf (2.3.4)
+ `-- baz (1.2.3) <---[D]
+ `-- node_modules
+ `-- quux (3.2.0) <---[E]
+
Since foo depends directly on bar@1.2.3
and baz@1.2.3
, those are
+installed in foo's node_modules
folder.
+Even though the latest copy of blerg is 1.3.7, foo has a specific
+dependency on version 1.2.5. So, that gets installed at [A]. Since the
+parent installation of blerg satisfies bar's dependency on blerg@1.x
,
+it does not install another copy under [B].
+Bar [B] also has dependencies on baz and asdf, so those are installed in
+bar's node_modules
folder. Because it depends on baz@2.x
, it cannot
+re-use the baz@1.2.3
installed in the parent node_modules
folder [D],
+and must install its own copy [C].
+Underneath bar, the baz -> quux -> bar
dependency creates a cycle.
+However, because bar is already in quux's ancestry [B], it does not
+unpack another copy of bar into that folder.
+Underneath foo -> baz
[D], quux's [E] folder tree is empty, because its
+dependency on bar is satisfied by the parent folder copy installed at [B].
+For a graphical breakdown of what is installed where, use npm ls
.
+Publishing
+Upon publishing, npm will look in the node_modules
folder. If any of
+the items there are not in the bundledDependencies
array, then they will
+not be included in the package tarball.
+This allows a package maintainer to install all of their dependencies
+(and dev dependencies) locally, but only re-publish those items that
+cannot be found elsewhere. See package.json(5)
for more information.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html
new file mode 100644
index 0000000..df3bea8
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npm-json.html
@@ -0,0 +1,465 @@
+ Specifics of npm's package.json handling
+DESCRIPTION
+This document is all you need to know about what's required in your package.json
+file. It must be actual JSON, not just a JavaScript object literal.
+A lot of the behavior described in this document is affected by the config
+settings described in npm-config(7)
.
+name
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+The name is what your thing is called. Some tips:
+
+Don't put "js" or "node" in the name. It's assumed that it's js, since you're
+writing a package.json file, and you can specify the engine using the "engines"
+field. (See below.)
+The name ends up being part of a URL, an argument on the command line, and a
+folder name. Any name with non-url-safe characters will be rejected.
+Also, it can't start with a dot or an underscore.
+The name will probably be passed as an argument to require(), so it should
+be something short, but also reasonably descriptive.
+You may want to check the npm registry to see if there's something by that name
+already, before you get too attached to it. http://registry.npmjs.org/
+
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
+version
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+Version must be parseable by
+node-semver , which is bundled
+with npm as a dependency. (npm install semver
to use it yourself.)
+More on version numbers and ranges at semver(7) .
+description
+Put a description in it. It's a string. This helps people discover your
+package, as it's listed in npm search
.
+keywords
+Put keywords in it. It's an array of strings. This helps people
+discover your package as it's listed in npm search
.
+homepage
+The url to the project homepage.
+NOTE : This is not the same as "url". If you put a "url" field,
+then the registry will think it's a redirection to your package that has
+been published somewhere else, and spit at you.
+Literally. Spit. I'm so not kidding.
+bugs
+The url to your project's issue tracker and / or the email address to which
+issues should be reported. These are helpful for people who encounter issues
+with your package.
+It should look like this:
+{ "url" : "http://github.com/owner/project/issues"
+, "email" : "project@hostname.com"
+}
+
You can specify either one or both values. If you want to provide only a url,
+you can specify the value for "bugs" as a simple string instead of an object.
+If a url is provided, it will be used by the npm bugs
command.
+license
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.
+The simplest way, assuming you're using a common license such as BSD-3-Clause
+or MIT, is to just specify the standard SPDX ID of the license you're using,
+like this:
+{ "license" : "BSD-3-Clause" }
+
You can check the full list of SPDX license IDs .
+Ideally you should pick one that is
+OSI approved.
+It's also a good idea to include a LICENSE file at the top level in
+your package.
+people fields: author, contributors
+The "author" is one person. "contributors" is an array of people. A "person"
+is an object with a "name" field and optionally "url" and "email", like this:
+{ "name" : "Barney Rubble"
+, "email" : "b@rubble.com"
+, "url" : "http://barnyrubble.tumblr.com/"
+}
+
Or you can shorten that all into a single string, and npm will parse it for you:
+"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
+
Both email and url are optional either way.
+npm also sets a top-level "maintainers" field with your npm user info.
+files
+The "files" field is an array of files to include in your project. If
+you name a folder in the array, then it will also include the files
+inside that folder. (Unless they would be ignored by another rule.)
+You can also provide a ".npmignore" file in the root of your package,
+which will keep files from being included, even if they would be picked
+up by the files array. The ".npmignore" file works just like a
+".gitignore".
+main
+The main field is a module ID that is the primary entry point to your program.
+That is, if your package is named foo
, and a user installs it, and then does
+require("foo")
, then your main module's exports object will be returned.
+This should be a module ID relative to the root of your package folder.
+For most modules, it makes the most sense to have a main script and often not
+much else.
+bin
+A lot of packages have one or more executable files that they'd like to
+install into the PATH. npm makes this pretty easy (in fact, it uses this
+feature to install the "npm" executable.)
+To use this, supply a bin
field in your package.json which is a map of
+command name to local file name. On install, npm will symlink that file into
+prefix/bin
for global installs, or ./node_modules/.bin/
for local
+installs.
+For example, npm has this:
+{ "bin" : { "npm" : "./cli.js" } }
+
So, when you install npm, it'll create a symlink from the cli.js
script to
+/usr/local/bin/npm
.
+If you have a single executable, and its name should be the name
+of the package, then you can just supply it as a string. For example:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin": "./path/to/program" }
+
would be the same as this:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin" : { "my-program" : "./path/to/program" } }
+
man
+Specify either a single file or an array of filenames to put in place for the
+man
program to find.
+If only a single file is provided, then it's installed such that it is the
+result from man <pkgname>
, regardless of its actual filename. For example:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : "./man/doc.1"
+}
+
would link the ./man/doc.1
file in such that it is the target for man foo
+If the filename doesn't start with the package name, then it's prefixed.
+So, this:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/bar.1" ]
+}
+
will create files to do man foo
and man foo-bar
.
+Man files must end with a number, and optionally a .gz
suffix if they are
+compressed. The number dictates which man section the file is installed into.
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/foo.2" ]
+}
+
will create entries for man foo
and man 2 foo
+directories
+The CommonJS Packages spec details a
+few ways that you can indicate the structure of your package using a directories
+object. If you look at npm's package.json ,
+you'll see that it has directories for doc, lib, and man.
+In the future, this information may be used in other creative ways.
+directories.lib
+Tell people where the bulk of your library is. Nothing special is done
+with the lib folder in any way, but it's useful meta info.
+directories.bin
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
+directories.man
+A folder that is full of man pages. Sugar to generate a "man" array by
+walking the folder.
+directories.doc
+Put markdown files in here. Eventually, these will be displayed nicely,
+maybe, someday.
+directories.example
+Put example scripts in here. Someday, it might be exposed in some clever way.
+repository
+Specify the place where your code lives. This is helpful for people who
+want to contribute. If the git repo is on github, then the npm docs
+command will be able to find you.
+Do it like this:
+"repository" :
+ { "type" : "git"
+ , "url" : "http://github.com/npm/npm.git"
+ }
+
+"repository" :
+ { "type" : "svn"
+ , "url" : "http://v8.googlecode.com/svn/trunk/"
+ }
+
The URL should be a publicly available (perhaps read-only) url that can be handed
+directly to a VCS program without any modification. It should not be a url to an
+html project page that you put in your browser. It's for computers.
+scripts
+The "scripts" property is a dictionary containing script commands that are run
+at various times in the lifecycle of your package. The key is the lifecycle
+event, and the value is the command to run at that point.
+See npm-scripts(7)
to find out more about writing package scripts.
+config
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
+{ "name" : "foo"
+, "config" : { "port" : "8080" } }
+
and then had a "start" command that then referenced the
+npm_package_config_port
environment variable, then the user could
+override that by doing npm config set foo:port 8001
.
+See npm-config(7)
and npm-scripts(7)
for more on package
+configs.
+dependencies
+Dependencies are specified in a simple object that maps a package name to a
+version range. The version range is a string which has one or more
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
+Please do not put test harnesses or transpilers in your
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
+
+version
Must match version
exactly
+>version
Must be greater than version
+>=version
etc
+<version
+<=version
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
+1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
+http://...
See 'URLs as Dependencies' below
+*
Matches any version
+""
(just an empty string) Same as *
+version1 - version2
Same as >=version1 <=version2
.
+range1 || range2
Passes if either range1 or range2 are satisfied.
+git...
See 'Git URLs as Dependencies' below
+user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
+
+For example, these are all valid:
+{ "dependencies" :
+ { "foo" : "1.0.0 - 2.9999.9999"
+ , "bar" : ">=1.0.2 <2.1.2"
+ , "baz" : ">1.0.2 <=2.3.4"
+ , "boo" : "2.0.1"
+ , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
+ , "asd" : "http://asdf.com/asdf.tar.gz"
+ , "til" : "~1.2"
+ , "elf" : "~1.2.3"
+ , "two" : "2.x"
+ , "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
+ }
+}
+
URLs as Dependencies
+You may specify a tarball URL in place of a version range.
+This tarball will be downloaded and installed locally to your package at
+install time.
+Git URLs as Dependencies
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+ssh://user@hostname/project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+GitHub URLs
+As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
+{
+ "name": "foo",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "visionmedia/express"
+ }
+}
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
+If someone is planning on downloading and using your module in their
+program, then they probably don't want or need to download and build
+the external test or documentation framework that you use.
+In this case, it's best to map these additional items in a devDependencies
+object.
+These things will be installed when doing npm link
or npm install
+from the root of a package, and can be managed like any other npm
+configuration param. See npm-config(7)
for more on the topic.
+For build steps that are not platform-specific, such as compiling
+CoffeeScript or other languages to JavaScript, use the prepublish
+script to do this, and make the required package a devDependency.
+For example:
+{ "name": "ethopia-waza",
+ "description": "a delightfully fruity coffee varietal",
+ "version": "1.2.3",
+ "devDependencies": {
+ "coffee-script": "~1.6.3"
+ },
+ "scripts": {
+ "prepublish": "coffee -o lib/ -c src/waza.coffee"
+ },
+ "main": "lib/waza.js"
+}
+
The prepublish
script will be run before publishing, so that users
+can consume the functionality without requiring them to compile it
+themselves. In dev mode (ie, locally running npm install
), it'll
+run this script as well, so that you can test it easily.
+peerDependencies
+In some cases, you want to express the compatibility of your package with an
+host tool or library, while not necessarily doing a require
of this host.
+This is usually refered to as a plugin . Notably, your module may be exposing
+a specific interface, expected and specified by the host documentation.
+For example:
+{
+ "name": "tea-latte",
+ "version": "1.3.5"
+ "peerDependencies": {
+ "tea": "2.x"
+ }
+}
+
This ensures your package tea-latte
can be installed along with the second
+major version of the host package tea
only. The host package is automatically
+installed if needed. npm install tea-latte
could possibly yield the following
+dependency graph:
+âââ tea-latte@1.3.5
+âââ tea@2.2.0
+
Trying to install another plugin with a conflicting requirement will cause an
+error. For this reason, make sure your plugin requirement is as broad as
+possible, and not to lock it down to specific patch versions.
+Assuming the host complies with semver , only changes in
+the host package's major version will break your plugin. Thus, if you've worked
+with every 1.x version of the host package, use "^1.0"
or "1.x"
to express
+this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2"
.
+bundledDependencies
+Array of package names that will be bundled when publishing the package.
+If this is spelled "bundleDependencies"
, then that is also honorable.
+optionalDependencies
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
+It is still your program's responsibility to handle the lack of the
+dependency. For example, something like this:
+try {
+ var foo = require('foo')
+ var fooVersion = require('foo/package.json').version
+} catch (er) {
+ foo = null
+}
+if ( notGoodFooVersion(fooVersion) ) {
+ foo = null
+}
+
+// .. then later in your program ..
+
+if (foo) {
+ foo.doFooThings()
+}
+
Entries in optionalDependencies
will override entries of the same name in
+dependencies
, so it's usually best to only put in one place.
+engines
+You can specify the version of node that your stuff works on:
+{ "engines" : { "node" : ">=0.10.3 <0.12" } }
+
And, like with dependencies, if you don't specify the version (or if you
+specify "*" as the version), then any version of node will do.
+If you specify an "engines" field, then npm will require that "node" be
+somewhere on that list. If "engines" is omitted, then npm will just assume
+that it works on node.
+You can also use the "engines" field to specify which versions of npm
+are capable of properly installing your program. For example:
+{ "engines" : { "npm" : "~1.0.20" } }
+
Note that, unless the user has set the engine-strict
config flag, this
+field is advisory only.
+engineStrict
+If you are sure that your module will definitely not run properly on
+versions of Node/npm other than those specified in the engines
object,
+then you can set "engineStrict": true
in your package.json file.
+This will override the user's engine-strict
config setting.
+Please do not do this unless you are really very very sure. If your
+engines object is something overly restrictive, you can quite easily and
+inadvertently lock yourself into obscurity and prevent your users from
+updating to new versions of Node. Consider this choice carefully. If
+people abuse it, it will be removed in a future version of npm.
+os
+You can specify which operating systems your
+module will run on:
+"os" : [ "darwin", "linux" ]
+
You can also blacklist instead of whitelist operating systems,
+just prepend the blacklisted os with a '!':
+"os" : [ "!win32" ]
+
The host operating system is determined by process.platform
+It is allowed to both blacklist, and whitelist, although there isn't any
+good reason to do this.
+cpu
+If your code only runs on certain cpu architectures,
+you can specify which ones.
+"cpu" : [ "x64", "ia32" ]
+
Like the os
option, you can also blacklist architectures:
+"cpu" : [ "!arm", "!mips" ]
+
The host architecture is determined by process.arch
+preferGlobal
+If your package is primarily a command-line application that should be
+installed globally, then set this value to true
to provide a warning
+if it is installed locally.
+It doesn't actually prevent users from installing it locally, but it
+does help prevent some confusion if it doesn't work as expected.
+private
+If you set "private": true
in your package.json, then npm will refuse
+to publish it.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
+publishConfig
+This is a set of config values that will be used at publish-time. It's
+especially handy if you want to set the tag or registry, so that you can
+ensure that a given package is not tagged with "latest" or published to
+the global public registry by default.
+Any config values can be overridden, but of course only "tag" and
+"registry" probably matter for the purposes of publishing.
+See npm-config(7)
to see the list of config options that can be
+overridden.
+DEFAULT VALUES
+npm will default some values based on package contents.
+
+"scripts": {"start": "node server.js"}
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"scripts":{"preinstall": "node-gyp rebuild"}
+If there is a binding.gyp
file in the root of your package, npm will
+default the preinstall
command to compile using node-gyp.
+
+"contributors": [...]
+If there is an AUTHORS
file in the root of your package, npm will
+treat each line as a Name <email> (url)
format, where email and url
+are optional. Lines which start with a #
or are blank, will be
+ignored.
+
+
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/npmrc.html b/deps/npm/html/partial/doc/files/npmrc.html
new file mode 100644
index 0000000..ac386ca
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/npmrc.html
@@ -0,0 +1,53 @@
+ The npm config files
+DESCRIPTION
+npm gets its config settings from the command line, environment
+variables, and npmrc
files.
+The npm config
command can be used to update and edit the contents
+of the user and global npmrc files.
+For a list of available configuration options, see npm-config(7) .
+FILES
+The four relevant files are:
+
+per-project config file (/path/to/my/project/.npmrc)
+per-user config file (~/.npmrc)
+global config file ($PREFIX/npmrc)
+npm builtin config file (/path/to/npm/npmrc)
+
+All npm config files are an ini-formatted list of key = value
+parameters. Environment variables can be replaced using
+${VARIABLE_NAME}
. For example:
+prefix = ${HOME}/.npm-packages
+
Each of these files is loaded, and config options are resolved in
+priority order. For example, a setting in the userconfig file would
+override the setting in the globalconfig file.
+Per-project config file
+When working locally in a project, a .npmrc
file in the root of the
+project (ie, a sibling of node_modules
and package.json
) will set
+config values specific to this project.
+Note that this only applies to the root of the project that you're
+running npm in. It has no effect when your module is published. For
+example, you can't publish a module that forces itself to install
+globally, or in a different location.
+Per-user config file
+$HOME/.npmrc
(or the userconfig
param, if set in the environment
+or on the command line)
+Global config file
+$PREFIX/etc/npmrc
(or the globalconfig
param, if set above):
+This file is an ini-file formatted list of key = value
parameters.
+Environment variables can be replaced as above.
+Built-in config file
+path/to/npm/itself/npmrc
+This is an unchangeable "builtin" configuration file that npm keeps
+consistent across updates. Set fields in here using the ./configure
+script that comes with npm. This is primarily for distribution
+maintainers to override default configs in a standard and consistent
+manner.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
new file mode 100644
index 0000000..df3bea8
--- /dev/null
+++ b/deps/npm/html/partial/doc/files/package.json.html
@@ -0,0 +1,465 @@
+ Specifics of npm's package.json handling
+DESCRIPTION
+This document is all you need to know about what's required in your package.json
+file. It must be actual JSON, not just a JavaScript object literal.
+A lot of the behavior described in this document is affected by the config
+settings described in npm-config(7)
.
+name
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+The name is what your thing is called. Some tips:
+
+Don't put "js" or "node" in the name. It's assumed that it's js, since you're
+writing a package.json file, and you can specify the engine using the "engines"
+field. (See below.)
+The name ends up being part of a URL, an argument on the command line, and a
+folder name. Any name with non-url-safe characters will be rejected.
+Also, it can't start with a dot or an underscore.
+The name will probably be passed as an argument to require(), so it should
+be something short, but also reasonably descriptive.
+You may want to check the npm registry to see if there's something by that name
+already, before you get too attached to it. http://registry.npmjs.org/
+
+A name can be optionally prefixed by a scope, e.g. @myorg/mypackage
. See
+npm-scope(7)
for more detail.
+version
+The most important things in your package.json are the name and version fields.
+Those are actually required, and your package won't install without
+them. The name and version together form an identifier that is assumed
+to be completely unique. Changes to the package should come along with
+changes to the version.
+Version must be parseable by
+node-semver , which is bundled
+with npm as a dependency. (npm install semver
to use it yourself.)
+More on version numbers and ranges at semver(7) .
+description
+Put a description in it. It's a string. This helps people discover your
+package, as it's listed in npm search
.
+keywords
+Put keywords in it. It's an array of strings. This helps people
+discover your package as it's listed in npm search
.
+homepage
+The url to the project homepage.
+NOTE : This is not the same as "url". If you put a "url" field,
+then the registry will think it's a redirection to your package that has
+been published somewhere else, and spit at you.
+Literally. Spit. I'm so not kidding.
+bugs
+The url to your project's issue tracker and / or the email address to which
+issues should be reported. These are helpful for people who encounter issues
+with your package.
+It should look like this:
+{ "url" : "http://github.com/owner/project/issues"
+, "email" : "project@hostname.com"
+}
+
You can specify either one or both values. If you want to provide only a url,
+you can specify the value for "bugs" as a simple string instead of an object.
+If a url is provided, it will be used by the npm bugs
command.
+license
+You should specify a license for your package so that people know how they are
+permitted to use it, and any restrictions you're placing on it.
+The simplest way, assuming you're using a common license such as BSD-3-Clause
+or MIT, is to just specify the standard SPDX ID of the license you're using,
+like this:
+{ "license" : "BSD-3-Clause" }
+
You can check the full list of SPDX license IDs .
+Ideally you should pick one that is
+OSI approved.
+It's also a good idea to include a LICENSE file at the top level in
+your package.
+people fields: author, contributors
+The "author" is one person. "contributors" is an array of people. A "person"
+is an object with a "name" field and optionally "url" and "email", like this:
+{ "name" : "Barney Rubble"
+, "email" : "b@rubble.com"
+, "url" : "http://barnyrubble.tumblr.com/"
+}
+
Or you can shorten that all into a single string, and npm will parse it for you:
+"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
+
Both email and url are optional either way.
+npm also sets a top-level "maintainers" field with your npm user info.
+files
+The "files" field is an array of files to include in your project. If
+you name a folder in the array, then it will also include the files
+inside that folder. (Unless they would be ignored by another rule.)
+You can also provide a ".npmignore" file in the root of your package,
+which will keep files from being included, even if they would be picked
+up by the files array. The ".npmignore" file works just like a
+".gitignore".
+main
+The main field is a module ID that is the primary entry point to your program.
+That is, if your package is named foo
, and a user installs it, and then does
+require("foo")
, then your main module's exports object will be returned.
+This should be a module ID relative to the root of your package folder.
+For most modules, it makes the most sense to have a main script and often not
+much else.
+bin
+A lot of packages have one or more executable files that they'd like to
+install into the PATH. npm makes this pretty easy (in fact, it uses this
+feature to install the "npm" executable.)
+To use this, supply a bin
field in your package.json which is a map of
+command name to local file name. On install, npm will symlink that file into
+prefix/bin
for global installs, or ./node_modules/.bin/
for local
+installs.
+For example, npm has this:
+{ "bin" : { "npm" : "./cli.js" } }
+
So, when you install npm, it'll create a symlink from the cli.js
script to
+/usr/local/bin/npm
.
+If you have a single executable, and its name should be the name
+of the package, then you can just supply it as a string. For example:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin": "./path/to/program" }
+
would be the same as this:
+{ "name": "my-program"
+, "version": "1.2.5"
+, "bin" : { "my-program" : "./path/to/program" } }
+
man
+Specify either a single file or an array of filenames to put in place for the
+man
program to find.
+If only a single file is provided, then it's installed such that it is the
+result from man <pkgname>
, regardless of its actual filename. For example:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : "./man/doc.1"
+}
+
would link the ./man/doc.1
file in such that it is the target for man foo
+If the filename doesn't start with the package name, then it's prefixed.
+So, this:
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/bar.1" ]
+}
+
will create files to do man foo
and man foo-bar
.
+Man files must end with a number, and optionally a .gz
suffix if they are
+compressed. The number dictates which man section the file is installed into.
+{ "name" : "foo"
+, "version" : "1.2.3"
+, "description" : "A packaged foo fooer for fooing foos"
+, "main" : "foo.js"
+, "man" : [ "./man/foo.1", "./man/foo.2" ]
+}
+
will create entries for man foo
and man 2 foo
+directories
+The CommonJS Packages spec details a
+few ways that you can indicate the structure of your package using a directories
+object. If you look at npm's package.json ,
+you'll see that it has directories for doc, lib, and man.
+In the future, this information may be used in other creative ways.
+directories.lib
+Tell people where the bulk of your library is. Nothing special is done
+with the lib folder in any way, but it's useful meta info.
+directories.bin
+If you specify a bin
directory, then all the files in that folder will
+be added as children of the bin
path.
+If you have a bin
path already, then this has no effect.
+directories.man
+A folder that is full of man pages. Sugar to generate a "man" array by
+walking the folder.
+directories.doc
+Put markdown files in here. Eventually, these will be displayed nicely,
+maybe, someday.
+directories.example
+Put example scripts in here. Someday, it might be exposed in some clever way.
+repository
+Specify the place where your code lives. This is helpful for people who
+want to contribute. If the git repo is on github, then the npm docs
+command will be able to find you.
+Do it like this:
+"repository" :
+ { "type" : "git"
+ , "url" : "http://github.com/npm/npm.git"
+ }
+
+"repository" :
+ { "type" : "svn"
+ , "url" : "http://v8.googlecode.com/svn/trunk/"
+ }
+
The URL should be a publicly available (perhaps read-only) url that can be handed
+directly to a VCS program without any modification. It should not be a url to an
+html project page that you put in your browser. It's for computers.
+scripts
+The "scripts" property is a dictionary containing script commands that are run
+at various times in the lifecycle of your package. The key is the lifecycle
+event, and the value is the command to run at that point.
+See npm-scripts(7)
to find out more about writing package scripts.
+config
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades. For instance, if a package had the
+following:
+{ "name" : "foo"
+, "config" : { "port" : "8080" } }
+
and then had a "start" command that then referenced the
+npm_package_config_port
environment variable, then the user could
+override that by doing npm config set foo:port 8001
.
+See npm-config(7)
and npm-scripts(7)
for more on package
+configs.
+dependencies
+Dependencies are specified in a simple object that maps a package name to a
+version range. The version range is a string which has one or more
+space-separated descriptors. Dependencies can also be identified with a
+tarball or git URL.
+Please do not put test harnesses or transpilers in your
+dependencies
object. See devDependencies
, below.
+See semver(7) for more details about specifying version ranges.
+
+version
Must match version
exactly
+>version
Must be greater than version
+>=version
etc
+<version
+<=version
+~version
"Approximately equivalent to version" See semver(7)
+^version
"Compatible with version" See semver(7)
+1.2.x
1.2.0, 1.2.1, etc., but not 1.3.0
+http://...
See 'URLs as Dependencies' below
+*
Matches any version
+""
(just an empty string) Same as *
+version1 - version2
Same as >=version1 <=version2
.
+range1 || range2
Passes if either range1 or range2 are satisfied.
+git...
See 'Git URLs as Dependencies' below
+user/repo
See 'GitHub URLs' below
+tag
A specific version tagged and published as tag
See npm-tag(1)
+path/path/path
See Local Paths below
+
+For example, these are all valid:
+{ "dependencies" :
+ { "foo" : "1.0.0 - 2.9999.9999"
+ , "bar" : ">=1.0.2 <2.1.2"
+ , "baz" : ">1.0.2 <=2.3.4"
+ , "boo" : "2.0.1"
+ , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
+ , "asd" : "http://asdf.com/asdf.tar.gz"
+ , "til" : "~1.2"
+ , "elf" : "~1.2.3"
+ , "two" : "2.x"
+ , "thr" : "3.3.x"
+ , "lat" : "latest"
+ , "dyl" : "file:../dyl"
+ }
+}
+
URLs as Dependencies
+You may specify a tarball URL in place of a version range.
+This tarball will be downloaded and installed locally to your package at
+install time.
+Git URLs as Dependencies
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+ssh://user@hostname/project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+GitHub URLs
+As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
+{
+ "name": "foo",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "visionmedia/express"
+ }
+}
+
Local Paths
+As of version 2.0.0 you can provide a path to a local directory that contains a
+package. Local paths can be saved using npm install --save
, using any of
+these forms:
+../foo/bar
+~/foo/bar
+./foo/bar
+/foo/bar
+
in which case they will be normalized to a relative path and added to your
+package.json
. For example:
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:../foo/bar"
+ }
+}
+
This feature is helpful for local offline development and creating
+tests that require npm installing where you don't want to hit an
+external server, but should not be used when publishing packages
+to the public registry.
+devDependencies
+If someone is planning on downloading and using your module in their
+program, then they probably don't want or need to download and build
+the external test or documentation framework that you use.
+In this case, it's best to map these additional items in a devDependencies
+object.
+These things will be installed when doing npm link
or npm install
+from the root of a package, and can be managed like any other npm
+configuration param. See npm-config(7)
for more on the topic.
+For build steps that are not platform-specific, such as compiling
+CoffeeScript or other languages to JavaScript, use the prepublish
+script to do this, and make the required package a devDependency.
+For example:
+{ "name": "ethopia-waza",
+ "description": "a delightfully fruity coffee varietal",
+ "version": "1.2.3",
+ "devDependencies": {
+ "coffee-script": "~1.6.3"
+ },
+ "scripts": {
+ "prepublish": "coffee -o lib/ -c src/waza.coffee"
+ },
+ "main": "lib/waza.js"
+}
+
The prepublish
script will be run before publishing, so that users
+can consume the functionality without requiring them to compile it
+themselves. In dev mode (ie, locally running npm install
), it'll
+run this script as well, so that you can test it easily.
+peerDependencies
+In some cases, you want to express the compatibility of your package with an
+host tool or library, while not necessarily doing a require
of this host.
+This is usually refered to as a plugin . Notably, your module may be exposing
+a specific interface, expected and specified by the host documentation.
+For example:
+{
+ "name": "tea-latte",
+ "version": "1.3.5"
+ "peerDependencies": {
+ "tea": "2.x"
+ }
+}
+
This ensures your package tea-latte
can be installed along with the second
+major version of the host package tea
only. The host package is automatically
+installed if needed. npm install tea-latte
could possibly yield the following
+dependency graph:
+âââ tea-latte@1.3.5
+âââ tea@2.2.0
+
Trying to install another plugin with a conflicting requirement will cause an
+error. For this reason, make sure your plugin requirement is as broad as
+possible, and not to lock it down to specific patch versions.
+Assuming the host complies with semver , only changes in
+the host package's major version will break your plugin. Thus, if you've worked
+with every 1.x version of the host package, use "^1.0"
or "1.x"
to express
+this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2"
.
+bundledDependencies
+Array of package names that will be bundled when publishing the package.
+If this is spelled "bundleDependencies"
, then that is also honorable.
+optionalDependencies
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the optionalDependencies
+object. This is a map of package name to version or url, just like the
+dependencies
object. The difference is that build failures do not cause
+installation to fail.
+It is still your program's responsibility to handle the lack of the
+dependency. For example, something like this:
+try {
+ var foo = require('foo')
+ var fooVersion = require('foo/package.json').version
+} catch (er) {
+ foo = null
+}
+if ( notGoodFooVersion(fooVersion) ) {
+ foo = null
+}
+
+// .. then later in your program ..
+
+if (foo) {
+ foo.doFooThings()
+}
+
Entries in optionalDependencies
will override entries of the same name in
+dependencies
, so it's usually best to only put in one place.
+engines
+You can specify the version of node that your stuff works on:
+{ "engines" : { "node" : ">=0.10.3 <0.12" } }
+
And, like with dependencies, if you don't specify the version (or if you
+specify "*" as the version), then any version of node will do.
+If you specify an "engines" field, then npm will require that "node" be
+somewhere on that list. If "engines" is omitted, then npm will just assume
+that it works on node.
+You can also use the "engines" field to specify which versions of npm
+are capable of properly installing your program. For example:
+{ "engines" : { "npm" : "~1.0.20" } }
+
Note that, unless the user has set the engine-strict
config flag, this
+field is advisory only.
+engineStrict
+If you are sure that your module will definitely not run properly on
+versions of Node/npm other than those specified in the engines
object,
+then you can set "engineStrict": true
in your package.json file.
+This will override the user's engine-strict
config setting.
+Please do not do this unless you are really very very sure. If your
+engines object is something overly restrictive, you can quite easily and
+inadvertently lock yourself into obscurity and prevent your users from
+updating to new versions of Node. Consider this choice carefully. If
+people abuse it, it will be removed in a future version of npm.
+os
+You can specify which operating systems your
+module will run on:
+"os" : [ "darwin", "linux" ]
+
You can also blacklist instead of whitelist operating systems,
+just prepend the blacklisted os with a '!':
+"os" : [ "!win32" ]
+
The host operating system is determined by process.platform
+It is allowed to both blacklist, and whitelist, although there isn't any
+good reason to do this.
+cpu
+If your code only runs on certain cpu architectures,
+you can specify which ones.
+"cpu" : [ "x64", "ia32" ]
+
Like the os
option, you can also blacklist architectures:
+"cpu" : [ "!arm", "!mips" ]
+
The host architecture is determined by process.arch
+preferGlobal
+If your package is primarily a command-line application that should be
+installed globally, then set this value to true
to provide a warning
+if it is installed locally.
+It doesn't actually prevent users from installing it locally, but it
+does help prevent some confusion if it doesn't work as expected.
+private
+If you set "private": true
in your package.json, then npm will refuse
+to publish it.
+This is a way to prevent accidental publication of private repositories. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+publishConfig
dictionary described below to override the registry
config
+param at publish-time.
+publishConfig
+This is a set of config values that will be used at publish-time. It's
+especially handy if you want to set the tag or registry, so that you can
+ensure that a given package is not tagged with "latest" or published to
+the global public registry by default.
+Any config values can be overridden, but of course only "tag" and
+"registry" probably matter for the purposes of publishing.
+See npm-config(7)
to see the list of config options that can be
+overridden.
+DEFAULT VALUES
+npm will default some values based on package contents.
+
+"scripts": {"start": "node server.js"}
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"scripts":{"preinstall": "node-gyp rebuild"}
+If there is a binding.gyp
file in the root of your package, npm will
+default the preinstall
command to compile using node-gyp.
+
+"contributors": [...]
+If there is an AUTHORS
file in the root of your package, npm will
+treat each line as a Name <email> (url)
format, where email and url
+are optional. Lines which start with a #
or are blank, will be
+ignored.
+
+
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/index.html b/deps/npm/html/partial/doc/index.html
new file mode 100644
index 0000000..f6678d9
--- /dev/null
+++ b/deps/npm/html/partial/doc/index.html
@@ -0,0 +1,210 @@
+ Index of all npm documentation
+
+node package manager
+Command Line Documentation
+Using npm on the command line
+
+node package manager
+
+Add a registry user account
+
+Display npm bin folder
+
+Bugs for a package in a web browser maybe
+
+Build a package
+
+REMOVED
+
+Manipulates packages cache
+
+Tab Completion for npm
+
+Manage the npm configuration files
+
+Reduce duplication
+
+Deprecate a version of a package
+
+Docs for a package in a web browser maybe
+
+Edit an installed package
+
+Browse an installed package
+
+Search npm help documentation
+
+Get help on npm
+
+Interactively create a package.json file
+
+Install a package
+
+Symlink a package folder
+
+List installed packages
+
+Check for outdated packages
+
+Manage package owners
+
+Create a tarball from a package
+
+Display prefix
+
+Remove extraneous packages
+
+Publish a package
+
+Rebuild a package
+
+Open package repository page in the browser
+
+Start a package
+
+Remove a package
+
+Display npm root
+
+Run arbitrary package scripts
+
+Search for packages
+
+Lock down dependency versions
+
+Mark your favorite packages
+
+View packages marked as favorites
+
+Start a package
+
+Stop a package
+
+Tag a published version
+
+Test a package
+
+Remove a package
+
+Remove a package from the registry
+
+Update a package
+
+Bump a package version
+
+View registry info
+
+Display npm username
+API Documentation
+Using npm in your Node programs
+
+node package manager
+
+Display npm bin folder
+
+Bugs for a package in a web browser maybe
+
+manage the npm cache programmatically
+
+npm commands
+
+Manage the npm configuration files
+
+Deprecate a version of a package
+
+Docs for a package in a web browser maybe
+
+Edit an installed package
+
+Browse an installed package
+
+Search the help pages
+
+Interactively create a package.json file
+
+install a package programmatically
+
+Symlink a package folder
+
+Load config settings
+
+List installed packages
+
+Check for outdated packages
+
+Manage package owners
+
+Create a tarball from a package
+
+Display prefix
+
+Remove extraneous packages
+
+Publish a package
+
+Rebuild a package
+
+Open package repository page in the browser
+
+Start a package
+
+Display npm root
+
+Run arbitrary package scripts
+
+Search for packages
+
+programmatically generate package shrinkwrap file
+
+Start a package
+
+Stop a package
+
+Tag a published version
+
+Test a package
+
+uninstall a package programmatically
+
+Remove a package from the registry
+
+Update a package
+
+Bump a package version
+
+View registry info
+
+Display npm username
+Files
+File system structures npm uses
+
+Folder Structures Used by npm
+
+The npm config files
+
+Specifics of npm's package.json handling
+Misc
+Various other bits and bobs
+
+npm's "funny" coding style
+
+More than you probably want to know about npm configuration
+
+Developer Guide
+
+Handling Module Name Disputes
+
+Frequently Asked Questions
+
+Index of all npm documentation
+
+The JavaScript Package Registry
+
+Scoped packages
+
+How npm handles the "scripts" field
+
+Cleaning the Slate
+
+The semantic versioner for npm
+
diff --git a/deps/npm/html/partial/doc/misc/npm-coding-style.html b/deps/npm/html/partial/doc/misc/npm-coding-style.html
new file mode 100644
index 0000000..732b326
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-coding-style.html
@@ -0,0 +1,127 @@
+ npm's "funny" coding style
+DESCRIPTION
+npm's coding style is a bit unconventional. It is not different for
+difference's sake, but rather a carefully crafted style that is
+designed to reduce visual clutter and make bugs more apparent.
+If you want to contribute to npm (which is very encouraged), you should
+make your code conform to npm's style.
+Note: this concerns npm's code not the specific packages at npmjs.org
+Line Length
+Keep lines shorter than 80 characters. It's better for lines to be
+too short than to be too long. Break up long lists, objects, and other
+statements onto multiple lines.
+Indentation
+Two-spaces. Tabs are better, but they look like hell in web browsers
+(and on github), and node uses 2 spaces, so that's that.
+Configure your editor appropriately.
+Curly braces
+Curly braces belong on the same line as the thing that necessitates them.
+Bad:
+function ()
+{
+
Good:
+function () {
+
If a block needs to wrap to the next line, use a curly brace. Don't
+use it if it doesn't.
+Bad:
+if (foo) { bar() }
+while (foo)
+ bar()
+
Good:
+if (foo) bar()
+while (foo) {
+ bar()
+}
+
Semicolons
+Don't use them except in four situations:
+
+for (;;)
loops. They're actually required.
+null loops like: while (something) ;
(But you'd better have a good
+reason for doing that.)
+case "foo": doSomething(); break
+In front of a leading (
or [
at the start of the line.
+This prevents the expression from being interpreted
+as a function call or property access, respectively.
+
+Some examples of good semicolon usage:
+;(x || y).doSomething()
+;[a, b, c].forEach(doSomething)
+for (var i = 0; i < 10; i ++) {
+ switch (state) {
+ case "begin": start(); continue
+ case "end": finish(); break
+ default: throw new Error("unknown state")
+ }
+ end()
+}
+
Note that starting lines with -
and +
also should be prefixed
+with a semicolon, but this is much less common.
+Comma First
+If there is a list of things separated by commas, and it wraps
+across multiple lines, put the comma at the start of the next
+line, directly below the token that starts the list. Put the
+final token in the list on a line by itself. For example:
+var magicWords = [ "abracadabra"
+ , "gesundheit"
+ , "ventrilo"
+ ]
+ , spells = { "fireball" : function () { setOnFire() }
+ , "water" : function () { putOut() }
+ }
+ , a = 1
+ , b = "abc"
+ , etc
+ , somethingElse
+
Whitespace
+Put a single space in front of ( for anything other than a function call.
+Also use a single space wherever it makes things more readable.
+Don't leave trailing whitespace at the end of lines. Don't indent empty
+lines. Don't use more spaces than are helpful.
+Functions
+Use named functions. They make stack traces a lot easier to read.
+Callbacks, Sync/async Style
+Use the asynchronous/non-blocking versions of things as much as possible.
+It might make more sense for npm to use the synchronous fs APIs, but this
+way, the fs and http and child process stuff all uses the same callback-passing
+methodology.
+The callback should always be the last argument in the list. Its first
+argument is the Error or null.
+Be very careful never to ever ever throw anything. It's worse than useless.
+Just send the error message back as the first argument to the callback.
+Errors
+Always create a new Error object with your message. Don't just return a
+string message to the callback. Stack traces are handy.
+Logging
+Logging is done using the npmlog
+utility.
+Please clean up logs when they are no longer helpful. In particular,
+logging the same object over and over again is not helpful. Logs should
+report what's happening so that it's easier to track down where a fault
+occurs.
+Use appropriate log levels. See npm-config(7)
and search for
+"loglevel".
+Case, naming, etc.
+Use lowerCamelCase
for multiword identifiers when they refer to objects,
+functions, methods, properties, or anything not specified in this section.
+Use UpperCamelCase
for class names (things that you'd pass to "new").
+Use all-lower-hyphen-css-case
for multiword filenames and config keys.
+Use named functions. They make stack traces easier to follow.
+Use CAPS_SNAKE_CASE
for constants, things that should never change
+and are rarely used.
+Use a single uppercase letter for function names where the function
+would normally be anonymous, but needs to call itself recursively. It
+makes it clear that it's a "throwaway" function.
+null, undefined, false, 0
+Boolean variables and functions should always be either true
or
+false
. Don't set it to 0 unless it's supposed to be a number.
+When something is intentionally missing or removed, set it to null
.
+Don't set things to undefined
. Reserve that value to mean "not yet
+set to anything."
+Boolean objects are verboten.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html
new file mode 100644
index 0000000..8740972
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-config.html
@@ -0,0 +1,739 @@
+ More than you probably want to know about npm configuration
+DESCRIPTION
+npm gets its configuration values from 6 sources, in this priority:
+Command Line Flags
+Putting --foo bar
on the command line sets the foo
configuration
+parameter to "bar"
. A --
argument tells the cli parser to stop
+reading flags. A --flag
parameter that is at the end of the
+command will be given the value of true
.
+Environment Variables
+Any environment variables that start with npm_config_
will be
+interpreted as a configuration parameter. For example, putting
+npm_config_foo=bar
in your environment will set the foo
+configuration parameter to bar
. Any environment configurations that
+are not given a value will be given the value of true
. Config
+values are case-insensitive, so NPM_CONFIG_FOO=bar
will work the
+same.
+npmrc Files
+The four relevant files are:
+
+per-project config file (/path/to/my/project/.npmrc)
+per-user config file (~/.npmrc)
+global config file ($PREFIX/npmrc)
+npm builtin config file (/path/to/npm/npmrc)
+
+See npmrc(5) for more details.
+Default Configs
+A set of configuration parameters that are internal to npm, and are
+defaults if nothing else is specified.
+Shorthands and Other CLI Niceties
+The following shorthands are parsed on the command-line:
+
+-v
: --version
+-h
, -?
, --help
, -H
: --usage
+-s
, --silent
: --loglevel silent
+-q
, --quiet
: --loglevel warn
+-d
: --loglevel info
+-dd
, --verbose
: --loglevel verbose
+-ddd
: --loglevel silly
+-g
: --global
+-C
: --prefix
+-l
: --long
+-m
: --message
+-p
, --porcelain
: --parseable
+-reg
: --registry
+-v
: --version
+-f
: --force
+-desc
: --description
+-S
: --save
+-D
: --save-dev
+-O
: --save-optional
+-B
: --save-bundle
+-E
: --save-exact
+-y
: --yes
+-n
: --yes false
+ll
and la
commands: ls --long
+
+If the specified configuration param resolves unambiguously to a known
+configuration parameter, then it is expanded to that configuration
+parameter. For example:
+npm ls --par
+# same as:
+npm ls --parseable
+
If multiple single-character shorthands are strung together, and the
+resulting combination is unambiguously not some other configuration
+param, then it is expanded to its various component pieces. For
+example:
+npm ls -gpld
+# same as:
+npm ls --global --parseable --long --loglevel info
+
Per-Package Config Settings
+When running scripts (see npm-scripts(7)
) the package.json "config"
+keys are overwritten in the environment if there is a config param of
+<name>[@<version>]:<key>
. For example, if the package.json has
+this:
+{ "name" : "foo"
+, "config" : { "port" : "8080" }
+, "scripts" : { "start" : "node server.js" } }
+
and the server.js is this:
+http.createServer(...).listen(process.env.npm_package_config_port)
+
then the user could change the behavior by doing:
+npm config set foo:port 80
+
See package.json(5) for more information.
+Config Settings
+always-auth
+
+Default: false
+Type: Boolean
+
+Force npm to always require authentication when accessing the registry,
+even for GET
requests.
+bin-links
+
+Default: true
+Type: Boolean
+
+Tells npm to create symlinks (or .cmd
shims on Windows) for package
+executables.
+Set to false to have it not do this. This can be used to work around
+the fact that some file systems don't support symlinks, even on
+ostensibly Unix systems.
+browser
+
+Default: OS X: "open"
, Windows: "start"
, Others: "xdg-open"
+Type: String
+
+The browser that is called by the npm docs
command to open websites.
+ca
+
+Default: The npm CA certificate
+Type: String or null
+
+The Certificate Authority signing certificate that is trusted for SSL
+connections to the registry.
+Set to null
to only allow "known" registrars, or to a specific CA cert
+to trust only that specific signing authority.
+See also the strict-ssl
config.
+cafile
+
+Default: null
+Type: path
+
+A path to a file containing one or multiple Certificate Authority signing
+certificates. Similar to the ca
setting, but allows for multiple CA's, as
+well as for the CA information to be stored in a file on disk.
+cache
+
+Default: Windows: %AppData%\npm-cache
, Posix: ~/.npm
+Type: path
+
+The location of npm's cache directory. See npm-cache(1)
+cache-lock-stale
+
+Default: 60000 (1 minute)
+Type: Number
+
+The number of ms before cache folder lockfiles are considered stale.
+cache-lock-retries
+
+Default: 10
+Type: Number
+
+Number of times to retry to acquire a lock on cache folder lockfiles.
+cache-lock-wait
+
+Default: 10000 (10 seconds)
+Type: Number
+
+Number of ms to wait for cache lock files to expire.
+cache-max
+
+Default: Infinity
+Type: Number
+
+The maximum time (in seconds) to keep items in the registry cache before
+re-checking against the registry.
+Note that no purging is done unless the npm cache clean
command is
+explicitly used, and that only GET requests use the cache.
+cache-min
+
+Default: 10
+Type: Number
+
+The minimum time (in seconds) to keep items in the registry cache before
+re-checking against the registry.
+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
+Type: Boolean or "always"
+
+If false, never shows colors. If "always"
then always shows colors.
+If true, then only prints color codes for tty file descriptors.
+depth
+
+Default: Infinity
+Type: Number
+
+The depth to go when recursing directories for npm ls
and
+npm cache ls
.
+description
+
+Default: true
+Type: Boolean
+
+Show the description in npm search
+dev
+
+Default: false
+Type: Boolean
+
+Install dev-dependencies
along with packages.
+Note that dev-dependencies
are also installed if the npat
flag is
+set.
+editor
+
+Default: EDITOR
environment variable if set, or "vi"
on Posix,
+or "notepad"
on Windows.
+Type: path
+
+The command to run for npm edit
or npm config edit
.
+engine-strict
+
+Default: false
+Type: Boolean
+
+If set to true, then npm will stubbornly refuse to install (or even
+consider installing) any package that claims to not be compatible with
+the current Node.js version.
+force
+
+Default: false
+Type: Boolean
+
+Makes various commands more forceful.
+
+lifecycle script failure does not block progress.
+publishing clobbers previously published versions.
+skips cache when requesting from the registry.
+prevents checks against clobbering non-npm files.
+
+fetch-retries
+
+Default: 2
+Type: Number
+
+The "retries" config for the retry
module to use when fetching
+packages from the registry.
+fetch-retry-factor
+
+Default: 10
+Type: Number
+
+The "factor" config for the retry
module to use when fetching
+packages.
+fetch-retry-mintimeout
+
+Default: 10000 (10 seconds)
+Type: Number
+
+The "minTimeout" config for the retry
module to use when fetching
+packages.
+fetch-retry-maxtimeout
+
+Default: 60000 (1 minute)
+Type: Number
+
+The "maxTimeout" config for the retry
module to use when fetching
+packages.
+git
+
+Default: "git"
+Type: String
+
+The command to use for git commands. If git is installed on the
+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
+Type: Boolean
+
+Operates in "global" mode, so that packages are installed into the
+prefix
folder instead of the current working directory. See
+npm-folders(5)
for more on the differences in behavior.
+
+packages are installed into the {prefix}/lib/node_modules
folder, instead of the
+current working directory.
+bin files are linked to {prefix}/bin
+man pages are linked to {prefix}/share/man
+
+globalconfig
+
+Default: {prefix}/etc/npmrc
+Type: path
+
+The config file to read for global config options.
+group
+
+Default: GID of the current process
+Type: String or Number
+
+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
+http_proxy
environment variables.
+Type: url
+
+A proxy to use for outgoing https requests.
+ignore-scripts
+
+Default: false
+Type: Boolean
+
+If true, npm does not run scripts specified in package.json files.
+init-module
+
+Default: ~/.npm-init.js
+Type: path
+
+A module that will be loaded by the npm init
command. See the
+documentation for the
+init-package-json module
+for more information, or npm-init(1) .
+init-author-name
+
+Default: ""
+Type: String
+
+The value npm init
should use by default for the package author's name.
+init-author-email
+
+Default: ""
+Type: String
+
+The value npm init
should use by default for the package author's email.
+init-author-url
+
+Default: ""
+Type: String
+
+The value npm init
should use by default for the package author's homepage.
+init-license
+
+Default: "ISC"
+Type: String
+
+The value npm init
should use by default for the package license.
+init-version
+
+Default: "0.0.0"
+Type: semver
+
+The value that npm init
should use by default for the package
+version number, if not already set in package.json.
+json
+
+Default: false
+Type: Boolean
+
+Whether or not to output JSON data, rather than the normal output.
+This feature is currently experimental, and the output data structures
+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
+Type: Boolean
+
+If true, then local installs will link if there is a suitable globally
+installed package.
+Note that this means that local installs can cause things to be
+installed into the global space at the same time. The link is only done
+if one of the two conditions are met:
+
+The package is not already installed globally, or
+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: "warn"
+Type: String
+Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
+
+What level of logs to report. On failure, all logs are written to
+npm-debug.log
in the current working directory.
+Any logs of a higher level than the setting are shown.
+The default is "warn", which shows warn and error output.
+logstream
+
+Default: process.stderr
+Type: Stream
+
+This is the stream that is passed to the
+npmlog module at run time.
+It cannot be set from the command line, but if you are using npm
+programmatically, you may wish to send logs to somewhere other than
+stderr.
+If the color
config is set to true, then this stream will receive
+colored output if it is a TTY.
+long
+
+Default: false
+Type: Boolean
+
+Show extended information in npm ls
and npm search
.
+message
+
+Default: "%s"
+Type: String
+
+Commit message which is used by npm version
when creating version commit.
+Any "%s" in the message will be replaced with the version number.
+node-version
+
+Default: process.version
+Type: semver or false
+
+The node version to use when checking a package's engines
map.
+npat
+
+Default: false
+Type: Boolean
+
+Run tests on installation.
+onload-script
+
+Default: false
+Type: path
+
+A node module to require()
when npm loads. Useful for programmatic
+usage.
+optional
+
+Default: true
+Type: Boolean
+
+Attempt to install packages in the optionalDependencies
object. Note
+that if these packages fail to install, the overall installation
+process is not aborted.
+parseable
+
+Default: false
+Type: Boolean
+
+Output parseable results from commands that write to
+standard output.
+prefix
+
+The location to install global items. If set on the command line, then
+it forces non-global commands to run in the specified folder.
+production
+
+Default: false
+Type: Boolean
+
+Set to true to run in "production" mode.
+
+devDependencies are not installed at the topmost level when running
+local npm install
without any arguments.
+Set the NODE_ENV="production" for lifecycle scripts.
+
+proprietary-attribs
+
+Default: true
+Type: Boolean
+
+Whether or not to include proprietary extended attributes in the
+tarballs created by npm.
+Unless you are expecting to unpack package tarballs with something other
+than npm -- particularly a very outdated tar implementation -- leave
+this as true.
+proxy
+
+Default: HTTP_PROXY
or http_proxy
environment variable, or null
+Type: url
+
+A proxy to use for outgoing http requests.
+rebuild-bundle
+
+Default: true
+Type: Boolean
+
+Rebuild bundled dependencies after installation.
+registry
+
+The base URL of the npm package registry.
+rollback
+
+Default: true
+Type: Boolean
+
+Remove failed installs.
+save
+
+Default: false
+Type: Boolean
+
+Save installed packages to a package.json file as dependencies.
+When used with the npm rm
command, it removes it from the dependencies
+object.
+Only works if there is already a package.json file present.
+save-bundle
+
+Default: false
+Type: Boolean
+
+If a package would be saved at install time by the use of --save
,
+--save-dev
, or --save-optional
, then also put it in the
+bundleDependencies
list.
+When used with the npm rm
command, it removes it from the
+bundledDependencies list.
+save-dev
+
+Default: false
+Type: Boolean
+
+Save installed packages to a package.json file as devDependencies
.
+When used with the npm rm
command, it removes it from the
+devDependencies
object.
+Only works if there is already a package.json file present.
+save-exact
+
+Default: false
+Type: Boolean
+
+Dependencies saved to package.json using --save
, --save-dev
or
+--save-optional
will be configured with an exact version rather than
+using npm's default semver range operator.
+save-optional
+
+Default: false
+Type: Boolean
+
+Save installed packages to a package.json file as
+optionalDependencies.
+When used with the npm rm
command, it removes it from the
+devDependencies
object.
+Only works if there is already a package.json file present.
+save-prefix
+
+Default: '^'
+Type: String
+
+Configure how versions of packages installed to a package.json file via
+--save
or --save-dev
get prefixed.
+For example if a package has version 1.2.3
, by default it's version is
+set to ^1.2.3
which allows minor upgrades for that package, but after
+npm config set save-prefix='~'
it would be set to ~1.2.3
which only allows
+patch upgrades.
+scope
+
+Default: ""
+Type: String
+
+Associate an operation with a scope for a scoped registry. Useful when logging
+in to a private registry for the first time:
+npm login --scope=@organization --registry=registry.organization.com
, which
+will cause @organization
to be mapped to the registry for future installation
+of packages specified according to the pattern @organization/package
.
+searchopts
+
+Default: ""
+Type: String
+
+Space-separated options that are always passed to search.
+searchexclude
+
+Default: ""
+Type: String
+
+Space-separated options that limit the results from search.
+searchsort
+
+Default: "name"
+Type: String
+Values: "name", "-name", "date", "-date", "description",
+"-description", "keywords", "-keywords"
+
+Indication of which field to sort search results by. Prefix with a -
+character to indicate reverse sort.
+shell
+
+Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
+Windows
+Type: path
+
+The shell to run for the npm explore
command.
+shrinkwrap
+
+Default: true
+Type: Boolean
+
+If set to false, then ignore npm-shrinkwrap.json
files when
+installing.
+sign-git-tag
+
+Default: false
+Type: Boolean
+
+If set to true, then the npm version
command will tag the version
+using -s
to add a signature.
+Note that git requires you to have set up GPG keys in your git configs
+for this to work properly.
+spin
+
+Default: true
+Type: Boolean or "always"
+
+When set to true
, npm will display an ascii spinner while it is doing
+things, if process.stderr
is a TTY.
+Set to false
to suppress the spinner, or set to always
to output
+the spinner even for non-TTY outputs.
+strict-ssl
+
+Default: true
+Type: Boolean
+
+Whether or not to do SSL key validation when making requests to the
+registry via https.
+See also the ca
config.
+tag
+
+Default: latest
+Type: String
+
+If you ask npm to install a package and don't tell it a specific version, then
+it will install the specified tag.
+Also the tag that is added to the package@version specified by the npm
+tag
command, if no explicit tag is given.
+tmp
+
+Default: TMPDIR environment variable, or "/tmp"
+Type: path
+
+Where to store temporary files and folders. All temp files are deleted
+on success, but left behind on failure for forensic purposes.
+unicode
+
+Default: true
+Type: Boolean
+
+When set to true, npm uses unicode characters in the tree output. When
+false, it uses ascii characters to draw trees.
+unsafe-perm
+
+Default: false if running as root, true otherwise
+Type: Boolean
+
+Set to true to suppress the UID/GID switching when running package
+scripts. If set explicitly to false, then installing as a non-root user
+will fail.
+usage
+
+Default: false
+Type: Boolean
+
+Set to show short usage output (like the -H output)
+instead of complete help when doing npm-help(1)
.
+user
+
+Default: "nobody"
+Type: String or Number
+
+The UID to set to when running package scripts as root.
+userconfig
+
+Default: ~/.npmrc
+Type: path
+
+The location of user-level configuration settings.
+umask
+
+Default: 022
+Type: Octal numeric string
+
+The "umask" value to use when setting the file creation mode on files
+and folders.
+Folders and executables are given a mode which is 0777
masked against
+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
+Type: boolean
+
+If true, output the npm version and exit successfully.
+Only relevant when specified explicitly on the command line.
+versions
+
+Default: false
+Type: boolean
+
+If true, output the npm version as well as node's process.versions
map, and
+exit successfully.
+Only relevant when specified explicitly on the command line.
+viewer
+
+Default: "man" on Posix, "browser" on Windows
+Type: path
+
+The program to use to view help content.
+Set to "browser"
to view html help content in the default web browser.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-developers.html b/deps/npm/html/partial/doc/misc/npm-developers.html
new file mode 100644
index 0000000..7ba880a
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-developers.html
@@ -0,0 +1,161 @@
+ Developer Guide
+DESCRIPTION
+So, you've decided to use npm to develop (and maybe publish/deploy)
+your project.
+Fantastic!
+There are a few things that you need to do above the simple steps
+that your users will do to install your program.
+About These Documents
+These are man pages. If you install npm, you should be able to
+then do man npm-thing
to get the documentation on a particular
+topic, or npm help thing
to see the same information.
+What is a package
+A package is:
+
+a) a folder containing a program described by a package.json file
+b) a gzipped tarball containing (a)
+c) a url that resolves to (b)
+d) a <name>@<version>
that is published on the registry with (c)
+e) a <name>@<tag>
that points to (d)
+f) a <name>
that has a "latest" tag satisfying (e)
+g) a git
url that, when cloned, results in (a).
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+The package.json File
+You need to have a package.json
file in the root of your project to do
+much of anything with npm. That is basically the whole interface.
+See package.json(5)
for details about what goes in that file. At the very
+least, you need:
+
+name:
+This should be a string that identifies your project. Please do not
+use the name to specify that it runs on node, or is in JavaScript.
+You can use the "engines" field to explicitly state the versions of
+node (or whatever else) that your program requires, and it's pretty
+well assumed that it's javascript.
+It does not necessarily need to match your github repository name.
+So, node-foo
and bar-js
are bad names. foo
or bar
are better.
+
+version:
+A semver-compatible version.
+
+engines:
+Specify the versions of node (or whatever else) that your program
+runs on. The node API changes a lot, and there may be bugs or new
+functionality that you depend on. Be explicit.
+
+author:
+Take some credit.
+
+scripts:
+If you have a special compilation or installation script, then you
+should put it in the scripts
object. You should definitely have at
+least a basic smoke-test command as the "scripts.test" field.
+See npm-scripts(7) .
+
+main:
+If you have a single module that serves as the entry point to your
+program (like what the "foo" package gives you at require("foo")),
+then you need to specify that in the "main" field.
+
+directories:
+This is an object mapping names to folders. The best ones to include are
+"lib" and "doc", but if you use "man" to specify a folder full of man pages,
+they'll get installed just like these ones.
+
+
+You can use npm init
in the root of your package in order to get you
+started with a pretty basic package.json file. See npm-init(1)
for
+more info.
+Keeping files out of your package
+Use a .npmignore
file to keep stuff out of your package. If there's
+no .npmignore
file, but there is a .gitignore
file, then npm will
+ignore the stuff matched by the .gitignore
file. If you want to
+include something that is excluded by your .gitignore
file, you can
+create an empty .npmignore
file to override it.
+By default, the following paths and files are ignored, so there's no
+need to add them to .npmignore
explicitly:
+
+.*.swp
+._*
+.DS_Store
+.git
+.hg
+.lock-wscript
+.svn
+.wafpickle-*
+CVS
+npm-debug.log
+
+Additionally, everything in node_modules
is ignored, except for
+bundled dependencies. npm automatically handles this for you, so don't
+bother adding node_modules
to .npmignore
.
+The following paths and files are never ignored, so adding them to
+.npmignore
is pointless:
+
+Link Packages
+npm link
is designed to install a development package and see the
+changes in real time without having to keep re-installing it. (You do
+need to either re-link or npm rebuild -g
to update compiled packages,
+of course.)
+More info at npm-link(1)
.
+Before Publishing: Make Sure Your Package Installs and Works
+This is important.
+If you can not install it locally, you'll have
+problems trying to publish it. Or, worse yet, you'll be able to
+publish it, but you'll be publishing a broken or pointless package.
+So don't do that.
+In the root of your package, do this:
+npm install . -g
+
That'll show you that it's working. If you'd rather just create a symlink
+package that points to your working directory, then do this:
+npm link
+
Use npm ls -g
to see if it's there.
+To test a local install, go into some other folder, and then do:
+cd ../some-other-folder
+npm install ../my-package
+
to install it locally into the node_modules folder in that other place.
+Then go into the node-repl, and try using require("my-thing") to
+bring in your module's main module.
+Create a User Account
+Create a user with the adduser command. It works like this:
+npm adduser
+
and then follow the prompts.
+This is documented better in npm-adduser(1) .
+Publish your package
+This part's easy. IN the root of your folder, do this:
+npm publish
+
You can give publish a url to a tarball, or a filename of a tarball,
+or a path to a folder.
+Note that pretty much everything in that folder will be exposed
+by default. So, if you have secret stuff in there, use a
+.npmignore
file to list out the globs to ignore, or publish
+from a fresh checkout.
+Brag about it
+Send emails, write blogs, blab in IRC.
+Tell the world how easy it is to install your program!
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html
new file mode 100644
index 0000000..6a7abca
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-disputes.html
@@ -0,0 +1,92 @@
+ Handling Module Name Disputes
+SYNOPSIS
+
+Get the author email with npm owner ls <pkgname>
+Email the author, CC support@npmjs.com
+After a few weeks, if there's no resolution, we'll sort it out.
+
+Don't squat on package names. Publish code or move out of the way.
+DESCRIPTION
+There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name. Here are some common
+ways that happens (each of these is based on actual events.)
+
+Joe writes a JavaScript module foo
, which is not node-specific.
+Joe doesn't use node at all. Bob wants to use foo
in node, so he
+wraps it in an npm module. Some time later, Joe starts using node,
+and wants to take over management of his program.
+Bob writes an npm module foo
, and publishes it. Perhaps much
+later, Joe finds a bug in foo
, and fixes it. He sends a pull
+request to Bob, but Bob doesn't have the time to deal with it,
+because he has a new job and a new baby and is focused on his new
+erlang project, and kind of not involved with node any more. Joe
+would like to publish a new foo
, but can't, because the name is
+taken.
+Bob writes a 10-line flow-control library, and calls it foo
, and
+publishes it to the npm registry. Being a simple little thing, it
+never really has to be updated. Joe works for Foo Inc, the makers
+of the critically acclaimed and widely-marketed foo
JavaScript
+toolkit framework. They publish it to npm as foojs
, but people are
+routinely confused when npm install foo
is some different thing.
+Bob writes a parser for the widely-known foo
file format, because
+he needs it for work. Then, he gets a new job, and never updates the
+prototype. Later on, Joe writes a much more complete foo
parser,
+but can't publish, because Bob's foo
is in the way.
+
+The validity of Joe's claim in each situation can be debated. However,
+Joe's appropriate course of action in each case is the same.
+
+npm owner ls foo
. This will tell Joe the email address of the
+owner (Bob).
+Joe emails Bob, explaining the situation as respectfully as
+possible , and what he would like to do with the module name. He
+adds the npm support staff support@npmjs.com to the CC list of
+the email. Mention in the email that Bob can run npm owner add
+joe foo
to add Joe as an owner of the foo
package.
+After a reasonable amount of time, if Bob has not responded, or if
+Bob and Joe can't come to any sort of resolution, email support
+support@npmjs.com and we'll sort it out. ("Reasonable" is
+usually at least 4 weeks, but extra time is allowed around common
+holidays.)
+
+REASONING
+In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention. Most people
+really do want to be reasonable, and are probably not even aware that
+they're in your way.
+Module ecosystems are most vibrant and powerful when they are as
+self-directed as possible. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction.
+EXCEPTIONS
+Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:
+
+Malware (that is, a package designed to exploit or harm the machine on
+which it is installed).
+Violations of copyright or licenses (for example, cloning an
+MIT-licensed program, and then removing or changing the copyright and
+license statement).
+Illegal content.
+"Squatting" on a package name that you plan to use, but aren't
+actually using. Sorry, I don't care how great the name is, or how
+perfect a fit it is for the thing that someday might happen. If
+someone wants to use it today, and you're just taking up space with
+an empty tarball, you're going to be evicted.
+Putting empty packages in the registry. Packages must have SOME
+functionality. It can be silly, but it can't be nothing . (See
+also: squatting.)
+Doing weird things with the registry, like using it as your own
+personal application database or otherwise putting non-packagey
+things into it.
+
+If you see bad behavior like this, please report it right away.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html
new file mode 100644
index 0000000..7fc1634
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-faq.html
@@ -0,0 +1,264 @@
+ Frequently Asked Questions
+Where can I find these docs in HTML?
+https://www.npmjs.org/doc/ , or run:
+npm config set viewer browser
+
to open these documents in your default web browser rather than man
.
+It didn't work.
+That's not really a question.
+Why didn't it work?
+I don't know yet.
+Read the error output, and if you can't figure out what it means,
+do what it says and post a bug with all the information it asks for.
+Where does npm put stuff?
+See npm-folders(5)
+tl;dr:
+
+Use the npm root
command to see where modules go, and the npm bin
+command to see where executables go
+Global installs are different from local installs. If you install
+something with the -g
flag, then its executables go in npm bin -g
+and its modules go in npm root -g
.
+
+How do I install something on my computer in a central location?
+Install it globally by tacking -g
or --global
to the command. (This
+is especially important for command line utilities that need to add
+their bins to the global system PATH
.)
+I installed something globally, but I can't require()
it
+Install it locally.
+The global install location is a place for command-line utilities
+to put their bins in the system PATH
. It's not for use with require()
.
+If you require()
a module in your code, then that means it's a
+dependency, and a part of your program. You need to install it locally
+in your program.
+Why can't npm just put everything in one place, like other package managers?
+Not every change is an improvement, but every improvement is a change.
+This would be like asking git to do network IO for every commit. It's
+not going to happen, because it's a terrible idea that causes more
+problems than it solves.
+It is much harder to avoid dependency conflicts without nesting
+dependencies. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach. See npm-folders(5)
for
+more details.
+If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the npm link
command.
+That's what it's for. Install it globally, then link it into each
+program that uses it.
+Whatever, I really want the old style 'everything global' style.
+Write your own package manager. You could probably even wrap up npm
+in a shell script if you really wanted to.
+npm will not help you do something that is known to be a bad idea.
+Should I check my node_modules
folder into git?
+Usually, no. Allow npm to resolve dependencies for your packages.
+For packages you deploy , such as websites and apps,
+you should use npm shrinkwrap to lock down your full dependency tree:
+https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
+If you are paranoid about depending on the npm ecosystem,
+you should run a private npm mirror or a private cache.
+If you want 100% confidence in being able to reproduce the specific bytes
+included in a deployment, you should use an additional mechanism that can
+verify contents rather than versions. For example,
+Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs.
+Is it 'npm' or 'NPM' or 'Npm'?
+npm should never be capitalized unless it is being displayed in a
+location that is customarily all-caps (such as the title of man pages.)
+If 'npm' is an acronym, why is it never capitalized?
+Contrary to the belief of many, "npm" is not in fact an abbreviation for
+"Node Package Manager". It is a recursive bacronymic abbreviation for
+"npm is not an acronym". (If it was "ninaa", then it would be an
+acronym, and thus incorrectly named.)
+"NPM", however, is an acronym (more precisely, a capitonym) for the
+National Association of Pastoral Musicians. You can learn more
+about them at http://npm.org/ .
+In software, "NPM" is a Non-Parametric Mapping utility written by
+Chris Rorden. You can analyze pictures of brains with it. Learn more
+about the (capitalized) NPM program at http://www.cabiatl.com/mricro/npm/ .
+The first seed that eventually grew into this flower was a bash utility
+named "pm", which was a shortened descendent of "pkgmakeinst", a
+bash function that was used to install various different things on different
+platforms, most often using Yahoo's yinst
. If npm
was ever an
+acronym for anything, it was node pm
or maybe new pm
.
+So, in all seriousness, the "npm" project is named after its command-line
+utility, which was organically selected to be easily typed by a right-handed
+programmer using a US QWERTY keyboard layout, ending with the
+right-ring-finger in a postition to type the -
key for flags and
+other command-line arguments. That command-line utility is always
+lower-case, though it starts most sentences it is a part of.
+How do I list installed packages?
+npm ls
+How do I search for packages?
+npm search
+Arguments are greps. npm search jsdom
shows jsdom packages.
+How do I update npm?
+npm install npm -g
+
You can also update all outdated local packages by doing npm update
without
+any arguments, or global packages by doing npm update -g
.
+Occasionally, the version of npm will progress such that the current
+version cannot be properly installed with the version that you have
+installed already. (Consider, if there is ever a bug in the update
+command.)
+In those cases, you can do this:
+curl https://www.npmjs.org/install.sh | sh
+
What is a package
?
+A package is:
+
+a) a folder containing a program described by a package.json file
+b) a gzipped tarball containing (a)
+c) a url that resolves to (b)
+d) a <name>@<version>
that is published on the registry with (c)
+e) a <name>@<tag>
that points to (d)
+f) a <name>
that has a "latest" tag satisfying (e)
+g) a git
url that, when cloned, results in (a).
+
+Even if you never publish your package, you can still get a lot of
+benefits of using npm if you just want to write a node program (a), and
+perhaps if you also want to be able to easily install it elsewhere
+after packing it up into a tarball (b).
+Git urls can be of the form:
+git://github.com/user/project.git#commit-ish
+git+ssh://user@hostname:project.git#commit-ish
+git+http://user@hostname/project/blah.git#commit-ish
+git+https://user@hostname/project/blah.git#commit-ish
+
The commit-ish
can be any tag, sha, or branch which can be supplied as
+an argument to git checkout
. The default is master
.
+What is a module
?
+A module is anything that can be loaded with require()
in a Node.js
+program. The following things are all examples of things that can be
+loaded as modules:
+
+A folder with a package.json
file containing a main
field.
+A folder with an index.js
file in it.
+A JavaScript file.
+
+Most npm packages are modules, because they are libraries that you
+load with require
. However, there's no requirement that an npm
+package be a module! Some only contain an executable command-line
+interface, and don't provide a main
field for use in Node programs.
+Almost all npm packages (at least, those that are Node programs)
+contain many modules within them (because every file they load with
+require()
is a module).
+In the context of a Node program, the module
is also the thing that
+was loaded from a file. For example, in the following program:
+var req = require('request')
+
we might say that "The variable req
refers to the request
module".
+So, why is it the "node_modules
" folder, but "package.json
" file? Why not node_packages
or module.json
?
+The package.json
file defines the package. (See "What is a
+package?" above.)
+The node_modules
folder is the place Node.js looks for modules.
+(See "What is a module?" above.)
+For example, if you create a file at node_modules/foo.js
and then
+had a program that did var f = require('foo.js')
then it would load
+the module. However, foo.js
is not a "package" in this case,
+because it does not have a package.json.
+Alternatively, if you create a package which does not have an
+index.js
or a "main"
field in the package.json
file, then it is
+not a module. Even if it's installed in node_modules
, it can't be
+an argument to require()
.
+
+No. This will never happen. This question comes up sometimes,
+because it seems silly from the outside that npm couldn't just be
+configured to put stuff somewhere else, and then npm could load them
+from there. It's an arbitrary spelling choice, right? What's the big
+deal?
+At the time of this writing, the string 'node_modules'
appears 151
+times in 53 separate files in npm and node core (excluding tests and
+documentation).
+Some of these references are in node's built-in module loader. Since
+npm is not involved at all at run-time, node itself would have to
+be configured to know where you've decided to stick stuff. Complexity
+hurdle #1. Since the Node module system is locked, this cannot be
+changed, and is enough to kill this request. But I'll continue, in
+deference to your deity's delicate feelings regarding spelling.
+Many of the others are in dependencies that npm uses, which are not
+necessarily tightly coupled to npm (in the sense that they do not read
+npm's configuration files, etc.) Each of these would have to be
+configured to take the name of the node_modules
folder as a
+parameter. Complexity hurdle #2.
+Furthermore, npm has the ability to "bundle" dependencies by adding
+the dep names to the "bundledDependencies"
list in package.json,
+which causes the folder to be included in the package tarball. What
+if the author of a module bundles its dependencies, and they use a
+different spelling for node_modules
? npm would have to rename the
+folder at publish time, and then be smart enough to unpack it using
+your locally configured name. Complexity hurdle #3.
+Furthermore, what happens when you change this name? Fine, it's
+easy enough the first time, just rename the node_modules
folders to
+./blergyblerp/
or whatever name you choose. But what about when you
+change it again? npm doesn't currently track any state about past
+configuration settings, so this would be rather difficult to do
+properly. It would have to track every previous value for this
+config, and always accept any of them, or else yesterday's install may
+be broken tomorrow. Complexity hurdle #4.
+Never going to happen. The folder is named node_modules
. It is
+written indelibly in the Node Way, handed down from the ancient times
+of Node 0.3.
+How do I install node with npm?
+You don't. Try one of these node version managers:
+Unix:
+
+Windows:
+
+How can I use npm for development?
+See npm-developers(7)
and package.json(5)
.
+You'll most likely want to npm link
your development folder. That's
+awesomely handy.
+To set up your own private registry, check out npm-registry(7)
.
+Can I list a url as a dependency?
+Yes. It should be a url to a gzipped tarball containing a single folder
+that has a package.json in its root, or a git url.
+(See "what is a package?" above.)
+How do I symlink to a dev folder so I don't have to keep re-installing?
+See npm-link(1)
+The package registry website. What is that exactly?
+See npm-registry(7)
.
+I forgot my password, and can't publish. How do I reset it?
+Go to https://npmjs.org/forgot .
+I get ECONNREFUSED a lot. What's up?
+Either the registry is down, or node's DNS isn't able to reach out.
+To check if the registry is down, open up
+https://registry.npmjs.org/ in a web browser. This will also tell
+you if you are just unable to access the internet for some reason.
+If the registry IS down, let us know by emailing support@npmjs.com
+or posting an issue at https://github.com/npm/npm/issues . If it's
+down for the world (and not just on your local network) then we're
+probably already being pinged about it.
+You can also often get a faster response by visiting the #npm channel
+on Freenode IRC.
+Why no namespaces?
+Please see this discussion: https://github.com/npm/npm/issues/798
+tl;dr - It doesn't actually make things better, and can make them worse.
+If you want to namespace your own packages, you may: simply use the
+-
character to separate the names. npm is a mostly anarchic system.
+There is not sufficient need to impose namespace rules on everyone.
+Who does npm?
+npm was originally written by Isaac Z. Schlueter, and many others have
+contributed to it, some of them quite substantially.
+The npm open source project, The npm Registry, and the community
+website are maintained and operated by the
+good folks at npm, Inc.
+I have a question or request not addressed here. Where should I put it?
+Post an issue on the github project:
+
+Why does npm hate me?
+npm is not capable of hatred. It loves everyone, especially you.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-index.html b/deps/npm/html/partial/doc/misc/npm-index.html
new file mode 100644
index 0000000..6e4c0ca
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-index.html
@@ -0,0 +1,210 @@
+ Index of all npm documentation
+
+node package manager
+Command Line Documentation
+Using npm on the command line
+
+node package manager
+
+Add a registry user account
+
+Display npm bin folder
+
+Bugs for a package in a web browser maybe
+
+Build a package
+
+REMOVED
+
+Manipulates packages cache
+
+Tab Completion for npm
+
+Manage the npm configuration files
+
+Reduce duplication
+
+Deprecate a version of a package
+
+Docs for a package in a web browser maybe
+
+Edit an installed package
+
+Browse an installed package
+
+Search npm help documentation
+
+Get help on npm
+
+Interactively create a package.json file
+
+Install a package
+
+Symlink a package folder
+
+List installed packages
+
+Check for outdated packages
+
+Manage package owners
+
+Create a tarball from a package
+
+Display prefix
+
+Remove extraneous packages
+
+Publish a package
+
+Rebuild a package
+
+Open package repository page in the browser
+
+Start a package
+
+Remove a package
+
+Display npm root
+
+Run arbitrary package scripts
+
+Search for packages
+
+Lock down dependency versions
+
+Mark your favorite packages
+
+View packages marked as favorites
+
+Start a package
+
+Stop a package
+
+Tag a published version
+
+Test a package
+
+Remove a package
+
+Remove a package from the registry
+
+Update a package
+
+Bump a package version
+
+View registry info
+
+Display npm username
+API Documentation
+Using npm in your Node programs
+
+node package manager
+
+Display npm bin folder
+
+Bugs for a package in a web browser maybe
+
+manage the npm cache programmatically
+
+npm commands
+
+Manage the npm configuration files
+
+Deprecate a version of a package
+
+Docs for a package in a web browser maybe
+
+Edit an installed package
+
+Browse an installed package
+
+Search the help pages
+
+Interactively create a package.json file
+
+install a package programmatically
+
+Symlink a package folder
+
+Load config settings
+
+List installed packages
+
+Check for outdated packages
+
+Manage package owners
+
+Create a tarball from a package
+
+Display prefix
+
+Remove extraneous packages
+
+Publish a package
+
+Rebuild a package
+
+Open package repository page in the browser
+
+Start a package
+
+Display npm root
+
+Run arbitrary package scripts
+
+Search for packages
+
+programmatically generate package shrinkwrap file
+
+Start a package
+
+Stop a package
+
+Tag a published version
+
+Test a package
+
+uninstall a package programmatically
+
+Remove a package from the registry
+
+Update a package
+
+Bump a package version
+
+View registry info
+
+Display npm username
+Files
+File system structures npm uses
+
+Folder Structures Used by npm
+
+The npm config files
+
+Specifics of npm's package.json handling
+Misc
+Various other bits and bobs
+
+npm's "funny" coding style
+
+More than you probably want to know about npm configuration
+
+Developer Guide
+
+Handling Module Name Disputes
+
+Frequently Asked Questions
+
+Index of all npm documentation
+
+The JavaScript Package Registry
+
+Scoped packages
+
+How npm handles the "scripts" field
+
+Cleaning the Slate
+
+The semantic versioner for npm
+
diff --git a/deps/npm/html/partial/doc/misc/npm-registry.html b/deps/npm/html/partial/doc/misc/npm-registry.html
new file mode 100644
index 0000000..0031f61
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-registry.html
@@ -0,0 +1,50 @@
+ The JavaScript Package Registry
+DESCRIPTION
+To resolve packages by name and version, npm talks to a registry website
+that implements the CommonJS Package Registry specification for reading
+package info.
+Additionally, npm's package registry implementation supports several
+write APIs as well, to allow for publishing packages and managing user
+account information.
+The official public npm registry is at http://registry.npmjs.org/ . It
+is powered by a CouchDB database, of which there is a public mirror at
+http://skimdb.npmjs.com/registry . The code for the couchapp is
+available at http://github.com/npm/npm-registry-couchapp .
+The registry URL used is determined by the scope of the package (see
+npm-scope(7)
). If no scope is specified, the default registry is used, which is
+supplied by the registry
config parameter. See npm-config(1)
,
+npmrc(5)
, and npm-config(7)
for more on managing npm's configuration.
+Can I run my own private registry?
+Yes!
+The easiest way is to replicate the couch database, and use the same (or
+similar) design doc to implement the APIs.
+If you set up continuous replication from the official CouchDB, and then
+set your internal CouchDB as the registry config, then you'll be able
+to read any published packages, in addition to your private ones, and by
+default will only publish internally. If you then want to publish a
+package for the whole world to see, you can simply override the
+--registry
config for that command.
+I don't want my package published in the official registry. It's private.
+Set "private": true
in your package.json to prevent it from being
+published at all, or
+"publishConfig":{"registry":"http://my-internal-registry.local"}
+to force it to be published only to your internal registry.
+See package.json(5)
for more info on what goes in the package.json file.
+Will you replicate from my registry into the public one?
+No. If you want things to be public, then publish them into the public
+registry using npm. What little security there is would be for nought
+otherwise.
+Do I have to use couchdb to build a registry that npm can talk to?
+No, but it's way easier. Basically, yes, you do, or you have to
+effectively implement the entire CouchDB API anyway.
+Is there a website or something to see package docs and such?
+Yes, head over to https://npmjs.org/
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-scope.html b/deps/npm/html/partial/doc/misc/npm-scope.html
new file mode 100644
index 0000000..5616efd
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-scope.html
@@ -0,0 +1,58 @@
+ Scoped packages
+DESCRIPTION
+All npm packages have a name. Some package names also have a scope. A scope
+follows the usual rules for package names (url-safe characters, no leading dots
+or underscores). When used in package names, preceded by an @-symbol and
+followed by a slash, e.g.
+@somescope/somepackagename
+
Scopes are a way of grouping related packages together, and also affect a few
+things about the way npm treats the package.
+As of 2014-09-03, scoped packages are not supported by the public npm registry .
+However, the npm client is backwards-compatible with un-scoped registries, so
+it can be used to work with scoped and un-scoped registries at the same time.
+Installing scoped packages
+Scoped packages are installed to a sub-folder of the regular installation
+folder, e.g. if your other packages are installed in node_modules/packagename
,
+scoped modules will be in node_modules/@myorg/packagename
. The scope folder
+(@myorg
) is simply the name of the scope preceded by an @-symbol, and can
+contain any number of scoped packages.
+A scoped package is installed by referencing it by name, preceded by an
+@-symbol, in npm install
:
+npm install @myorg/mypackage
+
Or in package.json
:
+"dependencies": {
+ "@myorg/mypackage": "^1.3.0"
+}
+
Note that if the @-symbol is omitted in either case npm will instead attempt to
+install from GitHub; see npm-install(1)
.
+Requiring scoped packages
+Because scoped packages are installed into a scope folder, you have to
+include the name of the scope when requiring them in your code, e.g.
+require('@myorg/mypackage')
+
There is nothing special about the way Node treats scope folders, this is
+just specifying to require the module mypackage
in the folder called @myorg
.
+Publishing scoped packages
+Scoped packages can be published to any registry that supports them.
+As of 2014-09-03, the public npm registry does not support scoped packages ,
+so attempting to publish a scoped package to the registry will fail unless
+you have associated that scope with a different registry, see below.
+Associating a scope with a registry
+Scopes can be associated with a separate registry. This allows you to
+seamlessly use a mix of packages from the public npm registry and one or more
+private registries, such as npm Enterprise.
+You can associate a scope with a registry at login, e.g.
+npm login --registry=http://reg.example.com --scope=@myco
+
Scopes have a many-to-one relationship with registries: one registry can
+host multiple scopes, but a scope only ever points to one registry.
+You can also associate a scope with a registry using npm config
:
+npm config set @myco:registry http://reg.example.com
+
Once a scope is associated with a registry, any npm install
for a package
+with that scope will request packages from that registry instead. Any
+npm publish
for a package name that contains the scope will be published to
+that registry instead.
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/npm-scripts.html b/deps/npm/html/partial/doc/misc/npm-scripts.html
new file mode 100644
index 0000000..08bcbd5
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/npm-scripts.html
@@ -0,0 +1,200 @@
+ How npm handles the "scripts" field
+DESCRIPTION
+npm supports the "scripts" property of the package.json script, for the
+following scripts:
+
+prepublish:
+Run BEFORE the package is published. (Also run on local npm
+install
without any arguments.)
+publish, postpublish:
+Run AFTER the package is published.
+preinstall:
+Run BEFORE the package is installed
+install, postinstall:
+Run AFTER the package is installed.
+preuninstall, uninstall:
+Run BEFORE the package is uninstalled.
+postuninstall:
+Run AFTER the package is uninstalled.
+preupdate:
+Run BEFORE the package is updated with the update command.
+update, postupdate:
+Run AFTER the package is updated with the update command.
+pretest, test, posttest:
+Run by the npm test
command.
+prestop, stop, poststop:
+Run by the npm stop
command.
+prestart, start, poststart:
+Run by the npm start
command.
+prerestart, restart, postrestart:
+Run by the npm restart
command. Note: npm restart
will run the
+stop and start scripts if no restart
script is provided.
+
+Additionally, arbitrary scripts can be executed by running npm
+run-script <pkg> <stage>
. Pre and post commands with matching
+names will be run for those as well (e.g. premyscript
, myscript
,
+postmyscript
).
+NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
+tl;dr Don't use install
. Use a .gyp
file for compilation, and
+prepublish
for anything else.
+You should almost never have to explicitly set a preinstall
or
+install
script. If you are doing this, please consider if there is
+another option.
+The only valid use of install
or preinstall
scripts is for
+compilation which must be done on the target architecture. In early
+versions of node, this was often done using the node-waf
scripts, or
+a standalone Makefile
, and early versions of npm required that it be
+explicitly set in package.json. This was not portable, and harder to
+do properly.
+In the current version of node, the standard way to do this is using a
+.gyp
file. If you have a file with a .gyp
extension in the root
+of your package, then npm will run the appropriate node-gyp
commands
+automatically at install time. This is the only officially supported
+method for compiling binary addons, and does not require that you add
+anything to your package.json file.
+If you have to do other things before your package is used, in a way
+that is not dependent on the operating system or architecture of the
+target system, then use a prepublish
script instead. This includes
+tasks such as:
+
+Compile CoffeeScript source code into JavaScript.
+Create minified versions of JavaScript source code.
+Fetching remote resources that your package will use.
+
+The advantage of doing these things at prepublish
time instead of
+preinstall
or install
time is that they can be done once, in a
+single place, and thus greatly reduce complexity and variability.
+Additionally, this means that:
+
+You can depend on coffee-script
as a devDependency
, and thus
+your users don't need to have it installed.
+You don't need to include the minifiers in your package, reducing
+the size for your users.
+You don't need to rely on your users having curl
or wget
or
+other system tools on the target machines.
+
+DEFAULT VALUES
+npm will default some script values based on package contents.
+
+"start": "node server.js"
:
+If there is a server.js
file in the root of your package, then npm
+will default the start
command to node server.js
.
+
+"preinstall": "node-waf clean || true; node-waf configure build"
:
+If there is a wscript
file in the root of your package, npm will
+default the preinstall
command to compile using node-waf.
+
+
+USER
+If npm was invoked with root privileges, then it will change the uid
+to the user account or uid specified by the user
config, which
+defaults to nobody
. Set the unsafe-perm
flag to run scripts with
+root privileges.
+ENVIRONMENT
+Package scripts run in an environment where many pieces of information
+are made available regarding the setup of npm and the current state of
+the process.
+path
+If you depend on modules that define executable scripts, like test
+suites, then those executables will be added to the PATH
for
+executing the scripts. So, if your package.json has this:
+{ "name" : "foo"
+, "dependencies" : { "bar" : "0.1.x" }
+, "scripts": { "start" : "bar ./test" } }
+
then you could run npm start
to execute the bar
script, which is
+exported into the node_modules/.bin
directory on npm install
.
+package.json vars
+The package.json fields are tacked onto the npm_package_
prefix. So,
+for instance, if you had {"name":"foo", "version":"1.2.5"}
in your
+package.json file, then your package scripts would have the
+npm_package_name
environment variable set to "foo", and the
+npm_package_version
set to "1.2.5"
+configuration
+Configuration parameters are put in the environment with the
+npm_config_
prefix. For instance, you can view the effective root
+config by checking the npm_config_root
environment variable.
+Special: package.json "config" object
+The package.json "config" keys are overwritten in the environment if
+there is a config param of <name>[@<version>]:<key>
. For example,
+if the package.json has this:
+{ "name" : "foo"
+, "config" : { "port" : "8080" }
+, "scripts" : { "start" : "node server.js" } }
+
and the server.js is this:
+http.createServer(...).listen(process.env.npm_package_config_port)
+
then the user could change the behavior by doing:
+npm config set foo:port 80
+
current lifecycle event
+Lastly, the npm_lifecycle_event
environment variable is set to
+whichever stage of the cycle is being executed. So, you could have a
+single script used for different parts of the process which switches
+based on what's currently happening.
+Objects are flattened following this format, so if you had
+{"scripts":{"install":"foo.js"}}
in your package.json, then you'd
+see this in the script:
+process.env.npm_package_scripts_install === "foo.js"
+
EXAMPLES
+For example, if your package.json contains this:
+{ "scripts" :
+ { "install" : "scripts/install.js"
+ , "postinstall" : "scripts/install.js"
+ , "uninstall" : "scripts/uninstall.js"
+ }
+}
+
then the scripts/install.js
will be called for the install,
+post-install, stages of the lifecycle, and the scripts/uninstall.js
+would be called when the package is uninstalled. Since
+scripts/install.js
is running for three different phases, it would
+be wise in this case to look at the npm_lifecycle_event
environment
+variable.
+If you want to run a make command, you can do so. This works just
+fine:
+{ "scripts" :
+ { "preinstall" : "./configure"
+ , "install" : "make && make install"
+ , "test" : "make test"
+ }
+}
+
EXITING
+Scripts are run by passing the line as a script argument to sh
.
+If the script exits with a code other than 0, then this will abort the
+process.
+Note that these script files don't have to be nodejs or even
+javascript programs. They just have to be some kind of executable
+file.
+HOOK SCRIPTS
+If you want to run a specific script at a specific lifecycle event for
+ALL packages, then you can use a hook script.
+Place an executable file at node_modules/.hooks/{eventname}
, and
+it'll get run for all packages when they are going through that point
+in the package lifecycle for any packages installed in that root.
+Hook scripts are run exactly the same way as package.json scripts.
+That is, they are in a separate child process, with the env described
+above.
+BEST PRACTICES
+
+Don't exit with a non-zero error code unless you really mean it.
+Except for uninstall scripts, this will cause the npm action to
+fail, and potentially be rolled back. If the failure is minor or
+only will prevent some optional features, then it's better to just
+print a warning and exit successfully.
+Try not to use scripts to do what npm can do for you. Read through
+package.json(5)
to see all the things that you can specify and enable
+by simply describing your package appropriately. In general, this
+will lead to a more robust and consistent state.
+Inspect the env to determine where to put things. For instance, if
+the npm_config_binroot
environ is set to /home/user/bin
, then
+don't try to install executables into /usr/local/bin
. The user
+probably set it up that way for a reason.
+Don't prefix your script commands with "sudo". If root permissions
+are required for some reason, then it'll fail with that error, and
+the user will sudo the npm command in question.
+
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/removing-npm.html b/deps/npm/html/partial/doc/misc/removing-npm.html
new file mode 100644
index 0000000..3b3968b
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/removing-npm.html
@@ -0,0 +1,37 @@
+ Cleaning the Slate
+SYNOPSIS
+So sad to see you go.
+sudo npm uninstall npm -g
+
Or, if that fails, get the npm source code, and do:
+sudo make uninstall
+
More Severe Uninstalling
+Usually, the above instructions are sufficient. That will remove
+npm, but leave behind anything you've installed.
+If that doesn't work, or if you require more drastic measures,
+continue reading.
+Note that this is only necessary for globally-installed packages. Local
+installs are completely contained within a project's node_modules
+folder. Delete that folder, and everything is gone (unless a package's
+install script is particularly ill-behaved).
+This assumes that you installed node and npm in the default place. If
+you configured node with a different --prefix
, or installed npm with a
+different prefix setting, then adjust the paths accordingly, replacing
+/usr/local
with your install prefix.
+To remove everything npm-related manually:
+rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
+
If you installed things with npm, then your best bet is to uninstall
+them with npm first, and then install them again once you have a
+proper install. This can help find any symlinks that are lying
+around:
+ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
+
Prior to version 0.3, npm used shim files for executables and node
+modules. To track those down, you can do the following:
+find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
+
(This is also in the README file.)
+SEE ALSO
+
+
diff --git a/deps/npm/html/partial/doc/misc/semver.html b/deps/npm/html/partial/doc/misc/semver.html
new file mode 100644
index 0000000..691a277
--- /dev/null
+++ b/deps/npm/html/partial/doc/misc/semver.html
@@ -0,0 +1,243 @@
+ The semantic versioner for npm
+Usage
+$ npm install semver
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+
As a command-line utility:
+$ semver -h
+
+Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | -d <dec>]
+Test if version(s) satisfy the supplied range(s), and sort them.
+
+Multiple versions or ranges may be supplied, unless increment
+or decrement options are specified. In that case, only a single
+version may be used, and it is incremented by the specified level
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no versions are valid, or ranges are not satisfied,
+then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+
Versions
+A "version" is described by the v2.0.0
specification found at
+http://semver.org/ .
+A leading "="
or "v"
character is stripped off and ignored.
+Ranges
+A version range
is a set of comparators
which specify versions
+that satisfy the range.
+A comparator
is composed of an operator
and a version
. The set
+of primitive operators
is:
+
+<
Less than
+<=
Less than or equal to
+>
Greater than
+>=
Greater than or equal to
+=
Equal. If no operator is specified, then equality is assumed,
+so this operator is optional, but MAY be included.
+
+For example, the comparator >=1.2.7
would match the versions
+1.2.7
, 1.2.8
, 2.5.3
, and 1.3.9
, but not the versions 1.2.6
+or 1.1.0
.
+Comparators can be joined by whitespace to form a comparator set
,
+which is satisfied by the intersection of all of the comparators
+it includes.
+A range is composed of one or more comparator sets, joined by ||
. A
+version matches a range if and only if every comparator in at least
+one of the ||
-separated comparator sets is satisfied by the version.
+For example, the range >=1.2.7 <1.3.0
would match the versions
+1.2.7
, 1.2.8
, and 1.2.99
, but not the versions 1.2.6
, 1.3.0
,
+or 1.1.0
.
+The range 1.2.7 || >=1.2.9 <2.0.0
would match the versions 1.2.7
,
+1.2.9
, and 1.4.6
, but not the versions 1.2.8
or 2.0.0
.
+
+If a version has a prerelease tag (for example, 1.2.3-alpha.3
) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same [major, minor, patch]
tuple also has a
+prerelease tag.
+For example, the range >1.2.3-alpha.3
would be allowed to match the
+version 1.2.3-alpha.7
, but it would not be satisfied by
+3.4.5-alpha.9
, even though 3.4.5-alpha.9
is technically "greater
+than" 1.2.3-alpha.3
according to the SemVer sort rules. The version
+range only accepts prerelease tags on the 1.2.3
version. The
+version 3.4.5
would satisfy the range, because it does not have a
+prerelease flag, and 3.4.5
is greater than 1.2.3-alpha.7
.
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use that specific set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the next set of prerelease versions.
+Advanced Range Syntax
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or ||
.
+Hyphen Ranges X.Y.Z - A.B.C
+Specifies an inclusive set.
+
+1.2.3 - 2.3.4
:= >=1.2.3 <=2.3.4
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+1.2 - 2.3.4
:= >=1.2.0 <=2.3.4
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+1.2.3 - 2.3
:= >=1.2.3 <2.4.0
+1.2.3 - 2
:= >=1.2.3 <3.0.0
+
+X-Ranges 1.2.x
1.X
1.2.*
*
+Any of X
, x
, or *
may be used to "stand in" for one of the
+numeric values in the [major, minor, patch]
tuple.
+
+*
:= >=0.0.0
(Any version satisfies)
+1.x
:= >=1.0.0 <2.0.0
(Matching major version)
+1.2.x
:= >=1.2.0 <1.3.0
(Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+""
(empty string) := *
:= >=0.0.0
+1
:= 1.x.x
:= >=1.0.0 <2.0.0
+1.2
:= 1.2.x
:= >=1.2.0 <1.3.0
+
+Tilde Ranges ~1.2.3
~1.2
~1
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+~1.2.3
:= >=1.2.3 <1.(2+1).0
:= >=1.2.3 <1.3.0
+~1.2
:= >=1.2.0 <1.(2+1).0
:= >=1.2.0 <1.3.0
(Same as 1.2.x
)
+~1
:= >=1.0.0 <(1+1).0.0
:= >=1.0.0 <2.0.0
(Same as 1.x
)
+~0.2.3
:= >=0.2.3 <0.(2+1).0
:= >=0.2.3 <0.3.0
+~0.2
:= >=0.2.0 <0.(2+1).0
:= >=0.2.0 <0.3.0
(Same as 0.2.x
)
+~0
:= >=0.0.0 <(0+1).0.0
:= >=0.0.0 <1.0.0
(Same as 0.x
)
+~1.2.3-beta.2
:= >=1.2.3-beta.2 <1.3.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+
+Note: this is the same as the ~>
operator in rubygems.
+Caret Ranges ^1.2.3
^0.2.5
^0.0.4
+Allows changes that do not modify the left-most non-zero digit in the
+[major, minor, patch]
tuple. In other words, this allows patch and
+minor updates for versions 1.0.0
and above, patch updates for
+versions 0.X >=0.1.0
, and no updates for versions 0.0.X
.
+Many authors treat a 0.x
version as if the x
were the major
+"breaking-change" indicator.
+Caret ranges are ideal when an author may make breaking changes
+between 0.2.4
and 0.3.0
releases, which is a common practice.
+However, it presumes that there will not be breaking changes between
+0.2.4
and 0.2.5
. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+^1.2.3
:= >=1.2.3 <2.0.0
+^0.2.3
:= >=0.2.3 <0.3.0
+^0.0.3
:= >=0.0.3 <0.0.4
+^1.2.3-beta.2
:= >=1.2.3-beta.2 <2.0.0
Note that prereleases in
+the 1.2.3
version will be allowed, if they are greater than or
+equal to beta.2
. So, 1.2.3-beta.4
would be allowed, but
+1.2.4-beta.2
would not, because it is a prerelease of a
+different [major, minor, patch]
tuple.
+^0.0.3-beta
:= >=0.0.3-beta <0.0.4
Note that prereleases in the
+0.0.3
version only will be allowed, if they are greater than or
+equal to beta
. So, 0.0.3-pr.2
would be allowed.
+
+When parsing caret ranges, a missing patch
value desugars to the
+number 0
, but will allow flexibility within that value, even if the
+major and minor versions are both 0
.
+
+^1.2.x
:= >=1.2.0 <2.0.0
+^0.0.x
:= >=0.0.0 <0.1.0
+^0.0
:= >=0.0.0 <0.1.0
+
+A missing minor
and patch
values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+^1.x
:= >=1.0.0 <2.0.0
+^0.x
:= >=0.0.0 <1.0.0
+
+Functions
+All methods and classes take a final loose
boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+valid(v)
: Return the parsed version, or null if it's not valid.
+inc(v, release)
: Return the version incremented by the release
+type (major
, premajor
, minor
, preminor
, patch
,
+prepatch
, or prerelease
), or null if it's not valid
+premajor
in one call will bump the version up to the next major
+version and down to a prerelease of that major version.
+preminor
, and prepatch
work the same way.
+If called from a non-prerelease version, the prerelease
will work the
+same as prepatch
. It increments the patch version, then makes a
+prerelease. If the input version is already a prerelease it simply
+increments it.
+
+
+
+Comparison
+
+gt(v1, v2)
: v1 > v2
+gte(v1, v2)
: v1 >= v2
+lt(v1, v2)
: v1 < v2
+lte(v1, v2)
: v1 <= v2
+eq(v1, v2)
: v1 == v2
This is true if they're logically equivalent,
+even if they're not the exact same string. You already know how to
+compare strings.
+neq(v1, v2)
: v1 != v2
The opposite of eq
.
+cmp(v1, comparator, v2)
: Pass in a comparison string, and it'll call
+the corresponding function above. "==="
and "!=="
do simple
+string comparison, but are included for completeness. Throws if an
+invalid comparison string is provided.
+compare(v1, v2)
: Return 0
if v1 == v2
, or 1
if v1
is greater, or -1
if
+v2
is greater. Sorts in ascending order if passed to Array.sort()
.
+rcompare(v1, v2)
: The reverse of compare. Sorts an array of versions
+in descending order when passed to Array.sort()
.
+
+Ranges
+
+validRange(range)
: Return the valid range or null if it's not valid
+satisfies(version, range)
: Return true if the version satisfies the
+range.
+maxSatisfying(versions, range)
: Return the highest version in the list
+that satisfies the range, or null
if none of them do.
+gtr(version, range)
: Return true
if version is greater than all the
+versions possible in the range.
+ltr(version, range)
: Return true
if version is less than all the
+versions possible in the range.
+outside(version, range, hilo)
: Return true if the version is outside
+the bounds of the range in either the high or low direction. The
+hilo
argument must be either the string '>'
or '<'
. (This is
+the function called by gtr
and ltr
.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, or satisfy a range! For
+example, the range 1.2 <1.2.9 || >2.0.0
would have a hole from 1.2.9
+until 2.0.0
, so the version 1.2.10
would not be greater than the
+range (because 2.0.1
satisfies, which is higher), nor less than the
+range (since 1.2.8
satisfies, which is lower), and it also does not
+satisfy the range.
+If you want to know if a version satisfies or does not satisfy a
+range, use the satisfies(version, range)
function.
+
diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js
index 7e933ea..9693aeb 100644
--- a/deps/npm/lib/adduser.js
+++ b/deps/npm/lib/adduser.js
@@ -166,9 +166,10 @@ function save (c, u, cb) {
}
else {
npm.config.setCredentialsByURI(uri, {
- username : u.u,
- password : u.p,
- email : u.e
+ username : u.u,
+ password : u.p,
+ email : u.e,
+ alwaysAuth : npm.config.get("always-auth")
})
}
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index f1c61bd..2e01ef6 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -19,6 +19,8 @@ var npm = require("./npm.js")
, cmdShim = require("cmd-shim")
, cmdShimIfExists = cmdShim.ifExists
, asyncMap = require("slide").asyncMap
+ , ini = require("ini")
+ , writeFile = require("write-file-atomic")
module.exports = build
build.usage = "npm build \n(this is plumbing)"
@@ -41,6 +43,7 @@ function build (args, global, didPre, didRB, cb) {
function build_ (global, didPre, didRB) { return function (folder, cb) {
folder = path.resolve(folder)
+ if (build._didBuild[folder]) log.error("build", "already built", folder)
build._didBuild[folder] = true
log.info("build", folder)
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
@@ -48,7 +51,7 @@ function build_ (global, didPre, didRB) { return function (folder, cb) {
chain
( [ !didPre && [lifecycle, pkg, "preinstall", folder]
, [linkStuff, pkg, folder, global, didRB]
- , pkg.name === "npm" && [writeBuiltinConf, folder]
+ , [writeBuiltinConf, pkg, folder]
, didPre !== build._noLC && [lifecycle, pkg, "install", folder]
, didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder]
, didPre !== build._noLC
@@ -58,14 +61,21 @@ function build_ (global, didPre, didRB) { return function (folder, cb) {
})
}}
-function writeBuiltinConf (folder, cb) {
- // the builtin config is "sticky". Any time npm installs itself,
- // it puts its builtin config file there, as well.
- if (!npm.config.usingBuiltin
- || folder !== path.dirname(__dirname)) {
+function writeBuiltinConf (pkg, folder, cb) {
+ // the builtin config is "sticky". Any time npm installs
+ // itself globally, it puts its builtin config file there
+ var parent = path.dirname(folder)
+ var dir = npm.globalDir
+
+ if (pkg.name !== "npm" ||
+ !npm.config.get("global") ||
+ !npm.config.usingBuiltin ||
+ dir !== parent) {
return cb()
}
- npm.config.save("builtin", cb)
+
+ var data = ini.stringify(npm.config.sources.builtin.data)
+ writeFile(path.resolve(folder, "npmrc"), data, cb)
}
function linkStuff (pkg, folder, global, didRB, cb) {
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index 281d610..e1afb0d 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -62,6 +62,7 @@ cache.read = read
var npm = require("./npm.js")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, assert = require("assert")
, rm = require("./utils/gently-rm.js")
, readJson = require("read-package-json")
@@ -77,8 +78,10 @@ var npm = require("./npm.js")
, addRemoteGit = require("./cache/add-remote-git.js")
, maybeGithub = require("./cache/maybe-github.js")
, inflight = require("inflight")
+ , realizePackageSpecifier = require("realize-package-specifier")
, npa = require("npm-package-arg")
, getStat = require("./cache/get-stat.js")
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
cache.usage = "npm cache add "
+ "\nnpm cache add "
@@ -129,8 +132,11 @@ function read (name, ver, forceBypass, cb) {
if (forceBypass === undefined || forceBypass === null) forceBypass = true
- var jsonFile = path.join(npm.cache, name, ver, "package", "package.json")
+ var root = cachedPackageRoot({name : name, version : ver})
function c (er, data) {
+ log.silly("cache", "addNamed cb", name+"@"+ver)
+ if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er)
+
if (data) deprCheck(data)
return cb(er, data)
@@ -141,15 +147,16 @@ function read (name, ver, forceBypass, cb) {
return addNamed(name, ver, null, c)
}
- readJson(jsonFile, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
+ readJson(path.join(root, "package", "package.json"), function (er, data) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- if (er) return addNamed(name, ver, null, c)
- deprCheck(data)
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+ }
- c(er, data)
+ if (er) return addNamed(name, ver, null, c)
+ else c(er, data)
})
}
@@ -223,7 +230,6 @@ cache.add = function (pkg, ver, where, scrub, cb) {
add([pkg, ver], where, cb)
})
}
- log.verbose("cache add", [pkg, ver])
return add([pkg, ver], where, cb)
}
@@ -246,7 +252,8 @@ function add (args, where, cb) {
+ " npm cache add \n"
+ " npm cache add \n"
, spec
- , p
+
+ log.silly("cache add", "args", args)
if (args[1] === undefined) args[1] = null
@@ -257,43 +264,26 @@ function add (args, where, cb) {
spec = args[0]
}
- log.verbose("cache add", "spec=%j args=%j", spec, args)
+ log.verbose("cache add", "spec", spec)
if (!spec) return cb(usage)
if (adding <= 0) {
npm.spinner.start()
}
- adding ++
+ adding++
cb = afterAdd(cb)
- // package.json can have local URI ("file:") dependencies which require
- // normalization
- p = npa(spec)
- if (p.type === "local" && where) spec = path.resolve(where, p.spec)
- log.verbose("parsed spec", p)
-
- // short-circuit local installs
- fs.stat(spec, function (er, s) {
- if (er) return addNonLocal(spec, cb)
- if (!s.isDirectory()) return addAndLogLocal(spec, cb)
- fs.stat(path.join(spec, "package.json"), function (er) {
- if (er) return addNonLocal(spec, cb)
- addAndLogLocal(spec, cb)
- })
- })
-}
+ realizePackageSpecifier(spec, where, function (err, p) {
+ if (err) return cb(err)
-function addAndLogLocal (spec, cb) {
- log.verbose("cache add", "local package", path.resolve(spec))
- return addLocal(spec, null, cb)
-}
-
-function addNonLocal (spec, cb) {
- var p = npa(spec)
- log.verbose("parsed spec", p)
+ log.silly("cache add", "parsed spec", p)
switch (p.type) {
+ case "local":
+ case "directory":
+ addLocal(p, null, cb)
+ break
case "remote":
addRemoteTarball(p.spec, {name : p.name}, null, cb)
break
@@ -308,6 +298,7 @@ function addNonLocal (spec, cb) {
cb(new Error("couldn't figure out how to install " + spec))
}
+ })
}
function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
@@ -323,7 +314,7 @@ function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
}
npm.commands.unbuild([unpackTarget], true, function (er) {
if (er) return cb(er)
- tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
+ tar.unpack( path.join(cachedPackageRoot({name : pkg, version : ver}), "package.tgz")
, unpackTarget
, dMode, fMode
, uid, gid
@@ -333,50 +324,25 @@ function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
}
function afterAdd (cb) { return function (er, data) {
- adding --
- if (adding <= 0) {
- npm.spinner.stop()
- }
- if (er || !data || !data.name || !data.version) {
- return cb(er, data)
- }
+ adding--
+ if (adding <= 0) npm.spinner.stop()
+
+ if (er || !data || !data.name || !data.version) return cb(er, data)
+ log.silly("cache", "afterAdd", data.name+"@"+data.version)
// Save the resolved, shasum, etc. into the data so that the next
// time we load from this cached data, we have all the same info.
- var name = data.name
- var ver = data.version
- var pj = path.join(npm.cache, name, ver, "package", "package.json")
- var tmp = pj + "." + process.pid
+ var pj = path.join(cachedPackageRoot(data), "package", "package.json")
var done = inflight(pj, cb)
+ if (!done) return log.verbose("afterAdd", pj, "already in flight; not writing")
+ log.verbose("afterAdd", pj, "not in flight; writing")
- if (!done) return undefined
-
- fs.writeFile(tmp, JSON.stringify(data), "utf8", function (er) {
+ getStat(function (er, cs) {
if (er) return done(er)
- getStat(function (er, cs) {
- if (er) return done(er)
- fs.rename(tmp, pj, function (er) {
- if (cs.uid && cs.gid) {
- fs.chown(pj, cs.uid, cs.gid, function (er) {
- return done(er, data)
- })
- } else {
- done(er, data)
- }
- })
+ writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) {
+ if (!er) log.verbose("afterAdd", pj, "written")
+ return done(er, data)
})
})
}}
-
-function needName (er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion (er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-local-tarball.js b/deps/npm/lib/cache/add-local-tarball.js
index f7cd761..e84b66d 100644
--- a/deps/npm/lib/cache/add-local-tarball.js
+++ b/deps/npm/lib/cache/add-local-tarball.js
@@ -1,80 +1,52 @@
var mkdir = require("mkdirp")
, assert = require("assert")
, fs = require("graceful-fs")
- , readJson = require("read-package-json")
- , log = require("npmlog")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, sha = require("sha")
, npm = require("../npm.js")
+ , log = require("npmlog")
, tar = require("../utils/tar.js")
, pathIsInside = require("path-is-inside")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
, chownr = require("chownr")
, inflight = require("inflight")
, once = require("once")
+ , writeStream = require("fs-write-stream-atomic")
+ , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness
module.exports = addLocalTarball
-function addLocalTarball (p, pkgData, shasum, cb_) {
+function addLocalTarball (p, pkgData, shasum, cb) {
assert(typeof p === "string", "must have path")
- assert(typeof cb_ === "function", "must have callback")
+ assert(typeof cb === "function", "must have callback")
if (!pkgData) pkgData = {}
- var name = pkgData.name || ""
- // If we don't have a shasum yet, then get the shasum now.
+ // If we don't have a shasum yet, compute it.
if (!shasum) {
return sha.get(p, function (er, shasum) {
- if (er) return cb_(er)
- addLocalTarball(p, pkgData, shasum, cb_)
+ if (er) return cb(er)
+ log.silly("addLocalTarball", "shasum (computed)", shasum)
+ addLocalTarball(p, pkgData, shasum, cb)
})
}
- // if it's a tar, and not in place,
- // then unzip to .tmp, add the tmp folder, and clean up tmp
- if (pathIsInside(p, npm.tmp))
- return addTmpTarball(p, pkgData, shasum, cb_)
-
if (pathIsInside(p, npm.cache)) {
- if (path.basename(p) !== "package.tgz") return cb_(new Error(
- "Not a valid cache tarball name: "+p))
- return addPlacedTarball(p, pkgData, shasum, cb_)
+ if (path.basename(p) !== "package.tgz") {
+ return cb(new Error("Not a valid cache tarball name: "+p))
+ }
+ log.verbose("addLocalTarball", "adding from inside cache", p)
+ return addPlacedTarball(p, pkgData, shasum, cb)
}
- function cb (er, data) {
+ addTmpTarball(p, pkgData, shasum, function (er, data) {
if (data) {
data._resolved = p
data._shasum = data._shasum || shasum
}
- return cb_(er, data)
- }
-
- // just copy it over and then add the temp tarball file.
- var tmp = path.join(npm.tmp, name + Date.now()
- + "-" + Math.random(), "tmp.tgz")
- mkdir(path.dirname(tmp), function (er) {
- if (er) return cb(er)
- var from = fs.createReadStream(p)
- , to = fs.createWriteStream(tmp)
- , errState = null
- function errHandler (er) {
- if (errState) return
- return cb(errState = er)
- }
- from.on("error", errHandler)
- to.on("error", errHandler)
- to.on("close", function () {
- if (errState) return
- log.verbose("chmod", tmp, npm.modes.file.toString(8))
- fs.chmod(tmp, npm.modes.file, function (er) {
- if (er) return cb(er)
- addTmpTarball(tmp, pkgData, shasum, cb)
- })
- })
- from.pipe(to)
+ return cb(er, data)
})
}
@@ -89,10 +61,7 @@ function addPlacedTarball (p, pkgData, shasum, cb) {
}
function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
- // now we know it's in place already as .cache/name/ver/package.tgz
- var name = pkgData.name
- , version = pkgData.version
- , folder = path.join(npm.cache, name, version, "package")
+ var folder = path.join(cachedPackageRoot(pkgData), "package")
// First, make sure we have the shasum, if we don't already.
if (!resolvedSum) {
@@ -103,90 +72,85 @@ function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
return
}
- lock(folder, function (er) {
+ mkdir(folder, function (er) {
if (er) return cb(er)
-
- // async try/finally
- var originalCb = cb
- cb = function (er, data) {
- unlock(folder, function (er2) {
- return originalCb(er || er2, data)
- })
- }
-
- mkdir(folder, function (er) {
- if (er) return cb(er)
- var pj = path.join(folder, "package.json")
- var json = JSON.stringify(pkgData, null, 2)
- fs.writeFile(pj, json, "utf8", function (er) {
- cb(er, pkgData)
- })
+ var pj = path.join(folder, "package.json")
+ var json = JSON.stringify(pkgData, null, 2)
+ writeFileAtomic(pj, json, function (er) {
+ cb(er, pkgData)
})
})
}
function addTmpTarball (tgz, pkgData, shasum, cb) {
assert(typeof cb === "function", "must have callback function")
- assert(shasum, "should have shasum by now")
+ assert(shasum, "must have shasum by now")
cb = inflight("addTmpTarball:" + tgz, cb)
- if (!cb) return
+ if (!cb) return log.verbose("addTmpTarball", tgz, "already in flight; not adding")
+ log.verbose("addTmpTarball", tgz, "not in flight; adding")
// we already have the package info, so just move into place
if (pkgData && pkgData.name && pkgData.version) {
+ log.verbose(
+ "addTmpTarball",
+ "already have metadata; skipping unpack for",
+ pkgData.name + "@" + pkgData.version
+ )
return addTmpTarball_(tgz, pkgData, shasum, cb)
}
- // This is a tarball we probably downloaded from the internet.
- // The shasum's already been checked, but we haven't ever had
- // a peek inside, so we unpack it here just to make sure it is
- // what it says it is.
- // Note: we might not have any clue what we think it is, for
- // example if the user just did `npm install ./foo.tgz`
-
- var target = tgz + "-unpack"
- getCacheStat(function (er, cs) {
- tar.unpack(tgz, target, null, null, cs.uid, cs.gid, next)
- })
+ // This is a tarball we probably downloaded from the internet. The shasum's
+ // already been checked, but we haven't ever had a peek inside, so we unpack
+ // it here just to make sure it is what it says it is.
+ //
+ // NOTE: we might not have any clue what we think it is, for example if the
+ // user just did `npm install ./foo.tgz`
- function next (er) {
+ // generate a unique filename
+ randomBytes(6, function (er, random) {
if (er) return cb(er)
- var pj = path.join(target, "package.json")
- readJson(pj, function (er, data) {
- // XXX dry with similar stanza in add-local.js
- er = needName(er, data)
- er = needVersion(er, data)
- // check that this is what we expected.
- if (!er && pkgData.name && pkgData.name !== data.name) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + " but found "
- + data.name )
- }
-
- if (!er && pkgData.version && pkgData.version !== data.version) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + "@" + pkgData.version
- + " but found "
- + data.name + "@" + data.version )
- }
+ var target = path.join(npm.tmp, "unpack-" + random.toString("hex"))
+ getCacheStat(function (er, cs) {
if (er) return cb(er)
- addTmpTarball_(tgz, data, shasum, cb)
+ log.verbose("addTmpTarball", "validating metadata from", tgz)
+ tar.unpack(tgz, target, null, null, cs.uid, cs.gid, function (er, data) {
+ if (er) return cb(er)
+
+ // check that this is what we expected.
+ if (!data.name) {
+ return cb(new Error("No name provided"))
+ }
+ else if (pkgData.name && data.name !== pkgData.name) {
+ return cb(new Error("Invalid Package: expected " + pkgData.name +
+ " but found " + data.name))
+ }
+
+ if (!data.version) {
+ return cb(new Error("No version provided"))
+ }
+ else if (pkgData.version && data.version !== pkgData.version) {
+ return cb(new Error("Invalid Package: expected " +
+ pkgData.name + "@" + pkgData.version +
+ " but found " + data.name + "@" + data.version))
+ }
+
+ addTmpTarball_(tgz, data, shasum, cb)
+ })
})
- }
+ })
}
function addTmpTarball_ (tgz, data, shasum, cb) {
assert(typeof cb === "function", "must have callback function")
cb = once(cb)
- var name = data.name
- var version = data.version
- assert(name, "should have package name by now")
- assert(version, "should have package version by now")
+ assert(data.name, "should have package name by now")
+ assert(data.version, "should have package version by now")
- var root = path.resolve(npm.cache, name, version)
+ var root = cachedPackageRoot(data)
var pkg = path.resolve(root, "package")
var target = path.resolve(root, "package.tgz")
getCacheStat(function (er, cs) {
@@ -196,13 +160,13 @@ function addTmpTarball_ (tgz, data, shasum, cb) {
// chown starting from the first dir created by mkdirp,
// or the root dir, if none had to be created, so that
// we know that we get all the children.
- function chown (er) {
+ function chown () {
chownr(created || root, cs.uid, cs.gid, done)
}
if (er) return cb(er)
var read = fs.createReadStream(tgz)
- var write = fs.createWriteStream(target)
+ var write = writeStream(target, { mode: npm.modes.file })
var fin = cs.uid && cs.gid ? chown : done
read.on("error", cb).pipe(write).on("error", cb).on("close", fin)
})
@@ -214,15 +178,3 @@ function addTmpTarball_ (tgz, data, shasum, cb) {
cb(null, data)
}
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-local.js b/deps/npm/lib/cache/add-local.js
index bedf34b..b425d7f 100644
--- a/deps/npm/lib/cache/add-local.js
+++ b/deps/npm/lib/cache/add-local.js
@@ -1,5 +1,4 @@
-var fs = require("graceful-fs")
- , assert = require("assert")
+var assert = require("assert")
, path = require("path")
, mkdir = require("mkdirp")
, chownr = require("chownr")
@@ -9,44 +8,36 @@ var fs = require("graceful-fs")
, npm = require("../npm.js")
, tar = require("../utils/tar.js")
, deprCheck = require("../utils/depr-check.js")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
, addLocalTarball = require("./add-local-tarball.js")
, sha = require("sha")
module.exports = addLocal
function addLocal (p, pkgData, cb_) {
- assert(typeof p === "string", "must have path")
+ assert(typeof p === "object", "must have spec info")
assert(typeof cb === "function", "must have callback")
pkgData = pkgData || {}
function cb (er, data) {
- unlock(p, function () {
- if (er) {
- log.error("addLocal", "Could not install %s", p)
- return cb_(er)
- }
- if (data && !data._fromGithub) {
- data._from = path.relative(npm.prefix, p) || "."
- }
- return cb_(er, data)
- })
+ if (er) {
+ log.error("addLocal", "Could not install %s", p.spec)
+ return cb_(er)
+ }
+ if (data && !data._fromGithub) {
+ data._from = path.relative(npm.prefix, p.spec) || "."
+ }
+ return cb_(er, data)
}
- lock(p, function (er) {
- if (er) return cb(er)
- // figure out if this is a folder or file.
- fs.stat(p, function (er, s) {
- if (er) return cb(er)
-
- if (s.isDirectory()) addLocalDirectory(p, pkgData, null, cb)
- else addLocalTarball(p, pkgData, null, cb)
- })
- })
+ if (p.type === "directory") {
+ addLocalDirectory(p.spec, pkgData, null, cb)
+ }
+ else {
+ addLocalTarball(p.spec, pkgData, null, cb)
+ }
}
// At this point, if shasum is set, it's something that we've already
@@ -61,30 +52,33 @@ function addLocalDirectory (p, pkgData, shasum, cb) {
"Adding a cache directory to the cache will make the world implode."))
readJson(path.join(p, "package.json"), false, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
+ if (er) return cb(er)
- // check that this is what we expected.
- if (!er && pkgData.name && pkgData.name !== data.name) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + " but found "
- + data.name )
+ if (!data.name) {
+ return cb(new Error("No name provided in package.json"))
+ }
+ else if (pkgData.name && pkgData.name !== data.name) {
+ return cb(new Error(
+ "Invalid package: expected " + pkgData.name + " but found " + data.name
+ ))
}
- if (!er && pkgData.version && pkgData.version !== data.version) {
- er = new Error( "Invalid Package: expected "
- + pkgData.name + "@" + pkgData.version
- + " but found "
- + data.name + "@" + data.version )
+ if (!data.version) {
+ return cb(new Error("No version provided in package.json"))
+ }
+ else if (pkgData.version && pkgData.version !== data.version) {
+ return cb(new Error(
+ "Invalid package: expected " + pkgData.name + "@" + pkgData.version +
+ " but found " + data.name + "@" + data.version
+ ))
}
- if (er) return cb(er)
deprCheck(data)
// pack to {cache}/name/ver/package.tgz
- var croot = path.resolve(npm.cache, data.name, data.version)
- var tgz = path.resolve(croot, "package.tgz")
- var pj = path.resolve(croot, "package/package.json")
+ var root = cachedPackageRoot(data)
+ var tgz = path.resolve(root, "package.tgz")
+ var pj = path.resolve(root, "package/package.json")
getCacheStat(function (er, cs) {
mkdir(path.dirname(pj), function (er, made) {
if (er) return cb(er)
@@ -120,15 +114,3 @@ function addLocalDirectory (p, pkgData, shasum, cb) {
}
})
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-named.js b/deps/npm/lib/cache/add-named.js
index 091d43c..1bd7af1 100644
--- a/deps/npm/lib/cache/add-named.js
+++ b/deps/npm/lib/cache/add-named.js
@@ -10,42 +10,45 @@ var path = require("path")
, registry = npm.registry
, deprCheck = require("../utils/depr-check.js")
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, addRemoteTarball = require("./add-remote-tarball.js")
+ , cachedPackageRoot = require("./cached-package-root.js")
, mapToRegistry = require("../utils/map-to-registry.js")
module.exports = addNamed
-var NAME_PREFIX = "addName:"
+function getOnceFromRegistry (name, from, next, done) {
+ mapToRegistry(name, npm.config, function (er, uri) {
+ if (er) return done(er)
+
+ var key = "registry:" + uri
+ next = inflight(key, next)
+ if (!next) return log.verbose(from, key, "already in flight; waiting")
+ else log.verbose(from, key, "not in flight; fetching")
+
+ registry.get(uri, null, next)
+ })
+}
+
function addNamed (name, version, data, cb_) {
assert(typeof name === "string", "must have module name")
assert(typeof cb_ === "function", "must have callback")
- log.verbose("addNamed", [name, version])
-
var key = name + "@" + version
+ log.verbose("addNamed", key)
+
function cb (er, data) {
if (data && !data._fromGithub) data._from = key
- unlock(key, function () { cb_(er, data) })
+ cb_(er, data)
}
- cb_ = inflight(NAME_PREFIX + key, cb_)
-
- if (!cb_) return
-
- log.verbose("addNamed", [semver.valid(version), semver.validRange(version)])
- lock(key, function (er) {
- if (er) return cb(er)
-
- var fn = ( semver.valid(version, true) ? addNameVersion
- : semver.validRange(version, true) ? addNameRange
- : addNameTag
- )
- fn(name, version, data, cb)
- })
+ log.silly("addNamed", "semver.valid", semver.valid(version))
+ log.silly("addNamed", "semver.validRange", semver.validRange(version))
+ var fn = ( semver.valid(version, true) ? addNameVersion
+ : semver.validRange(version, true) ? addNameRange
+ : addNameTag
+ )
+ fn(name, version, data, cb)
}
function addNameTag (name, tag, data, cb) {
@@ -56,17 +59,14 @@ function addNameTag (name, tag, data, cb) {
tag = npm.config.get("tag")
}
- mapToRegistry(name, npm.config, function (er, uri) {
- if (er) return cb(er)
-
- registry.get(uri, null, next)
- })
+ getOnceFromRegistry(name, "addNameTag", next, cb)
function next (er, data, json, resp) {
- if (!er) {
- er = errorResponse(name, resp)
- }
+ if (!er) er = errorResponse(name, resp)
if (er) return cb(er)
+
+ log.silly("addNameTag", "next cb for", name, "with tag", tag)
+
engineFilter(data)
if (data["dist-tags"] && data["dist-tags"][tag]
&& data.versions[data["dist-tags"][tag]]) {
@@ -111,11 +111,7 @@ function addNameVersion (name, v, data, cb) {
return next()
}
- mapToRegistry(name, npm.config, function (er, uri) {
- if (er) return cb(er)
-
- registry.get(uri, null, setData)
- })
+ getOnceFromRegistry(name, "addNameVersion", setData, cb)
function setData (er, d, json, resp) {
if (!er) {
@@ -147,18 +143,27 @@ function addNameVersion (name, v, data, cb) {
}
// we got cached data, so let's see if we have a tarball.
- var pkgroot = path.join(npm.cache, name, ver)
+ var pkgroot = cachedPackageRoot({name : name, version : ver})
var pkgtgz = path.join(pkgroot, "package.tgz")
var pkgjson = path.join(pkgroot, "package", "package.json")
fs.stat(pkgtgz, function (er) {
if (!er) {
readJson(pkgjson, function (er, data) {
- er = needName(er, data)
- er = needVersion(er, data)
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR")
- return cb(er)
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+
+ // check the SHA of the package we have, to ensure it wasn't installed
+ // from somewhere other than the registry (eg, a fork)
+ if (data._shasum && dist.shasum && data._shasum !== dist.shasum) {
+ return fetchit()
+ }
+ }
+
if (er) return fetchit()
- return cb(null, data)
+ else return cb(null, data)
})
} else return fetchit()
})
@@ -193,17 +198,14 @@ function addNameVersion (name, v, data, cb) {
function addNameRange (name, range, data, cb) {
range = semver.validRange(range, true)
if (range === null) return cb(new Error(
- "Invalid version range: "+range))
+ "Invalid version range: " + range
+ ))
log.silly("addNameRange", {name:name, range:range, hasData:!!data})
if (data) return next()
- mapToRegistry(name, npm.config, function (er, uri) {
- if (er) return cb(er)
-
- registry.get(uri, null, setData)
- })
+ getOnceFromRegistry(name, "addNameRange", setData, cb)
function setData (er, d, json, resp) {
if (!er) {
@@ -271,15 +273,3 @@ function errorResponse (name, response) {
}
return er
}
-
-function needName(er, data) {
- return er ? er
- : (data && !data.name) ? new Error("No name provided")
- : null
-}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index 304d2f3..d8f3f1c 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -12,11 +12,9 @@ var mkdir = require("mkdirp")
, npm = require("../npm.js")
, rm = require("../utils/gently-rm.js")
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, getCacheStat = require("./get-stat.js")
, addLocalTarball = require("./add-local-tarball.js")
+ , writeStream = require("fs-write-stream-atomic")
// 1. cacheDir = path.join(cache,'_git-remotes',sha1(u))
@@ -26,17 +24,9 @@ var mkdir = require("mkdirp")
// 5. git archive /tmp/random.tgz
// 6. addLocalTarball(/tmp/random.tgz) --format=tar --prefix=package/
// silent flag is used if this should error quietly
-module.exports = function addRemoteGit (u, silent, cb_) {
+module.exports = function addRemoteGit (u, silent, cb) {
assert(typeof u === "string", "must have git URL")
- assert(typeof cb_ === "function", "must have callback")
-
- function cb (er, data) {
- unlock(u, function () { cb_(er, data) })
- }
-
- cb_ = inflight(u, cb_)
-
- if (!cb_) return
+ assert(typeof cb === "function", "must have callback")
log.verbose("addRemoteGit", "u=%j silent=%j", u, silent)
var parsed = url.parse(u, true)
@@ -56,23 +46,28 @@ module.exports = function addRemoteGit (u, silent, cb_) {
u = u.replace(/^ssh:\/\//, "")
}
- lock(u, function (er) {
- if (er) return cb(er)
+ cb = inflight(u, cb)
+ if (!cb) return log.verbose("addRemoteGit", u, "already in flight; waiting")
+ log.verbose("addRemoteGit", u, "not in flight; cloning")
+
+ // figure out what we should check out.
+ var co = parsed.hash && parsed.hash.substr(1) || "master"
- // figure out what we should check out.
- var co = parsed.hash && parsed.hash.substr(1) || "master"
+ var v = crypto.createHash("sha1").update(u).digest("hex").slice(0, 8)
+ v = u.replace(/[^a-zA-Z0-9]+/g, "-")+"-"+v
- var v = crypto.createHash("sha1").update(u).digest("hex").slice(0, 8)
- v = u.replace(/[^a-zA-Z0-9]+/g, "-")+"-"+v
+ log.verbose("addRemoteGit", [u, co])
- log.verbose("addRemoteGit", [u, co])
+ var p = path.join(npm.config.get("cache"), "_git-remotes", v)
- var p = path.join(npm.config.get("cache"), "_git-remotes", v)
+ // we don't need global templates when cloning. use this empty dir to specify as template dir
+ mkdir(path.join(npm.config.get("cache"), "_git-remotes", "_templates"), function (er) {
+ if (er) return cb(er)
+ checkGitDir(p, u, co, origUrl, silent, function (er, data) {
+ if (er) return cb(er, data)
- checkGitDir(p, u, co, origUrl, silent, function(er, data) {
- addModeRecursive(p, npm.modes.file, function(erAddMode) {
- if (er) return cb(er, data)
- return cb(erAddMode, data)
+ addModeRecursive(p, npm.modes.file, function (er) {
+ return cb(er, data)
})
})
})
@@ -110,7 +105,8 @@ function cloneGitRemote (p, u, co, origUrl, silent, cb) {
mkdir(p, function (er) {
if (er) return cb(er)
- var args = [ "clone", "--mirror", u, p ]
+ var args = [ "clone", "--template=" + path.join(npm.config.get("cache"),
+ "_git_remotes", "_templates"), "--mirror", u, p ]
var env = gitEnv()
// check for git
@@ -146,10 +142,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
}
log.verbose("git fetch -a origin ("+u+")", stdout)
tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
- verifyOwnership()
- })
- function verifyOwnership() {
if (process.platform === "win32") {
log.silly("verifyOwnership", "skipping for windows")
resolveHead()
@@ -168,7 +161,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
})
})
}
- }
+ })
function resolveHead () {
git.whichAndExec(resolve, {cwd: p, env: env}, function (er, stdout, stderr) {
@@ -205,7 +198,7 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
if (er) return cb(er)
var gzip = zlib.createGzip({ level: 9 })
var args = ["archive", co, "--format=tar", "--prefix=package/"]
- var out = fs.createWriteStream(tmp)
+ var out = writeStream(tmp)
var env = gitEnv()
cb = once(cb)
var cp = git.spawn(args, { env: env, cwd: p })
@@ -231,7 +224,7 @@ function gitEnv () {
if (gitEnv_) return gitEnv_
gitEnv_ = {}
for (var k in process.env) {
- if (!~["GIT_PROXY_COMMAND","GIT_SSH","GIT_SSL_NO_VERIFY"].indexOf(k) && k.match(/^GIT/)) continue
+ if (!~["GIT_PROXY_COMMAND","GIT_SSH","GIT_SSL_NO_VERIFY","GIT_SSL_CAINFO"].indexOf(k) && k.match(/^GIT/)) continue
gitEnv_[k] = process.env[k]
}
return gitEnv_
@@ -261,11 +254,11 @@ function addModeRecursive(p, mode, cb) {
}
function addMode(p, mode, cb) {
- fs.stat(p, function (er, stats) {
- if (er) return cb(er)
- mode = stats.mode | mode
- fs.chmod(p, mode, cb)
- })
+ fs.stat(p, function (er, stats) {
+ if (er) return cb(er)
+ mode = stats.mode | mode
+ fs.chmod(p, mode, cb)
+ })
}
// taken from https://github.com/isaacs/chmodr/blob/master/chmodr.js
@@ -275,4 +268,3 @@ function dirMode(mode) {
if (mode & parseInt( "04", 8)) mode |= parseInt( "01", 8)
return mode
}
-
diff --git a/deps/npm/lib/cache/add-remote-tarball.js b/deps/npm/lib/cache/add-remote-tarball.js
index 2c7d013..9591ba8 100644
--- a/deps/npm/lib/cache/add-remote-tarball.js
+++ b/deps/npm/lib/cache/add-remote-tarball.js
@@ -4,13 +4,10 @@ var mkdir = require("mkdirp")
, path = require("path")
, sha = require("sha")
, retry = require("retry")
- , createWriteStream = require("graceful-fs").createWriteStream
+ , createWriteStream = require("fs-write-stream-atomic")
, npm = require("../npm.js")
, registry = npm.registry
, inflight = require("inflight")
- , locker = require("../utils/locker.js")
- , lock = locker.lock
- , unlock = locker.unlock
, addLocalTarball = require("./add-local-tarball.js")
, cacheFile = require("npm-cache-filename")
@@ -26,14 +23,12 @@ function addRemoteTarball (u, pkgData, shasum, cb_) {
data._shasum = data._shasum || shasum
data._resolved = u
}
- unlock(u, function () {
- cb_(er, data)
- })
+ cb_(er, data)
}
cb_ = inflight(u, cb_)
-
- if (!cb_) return
+ if (!cb_) return log.verbose("addRemoteTarball", u, "already in flight; waiting")
+ log.verbose("addRemoteTarball", u, "not in flight; adding")
// XXX Fetch direct to cache location, store tarballs under
// ${cache}/registry.npmjs.org/pkg/-/pkg-1.2.3.tgz
@@ -44,25 +39,22 @@ function addRemoteTarball (u, pkgData, shasum, cb_) {
addLocalTarball(tmp, pkgData, shasum, cb)
}
- lock(u, function (er) {
+ log.verbose("addRemoteTarball", [u, shasum])
+ mkdir(path.dirname(tmp), function (er) {
if (er) return cb(er)
-
- log.verbose("addRemoteTarball", [u, shasum])
- mkdir(path.dirname(tmp), function (er) {
- if (er) return cb(er)
- addRemoteTarball_(u, tmp, shasum, next)
- })
+ addRemoteTarball_(u, tmp, shasum, next)
})
}
function addRemoteTarball_(u, tmp, shasum, cb) {
// Tuned to spread 3 attempts over about a minute.
// See formula at .
- var operation = retry.operation
- ( { retries: npm.config.get("fetch-retries")
- , factor: npm.config.get("fetch-retry-factor")
- , minTimeout: npm.config.get("fetch-retry-mintimeout")
- , maxTimeout: npm.config.get("fetch-retry-maxtimeout") })
+ var operation = retry.operation({
+ retries: npm.config.get("fetch-retries")
+ , factor: npm.config.get("fetch-retry-factor")
+ , minTimeout: npm.config.get("fetch-retry-mintimeout")
+ , maxTimeout: npm.config.get("fetch-retry-maxtimeout")
+ })
operation.attempt(function (currentAttempt) {
log.info("retry", "fetch attempt " + currentAttempt
diff --git a/deps/npm/lib/cache/cached-package-root.js b/deps/npm/lib/cache/cached-package-root.js
new file mode 100644
index 0000000..7163314
--- /dev/null
+++ b/deps/npm/lib/cache/cached-package-root.js
@@ -0,0 +1,14 @@
+var assert = require("assert")
+var resolve = require("path").resolve
+
+var npm = require("../npm.js")
+
+module.exports = getCacheRoot
+
+function getCacheRoot (data) {
+ assert(data, "must pass package metadata")
+ assert(data.name, "package metadata must include name")
+ assert(data.version, "package metadata must include version")
+
+ return resolve(npm.cache, data.name, data.version)
+}
diff --git a/deps/npm/lib/cache/get-stat.js b/deps/npm/lib/cache/get-stat.js
index 372a86d..45b60ce 100644
--- a/deps/npm/lib/cache/get-stat.js
+++ b/deps/npm/lib/cache/get-stat.js
@@ -10,9 +10,6 @@ var cacheStat = null
module.exports = function getCacheStat (cb) {
if (cacheStat) return cb(null, cacheStat)
- cb = inflight("getCacheStat", cb)
- if (!cb) return
-
fs.stat(npm.cache, function (er, st) {
if (er) return makeCacheDir(cb)
if (!st.isDirectory()) {
@@ -24,6 +21,10 @@ module.exports = function getCacheStat (cb) {
}
function makeCacheDir (cb) {
+ cb = inflight("makeCacheDir", cb)
+ if (!cb) return log.verbose("getCacheStat", "cache creation already in flight; waiting")
+ log.verbose("getCacheStat", "cache creation not in flight; initializing")
+
if (!process.getuid) return mkdir(npm.cache, function (er) {
return cb(er, {})
})
diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js
index 5c1098a..1d26ffc 100644
--- a/deps/npm/lib/completion.js
+++ b/deps/npm/lib/completion.js
@@ -6,7 +6,7 @@ completion.usage = "npm completion >> ~/.bashrc\n"
+ "source <(npm completion)"
var npm = require("./npm.js")
- , npmconf = require("npmconf")
+ , npmconf = require("./config/core.js")
, configDefs = npmconf.defs
, configTypes = configDefs.types
, shorthands = configDefs.shorthands
@@ -229,7 +229,7 @@ function configCompl (opts, cb) {
// expand with the valid values of various config values.
// not yet implemented.
function configValueCompl (opts, cb) {
- console.error('configValue', opts)
+ console.error("configValue", opts)
return cb(null, [])
}
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index 8dc814a..f51156a 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -11,8 +11,9 @@ config.usage = "npm config set "
var log = require("npmlog")
, npm = require("./npm.js")
+ , npmconf = require("./config/core.js")
, fs = require("graceful-fs")
- , npmconf = require("npmconf")
+ , writeFileAtomic = require("write-file-atomic")
, types = npmconf.defs.types
, ini = require("ini")
, editor = require("editor")
@@ -88,17 +89,16 @@ function edit (cb) {
if (key === "logstream") return arr
return arr.concat(
ini.stringify(obj)
- .replace(/\n$/m, '')
- .replace(/^/g, '; ')
- .replace(/\n/g, '\n; ')
- .split('\n'))
+ .replace(/\n$/m, "")
+ .replace(/^/g, "; ")
+ .replace(/\n/g, "\n; ")
+ .split("\n"))
}, []))
.concat([""])
.join(os.EOL)
- fs.writeFile
+ writeFileAtomic
( f
, data
- , "utf8"
, function (er) {
if (er) return cb(er)
editor(f, { editor: e }, cb)
diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/lib/config/core.js
similarity index 68%
rename from deps/npm/node_modules/npmconf/npmconf.js
rename to deps/npm/lib/config/core.js
index 7607b50..6c61125 100644
--- a/deps/npm/node_modules/npmconf/npmconf.js
+++ b/deps/npm/lib/config/core.js
@@ -1,15 +1,15 @@
-var CC = require('config-chain').ConfigChain
-var inherits = require('inherits')
-var configDefs = require('./config-defs.js')
+var CC = require("config-chain").ConfigChain
+var inherits = require("inherits")
+var configDefs = require("./defaults.js")
var types = configDefs.types
-var once = require('once')
-var fs = require('fs')
-var path = require('path')
-var nopt = require('nopt')
-var ini = require('ini')
+var once = require("once")
+var fs = require("fs")
+var path = require("path")
+var nopt = require("nopt")
+var ini = require("ini")
var Octal = configDefs.Octal
-var mkdirp = require('mkdirp')
+var mkdirp = require("mkdirp")
exports.load = load
exports.Conf = Conf
@@ -18,11 +18,11 @@ exports.rootConf = null
exports.usingBuiltin = false
exports.defs = configDefs
-Object.defineProperty(exports, 'defaults', { get: function () {
+Object.defineProperty(exports, "defaults", { get: function () {
return configDefs.defaults
}, enumerable: true })
-Object.defineProperty(exports, 'types', { get: function () {
+Object.defineProperty(exports, "types", { get: function () {
return configDefs.types
}, enumerable: true })
@@ -36,13 +36,13 @@ var myGid = process.env.SUDO_GID !== undefined
var loading = false
var loadCbs = []
-function load (cli_, builtin_, cb_) {
+function load () {
var cli, builtin, cb
for (var i = 0; i < arguments.length; i++)
switch (typeof arguments[i]) {
- case 'string': builtin = arguments[i]; break
- case 'object': cli = arguments[i]; break
- case 'function': cb = arguments[i]; break
+ case "string": builtin = arguments[i]; break
+ case "object": cli = arguments[i]; break
+ case "function": cb = arguments[i]; break
}
if (!cb)
@@ -85,13 +85,14 @@ function load (cli_, builtin_, cb_) {
exports.usingBuiltin = !!builtin
var rc = exports.rootConf = new Conf()
if (builtin)
- rc.addFile(builtin, 'builtin')
+ rc.addFile(builtin, "builtin")
else
- rc.add({}, 'builtin')
+ rc.add({}, "builtin")
- rc.on('load', function () {
+ rc.on("load", function () {
load_(builtin, rc, cli, cb)
})
+ rc.on("error", cb)
}
function load_(builtin, rc, cli, cb) {
@@ -99,7 +100,7 @@ function load_(builtin, rc, cli, cb) {
var conf = new Conf(rc)
conf.usingBuiltin = !!builtin
- conf.add(cli, 'cli')
+ conf.add(cli, "cli")
conf.addEnv()
conf.loadPrefix(function(er) {
@@ -122,24 +123,24 @@ function load_(builtin, rc, cli, cb) {
// the default or resolved userconfig value. npm will log a "verbose"
// message about this when it happens, but it is a rare enough edge case
// that we don't have to be super concerned about it.
- var projectConf = path.resolve(conf.localPrefix, '.npmrc')
- var defaultUserConfig = rc.get('userconfig')
- var resolvedUserConfig = conf.get('userconfig')
- if (!conf.get('global') &&
+ var projectConf = path.resolve(conf.localPrefix, ".npmrc")
+ var defaultUserConfig = rc.get("userconfig")
+ var resolvedUserConfig = conf.get("userconfig")
+ if (!conf.get("global") &&
projectConf !== defaultUserConfig &&
projectConf !== resolvedUserConfig) {
- conf.addFile(projectConf, 'project')
- conf.once('load', afterPrefix)
+ conf.addFile(projectConf, "project")
+ conf.once("load", afterPrefix)
} else {
- conf.add({}, 'project')
+ conf.add({}, "project")
afterPrefix()
}
})
function afterPrefix() {
- conf.addFile(conf.get('userconfig'), 'user')
- conf.once('error', cb)
- conf.once('load', afterUser)
+ conf.addFile(conf.get("userconfig"), "user")
+ conf.once("error", cb)
+ conf.once("load", afterUser)
}
function afterUser () {
@@ -148,18 +149,18 @@ function load_(builtin, rc, cli, cb) {
// Eg, `npm config get globalconfig --prefix ~/local` should
// return `~/local/etc/npmrc`
// annoying humans and their expectations!
- if (conf.get('prefix')) {
- var etc = path.resolve(conf.get('prefix'), 'etc')
- defaults.globalconfig = path.resolve(etc, 'npmrc')
- defaults.globalignorefile = path.resolve(etc, 'npmignore')
+ if (conf.get("prefix")) {
+ var etc = path.resolve(conf.get("prefix"), "etc")
+ defaults.globalconfig = path.resolve(etc, "npmrc")
+ defaults.globalignorefile = path.resolve(etc, "npmignore")
}
- conf.addFile(conf.get('globalconfig'), 'global')
+ conf.addFile(conf.get("globalconfig"), "global")
// move the builtin into the conf stack now.
conf.root = defaults
- conf.add(rc.shift(), 'builtin')
- conf.once('load', function () {
+ conf.add(rc.shift(), "builtin")
+ conf.once("load", function () {
conf.loadExtras(afterExtras)
})
}
@@ -171,7 +172,7 @@ function load_(builtin, rc, cli, cb) {
// warn about invalid bits.
validate(conf)
- var cafile = conf.get('cafile')
+ var cafile = conf.get("cafile")
if (cafile) {
return conf.loadCAFile(cafile, finalize)
@@ -211,13 +212,13 @@ function Conf (base) {
this.root = configDefs.defaults
}
-Conf.prototype.loadPrefix = require('./lib/load-prefix.js')
-Conf.prototype.loadCAFile = require('./lib/load-cafile.js')
-Conf.prototype.loadUid = require('./lib/load-uid.js')
-Conf.prototype.setUser = require('./lib/set-user.js')
-Conf.prototype.findPrefix = require('./lib/find-prefix.js')
-Conf.prototype.getCredentialsByURI = require('./lib/get-credentials-by-uri.js')
-Conf.prototype.setCredentialsByURI = require('./lib/set-credentials-by-uri.js')
+Conf.prototype.loadPrefix = require("./load-prefix.js")
+Conf.prototype.loadCAFile = require("./load-cafile.js")
+Conf.prototype.loadUid = require("./load-uid.js")
+Conf.prototype.setUser = require("./set-user.js")
+Conf.prototype.findPrefix = require("./find-prefix.js")
+Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js")
+Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js")
Conf.prototype.loadExtras = function(cb) {
this.setUser(function(er) {
@@ -235,17 +236,17 @@ Conf.prototype.loadExtras = function(cb) {
Conf.prototype.save = function (where, cb) {
var target = this.sources[where]
if (!target || !(target.path || target.source) || !target.data) {
- if (where !== 'builtin')
- var er = new Error('bad save target: ' + where)
+ if (where !== "builtin")
+ var er = new Error("bad save target: " + where)
if (cb) {
process.nextTick(cb.bind(null, er))
return this
}
- return this.emit('error', er)
+ return this.emit("error", er)
}
if (target.source) {
- var pref = target.prefix || ''
+ var pref = target.prefix || ""
Object.keys(target.data).forEach(function (k) {
target.source[pref + k] = target.data[k]
})
@@ -259,9 +260,9 @@ Conf.prototype.save = function (where, cb) {
done = done.bind(this)
this._saving ++
- var mode = where === 'user' ? "0600" : "0666"
+ var mode = where === "user" ? "0600" : "0666"
if (!data.trim()) {
- fs.unlink(target.path, function (er) {
+ fs.unlink(target.path, function () {
// ignore the possible error (e.g. the file doesn't exist)
done(null)
})
@@ -269,10 +270,10 @@ Conf.prototype.save = function (where, cb) {
mkdirp(path.dirname(target.path), function (er) {
if (er)
return then(er)
- fs.writeFile(target.path, data, 'utf8', function (er) {
+ fs.writeFile(target.path, data, "utf8", function (er) {
if (er)
return then(er)
- if (where === 'user' && myUid && myGid)
+ if (where === "user" && myUid && myGid)
fs.chown(target.path, +myUid, +myGid, then)
else
then()
@@ -289,12 +290,12 @@ Conf.prototype.save = function (where, cb) {
function done (er) {
if (er) {
if (cb) return cb(er)
- else return this.emit('error', er)
+ else return this.emit("error", er)
}
this._saving --
if (this._saving === 0) {
if (cb) cb()
- this.emit('save')
+ this.emit("save")
}
}
@@ -304,26 +305,32 @@ Conf.prototype.save = function (where, cb) {
Conf.prototype.addFile = function (file, name) {
name = name || file
var marker = {__source__:name}
- this.sources[name] = { path: file, type: 'ini' }
+ this.sources[name] = { path: file, type: "ini" }
this.push(marker)
this._await()
- fs.readFile(file, 'utf8', function (er, data) {
+ fs.readFile(file, "utf8", function (er, data) {
if (er) // just ignore missing files.
return this.add({}, marker)
- this.addString(data, file, 'ini', marker)
+ this.addString(data, file, "ini", marker)
}.bind(this))
return this
}
// always ini files.
Conf.prototype.parse = function (content, file) {
- return CC.prototype.parse.call(this, content, file, 'ini')
+ return CC.prototype.parse.call(this, content, file, "ini")
}
Conf.prototype.add = function (data, marker) {
- Object.keys(data).forEach(function (k) {
- data[k] = parseField(data[k], k)
- })
+ try {
+ Object.keys(data).forEach(function (k) {
+ data[k] = parseField(data[k], k)
+ })
+ }
+ catch (e) {
+ this.emit("error", e)
+ return this
+ }
return CC.prototype.add.call(this, data, marker)
}
@@ -339,15 +346,15 @@ Conf.prototype.addEnv = function (env) {
// leave first char untouched, even if
// it is a "_" - convert all other to "-"
var p = k.toLowerCase()
- .replace(/^npm_config_/, '')
- .replace(/(?!^)_/g, '-')
+ .replace(/^npm_config_/, "")
+ .replace(/(?!^)_/g, "-")
conf[p] = env[k]
})
- return CC.prototype.addEnv.call(this, '', conf, 'env')
+ return CC.prototype.addEnv.call(this, "", conf, "env")
}
function parseField (f, k) {
- if (typeof f !== 'string' && !(f instanceof String))
+ if (typeof f !== "string" && !(f instanceof String))
return f
// type can be an array or single thing.
@@ -358,25 +365,31 @@ function parseField (f, k) {
var isOctal = -1 !== typeList.indexOf(Octal)
var isNumber = isOctal || (-1 !== typeList.indexOf(Number))
- f = (''+f).trim()
+ f = (""+f).trim()
- if (f.match(/^".*"$/))
- f = JSON.parse(f)
+ if (f.match(/^".*"$/)) {
+ try {
+ f = JSON.parse(f)
+ }
+ catch (e) {
+ throw new Error("Failed parsing JSON config key " + k + ": " + f)
+ }
+ }
- if (isBool && !isString && f === '')
+ if (isBool && !isString && f === "")
return true
switch (f) {
- case 'true': return true
- case 'false': return false
- case 'null': return null
- case 'undefined': return undefined
+ case "true": return true
+ case "false": return false
+ case "null": return null
+ case "undefined": return undefined
}
f = envReplace(f)
if (isPath) {
- var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
+ var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//
if (f.match(homePattern) && process.env.HOME) {
f = path.resolve(process.env.HOME, f.substr(2))
}
@@ -390,7 +403,7 @@ function parseField (f, k) {
}
function envReplace (f) {
- if (typeof f !== 'string' || !f) return f
+ if (typeof f !== "string" || !f) return f
// replace any ${ENV} values with the appropriate environ.
var envExpr = /(\\*)\$\{([^}]+)\}/g
@@ -399,7 +412,7 @@ function envReplace (f) {
if (esc)
return orig
if (undefined === process.env[name])
- throw new Error('Failed to replace env in config: '+orig)
+ throw new Error("Failed to replace env in config: "+orig)
return process.env[name]
})
}
diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/lib/config/defaults.js
similarity index 95%
rename from deps/npm/node_modules/npmconf/config-defs.js
rename to deps/npm/lib/config/defaults.js
index b0b4acf..7bd6721 100644
--- a/deps/npm/node_modules/npmconf/config-defs.js
+++ b/deps/npm/lib/config/defaults.js
@@ -16,7 +16,7 @@ try {
} catch (er) {
var util = require("util")
log = { warn: function (m) {
- console.warn(m + ' ' + util.format.apply(util, [].slice.call(arguments, 1)))
+ console.warn(m + " " + util.format.apply(util, [].slice.call(arguments, 1)))
} }
}
@@ -41,7 +41,7 @@ function validateSemver (data, k, val) {
}
function validateTag (data, k, val) {
- val = ('' + val).trim()
+ val = ("" + val).trim()
if (!val || semver.validRange(val)) return false
data[k] = val
}
@@ -126,8 +126,8 @@ Object.defineProperty(exports, "defaults", {get: function () {
}
}
- return defaults =
- { "always-auth" : false
+ defaults = {
+ "always-auth" : false
, "bin-links" : true
, browser : null
@@ -168,11 +168,11 @@ Object.defineProperty(exports, "defaults", {get: function () {
, heading: "npm"
, "ignore-scripts": false
, "init-module": path.resolve(home, ".npm-init.js")
- , "init.author.name" : ""
- , "init.author.email" : ""
- , "init.author.url" : ""
- , "init.version": "1.0.0"
- , "init.license": "ISC"
+ , "init-author-name" : ""
+ , "init-author-email" : ""
+ , "init-author-url" : ""
+ , "init-version": "1.0.0"
+ , "init-license": "ISC"
, json: false
, key: null
, link: false
@@ -231,7 +231,9 @@ Object.defineProperty(exports, "defaults", {get: function () {
, viewer: process.platform === "win32" ? "browser" : "man"
, _exit : true
- }
+ }
+
+ return defaults
}})
exports.types =
@@ -268,11 +270,11 @@ exports.types =
, "heading": String
, "ignore-scripts": Boolean
, "init-module": path
- , "init.author.name" : String
- , "init.author.email" : String
- , "init.author.url" : ["", url]
- , "init.license": String
- , "init.version": semver
+ , "init-author-name" : String
+ , "init-author-email" : String
+ , "init-author-url" : ["", url]
+ , "init-license": String
+ , "init-version": semver
, json: Boolean
, key: [null, String]
, link: Boolean
diff --git a/deps/npm/node_modules/npmconf/lib/find-prefix.js b/deps/npm/lib/config/find-prefix.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/lib/find-prefix.js
rename to deps/npm/lib/config/find-prefix.js
diff --git a/deps/npm/node_modules/npmconf/lib/get-credentials-by-uri.js b/deps/npm/lib/config/get-credentials-by-uri.js
similarity index 75%
rename from deps/npm/node_modules/npmconf/lib/get-credentials-by-uri.js
rename to deps/npm/lib/config/get-credentials-by-uri.js
index 6fb8f31..26a7f43 100644
--- a/deps/npm/node_modules/npmconf/lib/get-credentials-by-uri.js
+++ b/deps/npm/lib/config/get-credentials-by-uri.js
@@ -9,7 +9,16 @@ function getCredentialsByURI (uri) {
var nerfed = toNerfDart(uri)
var defnerf = toNerfDart(this.get("registry"))
- var c = {scope : nerfed}
+ // hidden class micro-optimization
+ var c = {
+ scope : nerfed,
+ token : undefined,
+ password : undefined,
+ username : undefined,
+ email : undefined,
+ auth : undefined,
+ alwaysAuth : undefined
+ }
if (this.get(nerfed + ":_authToken")) {
c.token = this.get(nerfed + ":_authToken")
@@ -49,6 +58,13 @@ function getCredentialsByURI (uri) {
c.email = this.get("email")
}
+ if (this.get(nerfed + ":always-auth") !== undefined) {
+ var val = this.get(nerfed + ":always-auth")
+ c.alwaysAuth = val === "false" ? false : !!val
+ } else if (this.get("always-auth") !== undefined) {
+ c.alwaysAuth = this.get("always-auth")
+ }
+
if (c.username && c.password) {
c.auth = new Buffer(c.username + ":" + c.password).toString("base64")
}
diff --git a/deps/npm/node_modules/npmconf/lib/load-cafile.js b/deps/npm/lib/config/load-cafile.js
similarity index 72%
rename from deps/npm/node_modules/npmconf/lib/load-cafile.js
rename to deps/npm/lib/config/load-cafile.js
index b8c9fff..dc1ff9f 100644
--- a/deps/npm/node_modules/npmconf/lib/load-cafile.js
+++ b/deps/npm/lib/config/load-cafile.js
@@ -1,18 +1,18 @@
module.exports = loadCAFile
-var fs = require('fs')
+var fs = require("fs")
function loadCAFile(cafilePath, cb) {
if (!cafilePath)
return process.nextTick(cb)
- fs.readFile(cafilePath, 'utf8', afterCARead.bind(this))
+ fs.readFile(cafilePath, "utf8", afterCARead.bind(this))
function afterCARead(er, cadata) {
if (er)
return cb(er)
- var delim = '-----END CERTIFICATE-----'
+ var delim = "-----END CERTIFICATE-----"
var output
output = cadata
@@ -24,8 +24,7 @@ function loadCAFile(cafilePath, cb) {
return xs.trimLeft() + delim
})
- this.set('ca', output)
+ this.set("ca", output)
cb(null)
}
-
}
diff --git a/deps/npm/node_modules/npmconf/lib/load-prefix.js b/deps/npm/lib/config/load-prefix.js
similarity index 89%
rename from deps/npm/node_modules/npmconf/lib/load-prefix.js
rename to deps/npm/lib/config/load-prefix.js
index bb39d9c..39d076f 100644
--- a/deps/npm/node_modules/npmconf/lib/load-prefix.js
+++ b/deps/npm/lib/config/load-prefix.js
@@ -1,7 +1,7 @@
module.exports = loadPrefix
var findPrefix = require("./find-prefix.js")
-var path = require('path')
+var path = require("path")
function loadPrefix (cb) {
var cli = this.list[0]
@@ -9,7 +9,7 @@ function loadPrefix (cb) {
Object.defineProperty(this, "prefix",
{ set : function (prefix) {
var g = this.get("global")
- this[g ? 'globalPrefix' : 'localPrefix'] = prefix
+ this[g ? "globalPrefix" : "localPrefix"] = prefix
}.bind(this)
, get : function () {
var g = this.get("global")
@@ -20,7 +20,7 @@ function loadPrefix (cb) {
Object.defineProperty(this, "globalPrefix",
{ set : function (prefix) {
- this.set('prefix', prefix)
+ this.set("prefix", prefix)
}.bind(this)
, get : function () {
return path.resolve(this.get("prefix"))
@@ -44,6 +44,6 @@ function loadPrefix (cb) {
findPrefix(process.cwd(), function (er, found) {
p = found
cb(er)
- }.bind(this))
+ })
}
}
diff --git a/deps/npm/node_modules/npmconf/lib/load-uid.js b/deps/npm/lib/config/load-uid.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/lib/load-uid.js
rename to deps/npm/lib/config/load-uid.js
diff --git a/deps/npm/node_modules/npmconf/lib/nerf-dart.js b/deps/npm/lib/config/nerf-dart.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/lib/nerf-dart.js
rename to deps/npm/lib/config/nerf-dart.js
diff --git a/deps/npm/node_modules/npmconf/lib/set-credentials-by-uri.js b/deps/npm/lib/config/set-credentials-by-uri.js
similarity index 62%
rename from deps/npm/node_modules/npmconf/lib/set-credentials-by-uri.js
rename to deps/npm/lib/config/set-credentials-by-uri.js
index 2fa0d19..31eab44 100644
--- a/deps/npm/node_modules/npmconf/lib/set-credentials-by-uri.js
+++ b/deps/npm/lib/config/set-credentials-by-uri.js
@@ -12,9 +12,10 @@ function setCredentialsByURI (uri, c) {
if (c.token) {
this.set(nerfed + ":_authToken", c.token, "user")
- this.del(nerfed + ":_password", "user")
- this.del(nerfed + ":username", "user")
- this.del(nerfed + ":email", "user")
+ this.del(nerfed + ":_password", "user")
+ this.del(nerfed + ":username", "user")
+ this.del(nerfed + ":email", "user")
+ this.del(nerfed + ":always-auth", "user")
}
else if (c.username || c.password || c.email) {
assert(c.username, "must include username")
@@ -24,9 +25,16 @@ function setCredentialsByURI (uri, c) {
this.del(nerfed + ":_authToken", "user")
var encoded = new Buffer(c.password, "utf8").toString("base64")
- this.set(nerfed + ":_password", encoded, "user")
+ this.set(nerfed + ":_password", encoded, "user")
this.set(nerfed + ":username", c.username, "user")
- this.set(nerfed + ":email", c.email, "user")
+ this.set(nerfed + ":email", c.email, "user")
+
+ if (c.alwaysAuth !== undefined) {
+ this.set(nerfed + ":always-auth", c.alwaysAuth, "user")
+ }
+ else {
+ this.del(nerfed + ":always-auth", "user")
+ }
}
else {
throw new Error("No credentials to set.")
diff --git a/deps/npm/node_modules/npmconf/lib/set-user.js b/deps/npm/lib/config/set-user.js
similarity index 63%
rename from deps/npm/node_modules/npmconf/lib/set-user.js
rename to deps/npm/lib/config/set-user.js
index cf29b1a..4c207a6 100644
--- a/deps/npm/node_modules/npmconf/lib/set-user.js
+++ b/deps/npm/lib/config/set-user.js
@@ -1,9 +1,9 @@
module.exports = setUser
-var Conf = require('../npmconf.js').Conf
-var assert = require('assert')
-var path = require('path')
-var fs = require('fs')
+var assert = require("assert")
+var path = require("path")
+var fs = require("fs")
+var mkdirp = require("mkdirp")
function setUser (cb) {
var defaultConf = this.root
@@ -19,8 +19,11 @@ function setUser (cb) {
}
var prefix = path.resolve(this.get("prefix"))
- fs.stat(prefix, function (er, st) {
- defaultConf.user = st && st.uid
- return cb(er)
+ mkdirp(prefix, function (er) {
+ if (er) return cb(er)
+ fs.stat(prefix, function (er, st) {
+ defaultConf.user = st && st.uid
+ return cb(er)
+ })
})
}
diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js
index 767d9a8..e87e839 100644
--- a/deps/npm/lib/explore.js
+++ b/deps/npm/lib/explore.js
@@ -27,7 +27,7 @@ function explore (args, cb) {
"Type 'exit' or ^D when finished\n")
npm.spinner.stop()
- var shell = spawn(sh, args, { cwd: cwd, customFds: [0, 1, 2] })
+ var shell = spawn(sh, args, { cwd: cwd, stdio: "inherit" })
shell.on("close", function (er) {
// only fail if non-interactive.
if (!args.length) return cb()
diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js
index 8f54d69..747bd50 100644
--- a/deps/npm/lib/help.js
+++ b/deps/npm/lib/help.js
@@ -31,7 +31,7 @@ function help (args, cb) {
// npm help : show basic usage
if (!section) {
- var valid = argv[0] === 'help' ? 0 : 1
+ var valid = argv[0] === "help" ? 0 : 1
return npmUsage(valid, cb)
}
@@ -111,7 +111,7 @@ function viewMan (man, cb) {
switch (viewer) {
case "woman":
var a = ["-e", "(woman-find-file \"" + man + "\")"]
- conf = { env: env, customFds: [ 0, 1, 2] }
+ conf = { env: env, stdio: "inherit" }
var woman = spawn("emacsclient", a, conf)
woman.on("close", cb)
break
@@ -121,7 +121,7 @@ function viewMan (man, cb) {
break
default:
- conf = { env: env, customFds: [ 0, 1, 2] }
+ conf = { env: env, stdio: "inherit" }
var manProcess = spawn("man", [num, section], conf)
manProcess.on("close", cb)
break
@@ -153,8 +153,8 @@ function htmlMan (man) {
function npmUsage (valid, cb) {
npm.config.set("loglevel", "silent")
log.level = "silent"
- console.log
- ( ["\nUsage: npm "
+ console.log(
+ [ "\nUsage: npm "
, ""
, "where is one of:"
, npm.config.get("long") ? usages()
@@ -196,7 +196,7 @@ function usages () {
function wrap (arr) {
- var out = ['']
+ var out = [""]
, l = 0
, line
@@ -209,9 +209,9 @@ function wrap (arr) {
arr.sort(function (a,b) { return a --save` afterwards to install a package and"
- ,"save it as a dependency in the package.json file."
- ,""
- ,"Press ^C at any time to quit."
- ].join("\n"))
-
+ var initFile = npm.config.get("init-module")
+ if (!initJson.yes(npm.config)) {
+ console.log(
+ ["This utility will walk you through creating a package.json file."
+ ,"It only covers the most common items, and tries to guess sane defaults."
+ ,""
+ ,"See `npm help json` for definitive documentation on these fields"
+ ,"and exactly what they do."
+ ,""
+ ,"Use `npm install --save` afterwards to install a package and"
+ ,"save it as a dependency in the package.json file."
+ ,""
+ ,"Press ^C at any time to quit."
+ ].join("\n"))
+ }
initJson(dir, initFile, npm.config, function (er, data) {
log.resume()
- log.silly('package data', data)
- log.info('init', 'written successfully')
- if (er && er.message === 'canceled') {
- log.warn('init', 'canceled')
+ log.silly("package data", data)
+ log.info("init", "written successfully")
+ if (er && er.message === "canceled") {
+ log.warn("init", "canceled")
return cb(null, data)
}
cb(er, data)
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 82d8725..e539307 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -73,6 +73,7 @@ var npm = require("./npm.js")
, log = require("npmlog")
, path = require("path")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, cache = require("./cache.js")
, asyncMap = require("slide").asyncMap
, chain = require("slide").chain
@@ -84,6 +85,10 @@ var npm = require("./npm.js")
, sortedObject = require("sorted-object")
, mapToRegistry = require("./utils/map-to-registry.js")
, npa = require("npm-package-arg")
+ , inflight = require("inflight")
+ , locker = require("./utils/locker.js")
+ , lock = locker.lock
+ , unlock = locker.unlock
function install (args, cb_) {
var hasArguments = !!args.length
@@ -143,6 +148,22 @@ function install (args, cb_) {
}
var deps = Object.keys(data.dependencies || {})
log.verbose("install", "where, deps", [where, deps])
+
+ // FIXME: Install peerDependencies as direct dependencies, but only at
+ // the top level. Should only last until peerDependencies are nerfed to
+ // no longer implicitly install themselves.
+ var peers = []
+ Object.keys(data.peerDependencies || {}).forEach(function (dep) {
+ if (!data.dependencies[dep]) {
+ log.verbose(
+ "install",
+ "peerDependency", dep, "wasn't going to be installed; adding"
+ )
+ peers.push(dep)
+ }
+ })
+ log.verbose("install", "where, peers", [where, peers])
+
var context = { family: {}
, ancestors: {}
, explicit: false
@@ -160,10 +181,12 @@ function install (args, cb_) {
installManyTop(deps.map(function (dep) {
var target = data.dependencies[dep]
- target = dep + "@" + target
- return target
- }), where, context, function(er, results) {
- if (er) return cb(er, results)
+ return dep + "@" + target
+ }).concat(peers.map(function (dep) {
+ var target = data.peerDependencies[dep]
+ return dep + "@" + target
+ })), where, context, function(er, results) {
+ if (er || npm.config.get("production")) return cb(er, results)
lifecycle(data, "prepublish", where, function(er) {
return cb(er, results)
})
@@ -205,7 +228,7 @@ function findPeerInvalid (where, cb) {
function findPeerInvalid_ (packageMap, fpiList) {
if (fpiList.indexOf(packageMap) !== -1)
- return
+ return undefined
fpiList.push(packageMap)
@@ -260,7 +283,13 @@ function readDependencies (context, where, opts, cb) {
if (opts && opts.dev) {
if (!data.dependencies) data.dependencies = {}
Object.keys(data.devDependencies || {}).forEach(function (k) {
- data.dependencies[k] = data.devDependencies[k]
+ if (data.dependencies[k]) {
+ log.warn("package.json", "Dependency '%s' exists in both dependencies " +
+ "and devDependencies, using '%s@%s' from dependencies",
+ k, k, data.dependencies[k])
+ } else {
+ data.dependencies[k] = data.devDependencies[k]
+ }
})
}
@@ -292,11 +321,9 @@ function readDependencies (context, where, opts, cb) {
var wrapfile = path.resolve(where, "npm-shrinkwrap.json")
fs.readFile(wrapfile, "utf8", function (er, wrapjson) {
- if (er) {
- log.verbose("readDependencies", "using package.json deps")
- return cb(null, data, null)
- }
+ if (er) return cb(null, data, null)
+ log.verbose("readDependencies", "npm-shrinkwrap.json is overriding dependencies")
var newwrap
try {
newwrap = JSON.parse(wrapjson)
@@ -346,7 +373,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
}
var saveBundle = npm.config.get("save-bundle")
- var savePrefix = npm.config.get("save-prefix") || "^"
+ var savePrefix = npm.config.get("save-prefix")
// each item in the tree is a top-level thing that should be saved
// to the package.json file.
@@ -420,7 +447,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
data[deps] = sortedObject(data[deps])
data = JSON.stringify(data, null, 2) + "\n"
- fs.writeFile(saveTarget, data, function (er) {
+ writeFileAtomic(saveTarget, data, function (er) {
cb(er, installed, tree, pretty)
})
})
@@ -551,30 +578,58 @@ function installManyTop_ (what, where, context, cb) {
fs.readdir(nm, function (er, pkgs) {
if (er) return installMany(what, where, context, cb)
- pkgs = pkgs.filter(function (p) {
+
+ var scopes = [], unscoped = []
+ pkgs.filter(function (p) {
return !p.match(/^[\._-]/)
+ }).forEach(function (p) {
+ // @names deserve deeper investigation
+ if (p[0] === "@") {
+ scopes.push(p)
+ }
+ else {
+ unscoped.push(p)
+ }
})
- asyncMap(pkgs.map(function (p) {
- return path.resolve(nm, p, "package.json")
- }), function (jsonfile, cb) {
- readJson(jsonfile, log.warn, function (er, data) {
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- if (er) return cb(null, [])
- return cb(null, [[data.name, data.version]])
- })
- }, function (er, packages) {
- // if there's nothing in node_modules, then don't freak out.
- if (er) packages = []
- // add all the existing packages to the family list.
- // however, do not add to the ancestors list.
- packages.forEach(function (p) {
- context.family[p[0]] = p[1]
+
+ maybeScoped(scopes, nm, function (er, scoped) {
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ // recombine unscoped with @scope/package packages
+ asyncMap(unscoped.concat(scoped).map(function (p) {
+ return path.resolve(nm, p, "package.json")
+ }), function (jsonfile, cb) {
+ readJson(jsonfile, log.warn, function (er, data) {
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ if (er) return cb(null, [])
+ cb(null, [[data.name, data.version]])
+ })
+ }, function (er, packages) {
+ // if there's nothing in node_modules, then don't freak out.
+ if (er) packages = []
+ // add all the existing packages to the family list.
+ // however, do not add to the ancestors list.
+ packages.forEach(function (p) {
+ context.family[p[0]] = p[1]
+ })
+ installMany(what, where, context, cb)
})
- return installMany(what, where, context, cb)
})
})
}
+function maybeScoped (scopes, where, cb) {
+ // find packages in scopes
+ asyncMap(scopes, function (scope, cb) {
+ fs.readdir(path.resolve(where, scope), function (er, scoped) {
+ if (er) return cb(er)
+ var paths = scoped.map(function (p) {
+ return path.join(scope, p)
+ })
+ cb(null, paths)
+ })
+ }, cb)
+}
+
function installMany (what, where, context, cb) {
// readDependencies takes care of figuring out whether the list of
// dependencies we'll iterate below comes from an existing shrinkwrap from a
@@ -614,7 +669,7 @@ function installMany (what, where, context, cb) {
targets.forEach(function (t) {
newPrev[t.name] = t.version
})
- log.silly("resolved", targets)
+ log.silly("install resolved", targets)
targets.filter(function (t) { return t }).forEach(function (t) {
log.info("install", "%s into %s", t._id, where)
})
@@ -652,9 +707,8 @@ function targetResolver (where, context, deps) {
// don't even mess with non-package looking things
inst = inst.filter(function (p) {
if (!p.match(/^[@\._-]/)) return true
- // scope pacakges
- var scopepath = path.join(name, p)
- readdir(scopepath)
+ // scoped packages
+ readdir(path.join(name, p))
})
asyncMap(inst, function (pkg, cb) {
@@ -847,15 +901,9 @@ function resultList (target, where, parentId) {
, target._from ]
}
-// name => install locations
-var installOnesInProgress = Object.create(null)
+var installed = Object.create(null)
-function isIncompatibleInstallOneInProgress(target, where) {
- return target.name in installOnesInProgress &&
- installOnesInProgress[target.name].indexOf(where) !== -1
-}
-
-function installOne_ (target, where, context, cb) {
+function installOne_ (target, where, context, cb_) {
var nm = path.resolve(where, "node_modules")
, targetFolder = path.resolve(nm, target.name)
, prettyWhere = path.relative(process.cwd(), where)
@@ -863,37 +911,55 @@ function installOne_ (target, where, context, cb) {
if (prettyWhere === ".") prettyWhere = null
- if (isIncompatibleInstallOneInProgress(target, where)) {
- // just call back, with no error. the error will be detected in the
- // final check for peer-invalid dependencies
- return cb()
+ cb_ = inflight(target.name + ":" + where, cb_)
+ if (!cb_) return log.verbose(
+ "installOne",
+ "of", target.name,
+ "to", where,
+ "already in flight; waiting"
+ )
+ else log.verbose(
+ "installOne",
+ "of", target.name,
+ "to", where,
+ "not in flight; installing"
+ )
+
+ function cb(er, data) {
+ unlock(nm, target.name, function () { cb_(er, data) })
}
- if (!(target.name in installOnesInProgress)) {
- installOnesInProgress[target.name] = []
- }
- installOnesInProgress[target.name].push(where)
- var indexOfIOIP = installOnesInProgress[target.name].length - 1
- , force = npm.config.get("force")
- , nodeVersion = npm.config.get("node-version")
- , strict = npm.config.get("engine-strict")
- , c = npmInstallChecks
-
- chain
- ( [ [c.checkEngine, target, npm.version, nodeVersion, force, strict]
- , [c.checkPlatform, target, force]
- , [c.checkCycle, target, context.ancestors]
- , [c.checkGit, targetFolder]
- , [write, target, targetFolder, context] ]
- , function (er, d) {
- installOnesInProgress[target.name].splice(indexOfIOIP, 1)
+ lock(nm, target.name, function (er) {
+ if (er) return cb(er)
- if (er) return cb(er)
+ if (targetFolder in installed) {
+ log.error("install", "trying to install", target.version, "to", targetFolder)
+ log.error("install", "but already installed versions", installed[targetFolder])
+ installed[targetFolder].push(target.version)
+ }
+ else {
+ installed[targetFolder] = [target.version]
+ }
- d.push(resultList(target, where, parent && parent._id))
- cb(er, d)
- }
- )
+ var force = npm.config.get("force")
+ , nodeVersion = npm.config.get("node-version")
+ , strict = npm.config.get("engine-strict")
+ , c = npmInstallChecks
+
+ chain(
+ [ [c.checkEngine, target, npm.version, nodeVersion, force, strict]
+ , [c.checkPlatform, target, force]
+ , [c.checkCycle, target, context.ancestors]
+ , [c.checkGit, targetFolder]
+ , [write, target, targetFolder, context] ]
+ , function (er, d) {
+ if (er) return cb(er)
+
+ d.push(resultList(target, where, parent && parent._id))
+ cb(er, d)
+ }
+ )
+ })
}
function write (target, targetFolder, context, cb_) {
@@ -907,15 +973,16 @@ function write (target, targetFolder, context, cb_) {
// is the list of installed packages from that last thing.
if (!er) return cb_(er, data)
- if (false === npm.config.get("rollback")) return cb_(er)
+ if (npm.config.get("rollback") === false) return cb_(er)
npm.rollbacks.push(targetFolder)
cb_(er, data)
}
var bundled = []
- chain
- ( [ [ cache.unpack, target.name, target.version, targetFolder
+ log.silly("install write", "writing", target.name, target.version, "to", targetFolder)
+ chain(
+ [ [ cache.unpack, target.name, target.version, targetFolder
, null, null, user, group ]
, [ fs, "writeFile"
, path.resolve(targetFolder, "package.json")
@@ -950,14 +1017,27 @@ function write (target, targetFolder, context, cb_) {
, explicit: false
, wrap: wrap }
+ var actions =
+ [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ]
+
+ // FIXME: This is an accident waiting to happen!
+ //
+ // 1. If multiple children at the same level of the tree share a
+ // peerDependency that's not in the parent's dependencies, because
+ // the peerDeps don't get added to the family, they will keep
+ // getting reinstalled (worked around by inflighting installOne).
+ // 2. The installer can't safely build at the parent level because
+ // that's already being done by the parent's installAndBuild. This
+ // runs the risk of the peerDependency never getting built.
+ //
+ // The fix: Don't install peerDependencies; require them to be
+ // included as explicit dependencies / devDependencies, and warn
+ // or error when they're missing. See #5080 for more arguments in
+ // favor of killing implicit peerDependency installs with fire.
var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
var pdTargetFolder = path.resolve(targetFolder, "..", "..")
var pdContext = context
-
- var actions =
- [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ]
-
if (peerDeps.length > 0) {
actions.push(
[ installMany, peerDeps, pdTargetFolder, pdContext ]
@@ -1000,8 +1080,9 @@ function prepareForInstallMany (packageData, depsKey, bundled, wrap, family) {
return !semver.satisfies(family[d], packageData[depsKey][d], true)
return true
}).map(function (d) {
- var t = packageData[depsKey][d]
- t = d + "@" + t
+ var v = packageData[depsKey][d]
+ var t = d + "@" + v
+ log.silly("prepareForInstallMany", "adding", t, "from", packageData.name, depsKey)
return t
})
}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index c811be5..e933a13 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -16,7 +16,7 @@ require('child-process-close')
var EventEmitter = require("events").EventEmitter
, npm = module.exports = new EventEmitter()
- , npmconf = require("npmconf")
+ , npmconf = require("./config/core.js")
, log = require("npmlog")
, fs = require("graceful-fs")
, path = require("path")
@@ -99,7 +99,6 @@ var commandCache = {}
, "update"
, "outdated"
, "prune"
- , "submodule"
, "pack"
, "dedupe"
@@ -424,11 +423,7 @@ Object.defineProperty(npm, "cache",
})
var tmpFolder
-var crypto = require("crypto")
-var rand = crypto.randomBytes(6)
- .toString("base64")
- .replace(/\//g, '_')
- .replace(/\+/, '-')
+var rand = require("crypto").randomBytes(4).toString("hex")
Object.defineProperty(npm, "tmp",
{ get : function () {
if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index f955cb7..a5ce900 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -11,6 +11,8 @@ var npm = require("./npm.js")
, chain = require("slide").chain
, path = require("path")
, cwd = process.cwd()
+ , writeStream = require('fs-write-stream-atomic')
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
pack.usage = "npm pack "
@@ -43,17 +45,14 @@ function pack_ (pkg, cb) {
cache.add(pkg, null, null, false, function (er, data) {
if (er) return cb(er)
- var name = data.name
// scoped packages get special treatment
+ var name = data.name
if (name[0] === "@") name = name.substr(1).replace(/\//g, "-")
-
var fname = name + "-" + data.version + ".tgz"
- , cached = path.resolve( npm.cache
- , data.name
- , data.version
- , "package.tgz" )
+
+ var cached = path.join(cachedPackageRoot(data), "package.tgz")
, from = fs.createReadStream(cached)
- , to = fs.createWriteStream(fname)
+ , to = writeStream(fname)
, errState = null
from.on("error", cb_)
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index 701dc2b..2a0fcff 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -8,9 +8,10 @@ var url = require("url")
, readJson = require("read-package-json")
, lifecycle = require("./utils/lifecycle.js")
, chain = require("slide").chain
- , Conf = require("npmconf").Conf
+ , Conf = require("./config/core.js").Conf
, RegClient = require("npm-registry-client")
, mapToRegistry = require("./utils/map-to-registry.js")
+ , cachedPackageRoot = require("./cache/cached-package-root.js")
publish.usage = "npm publish "
+ "\nnpm publish "
@@ -35,14 +36,18 @@ function publish (args, isRetry, cb) {
var arg = args[0]
// if it's a local folder, then run the prepublish there, first.
readJson(path.resolve(arg, "package.json"), function (er, data) {
- er = needVersion(er, data)
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
- // error is ok. could be publishing a url or tarball
- // however, that means that we will not have automatically run
- // the prepublish script, since that gets run when adding a folder
- // to the cache.
+
+ if (data) {
+ if (!data.name) return cb(new Error("No name provided"))
+ if (!data.version) return cb(new Error("No version provided"))
+ }
+
+ // Error is OK. Could be publishing a URL or tarball, however, that means
+ // that we will not have automatically run the prepublish script, since
+ // that gets run when adding a folder to the cache.
if (er) return cacheAddPublish(arg, false, isRetry, cb)
- cacheAddPublish(arg, true, isRetry, cb)
+ else cacheAddPublish(arg, true, isRetry, cb)
})
}
@@ -55,10 +60,7 @@ function cacheAddPublish (dir, didPre, isRetry, cb) {
npm.commands.cache.add(dir, null, null, false, function (er, data) {
if (er) return cb(er)
log.silly("publish", data)
- var cachedir = path.resolve( npm.cache
- , data.name
- , data.version
- , "package" )
+ var cachedir = path.resolve(cachedPackageRoot(data), "package")
chain([ !didPre &&
[lifecycle, data, "prepublish", cachedir]
, [publish_, dir, data, isRetry, cachedir]
@@ -88,7 +90,8 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
registry = new RegClient(config)
}
- data._npmVersion = npm.version
+ data._npmVersion = npm.version
+ data._nodeVersion = process.versions.node
delete data.modules
if (data.private) return cb(
@@ -128,9 +131,3 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
})
})
}
-
-function needVersion(er, data) {
- return er ? er
- : (data && !data.version) ? new Error("No version provided")
- : null
-}
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js
index 6cb7bf7..4495b93 100644
--- a/deps/npm/lib/run-script.js
+++ b/deps/npm/lib/run-script.js
@@ -53,7 +53,10 @@ runScript.completion = function (opts, cb) {
next()
})
- if (npm.config.get("global")) scripts = [], next()
+ if (npm.config.get("global")) {
+ scripts = []
+ next()
+ }
else readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
d = d || {}
@@ -63,7 +66,8 @@ runScript.completion = function (opts, cb) {
function next () {
if (!installed || !scripts) return
- return cb(null, scripts.concat(installed))
+
+ cb(null, scripts.concat(installed))
}
}
@@ -80,9 +84,9 @@ function runScript (args, cb) {
}
function list(cb) {
- var json = path.join(npm.localPrefix, 'package.json')
+ var json = path.join(npm.localPrefix, "package.json")
return readJson(json, function(er, d) {
- if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er)
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) d = {}
var scripts = Object.keys(d.scripts || {})
@@ -110,22 +114,27 @@ function list(cb) {
}
function run (pkg, wd, cmd, args, cb) {
- var cmds = []
if (!pkg.scripts) pkg.scripts = {}
+
+ var cmds
if (cmd === "restart") {
- cmds = ["prestop","stop","poststop"
- ,"restart"
- ,"prestart","start","poststart"]
+ cmds = [
+ "prestop", "stop", "poststop",
+ "restart",
+ "prestart", "start", "poststart"
+ ]
} else {
cmds = [cmd]
}
+
if (!cmd.match(/^(pre|post)/)) {
cmds = ["pre"+cmd].concat(cmds).concat("post"+cmd)
}
+
log.verbose("run-script", cmds)
chain(cmds.map(function (c) {
// pass cli arguments after -- to script.
- if (pkg.scripts[c]) pkg.scripts[c] = pkg.scripts[c] + joinArgs(args)
+ if (pkg.scripts[c] && c === cmd) pkg.scripts[c] = pkg.scripts[c] + joinArgs(args)
// when running scripts explicitly, assume that they're trusted.
return [lifecycle, pkg, c, wd, true]
@@ -135,10 +144,10 @@ function run (pkg, wd, cmd, args, cb) {
// join arguments after '--' and pass them to script,
// handle special characters such as ', ", ' '.
function joinArgs (args) {
- var joinedArgs = ''
- args.forEach(function(arg, i) {
+ var joinedArgs = ""
+ args.forEach(function(arg) {
if (arg.match(/[ '"]/)) arg = '"' + arg.replace(/"/g, '\\"') + '"'
- joinedArgs += ' ' + arg
+ joinedArgs += " " + arg
})
return joinedArgs
}
diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js
index 3be8b0d..5dd060f 100644
--- a/deps/npm/lib/search.js
+++ b/deps/npm/lib/search.js
@@ -218,7 +218,7 @@ function addColorMarker (str, arg, i) {
if (arg.charAt(0) === "/") {
//arg = arg.replace(/\/$/, "")
- return str.replace( new RegExp(arg.substr(1, arg.length - 1), "gi")
+ return str.replace( new RegExp(arg.substr(1, arg.length - 2), "gi")
, function (bit) { return markStart + bit + markEnd } )
}
diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js
index 5f8261d..a578383 100644
--- a/deps/npm/lib/shrinkwrap.js
+++ b/deps/npm/lib/shrinkwrap.js
@@ -6,6 +6,7 @@ module.exports = exports = shrinkwrap
var npm = require("./npm.js")
, log = require("npmlog")
, fs = require("fs")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, readJson = require("read-package-json")
, sortedObject = require("sorted-object")
@@ -70,7 +71,7 @@ function save (pkginfo, silent, cb) {
var file = path.resolve(npm.prefix, "npm-shrinkwrap.json")
- fs.writeFile(file, swdata, function (er) {
+ writeFileAtomic(file, swdata, function (er) {
if (er) return cb(er)
if (silent) return cb(null, pkginfo)
console.log("wrote npm-shrinkwrap.json")
diff --git a/deps/npm/lib/submodule.js b/deps/npm/lib/submodule.js
deleted file mode 100644
index eab4d21..0000000
--- a/deps/npm/lib/submodule.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// npm submodule
-// Check the package contents for a git repository url.
-// If there is one, then create a git submodule in the node_modules folder.
-
-module.exports = submodule
-
-var npm = require("./npm.js")
- , cache = require("./cache.js")
- , git = require("./utils/git.js")
- , asyncMap = require("slide").asyncMap
- , chain = require("slide").chain
-
-submodule.usage = "npm submodule "
-
-submodule.completion = require("./docs.js").completion
-
-function submodule (args, cb) {
- if (npm.config.get("global")) {
- return cb(new Error("Cannot use submodule command in global mode."))
- }
-
- if (args.length === 0) return cb(submodule.usage)
-
- asyncMap(args, function (arg, cb) {
- cache.add(arg, null, null, false, cb)
- }, function (er, pkgs) {
- if (er) return cb(er)
- chain(pkgs.map(function (pkg) { return function (cb) {
- submodule_(pkg, cb)
- }}), cb)
- })
-
-}
-
-function submodule_ (pkg, cb) {
- if (!pkg.repository
- || pkg.repository.type !== "git"
- || !pkg.repository.url) {
- return cb(new Error(pkg._id + ": No git repository listed"))
- }
-
- // prefer https:// github urls
- pkg.repository.url = pkg.repository.url
- .replace(/^(git:\/\/)?(git@)?github.com[:\/]/, "https://github.com/")
-
- // first get the list of submodules, and update if it's already there.
- getSubmodules(function (er, modules) {
- if (er) return cb(er)
- // if there's already a submodule, then just update it.
- if (modules.indexOf(pkg.name) !== -1) {
- return updateSubmodule(pkg.name, cb)
- }
- addSubmodule(pkg.name, pkg.repository.url, cb)
- })
-}
-
-function updateSubmodule (name, cb) {
- var args = [ "submodule", "update", "--init", "node_modules/", name ]
-
- git.whichAndExec(args, cb)
-}
-
-function addSubmodule (name, url, cb) {
- var args = [ "submodule", "add", url, "node_modules/", name ]
-
- git.whichAndExec(args, cb)
-}
-
-
-var getSubmodules = function (cb) {
- var args = [ "submodule", "status" ]
-
-
- git.whichAndExec(args, function _(er, stdout) {
- if (er) return cb(er)
- var res = stdout.trim().split(/\n/).map(function (line) {
- return line.trim().split(/\s+/)[1]
- }).filter(function (line) {
- // only care about submodules in the node_modules folder.
- return line && line.match(/^node_modules\//)
- }).map(function (line) {
- return line.replace(/^node_modules\//g, "")
- })
-
- // memoize.
- getSubmodules = function (cb) { return cb(null, res) }
-
- cb(null, res)
- })
-}
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index 7977624..8bd6e85 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -24,7 +24,7 @@ function unbuild_ (silent) { return function (folder, cb_) {
}
folder = path.resolve(folder)
delete build._didBuild[folder]
- log.verbose(folder.substr(npm.prefix.length + 1), "unbuild")
+ log.verbose("unbuild", folder.substr(npm.prefix.length + 1))
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
// if no json, then just trash it, but no scripts or whatever.
if (er) return gentlyRm(folder, false, cb)
@@ -53,7 +53,8 @@ function rmStuff (pkg, folder, cb) {
readJson.cache.del(path.resolve(folder, "package.json"))
- log.verbose([top, gnm, parent], "unbuild " + pkg._id)
+ log.verbose("unbuild rmStuff", pkg._id, "from", gnm)
+ if (!top) log.verbose("unbuild rmStuff", "in", parent)
asyncMap([rmBins, rmMans], function (fn, cb) {
fn(pkg, folder, parent, top, cb)
}, cb)
diff --git a/deps/npm/lib/uninstall.js b/deps/npm/lib/uninstall.js
index 42a9a83..68869f5 100644
--- a/deps/npm/lib/uninstall.js
+++ b/deps/npm/lib/uninstall.js
@@ -9,6 +9,7 @@ uninstall.usage = "npm uninstall [@ [[@] ...]"
uninstall.completion = require("./utils/completion/installed-shallow.js")
var fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, log = require("npmlog")
, readJson = require("read-package-json")
, path = require("path")
@@ -120,7 +121,7 @@ function saver (args, nm, cb_) {
}
}
- fs.writeFile(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) {
+ writeFileAtomic(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) {
return cb_(er, data)
})
})
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 788d3f8..95b78a8 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -11,6 +11,7 @@ var cbCalled = false
, exitCode = 0
, rollbacks = npm.rollbacks
, chain = require("slide").chain
+ , writeStream = require("fs-write-stream-atomic")
process.on("exit", function (code) {
@@ -66,17 +67,21 @@ function exit (code, noLog) {
if (er) {
log.error("error rolling back", er)
if (!code) errorHandler(er)
- else reallyExit(er)
+ else if (noLog) rm("npm-debug.log", reallyExit.bind(null, er))
+ else writeLogFile(reallyExit.bind(this, er))
} else {
- rm("npm-debug.log", reallyExit)
+ if (!noLog && code) writeLogFile(reallyExit)
+ else rm("npm-debug.log", reallyExit)
}
})
rollbacks.length = 0
}
else if (code && !noLog) writeLogFile(reallyExit)
- else reallyExit()
+ else rm("npm-debug.log", reallyExit)
+
+ function reallyExit (er) {
+ if (er && !code) code = typeof er.errno === "number" ? er.errno : 1
- function reallyExit() {
// truncate once it's been written.
log.record.length = 0
@@ -351,8 +356,7 @@ function writeLogFile (cb) {
writingLogFile = true
wroteLogFile = true
- var fs = require("graceful-fs")
- , fstr = fs.createWriteStream("npm-debug.log")
+ var fstr = writeStream("npm-debug.log")
, os = require("os")
, out = ""
diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js
index 7e20151..db5cc7b 100644
--- a/deps/npm/lib/utils/git.js
+++ b/deps/npm/lib/utils/git.js
@@ -10,16 +10,20 @@ var exec = require("child_process").execFile
, npm = require("../npm.js")
, which = require("which")
, git = npm.config.get("git")
+ , assert = require("assert")
+ , log = require("npmlog")
function prefixGitArgs() {
return process.platform === "win32" ? ["-c", "core.longpaths=true"] : []
}
function execGit(args, options, cb) {
+ log.info("git", args)
return exec(git, prefixGitArgs().concat(args || []), options, cb)
}
function spawnGit(args, options, cb) {
+ log.info("git", args)
return spawn(git, prefixGitArgs().concat(args || []), options)
}
@@ -33,6 +37,7 @@ function whichGit(cb) {
}
function whichAndExec(args, options, cb) {
+ assert.equal(typeof cb, "function", "no callback provided")
// check for git
whichGit(function (err) {
if (err) {
diff --git a/deps/npm/lib/utils/locker.js b/deps/npm/lib/utils/locker.js
index 9e322d7..4479f24 100644
--- a/deps/npm/lib/utils/locker.js
+++ b/deps/npm/lib/utils/locker.js
@@ -1,52 +1,75 @@
var crypto = require("crypto")
-var path = require("path")
+var resolve = require("path").resolve
-var npm = require("../npm.js")
-var lockFile = require("lockfile")
+var lockfile = require("lockfile")
var log = require("npmlog")
-var getCacheStat = require("../cache/get-stat.js")
-
-function lockFileName (u) {
- var c = u.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
- , h = crypto.createHash("sha1").update(u).digest("hex")
- h = h.substr(0, 8)
- c = c.substr(-32)
- log.silly("lockFile", h + "-" + c, u)
- return path.resolve(npm.config.get("cache"), h + "-" + c + ".lock")
+var mkdirp = require("mkdirp")
+
+var npm = require("../npm.js")
+var getStat = require("../cache/get-stat.js")
+
+var installLocks = {}
+
+function lockFileName (base, name) {
+ var c = name.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
+ , p = resolve(base, name)
+ , h = crypto.createHash("sha1").update(p).digest("hex")
+ , l = resolve(npm.cache, "_locks")
+
+ return resolve(l, c.substr(0, 24)+"-"+h.substr(0, 16)+".lock")
}
-var myLocks = {}
-function lock (u, cb) {
- // the cache dir needs to exist already for this.
- getCacheStat(function (er, cs) {
- if (er) return cb(er)
- var opts = { stale: npm.config.get("cache-lock-stale")
- , retries: npm.config.get("cache-lock-retries")
- , wait: npm.config.get("cache-lock-wait") }
- var lf = lockFileName(u)
- log.verbose("lock", u, lf)
- lockFile.lock(lf, opts, function(er) {
- if (!er) myLocks[lf] = true
- cb(er)
+function lock (base, name, cb) {
+ getStat(function (er) {
+ var lockDir = resolve(npm.cache, "_locks")
+ mkdirp(lockDir, function () {
+ if (er) return cb(er)
+
+ var opts = { stale: npm.config.get("cache-lock-stale")
+ , retries: npm.config.get("cache-lock-retries")
+ , wait: npm.config.get("cache-lock-wait") }
+ var lf = lockFileName(base, name)
+ lockfile.lock(lf, opts, function (er) {
+ if (er) log.warn("locking", lf, "failed", er)
+
+ if (!er) {
+ log.verbose("lock", "using", lf, "for", resolve(base, name))
+ installLocks[lf] = true
+ }
+
+ cb(er)
+ })
})
})
}
-function unlock (u, cb) {
- var lf = lockFileName(u)
- , locked = myLocks[lf]
+function unlock (base, name, cb) {
+ var lf = lockFileName(base, name)
+ , locked = installLocks[lf]
if (locked === false) {
return process.nextTick(cb)
- } else if (locked === true) {
- myLocks[lf] = false
- lockFile.unlock(lockFileName(u), cb)
- } else {
- throw new Error("Attempt to unlock " + u + ", which hasn't been locked")
+ }
+ else if (locked === true) {
+ lockfile.unlock(lf, function (er) {
+ if (er) {
+ log.warn("unlocking", lf, "failed", er)
+ }
+ else {
+ installLocks[lf] = false
+ log.verbose("unlock", "done using", lf, "for", resolve(base, name))
+ }
+
+ cb(er)
+ })
+ }
+ else {
+ throw new Error(
+ "Attempt to unlock " + resolve(base, name) + ", which hasn't been locked"
+ )
}
}
module.exports = {
- lock: lock,
- unlock: unlock,
- _lockFileName: lockFileName
+ lock : lock,
+ unlock : unlock
}
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
index 192de7a..ede49a1 100644
--- a/deps/npm/lib/utils/tar.js
+++ b/deps/npm/lib/utils/tar.js
@@ -3,6 +3,7 @@
var npm = require("../npm.js")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, path = require("path")
, log = require("npmlog")
, uidNumber = require("uid-number")
@@ -15,15 +16,6 @@ var npm = require("../npm.js")
, fstream = require("fstream")
, Packer = require("fstream-npm")
, lifecycle = require("./lifecycle.js")
- , locker = require("./locker.js")
-
-function lock(path, cb) {
- return locker.lock('tar://' + path, cb)
-}
-
-function unlock(path, cb) {
- return locker.unlock('tar://' + path, cb)
-}
if (process.env.SUDO_UID && myUid === 0) {
if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID
@@ -51,73 +43,40 @@ function pack (tarball, folder, pkg, dfc, cb) {
}
}
-function pack_ (tarball, folder, pkg, cb_) {
- var tarballLock = false
- , folderLock = false
-
- function cb (er) {
- if (folderLock)
- unlock(folder, function() {
- folderLock = false
- cb(er)
- })
- else if (tarballLock)
- unlock(tarball, function() {
- tarballLock = false
- cb(er)
- })
- else
- cb_(er)
- }
-
- lock(folder, function(er) {
- if (er) return cb(er)
- folderLock = true
- next()
- })
-
- lock(tarball, function (er) {
- if (er) return cb(er)
- tarballLock = true
- next()
- })
-
- function next () {
- if (!tarballLock || !folderLock) return
-
- new Packer({ path: folder, type: "Directory", isDirectory: true })
- .on("error", function (er) {
- if (er) log.error("tar pack", "Error reading " + folder)
- return cb(er)
- })
+function pack_ (tarball, folder, pkg, cb) {
+ new Packer({ path: folder, type: "Directory", isDirectory: true })
+ .on("error", function (er) {
+ if (er) log.error("tar pack", "Error reading " + folder)
+ return cb(er)
+ })
- // By default, npm includes some proprietary attributes in the
- // package tarball. This is sane, and allowed by the spec.
- // However, npm *itself* excludes these from its own package,
- // so that it can be more easily bootstrapped using old and
- // non-compliant tar implementations.
- .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") }))
- .on("error", function (er) {
- if (er) log.error("tar.pack", "tar creation error", tarball)
- cb(er)
- })
- .pipe(zlib.Gzip())
- .on("error", function (er) {
- if (er) log.error("tar.pack", "gzip error "+tarball)
- cb(er)
- })
- .pipe(fstream.Writer({ type: "File", path: tarball }))
- .on("error", function (er) {
- if (er) log.error("tar.pack", "Could not write "+tarball)
- cb(er)
- })
- .on("close", cb)
- }
+ // By default, npm includes some proprietary attributes in the
+ // package tarball. This is sane, and allowed by the spec.
+ // However, npm *itself* excludes these from its own package,
+ // so that it can be more easily bootstrapped using old and
+ // non-compliant tar implementations.
+ .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") }))
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "tar creation error", tarball)
+ cb(er)
+ })
+ .pipe(zlib.Gzip())
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "gzip error "+tarball)
+ cb(er)
+ })
+ .pipe(fstream.Writer({ type: "File", path: tarball }))
+ .on("error", function (er) {
+ if (er) log.error("tar.pack", "Could not write "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
}
function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
- log.verbose("tar unpack", tarball)
+ log.verbose("tar", "unpack", tarball)
+ log.verbose("tar", "unpacking to", unpackTarget)
if (typeof cb !== "function") cb = gid, gid = null
if (typeof cb !== "function") cb = uid, uid = null
if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file
@@ -129,52 +88,9 @@ function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
})
}
-function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb_ ) {
- var parent = path.dirname(unpackTarget)
- , base = path.basename(unpackTarget)
- , folderLock
- , tarballLock
-
- function cb (er) {
- if (folderLock)
- unlock(unpackTarget, function() {
- folderLock = false
- cb(er)
- })
- else if (tarballLock)
- unlock(tarball, function() {
- tarballLock = false
- cb(er)
- })
- else
- cb_(er)
- }
-
- lock(unpackTarget, function (er) {
- if (er) return cb(er)
- folderLock = true
- next()
- })
-
- lock(tarball, function (er) {
+function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) {
+ rm(unpackTarget, function (er) {
if (er) return cb(er)
- tarballLock = true
- next()
- })
-
- function next() {
- if (!tarballLock || !folderLock) return
- rmGunz()
- }
-
- function rmGunz () {
- rm(unpackTarget, function (er) {
- if (er) return cb(er)
- gtp()
- })
- }
-
- function gtp () {
// gzip {tarball} --decompress --stdout \
// | tar -mvxpf - --strip-components=1 -C {unpackTarget}
gunzTarPerm( tarball, unpackTarget
@@ -184,7 +100,7 @@ function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb_ ) {
if (er) return cb(er)
readJson(path.resolve(folder, "package.json"), cb)
})
- }
+ })
}
@@ -202,6 +118,17 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
var fst = fs.createReadStream(tarball)
+ fst.on("open", function (fd) {
+ fs.fstat(fd, function (er, st) {
+ if (er) return fst.emit("error", er)
+ if (st.size === 0) {
+ er = new Error("0-byte tarball\n" +
+ "Please run `npm cache clean`")
+ fst.emit("error", er)
+ }
+ })
+ })
+
// figure out who we're supposed to be, if we're not pretending
// to be a specific user.
if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
@@ -275,73 +202,74 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
}
- fst.on("error", function (er) {
- if (er) log.error("tar.unpack", "error reading "+tarball)
- cb(er)
- })
- fst.on("data", function OD (c) {
- // detect what it is.
- // Then, depending on that, we'll figure out whether it's
- // a single-file module, gzipped tarball, or naked tarball.
- // gzipped files all start with 1f8b08
- if (c[0] === 0x1F &&
- c[1] === 0x8B &&
- c[2] === 0x08) {
- fst
- .pipe(zlib.Unzip())
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "unzip error "+tarball)
- cb(er)
- })
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "untar error "+tarball)
- cb(er)
- })
- .on("close", cb)
- } else if (c.toString().match(/^package\//) ||
- c.toString().match(/^pax_global_header/)) {
- // naked tar
- fst
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "untar error "+tarball)
- cb(er)
- })
- .on("close", cb)
- } else {
- // naked js file
- var jsOpts = { path: path.resolve(target, "index.js") }
-
- if (process.platform !== "win32" &&
- typeof uid === "number" &&
- typeof gid === "number") {
- jsOpts.uid = uid
- jsOpts.gid = gid
- }
+ fst
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "error reading "+tarball)
+ cb(er)
+ })
+ .on("data", function OD (c) {
+ // detect what it is.
+ // Then, depending on that, we'll figure out whether it's
+ // a single-file module, gzipped tarball, or naked tarball.
+ // gzipped files all start with 1f8b08
+ if (c[0] === 0x1F &&
+ c[1] === 0x8B &&
+ c[2] === 0x08) {
+ fst
+ .pipe(zlib.Unzip())
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "unzip error "+tarball)
+ cb(er)
+ })
+ .pipe(tar.Extract(extractOpts))
+ .on("entry", extractEntry)
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "untar error "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
+ } else if (c.toString().match(/^package\//) ||
+ c.toString().match(/^pax_global_header/)) {
+ // naked tar
+ fst
+ .pipe(tar.Extract(extractOpts))
+ .on("entry", extractEntry)
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "untar error "+tarball)
+ cb(er)
+ })
+ .on("close", cb)
+ } else {
+ // naked js file
+ var jsOpts = { path: path.resolve(target, "index.js") }
+
+ if (process.platform !== "win32" &&
+ typeof uid === "number" &&
+ typeof gid === "number") {
+ jsOpts.uid = uid
+ jsOpts.gid = gid
+ }
- fst
- .pipe(fstream.Writer(jsOpts))
- .on("error", function (er) {
- if (er) log.error("tar.unpack", "copy error "+tarball)
- cb(er)
- })
- .on("close", function () {
- var j = path.resolve(target, "package.json")
- readJson(j, function (er, d) {
- if (er) {
- log.error("not a package", tarball)
- return cb(er)
- }
- fs.writeFile(j, JSON.stringify(d) + "\n", cb)
+ fst
+ .pipe(fstream.Writer(jsOpts))
+ .on("error", function (er) {
+ if (er) log.error("tar.unpack", "copy error "+tarball)
+ cb(er)
})
- })
- }
+ .on("close", function () {
+ var j = path.resolve(target, "package.json")
+ readJson(j, function (er, d) {
+ if (er) {
+ log.error("not a package", tarball)
+ return cb(er)
+ }
+ writeFileAtomic(j, JSON.stringify(d) + "\n", cb)
+ })
+ })
+ }
- // now un-hook, and re-emit the chunk
- fst.removeListener("data", OD)
- fst.emit("data", c)
- })
+ // now un-hook, and re-emit the chunk
+ fst.removeListener("data", OD)
+ fst.emit("data", c)
+ })
}
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index 5091ab9..a15e2c3 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -6,6 +6,7 @@ var exec = require("child_process").execFile
, semver = require("semver")
, path = require("path")
, fs = require("graceful-fs")
+ , writeFileAtomic = require("write-file-atomic")
, chain = require("slide").chain
, log = require("npmlog")
, which = require("which")
@@ -83,6 +84,15 @@ function checkGit (data, cb) {
// check for git
git.whichAndExec(args, options, function (er, stdout) {
+ if (er && er.code === "ENOGIT") {
+ log.warn(
+ "version",
+ "This is a Git checkout, but the git command was not found.",
+ "npm could not create a Git tag for this release!"
+ )
+ return write(data, cb)
+ }
+
var lines = stdout.trim().split("\n").filter(function (line) {
return line.trim() && !line.match(/^\?\? /)
}).map(function (line) {
@@ -111,7 +121,7 @@ function checkGit (data, cb) {
}
function write (data, cb) {
- fs.writeFile( path.join(npm.localPrefix, "package.json")
+ writeFileAtomic( path.join(npm.localPrefix, "package.json")
, new Buffer(JSON.stringify(data, null, 2) + "\n")
, cb )
}
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 43d09cb..6b45cca 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -35,11 +35,12 @@ view.completion = function (opts, cb) {
var p = pref.concat(k).join(".")
f.push(p)
if (Array.isArray(d[k])) {
- return d[k].forEach(function (val, i) {
+ d[k].forEach(function (val, i) {
var pi = p + "[" + i + "]"
if (val && typeof val === "object") getFields(val, f, [p])
else f.push(pi)
})
+ return
}
if (typeof d[k] === "object") getFields(d[k], f, [p])
})
@@ -48,24 +49,54 @@ view.completion = function (opts, cb) {
}
var npm = require("./npm.js")
+ , readJson = require("read-package-json")
, registry = npm.registry
, log = require("npmlog")
, util = require("util")
, semver = require("semver")
, mapToRegistry = require("./utils/map-to-registry.js")
, npa = require("npm-package-arg")
+ , path = require("path")
function view (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
- if (!args.length) return cb("Usage: "+view.usage)
+
+ if (!args.length) args = ["."]
+
var pkg = args.shift()
, nv = npa(pkg)
, name = nv.name
- , version = nv.rawSpec || npm.config.get("tag")
+ , local = (name === "." || !name)
+
+ if (npm.config.get("global") && local) {
+ return cb(new Error("Cannot use view command in global mode."))
+ }
+
+ if (local) {
+ var dir = npm.prefix
+ readJson(path.resolve(dir, "package.json"), function (er, d) {
+ d = d || {}
+ if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ if (!d.name) return cb(new Error("Invalid package.json"))
- if (name === ".") return cb(view.usage)
+ var p = d.name
+ nv = npa(p)
+ if (pkg && ~pkg.indexOf("@")) {
+ nv.rawSpec = pkg.split("@")[pkg.indexOf("@")]
+ }
+ fetchAndRead(nv, args, silent, cb)
+ })
+ } else {
+ fetchAndRead(nv, args, silent, cb)
+ }
+}
+
+function fetchAndRead (nv, args, silent, cb) {
// get the data about this package
+ var name = nv.name
+ , version = nv.rawSpec || npm.config.get("tag")
+
mapToRegistry(name, npm.config, function (er, uri) {
if (er) return cb(er)
@@ -184,9 +215,7 @@ function search (data, fields, version, title) {
results = results.reduce(reducer, {})
return results
}
- if (!data.hasOwnProperty(field)) {
- return
- }
+ if (!data.hasOwnProperty(field)) return undefined
data = data[field]
if (tail.length) {
if (typeof data === "object") {
@@ -205,15 +234,15 @@ function search (data, fields, version, title) {
function printData (data, name, cb) {
var versions = Object.keys(data)
, msg = ""
- , showVersions = versions.length > 1
- , showFields
+ , includeVersions = versions.length > 1
+ , includeFields
versions.forEach(function (v) {
var fields = Object.keys(data[v])
- showFields = showFields || (fields.length > 1)
+ includeFields = includeFields || (fields.length > 1)
fields.forEach(function (f) {
var d = cleanup(data[v][f])
- if (showVersions || showFields || typeof d !== "string") {
+ if (includeVersions || includeFields || typeof d !== "string") {
d = cleanup(data[v][f])
d = npm.config.get("json")
? JSON.stringify(d, null, 2)
@@ -221,10 +250,10 @@ function printData (data, name, cb) {
} else if (typeof d === "string" && npm.config.get("json")) {
d = JSON.stringify(d)
}
- if (f && showFields) f += " = "
+ if (f && includeFields) f += " = "
if (d.indexOf("\n") !== -1) d = " \n" + d
- msg += (showVersions ? name + "@" + v + " " : "")
- + (showFields ? f : "") + d + "\n"
+ msg += (includeVersions ? name + "@" + v + " " : "")
+ + (includeFields ? f : "") + d + "\n"
})
})
@@ -268,4 +297,3 @@ function unparsePerson (d) {
+ (d.email ? " <"+d.email+">" : "")
+ (d.url ? " ("+d.url+")" : "")
}
-
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 8f7d01b..a7cf104 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "September 2014" "" ""
+.TH "NPM" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm\fR \- node package manager
.P
@@ -37,26 +37,26 @@ https://www\.npmjs\.org/install\.sh\|\. You can download that and run it\.
Here's an example using curl:
.P
.RS 2
-.EX
+.nf
curl \-L https://npmjs\.org/install\.sh | sh
-.EE
+.fi
.RE
.SS Slightly Fancier
.P
You can set any npm configuration params with that script:
.P
.RS 2
-.EX
+.nf
npm_config_prefix=/some/path sh install\.sh
-.EE
+.fi
.RE
.P
Or, you can run it in uber\-debuggery mode:
.P
.RS 2
-.EX
+.nf
npm_debug=1 sh install\.sh
-.EE
+.fi
.RE
.SS Even Fancier
.P
@@ -102,9 +102,9 @@ If you would like to ensure that npm \fBalways\fR runs scripts as the
set the following configuration param:
.P
.RS 2
-.EX
+.nf
npm config set unsafe\-perm false
-.EE
+.fi
.RE
.P
This will prevent running in unsafe mode, even as non\-root users\.
@@ -113,17 +113,17 @@ This will prevent running in unsafe mode, even as non\-root users\.
So sad to see you go\.
.P
.RS 2
-.EX
+.nf
sudo npm uninstall npm \-g
-.EE
+.fi
.RE
.P
Or, if that fails,
.P
.RS 2
-.EX
+.nf
sudo make uninstall
-.EE
+.fi
.RE
.SH More Severe Uninstalling
.P
@@ -138,19 +138,19 @@ To remove cruft left behind by npm 0\.x, you can use the included
\fBclean\-old\.sh\fR script file\. You can run it conveniently like this:
.P
.RS 2
-.EX
+.nf
npm explore npm \-g \-\- sh scripts/clean\-old\.sh
-.EE
+.fi
.RE
.P
npm uses two configuration files, one for per\-user configs, and another
for global (every\-user) configs\. You can view them by doing:
.P
.RS 2
-.EX
+.nf
npm config get userconfig # defaults to ~/\.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
-.EE
+.fi
.RE
.P
Uninstalling npm does not remove configuration files by default\. You
@@ -171,7 +171,7 @@ that it depends on, but for now, there are some things that you must
use npm itself to do\.
.P
.RS 2
-.EX
+.nf
var npm = require("npm")
npm\.load(myConfigObject, function (er) {
if (er) return handlError(er)
@@ -179,9 +179,9 @@ npm\.load(myConfigObject, function (er) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
- npm\.on("log", function (message) { \.\.\.\. })
+ npm\.registry\.log\.on("log", function (message) { \.\.\.\. })
})
-.EE
+.fi
.RE
.P
The \fBload\fR function takes an object hash of the command\-line configs\.
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index 5db7ee2..6b85986 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,12 +1,12 @@
-.TH "NPM\-ADDUSER" "1" "September 2014" "" ""
+.TH "NPM\-ADDUSER" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
.P
.RS 2
-.EX
-npm adduser [\-\-registry=url] [\-\-scope=@orgname]
-.EE
+.nf
+npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth]
+.fi
.RE
.SH DESCRIPTION
.P
@@ -41,13 +41,31 @@ with the specified scope\. See npm help 7 \fBnpm\-scope\fR\|\. You can use both
e\.g\.
.P
.RS 2
-.EX
+.nf
npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
-.EE
+.fi
.RE
.P
This will set a registry for the given scope and login or create a user for
that registry at the same time\.
+.SS always\-auth
+.P
+Default: false
+.P
+If specified, save configuration indicating that all requests to the given
+registry should include authorization information\. Useful for private
+registries\. Can be used with \fB\-\-registry\fR and / or \fB\-\-scope\fR, e\.g\.
+.P
+.RS 2
+.nf
+npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth
+.fi
+.RE
+.P
+This will ensure that all requests to that registry (including for tarballs)
+include an authorization header\. See \fBalways\-auth\fR in npm help 7 \fBnpm\-config\fR for more
+details on always\-auth\. Registry\-specific configuaration of \fBalways\-auth\fR takes
+precedence over any global configuration\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index b496391..6552d6c 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,12 +1,12 @@
-.TH "NPM\-BIN" "1" "September 2014" "" ""
+.TH "NPM\-BIN" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm bin
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 67c0a61..09c7659 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,13 +1,13 @@
-.TH "NPM\-BUGS" "1" "September 2014" "" ""
+.TH "NPM\-BUGS" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm bugs
npm bugs (with no args in a package dir)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index ed530b3..0f21842 100644
--- a/deps/npm/man/man1/npm-build.1
+++ b/deps/npm/man/man1/npm-build.1
@@ -1,12 +1,12 @@
-.TH "NPM\-BUILD" "1" "September 2014" "" ""
+.TH "NPM\-BUILD" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm build
-.EE
+.fi
.RE
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index 7a8355d..0748922 100644
--- a/deps/npm/man/man1/npm-bundle.1
+++ b/deps/npm/man/man1/npm-bundle.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUNDLE" "1" "September 2014" "" ""
+.TH "NPM\-BUNDLE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 5a99d11..c49015a 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,10 +1,10 @@
-.TH "NPM\-CACHE" "1" "September 2014" "" ""
+.TH "NPM\-CACHE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm cache add
npm cache add
npm cache add
@@ -13,7 +13,7 @@ npm cache add @
npm cache ls []
npm cache clean []
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index bbd224f..a89cc6f 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,12 +1,12 @@
-.TH "NPM\-COMPLETION" "1" "September 2014" "" ""
+.TH "NPM\-COMPLETION" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
\|\. <(npm completion)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index ca7d69d..a93ebac 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,10 +1,10 @@
-.TH "NPM\-CONFIG" "1" "September 2014" "" ""
+.TH "NPM\-CONFIG" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm config set [\-\-global]
npm config get
npm config delete
@@ -13,7 +13,7 @@ npm config edit
npm c [set|get|delete|list]
npm get
npm set [\-\-global]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -33,9 +33,9 @@ Config supports the following sub\-commands:
.SS set
.P
.RS 2
-.EX
+.nf
npm config set key value
-.EE
+.fi
.RE
.P
Sets the config key to the value\.
@@ -44,36 +44,36 @@ If value is omitted, then it sets it to "true"\.
.SS get
.P
.RS 2
-.EX
+.nf
npm config get key
-.EE
+.fi
.RE
.P
Echo the config value to stdout\.
.SS list
.P
.RS 2
-.EX
+.nf
npm config list
-.EE
+.fi
.RE
.P
Show all the config settings\.
.SS delete
.P
.RS 2
-.EX
+.nf
npm config delete key
-.EE
+.fi
.RE
.P
Deletes the key from all configuration files\.
.SS edit
.P
.RS 2
-.EX
+.nf
npm config edit
-.EE
+.fi
.RE
.P
Opens the config file in an editor\. Use the \fB\-\-global\fR flag to edit the
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 58c01ca..2454807 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,13 +1,13 @@
-.TH "NPM\-DEDUPE" "1" "September 2014" "" ""
+.TH "NPM\-DEDUPE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm dedupe [package names\.\.\.]
npm ddp [package names\.\.\.]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -18,24 +18,24 @@ be more effectively shared by multiple dependent packages\.
For example, consider this dependency graph:
.P
.RS 2
-.EX
+.nf
a
+\-\- b <\-\- depends on c@1\.0\.x
| `\-\- c@1\.0\.3
`\-\- d <\-\- depends on c@~1\.0\.9
`\-\- c@1\.0\.10
-.EE
+.fi
.RE
.P
In this case, npm help \fBnpm\-dedupe\fR will transform the tree to:
.P
.RS 2
-.EX
+.nf
a
+\-\- b
+\-\- d
`\-\- c@1\.0\.10
-.EE
+.fi
.RE
.P
Because of the hierarchical nature of node's module lookup, b and d
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 3ff2f88..581a589 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,12 +1,12 @@
-.TH "NPM\-DEPRECATE" "1" "September 2014" "" ""
+.TH "NPM\-DEPRECATE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm deprecate [@]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -17,9 +17,9 @@ It works on version ranges as well as specific versions, so you can do
something like this:
.P
.RS 2
-.EX
+.nf
npm deprecate my\-thing@"< 0\.2\.3" "critical bug fixed in v0\.2\.3"
-.EE
+.fi
.RE
.P
Note that you must be the package owner to deprecate something\. See the
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 0a55953..1e9e5c1 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,15 +1,15 @@
-.TH "NPM\-DOCS" "1" "September 2014" "" ""
+.TH "NPM\-DOCS" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm docs [ [ \.\.\.]]
npm docs (with no args in a package dir)
npm home [ [ \.\.\.]]
npm home (with no args in a package dir)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index d7f4056..8a19d12 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,12 +1,12 @@
-.TH "NPM\-EDIT" "1" "September 2014" "" ""
+.TH "NPM\-EDIT" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm edit [@]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 01f91bf..0211aef 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,12 +1,12 @@
-.TH "NPM\-EXPLORE" "1" "September 2014" "" ""
+.TH "NPM\-EXPLORE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm explore [ \-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -19,9 +19,9 @@ This is particularly handy in the case of git submodules in the
\fBnode_modules\fR folder:
.P
.RS 2
-.EX
+.nf
npm explore some\-dependency \-\- git pull origin master
-.EE
+.fi
.RE
.P
Note that the package is \fInot\fR automatically rebuilt afterwards, so be
@@ -41,8 +41,6 @@ The shell to run for the \fBnpm explore\fR command\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
-npm help submodule
-.IP \(bu 2
npm help 5 folders
.IP \(bu 2
npm help edit
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 7886469..a18a8e9 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,12 +1,12 @@
-.TH "NPM\-HELP\-SEARCH" "1" "September 2014" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm help\-search some search terms
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index b0456ef..556eeb5 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,13 +1,13 @@
-.TH "NPM\-HELP" "1" "September 2014" "" ""
+.TH "NPM\-HELP" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm help
npm help some search terms
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 93e3845..3d4ed09 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,12 +1,12 @@
-.TH "NPM\-INIT" "1" "September 2014" "" ""
+.TH "NPM\-INIT" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
.P
.RS 2
-.EX
-npm init
-.EE
+.nf
+npm init [\-f|\-\-force|\-y|\-\-yes]
+.fi
.RE
.SH DESCRIPTION
.P
@@ -20,6 +20,9 @@ the options in there\.
.P
It is strictly additive, so it does not delete options from your package\.json
without a really good reason to do so\.
+.P
+If you invoke it with \fB\-f\fR, \fB\-\-force\fR, \fB\-y\fR, or \fB\-\-yes\fR, it will use only
+defaults and not prompt you for any options\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index ad6bdf5..0df0197 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,10 +1,10 @@
-.TH "NPM\-INSTALL" "1" "September 2014" "" ""
+.TH "NPM\-INSTALL" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm install (with no args in a package dir)
npm install
npm install
@@ -14,7 +14,7 @@ npm install [@/]@
npm install [@/]@
npm install [@/]@
npm i (with any of the previous argument usage)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -66,9 +66,9 @@ after packing it up into a tarball (b)\.
Example:
.P
.RS 2
-.EX
+.nf
npm install \./package\.tgz
-.EE
+.fi
.RE
.IP \(bu 2
\fBnpm install \fR:
@@ -77,9 +77,9 @@ after packing it up into a tarball (b)\.
Example:
.P
.RS 2
-.EX
+.nf
npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
-.EE
+.fi
.RE
.IP \(bu 2
\fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR:
@@ -90,9 +90,9 @@ after packing it up into a tarball (b)\.
Example:
.P
.RS 2
-.EX
+.nf
npm install sax
-.EE
+.fi
.RE
\fBnpm install\fR takes 3 exclusive, optional flags which save or update
the package version in your main package\.json:
@@ -118,14 +118,14 @@ must also be followed by a slash\.
Examples:
.P
.RS 2
-.EX
+.nf
npm install sax \-\-save
npm install githubname/reponame
npm install @myorg/privatepackage
npm install node\-tap \-\-save\-dev
npm install dtrace\-provider \-\-save\-optional
npm install readable\-stream \-\-save \-\-save\-exact
-.EE
+.fi
.RE
.RE
@@ -133,11 +133,11 @@ npm install readable\-stream \-\-save \-\-save\-exact
.RE
.P
.RS 2
-.EX
+.nf
**Note**: If there is a file or folder named `` in the current
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid\.
-.EE
+.fi
.RE
.RS 0
.IP \(bu 2
@@ -148,10 +148,10 @@ fetch the package by name if it is not valid\.
Example:
.P
.RS 2
-.EX
+.nf
npm install sax@latest
npm install @myorg/mypackage@latest
-.EE
+.fi
.RE
.IP \(bu 2
\fBnpm install [@/]@\fR:
@@ -160,10 +160,10 @@ fetch the package by name if it is not valid\.
Example:
.P
.RS 2
-.EX
+.nf
npm install sax@0\.1\.1
npm install @myorg/privatepackage@1\.5\.0
-.EE
+.fi
.RE
.IP \(bu 2
\fBnpm install [@/]@\fR:
@@ -174,10 +174,10 @@ fetch the package by name if it is not valid\.
Example:
.P
.RS 2
-.EX
+.nf
npm install sax@">=0\.1\.0 <0\.2\.0"
npm install @myorg/privatepackage@">=0\.1\.0 <0\.2\.0"
-.EE
+.fi
.RE
.IP \(bu 2
\fBnpm install /\fR:
@@ -186,9 +186,9 @@ fetch the package by name if it is not valid\.
Example:
.P
.RS 2
-.EX
+.nf
npm install mygithubuser/myproject
-.EE
+.fi
.RE
To reference a package in a git repo that is not on GitHub, see git
remote urls below\.
@@ -198,9 +198,9 @@ fetch the package by name if it is not valid\.
url is:
.P
.RS 2
-.EX
+.nf
://[@][#]
-.EE
+.fi
.RE
\fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or
\fBgit+https\fR\|\. If no \fB\fR is specified, then \fBmaster\fR is
@@ -208,11 +208,11 @@ fetch the package by name if it is not valid\.
Examples:
.P
.RS 2
-.EX
+.nf
git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27
git+https://isaacs@github\.com/npm/npm\.git
git://github\.com/npm/npm\.git#v1\.0\.27
-.EE
+.fi
.RE
.RE
@@ -221,9 +221,9 @@ You may combine multiple arguments, and even multiple types of arguments\.
For example:
.P
.RS 2
-.EX
+.nf
npm install sax@">=0\.1\.0 <0\.2\.0" bench supervisor
-.EE
+.fi
.RE
.P
The \fB\-\-tag\fR argument will apply to all of the specified install targets\. If a
@@ -234,9 +234,9 @@ The \fB\-\-force\fR argument will force npm to fetch remote resources even if a
local copy exists on disk\.
.P
.RS 2
-.EX
+.nf
npm install sax \-\-force
-.EE
+.fi
.RE
.P
The \fB\-\-global\fR argument will cause npm to install the package globally
@@ -264,7 +264,7 @@ effect on installation, since that's most of what npm does\.
To install a package, npm uses the following algorithm:
.P
.RS 2
-.EX
+.nf
install(where, what, family, ancestors)
fetch what, unpack to /node_modules/
for each dep in what\.dependencies
@@ -274,19 +274,19 @@ for each dep@version in what\.dependencies
and not in
add precise version deps to
install(/node_modules/, dep, family)
-.EE
+.fi
.RE
.P
For this \fBpackage{dep}\fR structure: \fBA{B,C}, B{C}, C{D}\fR,
this algorithm produces:
.P
.RS 2
-.EX
+.nf
A
+\-\- B
`\-\- C
`\-\- D
-.EE
+.fi
.RE
.P
That is, the dependency from B to C is satisfied by the fact that A
@@ -301,9 +301,9 @@ cause npm to try to install a never\-ending tree of packages\. Here is
the simplest case:
.P
.RS 2
-.EX
+.nf
A \-> B \-> A' \-> B' \-> A \-> B \-> A' \-> B' \-> A \-> \.\.\.
-.EE
+.fi
.RE
.P
where \fBA\fR is some version of a package, and \fBA'\fR is a different version
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 11ef2dc..62d7650 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,14 +1,14 @@
-.TH "NPM\-LINK" "1" "September 2014" "" ""
+.TH "NPM\-LINK" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm link (in package folder)
npm link [@/]
npm ln (with any of the previous argument usage)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -36,12 +36,12 @@ test it iteratively without having to continually rebuild\.
For example:
.P
.RS 2
-.EX
+.nf
cd ~/projects/node\-redis # go into the package directory
npm link # creates global link
cd ~/projects/node\-bloggy # go into some other package directory\.
npm link redis # link\-install the package
-.EE
+.fi
.RE
.P
Now, any changes to ~/projects/node\-redis will be reflected in
@@ -51,19 +51,19 @@ You may also shortcut the two steps in one\. For example, to do the
above use\-case in a shorter way:
.P
.RS 2
-.EX
+.nf
cd ~/projects/node\-bloggy # go into the dir of your main project
npm link \.\./node\-redis # link the dir of your dependency
-.EE
+.fi
.RE
.P
The second line is the equivalent of doing:
.P
.RS 2
-.EX
+.nf
(cd \.\./node\-redis; npm link)
npm link redis
-.EE
+.fi
.RE
.P
That is, it first creates a global link, and then links the global
@@ -73,9 +73,9 @@ If your linked package is scoped (see npm help 7 \fBnpm\-scope\fR) your link com
include that scope, e\.g\.
.P
.RS 2
-.EX
+.nf
npm link @myorg/privatepackage
-.EE
+.fi
.RE
.SH SEE ALSO
.RS 0
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 64db5a4..9cf4823 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,15 +1,15 @@
-.TH "NPM\-LS" "1" "September 2014" "" ""
+.TH "NPM\-LS" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm list [[@/] \.\.\.]
npm ls [[@/] \.\.\.]
npm la [[@/] \.\.\.]
npm ll [[@/] \.\.\.]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -22,11 +22,11 @@ nested packages will \fIalso\fR show the paths to the specified packages\.
For example, running \fBnpm ls promzard\fR in npm's source tree will show:
.P
.RS 2
-.EX
-npm@2.0.0 /path/to/npm
+.nf
+npm@2.1.6 /path/to/npm
ââ⬠init\-package\-json@0\.0\.4
âââ promzard@0\.1\.5
-.EE
+.fi
.RE
.P
It will print out extraneous, missing, and invalid packages\.
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 589bd6d..45433a8 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,12 +1,12 @@
-.TH "NPM\-OUTDATED" "1" "September 2014" "" ""
+.TH "NPM\-OUTDATED" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm outdated [ [ \.\.\.]]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index c073a8b..3ed5549 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,14 +1,14 @@
-.TH "NPM\-OWNER" "1" "September 2014" "" ""
+.TH "NPM\-OWNER" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm owner ls
npm owner add
npm owner rm
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index e90f378..8b9408a 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,12 +1,12 @@
-.TH "NPM\-PACK" "1" "September 2014" "" ""
+.TH "NPM\-PACK" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm pack [ [ \.\.\.]]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 373f5e4..b7bcac6 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,12 +1,12 @@
-.TH "NPM\-PREFIX" "1" "September 2014" "" ""
+.TH "NPM\-PREFIX" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm prefix [\-g]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 3c8a66a..1a8cc95 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,13 +1,13 @@
-.TH "NPM\-PRUNE" "1" "September 2014" "" ""
+.TH "NPM\-PRUNE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm prune [ [ [ [\-\-tag ]
npm publish [\-\-tag ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
-Publishes a package to the registry so that it can be installed by name\.
+Publishes a package to the registry so that it can be installed by name\. See
+npm help 7 \fBnpm\-developers\fR for details on what's included in the published package, as
+well as details on how the package is built\.
.P
By default npm will publish to the public registry\. This can be overridden by
specifying a different default registry or using a npm help 7 \fBnpm\-scope\fR in the name
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index f8d52a9..0e04b9c 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,13 +1,13 @@
-.TH "NPM\-REBUILD" "1" "September 2014" "" ""
+.TH "NPM\-REBUILD" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm rebuild [ [ \.\.\.]]
npm rb [ [ \.\.\.]]
-.EE
+.fi
.RE
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 57c48fb..dc8428d 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,13 +1,13 @@
-.TH "NPM\-REPO" "1" "September 2014" "" ""
+.TH "NPM\-REPO" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm repo
npm repo (with no args in a package dir)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index a4f95db..234d0aa 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,20 +1,17 @@
-.TH "NPM\-RESTART" "1" "September 2014" "" ""
+.TH "NPM\-RESTART" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Start a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm restart [\-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
-This runs a package's "restart" script, if one was provided\.
-Otherwise it runs package's "stop" script, if one was provided, and then
-the "start" script\.
-.P
-If no version is specified, then it restarts the "active" version\.
+This runs a package's "restart" script, if one was provided\. Otherwise it runs
+package's "stop" script, if one was provided, and then the "start" script\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1
index e9df0ff..c7f92fb 100644
--- a/deps/npm/man/man1/npm-rm.1
+++ b/deps/npm/man/man1/npm-rm.1
@@ -1,15 +1,15 @@
-.TH "NPM\-RM" "1" "September 2014" "" ""
+.TH "NPM\-RM" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm rm
npm r
npm uninstall
npm un
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index b80a855..f85ebb9 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,12 +1,12 @@
-.TH "NPM\-ROOT" "1" "September 2014" "" ""
+.TH "NPM\-ROOT" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm root
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 7ee4fc7..905908a 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,13 +1,13 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "September 2014" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm run\-script [command] [\-\- ]
npm run [command] [\-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -18,6 +18,20 @@ is provided, it will list the available top level scripts\.
.P
It is used by the test, start, restart, and stop commands, but can be
called directly, as well\.
+.P
+As of \fBnpm@2\.0\.0\fR \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
+use custom arguments when executing scripts\. The special option \fB\-\-\fR is used by
+getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass
+all the arguments after the \fB\-\-\fR directly to your script:
+.P
+.RS 2
+.nf
+npm run test \-\- \-\-grep="pattern"
+.fi
+.RE
+.P
+The arguments will only be passed to the script specified after \fBnpm run\fR
+and not to any pre or post script\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 16b3fa4..4ad5a67 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,14 +1,14 @@
-.TH "NPM\-SEARCH" "1" "September 2014" "" ""
+.TH "NPM\-SEARCH" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm search [\-\-long] [search terms \.\.\.]
npm s [search terms \.\.\.]
npm se [search terms \.\.\.]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index e154851..fa2b313 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,12 +1,12 @@
-.TH "NPM\-SHRINKWRAP" "1" "September 2014" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm shrinkwrap
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -31,7 +31,7 @@ but that may be undesirable for other reasons\.
As an example, consider package A:
.P
.RS 2
-.EX
+.nf
{
"name": "A",
"version": "0\.1\.0",
@@ -39,13 +39,13 @@ As an example, consider package A:
"B": "<0\.1\.0"
}
}
-.EE
+.fi
.RE
.P
package B:
.P
.RS 2
-.EX
+.nf
{
"name": "B",
"version": "0\.0\.1",
@@ -53,40 +53,40 @@ package B:
"C": "<0\.1\.0"
}
}
-.EE
+.fi
.RE
.P
and package C:
.P
.RS 2
-.EX
+.nf
{
"name": "C,
"version": "0\.0\.1"
}
-.EE
+.fi
.RE
.P
If these are the only versions of A, B, and C available in the
registry, then a normal "npm install A" will install:
.P
.RS 2
-.EX
+.nf
A@0\.1\.0
`\-\- B@0\.0\.1
`\-\- C@0\.0\.1
-.EE
+.fi
.RE
.P
However, if B@0\.0\.2 is published, then a fresh "npm install A" will
install:
.P
.RS 2
-.EX
+.nf
A@0\.1\.0
`\-\- B@0\.0\.2
`\-\- C@0\.0\.1
-.EE
+.fi
.RE
.P
assuming the new version did not modify B's dependencies\. Of course,
@@ -100,15 +100,15 @@ when B hasn't changed at all\.
In this case, A's author can run
.P
.RS 2
-.EX
+.nf
npm shrinkwrap
-.EE
+.fi
.RE
.P
This generates npm\-shrinkwrap\.json, which will look something like this:
.P
.RS 2
-.EX
+.nf
{
"name": "A",
"version": "0\.1\.0",
@@ -123,7 +123,7 @@ This generates npm\-shrinkwrap\.json, which will look something like this:
}
}
}
-.EE
+.fi
.RE
.P
The shrinkwrap command has locked down the dependencies based on
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 211225b..8dbc029 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,13 +1,13 @@
-.TH "NPM\-STAR" "1" "September 2014" "" ""
+.TH "NPM\-STAR" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm star [, \.\.\.]
npm unstar [, \.\.\.]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index 455cf4f..1762a0f 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,13 +1,13 @@
-.TH "NPM\-STARS" "1" "September 2014" "" ""
+.TH "NPM\-STARS" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm stars
npm stars [username]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 866cfd3..0a342ee 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,12 +1,12 @@
-.TH "NPM\-START" "1" "September 2014" "" ""
+.TH "NPM\-START" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm start [\-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 1c4a6a6..8622d18 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,12 +1,12 @@
-.TH "NPM\-STOP" "1" "September 2014" "" ""
+.TH "NPM\-STOP" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm stop [\-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-submodule.1 b/deps/npm/man/man1/npm-submodule.1
index bfb210d..4999ac6 100644
--- a/deps/npm/man/man1/npm-submodule.1
+++ b/deps/npm/man/man1/npm-submodule.1
@@ -1,12 +1,12 @@
-.TH "NPM\-SUBMODULE" "1" "September 2014" "" ""
+.TH "NPM\-SUBMODULE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-submodule\fR \- Add a package as a git submodule
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm submodule
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1
index 03fdbdb..5aace75 100644
--- a/deps/npm/man/man1/npm-tag.1
+++ b/deps/npm/man/man1/npm-tag.1
@@ -1,12 +1,12 @@
-.TH "NPM\-TAG" "1" "September 2014" "" ""
+.TH "NPM\-TAG" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm tag @ []
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -17,17 +17,17 @@ A tag can be used when installing packages as a reference to a version instead
of using a specific version number:
.P
.RS 2
-.EX
+.nf
npm install @
-.EE
+.fi
.RE
.P
When installing dependencies, a preferred tagged version may be specified:
.P
.RS 2
-.EX
+.nf
npm install \-\-tag
-.EE
+.fi
.RE
.P
This also applies to \fBnpm dedupe\fR\|\.
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index 8e92115..0b4a9f4 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,13 +1,13 @@
-.TH "NPM\-TEST" "1" "September 2014" "" ""
+.TH "NPM\-TEST" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm test [\-\- ]
npm tst [\-\- ]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 2ade4ac..a56f8bb 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,13 +1,13 @@
-.TH "NPM\-RM" "1" "September 2014" "" ""
+.TH "NPM\-RM" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm uninstall [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]
npm rm (with any of the previous argument usage)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -17,9 +17,9 @@ on its behalf\.
Example:
.P
.RS 2
-.EX
+.nf
npm uninstall sax
-.EE
+.fi
.RE
.P
In global mode (ie, with \fB\-g\fR or \fB\-\-global\fR appended to the command),
@@ -42,12 +42,12 @@ Scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fR\|\
Examples:
.P
.RS 2
-.EX
+.nf
npm uninstall sax \-\-save
npm uninstall @myorg/privatepackage \-\-save
npm uninstall node\-tap \-\-save\-dev
npm uninstall dtrace\-provider \-\-save\-optional
-.EE
+.fi
.RE
.SH SEE ALSO
.RS 0
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 9aec754..6cb1df7 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,12 +1,12 @@
-.TH "NPM\-UNPUBLISH" "1" "September 2014" "" ""
+.TH "NPM\-UNPUBLISH" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm unpublish [@/][@]
-.EE
+.fi
.RE
.SH WARNING
.P
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 4edfab3..19adfc9 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,12 +1,12 @@
-.TH "NPM\-UPDATE" "1" "September 2014" "" ""
+.TH "NPM\-UPDATE" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm update [\-g] [ [ \.\.\.]]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 5c05aab..21fde34 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,12 +1,12 @@
-.TH "NPM\-VERSION" "1" "September 2014" "" ""
+.TH "NPM\-VERSION" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -27,9 +27,9 @@ use it as a commit message when creating a version commit\. If the
resulting version number\. For example:
.P
.RS 2
-.EX
+.nf
npm version patch \-m "Upgrade to %s for reasons"
-.EE
+.fi
.RE
.P
If the \fBsign\-git\-tag\fR config is set, then the tag will be signed using
@@ -37,7 +37,7 @@ the \fB\-s\fR flag to git\. Note that you must have a default GPG key set up
in your git config for this to work properly\. For example:
.P
.RS 2
-.EX
+.nf
$ npm config set sign\-git\-tag true
$ npm version patch
@@ -46,7 +46,7 @@ user: "isaacs (http://blog\.izs\.me/) "
2048\-bit RSA key, ID 6C481CF6, created 2010\-08\-31
Enter passphrase:
-.EE
+.fi
.RE
.SH SEE ALSO
.RS 0
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index af435f0..35ef045 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,13 +1,13 @@
-.TH "NPM\-VIEW" "1" "September 2014" "" ""
+.TH "NPM\-VIEW" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm view [@/][@] [[\.]\.\.\.]
npm v [@/][@] [[\.]\.\.\.]
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -18,9 +18,9 @@ To show the package registry entry for the \fBconnect\fR package, you can do
this:
.P
.RS 2
-.EX
+.nf
npm view connect
-.EE
+.fi
.RE
.P
The default version is "latest" if unspecified\.
@@ -30,9 +30,9 @@ For example, to show the dependencies of the \fBronn\fR package at version
0\.3\.5, you could do the following:
.P
.RS 2
-.EX
+.nf
npm view ronn@0\.3\.5 dependencies
-.EE
+.fi
.RE
.P
You can view child field by separating them with a period\.
@@ -40,9 +40,9 @@ To view the git repository URL for the latest version of npm, you could
do this:
.P
.RS 2
-.EX
+.nf
npm view npm repository\.url
-.EE
+.fi
.RE
.P
This makes it easy to view information about a dependency with a bit of
@@ -50,9 +50,9 @@ shell scripting\. For example, to view all the data about the version of
opts that ronn depends on, you can do this:
.P
.RS 2
-.EX
+.nf
npm view opts@$(npm view ronn dependencies\.opts)
-.EE
+.fi
.RE
.P
For fields that are arrays, requesting a non\-numeric field will return
@@ -60,9 +60,9 @@ all of the values from the objects in the list\. For example, to get all
the contributor names for the "express" project, you can do this:
.P
.RS 2
-.EX
+.nf
npm view express contributors\.email
-.EE
+.fi
.RE
.P
You may also use numeric indices in square braces to specifically select
@@ -70,9 +70,9 @@ an item in an array field\. To just get the email address of the first
contributor in the list, you can do this:
.P
.RS 2
-.EX
+.nf
npm view express contributors[0]\.email
-.EE
+.fi
.RE
.P
Multiple fields may be specified, and will be printed one after another\.
@@ -80,9 +80,9 @@ For exampls, to get all the contributor names and email addresses, you
can do this:
.P
.RS 2
-.EX
+.nf
npm view express contributors\.name contributors\.email
-.EE
+.fi
.RE
.P
"Person" fields are shown as a string if they would be shown as an
@@ -90,9 +90,9 @@ object\. So, for example, this will show the list of npm contributors in
the shortened string format\. (See npm help 5 \fBpackage\.json\fR for more on this\.)
.P
.RS 2
-.EX
+.nf
npm view npm contributors
-.EE
+.fi
.RE
.P
If a version range is provided, then data will be printed for every
@@ -100,9 +100,9 @@ matching version of the package\. This will show which version of jsdom
was required by each matching version of yui3:
.P
.RS 2
-.EX
+.nf
npm view yui3@'>0\.5\.4' dependencies\.jsdom
-.EE
+.fi
.RE
.SH OUTPUT
.P
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 0d44c8b..34a3f04 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,12 +1,12 @@
-.TH "NPM\-WHOAMI" "1" "September 2014" "" ""
+.TH "NPM\-WHOAMI" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm whoami
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index a44acfe..a275e47 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,16 +1,16 @@
-.TH "NPM" "1" "September 2014" "" ""
+.TH "NPM" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm\fR \- node package manager
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm [args]
-.EE
+.fi
.RE
.SH VERSION
.P
-2.0.0
+2.1.6
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3
index 704b17c..4c76b8a 100644
--- a/deps/npm/man/man3/npm-bin.3
+++ b/deps/npm/man/man3/npm-bin.3
@@ -1,17 +1,17 @@
-.TH "NPM\-BIN" "3" "September 2014" "" ""
+.TH "NPM\-BIN" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.bin(args, cb)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
Print the folder where npm will install executables\.
.P
This function should not be used programmatically\. Instead, just refer
-to the \fBnpm\.bin\fR member\.
+to the \fBnpm\.bin\fR property\.
diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3
index c0809e6..cd8dda6 100644
--- a/deps/npm/man/man3/npm-bugs.3
+++ b/deps/npm/man/man3/npm-bugs.3
@@ -1,12 +1,12 @@
-.TH "NPM\-BUGS" "3" "September 2014" "" ""
+.TH "NPM\-BUGS" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.bugs(package, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3
index 125fcf7..1dccd8f 100644
--- a/deps/npm/man/man3/npm-cache.3
+++ b/deps/npm/man/man3/npm-cache.3
@@ -1,17 +1,17 @@
-.TH "NPM\-CACHE" "3" "September 2014" "" ""
+.TH "NPM\-CACHE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-cache\fR \- manage the npm cache programmatically
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.cache([args], callback)
// helpers
npm\.commands\.cache\.clean([args], callback)
npm\.commands\.cache\.add([args], callback)
npm\.commands\.cache\.read(name, version, forceBypass, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3
index 396b1c7..87ad325 100644
--- a/deps/npm/man/man3/npm-commands.3
+++ b/deps/npm/man/man3/npm-commands.3
@@ -1,12 +1,12 @@
-.TH "NPM\-COMMANDS" "3" "September 2014" "" ""
+.TH "NPM\-COMMANDS" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-commands\fR \- npm commands
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands[](args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3
index 0e8e364..763e225 100644
--- a/deps/npm/man/man3/npm-config.3
+++ b/deps/npm/man/man3/npm-config.3
@@ -1,14 +1,14 @@
-.TH "NPM\-CONFIG" "3" "September 2014" "" ""
+.TH "NPM\-CONFIG" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.config(args, callback)
var val = npm\.config\.get(key)
npm\.config\.set(key, val)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3
index ba5ffbd..9b543d3 100644
--- a/deps/npm/man/man3/npm-deprecate.3
+++ b/deps/npm/man/man3/npm-deprecate.3
@@ -1,12 +1,12 @@
-.TH "NPM\-DEPRECATE" "3" "September 2014" "" ""
+.TH "NPM\-DEPRECATE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.deprecate(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3
index 6aec6d7..ad93e30 100644
--- a/deps/npm/man/man3/npm-docs.3
+++ b/deps/npm/man/man3/npm-docs.3
@@ -1,12 +1,12 @@
-.TH "NPM\-DOCS" "3" "September 2014" "" ""
+.TH "NPM\-DOCS" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.docs(package, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3
index 0c52d96..82767c8 100644
--- a/deps/npm/man/man3/npm-edit.3
+++ b/deps/npm/man/man3/npm-edit.3
@@ -1,12 +1,12 @@
-.TH "NPM\-EDIT" "3" "September 2014" "" ""
+.TH "NPM\-EDIT" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.edit(package, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3
index 8b0cb72..54948ea 100644
--- a/deps/npm/man/man3/npm-explore.3
+++ b/deps/npm/man/man3/npm-explore.3
@@ -1,12 +1,12 @@
-.TH "NPM\-EXPLORE" "3" "September 2014" "" ""
+.TH "NPM\-EXPLORE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.explore(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3
index 8b92f90..8f4f346 100644
--- a/deps/npm/man/man3/npm-help-search.3
+++ b/deps/npm/man/man3/npm-help-search.3
@@ -1,12 +1,12 @@
-.TH "NPM\-HELP\-SEARCH" "3" "September 2014" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search the help pages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.helpSearch(args, [silent,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -37,5 +37,5 @@ Name of the file that matched
.RE
.P
-The silent parameter is not neccessary not used, but it may in the future\.
+The silent parameter is not necessary not used, but it may in the future\.
diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3
index 87059d9..d5da00d 100644
--- a/deps/npm/man/man3/npm-init.3
+++ b/deps/npm/man/man3/npm-init.3
@@ -1,12 +1,12 @@
-.TH "NPM" "" "September 2014" "" ""
+.TH "NPM" "" "October 2014" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.init(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3
index 3202bdf..ec98278 100644
--- a/deps/npm/man/man3/npm-install.3
+++ b/deps/npm/man/man3/npm-install.3
@@ -1,12 +1,12 @@
-.TH "NPM\-INSTALL" "3" "September 2014" "" ""
+.TH "NPM\-INSTALL" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-install\fR \- install a package programmatically
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.install([where,] packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3
index ff5ea0f..0c379a4 100644
--- a/deps/npm/man/man3/npm-link.3
+++ b/deps/npm/man/man3/npm-link.3
@@ -1,13 +1,13 @@
-.TH "NPM\-LINK" "3" "September 2014" "" ""
+.TH "NPM\-LINK" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.link(callback)
npm\.commands\.link(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -29,11 +29,11 @@ iteratively without having to continually rebuild\.
For example:
.P
.RS 2
-.EX
+.nf
npm\.commands\.link(cb) # creates global link from the cwd
# (say redis package)
npm\.commands\.link('redis', cb) # link\-install the package
-.EE
+.fi
.RE
.P
Now, any changes to the redis package will be reflected in
diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3
index 8189b5a..61fac42 100644
--- a/deps/npm/man/man3/npm-load.3
+++ b/deps/npm/man/man3/npm-load.3
@@ -1,21 +1,21 @@
-.TH "NPM\-LOAD" "3" "September 2014" "" ""
+.TH "NPM\-LOAD" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-load\fR \- Load config settings
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.load(conf, cb)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
npm\.load() must be called before any other function call\. Both parameters are
optional, but the second is recommended\.
.P
-The first parameter is an object hash of command\-line config params, and the
-second parameter is a callback that will be called when npm is loaded and
-ready to serve\.
+The first parameter is an object containing command\-line config params, and the
+second parameter is a callback that will be called when npm is loaded and ready
+to serve\.
.P
The first parameter should follow a similar structure as the package\.json
config object\.
@@ -23,11 +23,11 @@ config object\.
For example, to emulate the \-\-dev flag, pass an object that looks like this:
.P
.RS 2
-.EX
+.nf
{
"dev": true
}
-.EE
+.fi
.RE
.P
For a list of all the available command\-line configs, see \fBnpm help config\fR
diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3
index a8ce7f7..84558ab 100644
--- a/deps/npm/man/man3/npm-ls.3
+++ b/deps/npm/man/man3/npm-ls.3
@@ -1,12 +1,12 @@
-.TH "NPM\-LS" "3" "September 2014" "" ""
+.TH "NPM\-LS" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.ls(args, [silent,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3
index ac653f9..2bba846 100644
--- a/deps/npm/man/man3/npm-outdated.3
+++ b/deps/npm/man/man3/npm-outdated.3
@@ -1,12 +1,12 @@
-.TH "NPM\-OUTDATED" "3" "September 2014" "" ""
+.TH "NPM\-OUTDATED" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.outdated([packages,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3
index ac4ad14..101b752 100644
--- a/deps/npm/man/man3/npm-owner.3
+++ b/deps/npm/man/man3/npm-owner.3
@@ -1,12 +1,12 @@
-.TH "NPM\-OWNER" "3" "September 2014" "" ""
+.TH "NPM\-OWNER" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.owner(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3
index 07b6399..d9da93e 100644
--- a/deps/npm/man/man3/npm-pack.3
+++ b/deps/npm/man/man3/npm-pack.3
@@ -1,12 +1,12 @@
-.TH "NPM\-PACK" "3" "September 2014" "" ""
+.TH "NPM\-PACK" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.pack([packages,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3
index d83aea1..e2da6d6 100644
--- a/deps/npm/man/man3/npm-prefix.3
+++ b/deps/npm/man/man3/npm-prefix.3
@@ -1,12 +1,12 @@
-.TH "NPM\-PREFIX" "3" "September 2014" "" ""
+.TH "NPM\-PREFIX" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.prefix(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3
index 7ad7ebc..48a06c9 100644
--- a/deps/npm/man/man3/npm-prune.3
+++ b/deps/npm/man/man3/npm-prune.3
@@ -1,12 +1,12 @@
-.TH "NPM\-PRUNE" "3" "September 2014" "" ""
+.TH "NPM\-PRUNE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.prune([packages,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3
index 877ab41..13dbd95 100644
--- a/deps/npm/man/man3/npm-publish.3
+++ b/deps/npm/man/man3/npm-publish.3
@@ -1,12 +1,12 @@
-.TH "NPM\-PUBLISH" "3" "September 2014" "" ""
+.TH "NPM\-PUBLISH" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.publish([packages,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3
index 1a0387f..21a5aba 100644
--- a/deps/npm/man/man3/npm-rebuild.3
+++ b/deps/npm/man/man3/npm-rebuild.3
@@ -1,12 +1,12 @@
-.TH "NPM\-REBUILD" "3" "September 2014" "" ""
+.TH "NPM\-REBUILD" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.rebuild([packages,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3
index e889528..5638d43 100644
--- a/deps/npm/man/man3/npm-repo.3
+++ b/deps/npm/man/man3/npm-repo.3
@@ -1,12 +1,12 @@
-.TH "NPM\-REPO" "3" "September 2014" "" ""
+.TH "NPM\-REPO" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.repo(package, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3
index 9085436..be94833 100644
--- a/deps/npm/man/man3/npm-restart.3
+++ b/deps/npm/man/man3/npm-restart.3
@@ -1,12 +1,12 @@
-.TH "NPM\-RESTART" "3" "September 2014" "" ""
+.TH "NPM\-RESTART" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Start a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.restart(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3
index 36ce001..68bac79 100644
--- a/deps/npm/man/man3/npm-root.3
+++ b/deps/npm/man/man3/npm-root.3
@@ -1,12 +1,12 @@
-.TH "NPM\-ROOT" "3" "September 2014" "" ""
+.TH "NPM\-ROOT" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.root(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3
index 2ec3a67..866f1e0 100644
--- a/deps/npm/man/man3/npm-run-script.3
+++ b/deps/npm/man/man3/npm-run-script.3
@@ -1,12 +1,12 @@
-.TH "NPM\-RUN\-SCRIPT" "3" "September 2014" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.run\-script(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3
index e508a01..ba0cc5f 100644
--- a/deps/npm/man/man3/npm-search.3
+++ b/deps/npm/man/man3/npm-search.3
@@ -1,12 +1,12 @@
-.TH "NPM\-SEARCH" "3" "September 2014" "" ""
+.TH "NPM\-SEARCH" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.search(searchTerms, [silent,] [staleness,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3
index d7e4ba8..0f87c50 100644
--- a/deps/npm/man/man3/npm-shrinkwrap.3
+++ b/deps/npm/man/man3/npm-shrinkwrap.3
@@ -1,12 +1,12 @@
-.TH "NPM\-SHRINKWRAP" "3" "September 2014" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.shrinkwrap(args, [silent,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3
index 7942fbd..4eabb36 100644
--- a/deps/npm/man/man3/npm-start.3
+++ b/deps/npm/man/man3/npm-start.3
@@ -1,12 +1,12 @@
-.TH "NPM\-START" "3" "September 2014" "" ""
+.TH "NPM\-START" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.start(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3
index b7d2d6d..aa55b84 100644
--- a/deps/npm/man/man3/npm-stop.3
+++ b/deps/npm/man/man3/npm-stop.3
@@ -1,12 +1,12 @@
-.TH "NPM\-STOP" "3" "September 2014" "" ""
+.TH "NPM\-STOP" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.stop(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-submodule.3 b/deps/npm/man/man3/npm-submodule.3
index 7ade6d2..378862a 100644
--- a/deps/npm/man/man3/npm-submodule.3
+++ b/deps/npm/man/man3/npm-submodule.3
@@ -1,12 +1,12 @@
-.TH "NPM\-SUBMODULE" "3" "September 2014" "" ""
+.TH "NPM\-SUBMODULE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-submodule\fR \- Add a package as a git submodule
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.submodule(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3
index a6d3476..4da1376 100644
--- a/deps/npm/man/man3/npm-tag.3
+++ b/deps/npm/man/man3/npm-tag.3
@@ -1,12 +1,12 @@
-.TH "NPM\-TAG" "3" "September 2014" "" ""
+.TH "NPM\-TAG" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.tag(package@version, tag, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3
index 02f4de0..f6d0f6d 100644
--- a/deps/npm/man/man3/npm-test.3
+++ b/deps/npm/man/man3/npm-test.3
@@ -1,12 +1,12 @@
-.TH "NPM\-TEST" "3" "September 2014" "" ""
+.TH "NPM\-TEST" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.test(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3
index 883deaf..8505f39 100644
--- a/deps/npm/man/man3/npm-uninstall.3
+++ b/deps/npm/man/man3/npm-uninstall.3
@@ -1,12 +1,12 @@
-.TH "NPM\-UNINSTALL" "3" "September 2014" "" ""
+.TH "NPM\-UNINSTALL" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- uninstall a package programmatically
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.uninstall(packages, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3
index 8420247..9b4ab46 100644
--- a/deps/npm/man/man3/npm-unpublish.3
+++ b/deps/npm/man/man3/npm-unpublish.3
@@ -1,12 +1,12 @@
-.TH "NPM\-UNPUBLISH" "3" "September 2014" "" ""
+.TH "NPM\-UNPUBLISH" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.unpublish(package, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3
index 55fb3d1..3f40eb0 100644
--- a/deps/npm/man/man3/npm-update.3
+++ b/deps/npm/man/man3/npm-update.3
@@ -1,14 +1,14 @@
-.TH "NPM\-UPDATE" "3" "September 2014" "" ""
+.TH "NPM\-UPDATE" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.update(packages, callback)
-.EE
+.fi
.RE
-.TH "DESCRIPTION" "" "September 2014" "" ""
+.TH "DESCRIPTION" "" "October 2014" "" ""
.SH "NAME"
\fBDESCRIPTION\fR
.P
diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3
index 0cbf79c..1697924 100644
--- a/deps/npm/man/man3/npm-version.3
+++ b/deps/npm/man/man3/npm-version.3
@@ -1,12 +1,12 @@
-.TH "NPM\-VERSION" "3" "September 2014" "" ""
+.TH "NPM\-VERSION" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.version(newversion, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3
index 2201f54..e49f28d 100644
--- a/deps/npm/man/man3/npm-view.3
+++ b/deps/npm/man/man3/npm-view.3
@@ -1,12 +1,12 @@
-.TH "NPM\-VIEW" "3" "September 2014" "" ""
+.TH "NPM\-VIEW" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(args, [silent,] callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
@@ -25,9 +25,9 @@ For example, to get the package registry entry for the \fBconnect\fR package,
you can do this:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["connect"], callback)
-.EE
+.fi
.RE
.P
If no version is specified, "latest" is assumed\.
@@ -37,9 +37,9 @@ For example, to show the dependencies of the \fBronn\fR package at version
0\.3\.5, you could do the following:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["ronn@0\.3\.5", "dependencies"], callback)
-.EE
+.fi
.RE
.P
You can view child field by separating them with a period\.
@@ -47,9 +47,9 @@ To view the git repository URL for the latest version of npm, you could
do this:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["npm", "repository\.url"], callback)
-.EE
+.fi
.RE
.P
For fields that are arrays, requesting a non\-numeric field will return
@@ -57,9 +57,9 @@ all of the values from the objects in the list\. For example, to get all
the contributor names for the "express" project, you can do this:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["express", "contributors\.email"], callback)
-.EE
+.fi
.RE
.P
You may also use numeric indices in square braces to specifically select
@@ -67,9 +67,9 @@ an item in an array field\. To just get the email address of the first
contributor in the list, you can do this:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["express", "contributors[0]\.email"], callback)
-.EE
+.fi
.RE
.P
Multiple fields may be specified, and will be printed one after another\.
@@ -77,9 +77,9 @@ For exampls, to get all the contributor names and email addresses, you
can do this:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["express", "contributors\.name", "contributors\.email"], callback)
-.EE
+.fi
.RE
.P
"Person" fields are shown as a string if they would be shown as an
@@ -87,9 +87,9 @@ object\. So, for example, this will show the list of npm contributors in
the shortened string format\. (See \fBnpm help json\fR for more on this\.)
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["npm", "contributors"], callback)
-.EE
+.fi
.RE
.P
If a version range is provided, then data will be printed for every
@@ -97,9 +97,9 @@ matching version of the package\. This will show which version of jsdom
was required by each matching version of yui3:
.P
.RS 2
-.EX
+.nf
npm\.commands\.view(["yui3@'>0\.5\.4'", "dependencies\.jsdom"], callback)
-.EE
+.fi
.RE
.SH OUTPUT
.P
@@ -119,12 +119,12 @@ Console output can be disabled by setting the 'silent' parameter to true\.
The data returned will be an object in this formation:
.P
.RS 2
-.EX
+.nf
{ :
{ :
, \.\.\. }
, \.\.\. }
-.EE
+.fi
.RE
.P
corresponding to the list of fields selected\.
diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3
index 272d6b1..2d32507 100644
--- a/deps/npm/man/man3/npm-whoami.3
+++ b/deps/npm/man/man3/npm-whoami.3
@@ -1,12 +1,12 @@
-.TH "NPM\-WHOAMI" "3" "September 2014" "" ""
+.TH "NPM\-WHOAMI" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
npm\.commands\.whoami(args, callback)
-.EE
+.fi
.RE
.SH DESCRIPTION
.P
diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3
index 41103a0..71bbc58 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -1,10 +1,10 @@
-.TH "NPM" "3" "September 2014" "" ""
+.TH "NPM" "3" "October 2014" "" ""
.SH "NAME"
\fBnpm\fR \- node package manager
.SH SYNOPSIS
.P
.RS 2
-.EX
+.nf
var npm = require("npm")
npm\.load([configObject, ]function (er, npm) {
// use the npm object, now that it's loaded\.
@@ -16,24 +16,23 @@ npm\.load([configObject, ]function (er, npm) {
npm\.commands\.install(["package"], cb)
})
-.EE
+.fi
.RE
.SH VERSION
.P
-2.0.0
+2.1.6
.SH DESCRIPTION
.P
This is the API documentation for npm\.
To find documentation of the command line
client, see npm help \fBnpm\fR\|\.
.P
-Prior to using npm's commands, \fBnpm\.load()\fR must be called\.
-If you provide \fBconfigObject\fR as an object hash of top\-level
-configs, they override the values stored in the various config
-locations\. In the npm command line client, this set of configs
-is parsed from the command line options\. Additional configuration
-params are loaded from two configuration files\. See npm help \fBnpm\-config\fR,
-npm help 7 \fBnpm\-config\fR, and npm help 5 \fBnpmrc\fR for more information\.
+Prior to using npm's commands, \fBnpm\.load()\fR must be called\. If you provide
+\fBconfigObject\fR as an object map of top\-level configs, they override the values
+stored in the various config locations\. In the npm command line client, this
+set of configs is parsed from the command line options\. Additional
+configuration params are loaded from two configuration files\. See
+npm help \fBnpm\-config\fR, npm help 7 \fBnpm\-config\fR, and npm help 5 \fBnpmrc\fR for more information\.
.P
After that, each of the functions are accessible in the
commands object: \fBnpm\.commands\.\fR\|\. See npm help 7 \fBnpm\-index\fR for a list of
@@ -89,9 +88,9 @@ command\.
.RE
.SH MAGIC
.P
-For each of the methods in the \fBnpm\.commands\fR hash, a method is added to
-the npm object, which takes a set of positional string arguments rather
-than an array and a callback\.
+For each of the methods in the \fBnpm\.commands\fR object, a method is added to the
+npm object, which takes a set of positional string arguments rather than an
+array and a callback\.
.P
If the last argument is a callback, then it will use the supplied
callback\. However, if no callback is provided, then it will print out
@@ -100,11 +99,11 @@ the error or results\.
For example, this would work in a node repl:
.P
.RS 2
-.EX
+.nf
> npm = require("npm")
> npm\.load() // wait a sec\.\.\.
> npm\.install("dnode", "express")
-.EE
+.fi
.RE
.P
Note that that \fIwon't\fR work in a node program, since the \fBinstall\fR
@@ -118,8 +117,8 @@ method names\. Use the \fBnpm\.deref\fR method to find the real name\.
For example:
.P
.RS 2
-.EX
+.nf
var cmd = npm\.deref("unp") // cmd === "unpublish"
-.EE
+.fi
.RE
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index 4f4d2cc..9cd3436 100644
--- a/deps/npm/man/man5/npm-folders.5
+++ b/deps/npm/man/man5/npm-folders.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "September 2014" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2014" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -142,7 +142,7 @@ highest level possible, below the localized "target" folder\.
Consider this dependency graph:
.P
.RS 2
-.EX
+.nf
foo
+\-\- blerg@1\.2\.5
+\-\- bar@1\.2\.3
@@ -154,13 +154,13 @@ foo
`\-\- baz@1\.2\.3
`\-\- quux@3\.x
`\-\- bar
-.EE
+.fi
.RE
.P
In this case, we might expect a folder structure like this:
.P
.RS 2
-.EX
+.nf
foo
+\-\- node_modules
+\-\- blerg (1\.2\.5) <\-\-\-[A]
@@ -173,7 +173,7 @@ foo
`\-\- baz (1\.2\.3) <\-\-\-[D]
`\-\- node_modules
`\-\- quux (3\.2\.0) <\-\-\-[E]
-.EE
+.fi
.RE
.P
Since foo depends directly on \fBbar@1\.2\.3\fR and \fBbaz@1\.2\.3\fR, those are
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index 4f4d2cc..9cd3436 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "September 2014" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2014" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -142,7 +142,7 @@ highest level possible, below the localized "target" folder\.
Consider this dependency graph:
.P
.RS 2
-.EX
+.nf
foo
+\-\- blerg@1\.2\.5
+\-\- bar@1\.2\.3
@@ -154,13 +154,13 @@ foo
`\-\- baz@1\.2\.3
`\-\- quux@3\.x
`\-\- bar
-.EE
+.fi
.RE
.P
In this case, we might expect a folder structure like this:
.P
.RS 2
-.EX
+.nf
foo
+\-\- node_modules
+\-\- blerg (1\.2\.5) <\-\-\-[A]
@@ -173,7 +173,7 @@ foo
`\-\- baz (1\.2\.3) <\-\-\-[D]
`\-\- node_modules
`\-\- quux (3\.2\.0) <\-\-\-[E]
-.EE
+.fi
.RE
.P
Since foo depends directly on \fBbar@1\.2\.3\fR and \fBbaz@1\.2\.3\fR, those are
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 8ab713c..fa9ef95 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "September 2014" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2014" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -76,11 +76,11 @@ with your package\.
It should look like this:
.P
.RS 2
-.EX
+.nf
{ "url" : "http://github\.com/owner/project/issues"
, "email" : "project@hostname\.com"
}
-.EE
+.fi
.RE
.P
You can specify either one or both values\. If you want to provide only a url,
@@ -97,9 +97,9 @@ or MIT, is to just specify the standard SPDX ID of the license you're using,
like this:
.P
.RS 2
-.EX
+.nf
{ "license" : "BSD\-3\-Clause" }
-.EE
+.fi
.RE
.P
You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\.
@@ -114,20 +114,20 @@ The "author" is one person\. "contributors" is an array of people\. A "person"
is an object with a "name" field and optionally "url" and "email", like this:
.P
.RS 2
-.EX
+.nf
{ "name" : "Barney Rubble"
, "email" : "b@rubble\.com"
, "url" : "http://barnyrubble\.tumblr\.com/"
}
-.EE
+.fi
.RE
.P
Or you can shorten that all into a single string, and npm will parse it for you:
.P
.RS 2
-.EX
+.nf
"Barney Rubble (http://barnyrubble\.tumblr\.com/)
-.EE
+.fi
.RE
.P
Both email and url are optional either way\.
@@ -167,9 +167,9 @@ installs\.
For example, npm has this:
.P
.RS 2
-.EX
+.nf
{ "bin" : { "npm" : "\./cli\.js" } }
-.EE
+.fi
.RE
.P
So, when you install npm, it'll create a symlink from the \fBcli\.js\fR script to
@@ -179,21 +179,21 @@ If you have a single executable, and its name should be the name
of the package, then you can just supply it as a string\. For example:
.P
.RS 2
-.EX
+.nf
{ "name": "my\-program"
, "version": "1\.2\.5"
, "bin": "\./path/to/program" }
-.EE
+.fi
.RE
.P
would be the same as this:
.P
.RS 2
-.EX
+.nf
{ "name": "my\-program"
, "version": "1\.2\.5"
, "bin" : { "my\-program" : "\./path/to/program" } }
-.EE
+.fi
.RE
.SH man
.P
@@ -204,14 +204,14 @@ If only a single file is provided, then it's installed such that it is the
result from \fBman \fR, regardless of its actual filename\. For example:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : "\./man/doc\.1"
}
-.EE
+.fi
.RE
.P
would link the \fB\|\./man/doc\.1\fR file in such that it is the target for \fBman foo\fR
@@ -220,14 +220,14 @@ If the filename doesn't start with the package name, then it's prefixed\.
So, this:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ]
}
-.EE
+.fi
.RE
.P
will create files to do \fBman foo\fR and \fBman foo\-bar\fR\|\.
@@ -236,14 +236,14 @@ Man files must end with a number, and optionally a \fB\|\.gz\fR suffix if they a
compressed\. The number dictates which man section the file is installed into\.
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ]
}
-.EE
+.fi
.RE
.P
will create entries for \fBman foo\fR and \fBman 2 foo\fR
@@ -251,7 +251,7 @@ will create entries for \fBman foo\fR and \fBman 2 foo\fR
.P
The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a
few ways that you can indicate the structure of your package using a \fBdirectories\fR
-hash\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
+object\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
you'll see that it has directories for doc, lib, and man\.
.P
In the future, this information may be used in other creative ways\.
@@ -261,10 +261,10 @@ Tell people where the bulk of your library is\. Nothing special is done
with the lib folder in any way, but it's useful meta info\.
.SS directories\.bin
.P
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash\.
+If you specify a \fBbin\fR directory, then all the files in that folder will
+be added as children of the \fBbin\fR path\.
.P
-If you have a "bin" hash already, then this has no effect\.
+If you have a \fBbin\fR path already, then this has no effect\.
.SS directories\.man
.P
A folder that is full of man pages\. Sugar to generate a "man" array by
@@ -285,7 +285,7 @@ command will be able to find you\.
Do it like this:
.P
.RS 2
-.EX
+.nf
"repository" :
{ "type" : "git"
, "url" : "http://github\.com/npm/npm\.git"
@@ -295,7 +295,7 @@ Do it like this:
{ "type" : "svn"
, "url" : "http://v8\.googlecode\.com/svn/trunk/"
}
-.EE
+.fi
.RE
.P
The URL should be a publicly available (perhaps read\-only) url that can be handed
@@ -303,22 +303,22 @@ directly to a VCS program without any modification\. It should not be a url to
html project page that you put in your browser\. It's for computers\.
.SH scripts
.P
-The "scripts" member is an object hash of script commands that are run
+The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package\. The key is the lifecycle
event, and the value is the command to run at that point\.
.P
See npm help 7 \fBnpm\-scripts\fR to find out more about writing package scripts\.
.SH config
.P
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades\. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades\. For instance, if a package had the
+following:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "config" : { "port" : "8080" } }
-.EE
+.fi
.RE
.P
and then had a "start" command that then referenced the
@@ -329,13 +329,13 @@ See npm help 7 \fBnpm\-config\fR and npm help 7 \fBnpm\-scripts\fR for more on p
configs\.
.SH dependencies
.P
-Dependencies are specified with a simple hash of package name to
+Dependencies are specified in a simple object that maps a package name to a
version range\. The version range is a string which has one or more
-space\-separated descriptors\. Dependencies can also be identified with
-a tarball or git URL\.
+space\-separated descriptors\. Dependencies can also be identified with a
+tarball or git URL\.
.P
\fBPlease do not put test harnesses or transpilers in your
-\fBdependencies\fR hash\.\fR See \fBdevDependencies\fR, below\.
+\fBdependencies\fR object\.\fR See \fBdevDependencies\fR, below\.
.P
See npm help 7 semver for more details about specifying version ranges\.
.RS 0
@@ -379,7 +379,7 @@ See npm help 7 semver for more details about specifying version ranges\.
For example, these are all valid:
.P
.RS 2
-.EX
+.nf
{ "dependencies" :
{ "foo" : "1\.0\.0 \- 2\.9999\.9999"
, "bar" : ">=1\.0\.2 <2\.1\.2"
@@ -392,10 +392,10 @@ For example, these are all valid:
, "two" : "2\.x"
, "thr" : "3\.3\.x"
, "lat" : "latest"
- , "dyl" : "~/projects/dyl"
+ , "dyl" : "file:\.\./dyl"
}
}
-.EE
+.fi
.RE
.SS URLs as Dependencies
.P
@@ -408,13 +408,13 @@ install time\.
Git urls can be of the form:
.P
.RS 2
-.EX
+.nf
git://github\.com/user/project\.git#commit\-ish
git+ssh://user@hostname:project\.git#commit\-ish
git+ssh://user@hostname/project\.git#commit\-ish
git+http://user@hostname/project/blah\.git#commit\-ish
git+https://user@hostname/project/blah\.git#commit\-ish
-.EE
+.fi
.RE
.P
The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
@@ -424,7 +424,7 @@ an argument to \fBgit checkout\fR\|\. The default is \fBmaster\fR\|\.
As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-project"\. For example:
.P
.RS 2
-.EX
+.nf
{
"name": "foo",
"version": "0\.0\.0",
@@ -432,20 +432,35 @@ As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-p
"express": "visionmedia/express"
}
}
-.EE
+.fi
.RE
.SH Local Paths
.P
-As of version 2\.0\.0 you can provide a path to a local directory that
-contains a package\. Local paths can be in the form:
+As of version 2\.0\.0 you can provide a path to a local directory that contains a
+package\. Local paths can be saved using \fBnpm install \-\-save\fR, using any of
+these forms:
.P
.RS 2
-.EX
+.nf
\|\.\./foo/bar
~/foo/bar
\|\./foo/bar
/foo/bar
-.EE
+.fi
+.RE
+.P
+in which case they will be normalized to a relative path and added to your
+\fBpackage\.json\fR\|\. For example:
+.P
+.RS 2
+.nf
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:\.\./foo/bar"
+ }
+}
+.fi
.RE
.P
This feature is helpful for local offline development and creating
@@ -458,8 +473,8 @@ If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use\.
.P
-In this case, it's best to list these additional items in a
-\fBdevDependencies\fR hash\.
+In this case, it's best to map these additional items in a \fBdevDependencies\fR
+object\.
.P
These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR
from the root of a package, and can be managed like any other npm
@@ -472,7 +487,7 @@ script to do this, and make the required package a devDependency\.
For example:
.P
.RS 2
-.EX
+.nf
{ "name": "ethopia\-waza",
"description": "a delightfully fruity coffee varietal",
"version": "1\.2\.3",
@@ -484,7 +499,7 @@ For example:
},
"main": "lib/waza\.js"
}
-.EE
+.fi
.RE
.P
The \fBprepublish\fR script will be run before publishing, so that users
@@ -501,7 +516,7 @@ a specific interface, expected and specified by the host documentation\.
For example:
.P
.RS 2
-.EX
+.nf
{
"name": "tea\-latte",
"version": "1\.3\.5"
@@ -509,7 +524,7 @@ For example:
"tea": "2\.x"
}
}
-.EE
+.fi
.RE
.P
This ensures your package \fBtea\-latte\fR can be installed \fIalong\fR with the second
@@ -518,10 +533,10 @@ installed if needed\. \fBnpm install tea\-latte\fR could possibly yield the foll
dependency graph:
.P
.RS 2
-.EX
+.nf
âââ tea\-latte@1\.3\.5
âââ tea@2\.2\.0
-.EE
+.fi
.RE
.P
Trying to install another plugin with a conflicting requirement will cause an
@@ -539,17 +554,17 @@ Array of package names that will be bundled when publishing the package\.
If this is spelled \fB"bundleDependencies"\fR, then that is also honorable\.
.SH optionalDependencies
.P
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-\fBoptionalDependencies\fR hash\. This is a map of package name to version
-or url, just like the \fBdependencies\fR hash\. The difference is that
-failure is tolerated\.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the \fBoptionalDependencies\fR
+object\. This is a map of package name to version or url, just like the
+\fBdependencies\fR object\. The difference is that build failures do not cause
+installation to fail\.
.P
It is still your program's responsibility to handle the lack of the
dependency\. For example, something like this:
.P
.RS 2
-.EX
+.nf
try {
var foo = require('foo')
var fooVersion = require('foo/package\.json')\.version
@@ -565,7 +580,7 @@ if ( notGoodFooVersion(fooVersion) ) {
if (foo) {
foo\.doFooThings()
}
-.EE
+.fi
.RE
.P
Entries in \fBoptionalDependencies\fR will override entries of the same name in
@@ -575,9 +590,9 @@ Entries in \fBoptionalDependencies\fR will override entries of the same name in
You can specify the version of node that your stuff works on:
.P
.RS 2
-.EX
+.nf
{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } }
-.EE
+.fi
.RE
.P
And, like with dependencies, if you don't specify the version (or if you
@@ -591,9 +606,9 @@ You can also use the "engines" field to specify which versions of npm
are capable of properly installing your program\. For example:
.P
.RS 2
-.EX
+.nf
{ "engines" : { "npm" : "~1\.0\.20" } }
-.EE
+.fi
.RE
.P
Note that, unless the user has set the \fBengine\-strict\fR config flag, this
@@ -601,12 +616,12 @@ field is advisory only\.
.SH engineStrict
.P
If you are sure that your module will \fIdefinitely not\fR run properly on
-versions of Node/npm other than those specified in the \fBengines\fR hash,
+versions of Node/npm other than those specified in the \fBengines\fR object,
then you can set \fB"engineStrict": true\fR in your package\.json file\.
This will override the user's \fBengine\-strict\fR config setting\.
.P
Please do not do this unless you are really very very sure\. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node\. Consider this choice carefully\. If
people abuse it, it will be removed in a future version of npm\.
@@ -616,18 +631,18 @@ You can specify which operating systems your
module will run on:
.P
.RS 2
-.EX
+.nf
"os" : [ "darwin", "linux" ]
-.EE
+.fi
.RE
.P
You can also blacklist instead of whitelist operating systems,
just prepend the blacklisted os with a '!':
.P
.RS 2
-.EX
+.nf
"os" : [ "!win32" ]
-.EE
+.fi
.RE
.P
The host operating system is determined by \fBprocess\.platform\fR
@@ -640,17 +655,17 @@ If your code only runs on certain cpu architectures,
you can specify which ones\.
.P
.RS 2
-.EX
+.nf
"cpu" : [ "x64", "ia32" ]
-.EE
+.fi
.RE
.P
Like the \fBos\fR option, you can also blacklist architectures:
.P
.RS 2
-.EX
+.nf
"cpu" : [ "!arm", "!mips" ]
-.EE
+.fi
.RE
.P
The host architecture is determined by \fBprocess\.arch\fR
@@ -667,11 +682,11 @@ does help prevent some confusion if it doesn't work as expected\.
If you set \fB"private": true\fR in your package\.json, then npm will refuse
to publish it\.
.P
-This is a way to prevent accidental publication of private repositories\.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the \fBpublishConfig\fR hash described below
-to override the \fBregistry\fR config param at publish\-time\.
+This is a way to prevent accidental publication of private repositories\. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+\fBpublishConfig\fR dictionary described below to override the \fBregistry\fR config
+param at publish\-time\.
.SH publishConfig
.P
This is a set of config values that will be used at publish\-time\. It's
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 569b7c5..d284686 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "September 2014" "" ""
+.TH "NPMRC" "5" "October 2014" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
@@ -30,9 +30,9 @@ parameters\. Environment variables can be replaced using
\fB${VARIABLE_NAME}\fR\|\. For example:
.P
.RS 2
-.EX
+.nf
prefix = ${HOME}/\.npm\-packages
-.EE
+.fi
.RE
.P
Each of these files is loaded, and config options are resolved in
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index 8ab713c..fa9ef95 100644
--- a/deps/npm/man/man5/package.json.5
+++ b/deps/npm/man/man5/package.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "September 2014" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2014" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -76,11 +76,11 @@ with your package\.
It should look like this:
.P
.RS 2
-.EX
+.nf
{ "url" : "http://github\.com/owner/project/issues"
, "email" : "project@hostname\.com"
}
-.EE
+.fi
.RE
.P
You can specify either one or both values\. If you want to provide only a url,
@@ -97,9 +97,9 @@ or MIT, is to just specify the standard SPDX ID of the license you're using,
like this:
.P
.RS 2
-.EX
+.nf
{ "license" : "BSD\-3\-Clause" }
-.EE
+.fi
.RE
.P
You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\.
@@ -114,20 +114,20 @@ The "author" is one person\. "contributors" is an array of people\. A "person"
is an object with a "name" field and optionally "url" and "email", like this:
.P
.RS 2
-.EX
+.nf
{ "name" : "Barney Rubble"
, "email" : "b@rubble\.com"
, "url" : "http://barnyrubble\.tumblr\.com/"
}
-.EE
+.fi
.RE
.P
Or you can shorten that all into a single string, and npm will parse it for you:
.P
.RS 2
-.EX
+.nf
"Barney Rubble (http://barnyrubble\.tumblr\.com/)
-.EE
+.fi
.RE
.P
Both email and url are optional either way\.
@@ -167,9 +167,9 @@ installs\.
For example, npm has this:
.P
.RS 2
-.EX
+.nf
{ "bin" : { "npm" : "\./cli\.js" } }
-.EE
+.fi
.RE
.P
So, when you install npm, it'll create a symlink from the \fBcli\.js\fR script to
@@ -179,21 +179,21 @@ If you have a single executable, and its name should be the name
of the package, then you can just supply it as a string\. For example:
.P
.RS 2
-.EX
+.nf
{ "name": "my\-program"
, "version": "1\.2\.5"
, "bin": "\./path/to/program" }
-.EE
+.fi
.RE
.P
would be the same as this:
.P
.RS 2
-.EX
+.nf
{ "name": "my\-program"
, "version": "1\.2\.5"
, "bin" : { "my\-program" : "\./path/to/program" } }
-.EE
+.fi
.RE
.SH man
.P
@@ -204,14 +204,14 @@ If only a single file is provided, then it's installed such that it is the
result from \fBman \fR, regardless of its actual filename\. For example:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : "\./man/doc\.1"
}
-.EE
+.fi
.RE
.P
would link the \fB\|\./man/doc\.1\fR file in such that it is the target for \fBman foo\fR
@@ -220,14 +220,14 @@ If the filename doesn't start with the package name, then it's prefixed\.
So, this:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ]
}
-.EE
+.fi
.RE
.P
will create files to do \fBman foo\fR and \fBman foo\-bar\fR\|\.
@@ -236,14 +236,14 @@ Man files must end with a number, and optionally a \fB\|\.gz\fR suffix if they a
compressed\. The number dictates which man section the file is installed into\.
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "version" : "1\.2\.3"
, "description" : "A packaged foo fooer for fooing foos"
, "main" : "foo\.js"
, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ]
}
-.EE
+.fi
.RE
.P
will create entries for \fBman foo\fR and \fBman 2 foo\fR
@@ -251,7 +251,7 @@ will create entries for \fBman foo\fR and \fBman 2 foo\fR
.P
The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a
few ways that you can indicate the structure of your package using a \fBdirectories\fR
-hash\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
+object\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
you'll see that it has directories for doc, lib, and man\.
.P
In the future, this information may be used in other creative ways\.
@@ -261,10 +261,10 @@ Tell people where the bulk of your library is\. Nothing special is done
with the lib folder in any way, but it's useful meta info\.
.SS directories\.bin
.P
-If you specify a "bin" directory, then all the files in that folder will
-be used as the "bin" hash\.
+If you specify a \fBbin\fR directory, then all the files in that folder will
+be added as children of the \fBbin\fR path\.
.P
-If you have a "bin" hash already, then this has no effect\.
+If you have a \fBbin\fR path already, then this has no effect\.
.SS directories\.man
.P
A folder that is full of man pages\. Sugar to generate a "man" array by
@@ -285,7 +285,7 @@ command will be able to find you\.
Do it like this:
.P
.RS 2
-.EX
+.nf
"repository" :
{ "type" : "git"
, "url" : "http://github\.com/npm/npm\.git"
@@ -295,7 +295,7 @@ Do it like this:
{ "type" : "svn"
, "url" : "http://v8\.googlecode\.com/svn/trunk/"
}
-.EE
+.fi
.RE
.P
The URL should be a publicly available (perhaps read\-only) url that can be handed
@@ -303,22 +303,22 @@ directly to a VCS program without any modification\. It should not be a url to
html project page that you put in your browser\. It's for computers\.
.SH scripts
.P
-The "scripts" member is an object hash of script commands that are run
+The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package\. The key is the lifecycle
event, and the value is the command to run at that point\.
.P
See npm help 7 \fBnpm\-scripts\fR to find out more about writing package scripts\.
.SH config
.P
-A "config" hash can be used to set configuration
-parameters used in package scripts that persist across upgrades\. For
-instance, if a package had the following:
+A "config" object can be used to set configuration parameters used in package
+scripts that persist across upgrades\. For instance, if a package had the
+following:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "config" : { "port" : "8080" } }
-.EE
+.fi
.RE
.P
and then had a "start" command that then referenced the
@@ -329,13 +329,13 @@ See npm help 7 \fBnpm\-config\fR and npm help 7 \fBnpm\-scripts\fR for more on p
configs\.
.SH dependencies
.P
-Dependencies are specified with a simple hash of package name to
+Dependencies are specified in a simple object that maps a package name to a
version range\. The version range is a string which has one or more
-space\-separated descriptors\. Dependencies can also be identified with
-a tarball or git URL\.
+space\-separated descriptors\. Dependencies can also be identified with a
+tarball or git URL\.
.P
\fBPlease do not put test harnesses or transpilers in your
-\fBdependencies\fR hash\.\fR See \fBdevDependencies\fR, below\.
+\fBdependencies\fR object\.\fR See \fBdevDependencies\fR, below\.
.P
See npm help 7 semver for more details about specifying version ranges\.
.RS 0
@@ -379,7 +379,7 @@ See npm help 7 semver for more details about specifying version ranges\.
For example, these are all valid:
.P
.RS 2
-.EX
+.nf
{ "dependencies" :
{ "foo" : "1\.0\.0 \- 2\.9999\.9999"
, "bar" : ">=1\.0\.2 <2\.1\.2"
@@ -392,10 +392,10 @@ For example, these are all valid:
, "two" : "2\.x"
, "thr" : "3\.3\.x"
, "lat" : "latest"
- , "dyl" : "~/projects/dyl"
+ , "dyl" : "file:\.\./dyl"
}
}
-.EE
+.fi
.RE
.SS URLs as Dependencies
.P
@@ -408,13 +408,13 @@ install time\.
Git urls can be of the form:
.P
.RS 2
-.EX
+.nf
git://github\.com/user/project\.git#commit\-ish
git+ssh://user@hostname:project\.git#commit\-ish
git+ssh://user@hostname/project\.git#commit\-ish
git+http://user@hostname/project/blah\.git#commit\-ish
git+https://user@hostname/project/blah\.git#commit\-ish
-.EE
+.fi
.RE
.P
The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
@@ -424,7 +424,7 @@ an argument to \fBgit checkout\fR\|\. The default is \fBmaster\fR\|\.
As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-project"\. For example:
.P
.RS 2
-.EX
+.nf
{
"name": "foo",
"version": "0\.0\.0",
@@ -432,20 +432,35 @@ As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-p
"express": "visionmedia/express"
}
}
-.EE
+.fi
.RE
.SH Local Paths
.P
-As of version 2\.0\.0 you can provide a path to a local directory that
-contains a package\. Local paths can be in the form:
+As of version 2\.0\.0 you can provide a path to a local directory that contains a
+package\. Local paths can be saved using \fBnpm install \-\-save\fR, using any of
+these forms:
.P
.RS 2
-.EX
+.nf
\|\.\./foo/bar
~/foo/bar
\|\./foo/bar
/foo/bar
-.EE
+.fi
+.RE
+.P
+in which case they will be normalized to a relative path and added to your
+\fBpackage\.json\fR\|\. For example:
+.P
+.RS 2
+.nf
+{
+ "name": "baz",
+ "dependencies": {
+ "bar": "file:\.\./foo/bar"
+ }
+}
+.fi
.RE
.P
This feature is helpful for local offline development and creating
@@ -458,8 +473,8 @@ If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use\.
.P
-In this case, it's best to list these additional items in a
-\fBdevDependencies\fR hash\.
+In this case, it's best to map these additional items in a \fBdevDependencies\fR
+object\.
.P
These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR
from the root of a package, and can be managed like any other npm
@@ -472,7 +487,7 @@ script to do this, and make the required package a devDependency\.
For example:
.P
.RS 2
-.EX
+.nf
{ "name": "ethopia\-waza",
"description": "a delightfully fruity coffee varietal",
"version": "1\.2\.3",
@@ -484,7 +499,7 @@ For example:
},
"main": "lib/waza\.js"
}
-.EE
+.fi
.RE
.P
The \fBprepublish\fR script will be run before publishing, so that users
@@ -501,7 +516,7 @@ a specific interface, expected and specified by the host documentation\.
For example:
.P
.RS 2
-.EX
+.nf
{
"name": "tea\-latte",
"version": "1\.3\.5"
@@ -509,7 +524,7 @@ For example:
"tea": "2\.x"
}
}
-.EE
+.fi
.RE
.P
This ensures your package \fBtea\-latte\fR can be installed \fIalong\fR with the second
@@ -518,10 +533,10 @@ installed if needed\. \fBnpm install tea\-latte\fR could possibly yield the foll
dependency graph:
.P
.RS 2
-.EX
+.nf
âââ tea\-latte@1\.3\.5
âââ tea@2\.2\.0
-.EE
+.fi
.RE
.P
Trying to install another plugin with a conflicting requirement will cause an
@@ -539,17 +554,17 @@ Array of package names that will be bundled when publishing the package\.
If this is spelled \fB"bundleDependencies"\fR, then that is also honorable\.
.SH optionalDependencies
.P
-If a dependency can be used, but you would like npm to proceed if it
-cannot be found or fails to install, then you may put it in the
-\fBoptionalDependencies\fR hash\. This is a map of package name to version
-or url, just like the \fBdependencies\fR hash\. The difference is that
-failure is tolerated\.
+If a dependency can be used, but you would like npm to proceed if it cannot be
+found or fails to install, then you may put it in the \fBoptionalDependencies\fR
+object\. This is a map of package name to version or url, just like the
+\fBdependencies\fR object\. The difference is that build failures do not cause
+installation to fail\.
.P
It is still your program's responsibility to handle the lack of the
dependency\. For example, something like this:
.P
.RS 2
-.EX
+.nf
try {
var foo = require('foo')
var fooVersion = require('foo/package\.json')\.version
@@ -565,7 +580,7 @@ if ( notGoodFooVersion(fooVersion) ) {
if (foo) {
foo\.doFooThings()
}
-.EE
+.fi
.RE
.P
Entries in \fBoptionalDependencies\fR will override entries of the same name in
@@ -575,9 +590,9 @@ Entries in \fBoptionalDependencies\fR will override entries of the same name in
You can specify the version of node that your stuff works on:
.P
.RS 2
-.EX
+.nf
{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } }
-.EE
+.fi
.RE
.P
And, like with dependencies, if you don't specify the version (or if you
@@ -591,9 +606,9 @@ You can also use the "engines" field to specify which versions of npm
are capable of properly installing your program\. For example:
.P
.RS 2
-.EX
+.nf
{ "engines" : { "npm" : "~1\.0\.20" } }
-.EE
+.fi
.RE
.P
Note that, unless the user has set the \fBengine\-strict\fR config flag, this
@@ -601,12 +616,12 @@ field is advisory only\.
.SH engineStrict
.P
If you are sure that your module will \fIdefinitely not\fR run properly on
-versions of Node/npm other than those specified in the \fBengines\fR hash,
+versions of Node/npm other than those specified in the \fBengines\fR object,
then you can set \fB"engineStrict": true\fR in your package\.json file\.
This will override the user's \fBengine\-strict\fR config setting\.
.P
Please do not do this unless you are really very very sure\. If your
-engines hash is something overly restrictive, you can quite easily and
+engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node\. Consider this choice carefully\. If
people abuse it, it will be removed in a future version of npm\.
@@ -616,18 +631,18 @@ You can specify which operating systems your
module will run on:
.P
.RS 2
-.EX
+.nf
"os" : [ "darwin", "linux" ]
-.EE
+.fi
.RE
.P
You can also blacklist instead of whitelist operating systems,
just prepend the blacklisted os with a '!':
.P
.RS 2
-.EX
+.nf
"os" : [ "!win32" ]
-.EE
+.fi
.RE
.P
The host operating system is determined by \fBprocess\.platform\fR
@@ -640,17 +655,17 @@ If your code only runs on certain cpu architectures,
you can specify which ones\.
.P
.RS 2
-.EX
+.nf
"cpu" : [ "x64", "ia32" ]
-.EE
+.fi
.RE
.P
Like the \fBos\fR option, you can also blacklist architectures:
.P
.RS 2
-.EX
+.nf
"cpu" : [ "!arm", "!mips" ]
-.EE
+.fi
.RE
.P
The host architecture is determined by \fBprocess\.arch\fR
@@ -667,11 +682,11 @@ does help prevent some confusion if it doesn't work as expected\.
If you set \fB"private": true\fR in your package\.json, then npm will refuse
to publish it\.
.P
-This is a way to prevent accidental publication of private repositories\.
-If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
-then use the \fBpublishConfig\fR hash described below
-to override the \fBregistry\fR config param at publish\-time\.
+This is a way to prevent accidental publication of private repositories\. If
+you would like to ensure that a given package is only ever published to a
+specific registry (for example, an internal registry), then use the
+\fBpublishConfig\fR dictionary described below to override the \fBregistry\fR config
+param at publish\-time\.
.SH publishConfig
.P
This is a set of config values that will be used at publish\-time\. It's
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index 304dd49..0dc1531 100644
--- a/deps/npm/man/man7/npm-coding-style.7
+++ b/deps/npm/man/man7/npm-coding-style.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CODING\-STYLE" "7" "September 2014" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
@@ -29,18 +29,18 @@ Curly braces belong on the same line as the thing that necessitates them\.
Bad:
.P
.RS 2
-.EX
+.nf
function ()
{
-.EE
+.fi
.RE
.P
Good:
.P
.RS 2
-.EX
+.nf
function () {
-.EE
+.fi
.RE
.P
If a block needs to wrap to the next line, use a curly brace\. Don't
@@ -49,22 +49,22 @@ use it if it doesn't\.
Bad:
.P
.RS 2
-.EX
+.nf
if (foo) { bar() }
while (foo)
bar()
-.EE
+.fi
.RE
.P
Good:
.P
.RS 2
-.EX
+.nf
if (foo) bar()
while (foo) {
bar()
}
-.EE
+.fi
.RE
.SH Semicolons
.P
@@ -87,7 +87,7 @@ as a function call or property access, respectively\.
Some examples of good semicolon usage:
.P
.RS 2
-.EX
+.nf
;(x || y)\.doSomething()
;[a, b, c]\.forEach(doSomething)
for (var i = 0; i < 10; i ++) {
@@ -98,7 +98,7 @@ for (var i = 0; i < 10; i ++) {
}
end()
}
-.EE
+.fi
.RE
.P
Note that starting lines with \fB\-\fR and \fB+\fR also should be prefixed
@@ -111,7 +111,7 @@ line, directly below the token that starts the list\. Put the
final token in the list on a line by itself\. For example:
.P
.RS 2
-.EX
+.nf
var magicWords = [ "abracadabra"
, "gesundheit"
, "ventrilo"
@@ -123,7 +123,7 @@ var magicWords = [ "abracadabra"
, b = "abc"
, etc
, somethingElse
-.EE
+.fi
.RE
.SH Whitespace
.P
@@ -166,7 +166,7 @@ Use appropriate log levels\. See npm help 7 \fBnpm\-config\fR and search for
.SH Case, naming, etc\.
.P
Use \fBlowerCamelCase\fR for multiword identifiers when they refer to objects,
-functions, methods, members, or anything not specified in this section\.
+functions, methods, properties, or anything not specified in this section\.
.P
Use \fBUpperCamelCase\fR for class names (things that you'd pass to "new")\.
.P
diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7
index f759d94..e3b4c5c 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "7" "September 2014" "" ""
+.TH "NPM\-CONFIG" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -99,11 +99,11 @@ configuration parameter, then it is expanded to that configuration
parameter\. For example:
.P
.RS 2
-.EX
+.nf
npm ls \-\-par
# same as:
npm ls \-\-parseable
-.EE
+.fi
.RE
.P
If multiple single\-character shorthands are strung together, and the
@@ -112,11 +112,11 @@ param, then it is expanded to its various component pieces\. For
example:
.P
.RS 2
-.EX
+.nf
npm ls \-gpld
# same as:
npm ls \-\-global \-\-parseable \-\-long \-\-loglevel info
-.EE
+.fi
.RE
.SH Per\-Package Config Settings
.P
@@ -126,27 +126,27 @@ keys are overwritten in the environment if there is a config param of
this:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "config" : { "port" : "8080" }
, "scripts" : { "start" : "node server\.js" } }
-.EE
+.fi
.RE
.P
and the server\.js is this:
.P
.RS 2
-.EX
+.nf
http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port)
-.EE
+.fi
.RE
.P
then the user could change the behavior by doing:
.P
.RS 2
-.EX
+.nf
npm config set foo:port 80
-.EE
+.fi
.RE
.P
See npm help 5 package\.json for more information\.
@@ -535,7 +535,7 @@ A module that will be loaded by the \fBnpm init\fR command\. See the
documentation for the
init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module
for more information, or npm help init\.
-.SS init\.author\.name
+.SS init\-author\-name
.RS 0
.IP \(bu 2
Default: ""
@@ -545,7 +545,7 @@ Type: String
.RE
.P
The value \fBnpm init\fR should use by default for the package author's name\.
-.SS init\.author\.email
+.SS init\-author\-email
.RS 0
.IP \(bu 2
Default: ""
@@ -555,7 +555,7 @@ Type: String
.RE
.P
The value \fBnpm init\fR should use by default for the package author's email\.
-.SS init\.author\.url
+.SS init\-author\-url
.RS 0
.IP \(bu 2
Default: ""
@@ -565,7 +565,7 @@ Type: String
.RE
.P
The value \fBnpm init\fR should use by default for the package author's homepage\.
-.SS init\.license
+.SS init\-license
.RS 0
.IP \(bu 2
Default: "ISC"
@@ -575,7 +575,7 @@ Type: String
.RE
.P
The value \fBnpm init\fR should use by default for the package license\.
-.SS init\.version
+.SS init\-version
.RS 0
.IP \(bu 2
Default: "0\.0\.0"
@@ -647,7 +647,7 @@ to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\.
.SS loglevel
.RS 0
.IP \(bu 2
-Default: "http"
+Default: "warn"
.IP \(bu 2
Type: String
.IP \(bu 2
@@ -659,7 +659,7 @@ What level of logs to report\. On failure, \fIall\fR logs are written to
\fBnpm\-debug\.log\fR in the current working directory\.
.P
Any logs of a higher level than the setting are shown\.
-The default is "http", which shows http, warn, and error output\.
+The default is "warn", which shows warn and error output\.
.SS logstream
.RS 0
.IP \(bu 2
@@ -709,7 +709,7 @@ Type: semver or false
.RE
.P
-The node version to use when checking package's "engines" hash\.
+The node version to use when checking a package's \fBengines\fR map\.
.SS npat
.RS 0
.IP \(bu 2
@@ -740,7 +740,7 @@ Type: Boolean
.RE
.P
-Attempt to install packages in the \fBoptionalDependencies\fR hash\. Note
+Attempt to install packages in the \fBoptionalDependencies\fR object\. Note
that if these packages fail to install, the overall installation
process is not aborted\.
.SS parseable
@@ -849,8 +849,8 @@ Type: Boolean
.P
Save installed packages to a package\.json file as dependencies\.
.P
-When used with the \fBnpm rm\fR command, it removes it from the dependencies
-hash\.
+When used with the \fBnpm rm\fR command, it removes it from the \fBdependencies\fR
+object\.
.P
Only works if there is already a package\.json file present\.
.SS save\-bundle
@@ -877,10 +877,10 @@ Type: Boolean
.RE
.P
-Save installed packages to a package\.json file as devDependencies\.
+Save installed packages to a package\.json file as \fBdevDependencies\fR\|\.
.P
When used with the \fBnpm rm\fR command, it removes it from the
-devDependencies hash\.
+\fBdevDependencies\fR object\.
.P
Only works if there is already a package\.json file present\.
.SS save\-exact
@@ -908,7 +908,7 @@ Save installed packages to a package\.json file as
optionalDependencies\.
.P
When used with the \fBnpm rm\fR command, it removes it from the
-devDependencies hash\.
+\fBdevDependencies\fR object\.
.P
Only works if there is already a package\.json file present\.
.SS save\-prefix
@@ -1163,8 +1163,8 @@ Type: boolean
.RE
.P
-If true, output the npm version as well as node's \fBprocess\.versions\fR
-hash, and exit successfully\.
+If true, output the npm version as well as node's \fBprocess\.versions\fR map, and
+exit successfully\.
.P
Only relevant when specified explicitly on the command line\.
.SS viewer
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index fbf7a3c..bf8edb2 100644
--- a/deps/npm/man/man7/npm-developers.7
+++ b/deps/npm/man/man7/npm-developers.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DEVELOPERS" "7" "September 2014" "" ""
+.TH "NPM\-DEVELOPERS" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
@@ -44,12 +44,12 @@ after packing it up into a tarball (b)\.
Git urls can be of the form:
.P
.RS 2
-.EX
+.nf
git://github\.com/user/project\.git#commit\-ish
git+ssh://user@hostname:project\.git#commit\-ish
git+http://user@hostname/project/blah\.git#commit\-ish
git+https://user@hostname/project/blah\.git#commit\-ish
-.EE
+.fi
.RE
.P
The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
@@ -85,7 +85,7 @@ Take some credit\.
.IP \(bu 2
scripts:
If you have a special compilation or installation script, then you
-should put it in the \fBscripts\fR hash\. You should definitely have at
+should put it in the \fBscripts\fR object\. You should definitely have at
least a basic smoke\-test command as the "scripts\.test" field\.
See npm help 7 scripts\.
.IP \(bu 2
@@ -95,8 +95,8 @@ program (like what the "foo" package gives you at require("foo")),
then you need to specify that in the "main" field\.
.IP \(bu 2
directories:
-This is a hash of folders\. The best ones to include are "lib" and
-"doc", but if you specify a folder full of man pages in "man", then
+This is an object mapping names to folders\. The best ones to include are
+"lib" and "doc", but if you use "man" to specify a folder full of man pages,
they'll get installed just like these ones\.
.RE
@@ -171,18 +171,18 @@ So don't do that\.
In the root of your package, do this:
.P
.RS 2
-.EX
+.nf
npm install \. \-g
-.EE
+.fi
.RE
.P
That'll show you that it's working\. If you'd rather just create a symlink
package that points to your working directory, then do this:
.P
.RS 2
-.EX
+.nf
npm link
-.EE
+.fi
.RE
.P
Use \fBnpm ls \-g\fR to see if it's there\.
@@ -190,10 +190,10 @@ Use \fBnpm ls \-g\fR to see if it's there\.
To test a local install, go into some other folder, and then do:
.P
.RS 2
-.EX
+.nf
cd \.\./some\-other\-folder
npm install \.\./my\-package
-.EE
+.fi
.RE
.P
to install it locally into the node_modules folder in that other place\.
@@ -205,9 +205,9 @@ bring in your module's main module\.
Create a user with the adduser command\. It works like this:
.P
.RS 2
-.EX
+.nf
npm adduser
-.EE
+.fi
.RE
.P
and then follow the prompts\.
@@ -218,9 +218,9 @@ This is documented better in npm help adduser\.
This part's easy\. IN the root of your folder, do this:
.P
.RS 2
-.EX
+.nf
npm publish
-.EE
+.fi
.RE
.P
You can give publish a url to a tarball, or a filename of a tarball,
diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7
index fb7fd25..9cf7009 100644
--- a/deps/npm/man/man7/npm-disputes.7
+++ b/deps/npm/man/man7/npm-disputes.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DISPUTES" "7" "September 2014" "" ""
+.TH "NPM\-DISPUTES" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/npm-faq.7 b/deps/npm/man/man7/npm-faq.7
index 942d3c0..563509a 100644
--- a/deps/npm/man/man7/npm-faq.7
+++ b/deps/npm/man/man7/npm-faq.7
@@ -1,4 +1,4 @@
-.TH "NPM\-FAQ" "7" "September 2014" "" ""
+.TH "NPM\-FAQ" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-faq\fR \- Frequently Asked Questions
.SH Where can I find these docs in HTML?
@@ -6,9 +6,9 @@
https://www\.npmjs\.org/doc/, or run:
.P
.RS 2
-.EX
+.nf
npm config set viewer browser
-.EE
+.fi
.RE
.P
to open these documents in your default web browser rather than \fBman\fR\|\.
@@ -131,9 +131,9 @@ Arguments are greps\. \fBnpm search jsdom\fR shows jsdom packages\.
.SH How do I update npm?
.P
.RS 2
-.EX
-npm update npm \-g
-.EE
+.nf
+npm install npm \-g
+.fi
.RE
.P
You can also update all outdated local packages by doing \fBnpm update\fR without
@@ -147,9 +147,9 @@ command\.)
In those cases, you can do this:
.P
.RS 2
-.EX
+.nf
curl https://www\.npmjs\.org/install\.sh | sh
-.EE
+.fi
.RE
.SH What is a \fBpackage\fR?
.P
@@ -180,12 +180,12 @@ after packing it up into a tarball (b)\.
Git urls can be of the form:
.P
.RS 2
-.EX
+.nf
git://github\.com/user/project\.git#commit\-ish
git+ssh://user@hostname:project\.git#commit\-ish
git+http://user@hostname/project/blah\.git#commit\-ish
git+https://user@hostname/project/blah\.git#commit\-ish
-.EE
+.fi
.RE
.P
The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
@@ -218,9 +218,9 @@ In the context of a Node program, the \fBmodule\fR is also the thing that
was loaded \fIfrom\fR a file\. For example, in the following program:
.P
.RS 2
-.EX
+.nf
var req = require('request')
-.EE
+.fi
.RE
.P
we might say that "The variable \fBreq\fR refers to the \fBrequest\fR module"\.
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index 5667722..442815a 100644
--- a/deps/npm/man/man7/npm-index.7
+++ b/deps/npm/man/man7/npm-index.7
@@ -1,4 +1,4 @@
-.TH "NPM\-INDEX" "7" "September 2014" "" ""
+.TH "NPM\-INDEX" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
@@ -121,9 +121,6 @@ Start a package
.SS npm help stop
.P
Stop a package
-.SS npm help submodule
-.P
-Add a package as a git submodule
.SS npm help tag
.P
Tag a published version
@@ -244,9 +241,6 @@ Start a package
.SS npm apihelp stop
.P
Stop a package
-.SS npm apihelp submodule
-.P
-Add a package as a git submodule
.SS npm apihelp tag
.P
Tag a published version
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index ac3059c..9de209d 100644
--- a/deps/npm/man/man7/npm-registry.7
+++ b/deps/npm/man/man7/npm-registry.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REGISTRY" "7" "September 2014" "" ""
+.TH "NPM\-REGISTRY" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index ef8d251..f876e4e 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCOPE" "7" "September 2014" "" ""
+.TH "NPM\-SCOPE" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
@@ -9,9 +9,9 @@ or underscores)\. When used in package names, preceded by an @\-symbol and
followed by a slash, e\.g\.
.P
.RS 2
-.EX
+.nf
@somescope/somepackagename
-.EE
+.fi
.RE
.P
Scopes are a way of grouping related packages together, and also affect a few
@@ -28,23 +28,23 @@ scoped modules will be in \fBnode_modules/@myorg/packagename\fR\|\. The scope fo
(\fB@myorg\fR) is simply the name of the scope preceded by an @\-symbol, and can
contain any number of scoped packages\.
.P
-A scoped package is install by referencing it by name, preceded by an @\-symbol,
-in \fBnpm install\fR:
+A scoped package is installed by referencing it by name, preceded by an
+@\-symbol, in \fBnpm install\fR:
.P
.RS 2
-.EX
+.nf
npm install @myorg/mypackage
-.EE
+.fi
.RE
.P
Or in \fBpackage\.json\fR:
.P
.RS 2
-.EX
+.nf
"dependencies": {
"@myorg/mypackage": "^1\.3\.0"
}
-.EE
+.fi
.RE
.P
Note that if the @\-symbol is omitted in either case npm will instead attempt to
@@ -55,9 +55,9 @@ Because scoped packages are installed into a scope folder, you have to
include the name of the scope when requiring them in your code, e\.g\.
.P
.RS 2
-.EX
+.nf
require('@myorg/mypackage')
-.EE
+.fi
.RE
.P
There is nothing special about the way Node treats scope folders, this is
@@ -77,9 +77,9 @@ private registries, such as npm Enterprise\.
You can associate a scope with a registry at login, e\.g\.
.P
.RS 2
-.EX
+.nf
npm login \-\-registry=http://reg\.example\.com \-\-scope=@myco
-.EE
+.fi
.RE
.P
Scopes have a many\-to\-one relationship with registries: one registry can
@@ -88,9 +88,9 @@ host multiple scopes, but a scope only ever points to one registry\.
You can also associate a scope with a registry using \fBnpm config\fR:
.P
.RS 2
-.EX
+.nf
npm config set @myco:registry http://reg\.example\.com
-.EE
+.fi
.RE
.P
Once a scope is associated with a registry, any \fBnpm install\fR for a package
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index 4cc93a6..9d11f46 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -1,9 +1,9 @@
-.TH "NPM\-SCRIPTS" "7" "September 2014" "" ""
+.TH "NPM\-SCRIPTS" "7" "October 2014" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
.P
-npm supports the "scripts" member of the package\.json script, for the
+npm supports the "scripts" property of the package\.json script, for the
following scripts:
.RS 0
.IP \(bu 2
@@ -47,10 +47,10 @@ stop and start scripts if no \fBrestart\fR script is provided\.
.RE
.P
-Additionally, arbitrary scripts can be executed by running `npm run\-script
-.P
- \fB\|\. *Pre* and *post* commands with matching names will be run for
-those as well (e\.g\.\fRpremyscript\fB,\fRmyscript\fB,\fRpostmyscript`)\.
+Additionally, arbitrary scripts can be executed by running \fBnpm
+run\-script \fR\|\. \fIPre\fR and \fIpost\fR commands with matching
+names will be run for those as well (e\.g\. \fBpremyscript\fR, \fBmyscript\fR,
+\fBpostmyscript\fR)\.
.SH NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
.P
\fBtl;dr\fR Don't use \fBinstall\fR\|\. Use a \fB\|\.gyp\fR file for compilation, and
@@ -136,11 +136,11 @@ suites, then those executables will be added to the \fBPATH\fR for
executing the scripts\. So, if your package\.json has this:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "dependencies" : { "bar" : "0\.1\.x" }
, "scripts": { "start" : "bar \./test" } }
-.EE
+.fi
.RE
.P
then you could run \fBnpm start\fR to execute the \fBbar\fR script, which is
@@ -157,34 +157,34 @@ package\.json file, then your package scripts would have the
Configuration parameters are put in the environment with the
\fBnpm_config_\fR prefix\. For instance, you can view the effective \fBroot\fR
config by checking the \fBnpm_config_root\fR environment variable\.
-.SS Special: package\.json "config" hash
+.SS Special: package\.json "config" object
.P
The package\.json "config" keys are overwritten in the environment if
there is a config param of \fB[@]:\fR\|\. For example,
if the package\.json has this:
.P
.RS 2
-.EX
+.nf
{ "name" : "foo"
, "config" : { "port" : "8080" }
, "scripts" : { "start" : "node server\.js" } }
-.EE
+.fi
.RE
.P
and the server\.js is this:
.P
.RS 2
-.EX
+.nf
http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port)
-.EE
+.fi
.RE
.P
then the user could change the behavior by doing:
.P
.RS 2
-.EX
+.nf
npm config set foo:port 80
-.EE
+.fi
.RE
.SS current lifecycle event
.P
@@ -198,23 +198,23 @@ Objects are flattened following this format, so if you had
see this in the script:
.P
.RS 2
-.EX
+.nf
process\.env\.npm_package_scripts_install === "foo\.js"
-.EE
+.fi
.RE
.SH EXAMPLES
.P
For example, if your package\.json contains this:
.P
.RS 2
-.EX
+.nf
{ "scripts" :
{ "install" : "scripts/install\.js"
, "postinstall" : "scripts/install\.js"
, "uninstall" : "scripts/uninstall\.js"
}
}
-.EE
+.fi
.RE
.P
then the \fBscripts/install\.js\fR will be called for the install,
@@ -228,14 +228,14 @@ If you want to run a make command, you can do so\. This works just
fine:
.P
.RS 2
-.EX
+.nf
{ "scripts" :
{ "preinstall" : "\./configure"
, "install" : "make && make install"
, "test" : "make test"
}
}
-.EE
+.fi
.RE
.SH EXITING
.P
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index ae3513c..b0a4fca 100644
--- a/deps/npm/man/man7/removing-npm.7
+++ b/deps/npm/man/man7/removing-npm.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REMOVAL" "1" "September 2014" "" ""
+.TH "NPM\-REMOVAL" "1" "October 2014" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
@@ -6,17 +6,17 @@
So sad to see you go\.
.P
.RS 2
-.EX
+.nf
sudo npm uninstall npm \-g
-.EE
+.fi
.RE
.P
Or, if that fails, get the npm source code, and do:
.P
.RS 2
-.EX
+.nf
sudo make uninstall
-.EE
+.fi
.RE
.SH More Severe Uninstalling
.P
@@ -39,9 +39,9 @@ different prefix setting, then adjust the paths accordingly, replacing
To remove everything npm\-related manually:
.P
.RS 2
-.EX
+.nf
rm \-rf /usr/local/{lib/node{,/\.npm,_modules},bin,share/man}/npm*
-.EE
+.fi
.RE
.P
If you installed things \fIwith\fR npm, then your best bet is to uninstall
@@ -50,18 +50,18 @@ proper install\. This can help find any symlinks that are lying
around:
.P
.RS 2
-.EX
+.nf
ls \-laF /usr/local/{lib/node{,/\.npm},bin,share/man} | grep npm
-.EE
+.fi
.RE
.P
Prior to version 0\.3, npm used shim files for executables and node
modules\. To track those down, you can do the following:
.P
.RS 2
-.EX
+.nf
find /usr/local/{lib/node,bin} \-exec grep \-l npm \\{\\} \\; ;
-.EE
+.fi
.RE
.P
(This is also in the README file\.)
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index c2efd3d..a6be932 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,10 +1,10 @@
-.TH "SEMVER" "7" "September 2014" "" ""
+.TH "SEMVER" "7" "October 2014" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage
.P
.RS 2
-.EX
+.nf
$ npm install semver
semver\.valid('1\.2\.3') // '1\.2\.3'
@@ -13,13 +13,13 @@ semver\.clean(' =v1\.2\.3 ') // '1\.2\.3'
semver\.satisfies('1\.2\.3', '1\.x || >=2\.5\.0 || 5\.0\.0 \- 7\.2\.3') // true
semver\.gt('1\.2\.3', '9\.8\.7') // false
semver\.lt('1\.2\.3', '9\.8\.7') // true
-.EE
+.fi
.RE
.P
As a command\-line utility:
.P
.RS 2
-.EX
+.nf
$ semver \-h
Usage: semver [ [\.\.\.]] [\-r | \-i | \-d ]
@@ -37,7 +37,7 @@ then exits failure\.
Versions are printed in ascending order, so supplying
multiple versions to the utility will just sort them\.
-.EE
+.fi
.RE
.SH Versions
.P
@@ -165,7 +165,7 @@ A partial version range is treated as an X\-Range, so the special
character is in fact optional\.
.RS 0
.IP \(bu 2
-\fB` (empty string) :=\fR*\fB:=\fR>=0\.0\.0`
+\fB""\fR (empty string) := \fB*\fR := \fB>=0\.0\.0\fR
.IP \(bu 2
\fB1\fR := \fB1\.x\.x\fR := \fB>=1\.0\.0 <2\.0\.0\fR
.IP \(bu 2
diff --git a/deps/npm/node_modules/archy/LICENSE b/deps/npm/node_modules/archy/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/deps/npm/node_modules/archy/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/archy/README.markdown b/deps/npm/node_modules/archy/README.markdown
index deaba0f..ef7a5cf 100644
--- a/deps/npm/node_modules/archy/README.markdown
+++ b/deps/npm/node_modules/archy/README.markdown
@@ -1,12 +1,12 @@
-archy
-=====
+# archy
Render nested hierarchies `npm ls` style with unicode pipes.
+[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy)
+
[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)
-example
-=======
+# example
``` js
var archy = require('archy');
@@ -50,13 +50,11 @@ beep
time!
```
-methods
-=======
+# methods
var archy = require('archy')
-archy(obj, prefix='', opts={})
-------------------------------
+## archy(obj, prefix='', opts={})
Return a string representation of `obj` with unicode pipe characters like how
`npm ls` looks.
@@ -77,8 +75,7 @@ with the current prefix.
To disable unicode results in favor of all-ansi output set `opts.unicode` to
`false`.
-install
-=======
+# install
With [npm](http://npmjs.org) do:
@@ -86,7 +83,6 @@ With [npm](http://npmjs.org) do:
npm install archy
```
-license
-=======
+# license
-MIT/X11
+MIT
diff --git a/deps/npm/node_modules/archy/examples/beep.js b/deps/npm/node_modules/archy/examples/beep.js
new file mode 100644
index 0000000..9c07047
--- /dev/null
+++ b/deps/npm/node_modules/archy/examples/beep.js
@@ -0,0 +1,24 @@
+var archy = require('../');
+var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+});
+console.log(s);
diff --git a/deps/npm/node_modules/archy/examples/multi_line.js b/deps/npm/node_modules/archy/examples/multi_line.js
new file mode 100644
index 0000000..8afdfad
--- /dev/null
+++ b/deps/npm/node_modules/archy/examples/multi_line.js
@@ -0,0 +1,25 @@
+var archy = require('../');
+
+var s = archy({
+ label : 'beep\none\ntwo',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O\nwheee',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny\nmeat' ]
+ },
+ 'creature'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+});
+console.log(s);
diff --git a/deps/npm/node_modules/archy/package.json b/deps/npm/node_modules/archy/package.json
index 81c3e26..4b3da66 100644
--- a/deps/npm/node_modules/archy/package.json
+++ b/deps/npm/node_modules/archy/package.json
@@ -1,22 +1,42 @@
{
"name": "archy",
- "version": "0.0.2",
+ "version": "1.0.0",
"description": "render nested hierarchies `npm ls` style with unicode pipes",
"main": "index.js",
- "directories": {
- "lib": ".",
- "example": "example",
- "test": "test"
- },
"devDependencies": {
- "tap": "~0.2.3"
+ "tap": "~0.3.3",
+ "tape": "~0.1.1"
},
"scripts": {
"test": "tap test"
},
+ "testling": {
+ "files": "test/*.js",
+ "browsers": {
+ "iexplore": [
+ "6.0",
+ "7.0",
+ "8.0",
+ "9.0"
+ ],
+ "chrome": [
+ "20.0"
+ ],
+ "firefox": [
+ "10.0",
+ "15.0"
+ ],
+ "safari": [
+ "5.1"
+ ],
+ "opera": [
+ "12.0"
+ ]
+ }
+ },
"repository": {
"type": "git",
- "url": "git://github.com/substack/node-archy.git"
+ "url": "http://github.com/substack/node-archy.git"
},
"keywords": [
"hierarchy",
@@ -30,23 +50,30 @@
"email": "mail@substack.net",
"url": "http://substack.net"
},
- "license": "MIT/X11",
- "engine": {
- "node": ">=0.4"
+ "license": "MIT",
+ "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84",
+ "bugs": {
+ "url": "https://github.com/substack/node-archy/issues"
},
+ "homepage": "https://github.com/substack/node-archy",
+ "_id": "archy@1.0.0",
+ "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
+ "_from": "archy@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.25",
"_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "archy@0.0.2",
- "dependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "_engineSupported": true,
- "_npmVersion": "1.1.13",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "_from": "archy@0.0.2"
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "dist": {
+ "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
+ "tarball": "http://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
}
diff --git a/deps/npm/node_modules/archy/test/beep.js b/deps/npm/node_modules/archy/test/beep.js
new file mode 100644
index 0000000..4ea74f9
--- /dev/null
+++ b/deps/npm/node_modules/archy/test/beep.js
@@ -0,0 +1,40 @@
+var test = require('tape');
+var archy = require('../');
+
+test('beep', function (t) {
+ var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party!'
+ ]
+ }
+ ]
+ });
+ t.equal(s, [
+ 'beep',
+ 'âââ ity',
+ 'ââ⬠boop',
+ ' ââ⬠o_O',
+ ' â ââ⬠oh',
+ ' â â âââ hello',
+ ' â â âââ puny',
+ ' â âââ human',
+ ' âââ party!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/deps/npm/node_modules/archy/test/multi_line.js b/deps/npm/node_modules/archy/test/multi_line.js
new file mode 100644
index 0000000..2cf2154
--- /dev/null
+++ b/deps/npm/node_modules/archy/test/multi_line.js
@@ -0,0 +1,45 @@
+var test = require('tape');
+var archy = require('../');
+
+test('multi-line', function (t) {
+ var s = archy({
+ label : 'beep\none\ntwo',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O\nwheee',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny\nmeat' ]
+ },
+ 'creature'
+ ]
+ },
+ 'party\ntime!'
+ ]
+ }
+ ]
+ });
+ t.equal(s, [
+ 'beep',
+ 'â one',
+ 'â two',
+ 'âââ ity',
+ 'ââ⬠boop',
+ ' ââ⬠o_O',
+ ' â â wheee',
+ ' â ââ⬠oh',
+ ' â â âââ hello',
+ ' â â âââ puny',
+ ' â â meat',
+ ' â âââ creature',
+ ' âââ party',
+ ' time!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/deps/npm/node_modules/archy/test/non_unicode.js b/deps/npm/node_modules/archy/test/non_unicode.js
new file mode 100644
index 0000000..7204d33
--- /dev/null
+++ b/deps/npm/node_modules/archy/test/non_unicode.js
@@ -0,0 +1,40 @@
+var test = require('tape');
+var archy = require('../');
+
+test('beep', function (t) {
+ var s = archy({
+ label : 'beep',
+ nodes : [
+ 'ity',
+ {
+ label : 'boop',
+ nodes : [
+ {
+ label : 'o_O',
+ nodes : [
+ {
+ label : 'oh',
+ nodes : [ 'hello', 'puny' ]
+ },
+ 'human'
+ ]
+ },
+ 'party!'
+ ]
+ }
+ ]
+ }, '', { unicode : false });
+ t.equal(s, [
+ 'beep',
+ '+-- ity',
+ '`-- boop',
+ ' +-- o_O',
+ ' | +-- oh',
+ ' | | +-- hello',
+ ' | | `-- puny',
+ ' | `-- human',
+ ' `-- party!',
+ ''
+ ].join('\n'));
+ t.end();
+});
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore b/deps/npm/node_modules/config-chain/.npmignore
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore
rename to deps/npm/node_modules/config-chain/.npmignore
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE b/deps/npm/node_modules/config-chain/LICENCE
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE
rename to deps/npm/node_modules/config-chain/LICENCE
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js b/deps/npm/node_modules/config-chain/index.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/index.js
rename to deps/npm/node_modules/config-chain/index.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE b/deps/npm/node_modules/config-chain/node_modules/proto-list/LICENSE
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE
rename to deps/npm/node_modules/config-chain/node_modules/proto-list/LICENSE
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md b/deps/npm/node_modules/config-chain/node_modules/proto-list/README.md
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md
rename to deps/npm/node_modules/config-chain/node_modules/proto-list/README.md
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json b/deps/npm/node_modules/config-chain/node_modules/proto-list/package.json
similarity index 93%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json
rename to deps/npm/node_modules/config-chain/node_modules/proto-list/package.json
index 391d876..2dff291 100644
--- a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json
+++ b/deps/npm/node_modules/config-chain/node_modules/proto-list/package.json
@@ -29,7 +29,7 @@
"homepage": "https://github.com/isaacs/proto-list",
"_id": "proto-list@1.2.3",
"_shasum": "6235554a1bca1f0d15e3ca12ca7329d5def42bd9",
- "_from": "proto-list@>=1.2.1-0 <1.3.0-0",
+ "_from": "proto-list@~1.2.1",
"_npmVersion": "1.4.14",
"_npmUser": {
"name": "isaacs",
@@ -46,5 +46,6 @@
"tarball": "http://registry.npmjs.org/proto-list/-/proto-list-1.2.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.3.tgz"
+ "_resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.3.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js b/deps/npm/node_modules/config-chain/node_modules/proto-list/proto-list.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js
rename to deps/npm/node_modules/config-chain/node_modules/proto-list/proto-list.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js b/deps/npm/node_modules/config-chain/node_modules/proto-list/test/basic.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js
rename to deps/npm/node_modules/config-chain/node_modules/proto-list/test/basic.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json b/deps/npm/node_modules/config-chain/package.json
similarity index 99%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/package.json
rename to deps/npm/node_modules/config-chain/package.json
index bec4626..a07f2f4 100644
--- a/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json
+++ b/deps/npm/node_modules/config-chain/package.json
@@ -32,7 +32,7 @@
"shasum": "0943d0b7227213a20d4eaff4434f4a1c0a052cad",
"tarball": "http://registry.npmjs.org/config-chain/-/config-chain-1.1.8.tgz"
},
- "_from": "config-chain@>=1.1.8-0 <1.2.0-0",
+ "_from": "config-chain@^1.1.8",
"_npmVersion": "1.3.6",
"_npmUser": {
"name": "dominictarr",
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown b/deps/npm/node_modules/config-chain/readme.markdown
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown
rename to deps/npm/node_modules/config-chain/readme.markdown
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js b/deps/npm/node_modules/config-chain/test/broken.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js
rename to deps/npm/node_modules/config-chain/test/broken.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json b/deps/npm/node_modules/config-chain/test/broken.json
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json
rename to deps/npm/node_modules/config-chain/test/broken.json
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js b/deps/npm/node_modules/config-chain/test/chain-class.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js
rename to deps/npm/node_modules/config-chain/test/chain-class.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js b/deps/npm/node_modules/config-chain/test/env.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js
rename to deps/npm/node_modules/config-chain/test/env.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js b/deps/npm/node_modules/config-chain/test/find-file.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js
rename to deps/npm/node_modules/config-chain/test/find-file.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/get.js b/deps/npm/node_modules/config-chain/test/get.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/get.js
rename to deps/npm/node_modules/config-chain/test/get.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js b/deps/npm/node_modules/config-chain/test/ignore-unfound-file.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js
rename to deps/npm/node_modules/config-chain/test/ignore-unfound-file.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js b/deps/npm/node_modules/config-chain/test/ini.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js
rename to deps/npm/node_modules/config-chain/test/ini.js
diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js b/deps/npm/node_modules/config-chain/test/save.js
similarity index 100%
rename from deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js
rename to deps/npm/node_modules/config-chain/test/save.js
diff --git a/deps/npm/node_modules/dezalgo/dezalgo.js b/deps/npm/node_modules/dezalgo/dezalgo.js
index cdc48ae..04fd3ba 100644
--- a/deps/npm/node_modules/dezalgo/dezalgo.js
+++ b/deps/npm/node_modules/dezalgo/dezalgo.js
@@ -1,4 +1,5 @@
-module.exports = dezalgo
+var wrappy = require('wrappy')
+module.exports = wrappy(dezalgo)
var asap = require('asap')
diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json b/deps/npm/node_modules/dezalgo/node_modules/asap/package.json
index 1237784..311f9fc 100644
--- a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json
+++ b/deps/npm/node_modules/dezalgo/node_modules/asap/package.json
@@ -21,7 +21,7 @@
"shasum": "b2a45da5fdfa20b0496fc3768cc27c12fa916a7d",
"tarball": "http://registry.npmjs.org/asap/-/asap-1.0.0.tgz"
},
- "_from": "asap@>=1.0.0-0 <2.0.0-0",
+ "_from": "asap@>=1.0.0 <2.0.0",
"_npmVersion": "1.2.15",
"_npmUser": {
"name": "kriskowal",
diff --git a/deps/npm/node_modules/dezalgo/package.json b/deps/npm/node_modules/dezalgo/package.json
index 072e2ad..1f63e83 100644
--- a/deps/npm/node_modules/dezalgo/package.json
+++ b/deps/npm/node_modules/dezalgo/package.json
@@ -1,13 +1,14 @@
{
"name": "dezalgo",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "Contain async insanity so that the dark pony lord doesn't eat souls",
"main": "dezalgo.js",
"directories": {
"test": "test"
},
"dependencies": {
- "asap": "^1.0.0"
+ "asap": "^1.0.0",
+ "wrappy": "1"
},
"devDependencies": {
"tap": "^0.4.11"
@@ -42,11 +43,12 @@
"url": "https://github.com/npm/dezalgo/issues"
},
"homepage": "https://github.com/npm/dezalgo",
- "gitHead": "b10ea8ae0096d0e60c1acaa88d5334a9b372e4b0",
- "_id": "dezalgo@1.0.0",
- "_shasum": "050bb723f18b5617b309f26c2dc8fe6f2573b6fc",
- "_from": "dezalgo@1.0.0",
- "_npmVersion": "1.4.18",
+ "gitHead": "0a5eee75c179611f8b67f663015d68bb517e57d2",
+ "_id": "dezalgo@1.0.1",
+ "_shasum": "12bde135060807900d5a7aebb607c2abb7c76937",
+ "_from": "dezalgo@latest",
+ "_npmVersion": "2.0.0",
+ "_nodeVersion": "0.10.31",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -58,9 +60,8 @@
}
],
"dist": {
- "shasum": "050bb723f18b5617b309f26c2dc8fe6f2573b6fc",
- "tarball": "http://registry.npmjs.org/dezalgo/-/dezalgo-1.0.0.tgz"
+ "shasum": "12bde135060807900d5a7aebb607c2abb7c76937",
+ "tarball": "http://registry.npmjs.org/dezalgo/-/dezalgo-1.0.1.tgz"
},
- "_resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.1.tgz"
}
diff --git a/deps/npm/node_modules/dezalgo/test/basic.js b/deps/npm/node_modules/dezalgo/test/basic.js
index cc10336..da09e72 100644
--- a/deps/npm/node_modules/dezalgo/test/basic.js
+++ b/deps/npm/node_modules/dezalgo/test/basic.js
@@ -4,15 +4,19 @@ var dz = require('../dezalgo.js')
test('the dark pony', function(t) {
var n = 0
- function foo(cb) {
+ function foo(i, cb) {
cb = dz(cb)
- if (++n % 2) cb()
- else process.nextTick(cb)
+ if (++n % 2) cb(true, i)
+ else process.nextTick(cb.bind(null, false, i))
}
var called = 0
+ var order = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
+ var o = 0
for (var i = 0; i < 10; i++) {
- foo(function() {
+ foo(i, function(cached, i) {
+ t.equal(i, order[o++])
+ t.equal(i % 2, cached ? 0 : 1)
called++
})
t.equal(called, 0)
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/LICENSE b/deps/npm/node_modules/fs-write-stream-atomic/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/README.md b/deps/npm/node_modules/fs-write-stream-atomic/README.md
new file mode 100644
index 0000000..9a15d05
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/README.md
@@ -0,0 +1,35 @@
+# fs-write-stream-atomic
+
+Like `fs.createWriteStream(...)`, but atomic.
+
+Writes to a tmp file and does an atomic `fs.rename` to move it into
+place when it's done.
+
+First rule of debugging: **It's always a race condition.**
+
+## USAGE
+
+```javascript
+var fsWriteStreamAtomic = require('fs-write-stream-atomic')
+// options are optional.
+var write = fsWriteStreamAtomic('output.txt', options)
+var read = fs.createReadStream('input.txt')
+read.pipe(write)
+
+// When the write stream emits a 'finish' or 'close' event,
+// you can be sure that it is moved into place, and contains
+// all the bytes that were written to it, even if something else
+// was writing to `output.txt` at the same time.
+```
+
+### `fsWriteStreamAtomic(filename, [options])`
+
+* `filename` {String} The file we want to write to
+* `options` {Object}
+ * `chown` {Object} User and group to set ownership after write
+ * `uid` {Number}
+ * `gid` {Number}
+ * `encoding` {String} default = 'utf8'
+ * `mode` {Number} default = `0666`
+ * `flags` {String} default = `'w'`
+
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/index.js b/deps/npm/node_modules/fs-write-stream-atomic/index.js
new file mode 100644
index 0000000..42a9a88
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/index.js
@@ -0,0 +1,96 @@
+var fs = require('graceful-fs')
+var util = require('util')
+var crypto = require('crypto')
+
+function md5hex () {
+ var hash = crypto.createHash('md5')
+ for (var ii=0; ii=1.0.2 <1.1.0",
+ "_npmVersion": "2.1.0",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "fe0c6cec75256072b2fef8180d97e309fe3f5efb",
+ "tarball": "http://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.2.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.2.tgz"
+}
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js b/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js
new file mode 100644
index 0000000..159c596
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js
@@ -0,0 +1,89 @@
+var test = require('tap').test
+var writeStream = require('../index.js')
+var fs = require('fs')
+var path = require('path')
+
+test('basic', function (t) {
+ // open 10 write streams to the same file.
+ // then write to each of them, and to the target
+ // and verify at the end that each of them does their thing
+ var target = path.resolve(__dirname, 'test.txt')
+ var n = 10
+
+ var streams = []
+ for (var i = 0; i < n; i++) {
+ var s = writeStream(target)
+ s.on('finish', verifier('finish'))
+ s.on('close', verifier('close'))
+ streams.push(s)
+ }
+
+ var verifierCalled = 0
+ function verifier (ev) { return function () {
+ if (ev === 'close')
+ t.equal(this.__emittedFinish, true)
+ else {
+ this.__emittedFinish = true
+ t.equal(ev, 'finish')
+ }
+
+ // make sure that one of the atomic streams won.
+ var res = fs.readFileSync(target, 'utf8')
+ var lines = res.trim().split(/\n/)
+ lines.forEach(function (line) {
+ var first = lines[0].match(/\d+$/)[0]
+ var cur = line.match(/\d+$/)[0]
+ t.equal(cur, first)
+ })
+
+ var resExpr = /^first write \d+\nsecond write \d+\nthird write \d+\nfinal write \d+\n$/
+ t.similar(res, resExpr)
+
+ // should be called once for each close, and each finish
+ if (++verifierCalled === n * 2) {
+ t.end()
+ }
+ }}
+
+ // now write something to each stream.
+ streams.forEach(function (stream, i) {
+ stream.write('first write ' + i + '\n')
+ })
+
+ // wait a sec for those writes to go out.
+ setTimeout(function () {
+ // write something else to the target.
+ fs.writeFileSync(target, 'brutality!\n')
+
+ // write some more stuff.
+ streams.forEach(function (stream, i) {
+ stream.write('second write ' + i + '\n')
+ })
+
+ setTimeout(function () {
+ // Oops! Deleted the file!
+ fs.unlinkSync(target)
+
+ // write some more stuff.
+ streams.forEach(function (stream, i) {
+ stream.write('third write ' + i + '\n')
+ })
+
+ setTimeout(function () {
+ fs.writeFileSync(target, 'brutality TWO!\n')
+ streams.forEach(function (stream, i) {
+ stream.end('final write ' + i + '\n')
+ })
+ }, 50)
+ }, 50)
+ }, 50)
+})
+
+test('cleanup', function (t) {
+ fs.readdirSync(__dirname).filter(function (f) {
+ return f.match(/^test.txt/)
+ }).forEach(function (file) {
+ fs.unlinkSync(path.resolve(__dirname, file))
+ })
+ t.end()
+})
diff --git a/deps/npm/node_modules/fstream-npm/fstream-npm.js b/deps/npm/node_modules/fstream-npm/fstream-npm.js
index ca05880..863f588 100644
--- a/deps/npm/node_modules/fstream-npm/fstream-npm.js
+++ b/deps/npm/node_modules/fstream-npm/fstream-npm.js
@@ -93,6 +93,12 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
// readme files should never be ignored.
if (entry.match(/^readme(\.[^\.]*)$/i)) return true
+ // license files should never be ignored.
+ if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true
+
+ // changelogs should never be ignored.
+ if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true
+
// special rules. see below.
if (entry === "node_modules" && this.packageRoot) return true
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
index 558d3dc..29e5086 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
@@ -26,8 +26,6 @@
"mkdirp": ""
},
"license": "ISC",
- "readme": "# fstream-ignore\n\nA fstream DirReader that filters out files that match globs in `.ignore`\nfiles throughout the tree, like how git ignores files based on a\n`.gitignore` file.\n\nHere's an example:\n\n```javascript\nvar Ignore = require(\"fstream-ignore\")\nIgnore({ path: __dirname\n , ignoreFiles: [\".ignore\", \".gitignore\"]\n })\n .on(\"child\", function (c) {\n console.error(c.path.substr(c.root.path.length + 1))\n })\n .pipe(tar.Pack())\n .pipe(fs.createWriteStream(\"foo.tar\"))\n```\n\nThis will tar up the files in __dirname into `foo.tar`, ignoring\nanything matched by the globs in any .iginore or .gitignore file.\n",
- "readmeFilename": "README.md",
"gitHead": "290f2b621fa4f8fe3eec97307d22527fa2065375",
"bugs": {
"url": "https://github.com/isaacs/fstream-ignore/issues"
@@ -35,5 +33,23 @@
"homepage": "https://github.com/isaacs/fstream-ignore",
"_id": "fstream-ignore@1.0.1",
"_shasum": "153df36c4fa2cb006fb915dc71ac9d75f6a17c82",
- "_from": "fstream-ignore@^1.0.0"
+ "_from": "fstream-ignore@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.22",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "153df36c4fa2cb006fb915dc71ac9d75f6a17c82",
+ "tarball": "http://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/fstream-npm/package.json b/deps/npm/node_modules/fstream-npm/package.json
index 31a5af5..e7de770 100644
--- a/deps/npm/node_modules/fstream-npm/package.json
+++ b/deps/npm/node_modules/fstream-npm/package.json
@@ -6,7 +6,7 @@
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "1.0.0",
+ "version": "1.0.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-npm.git"
@@ -17,15 +17,31 @@
"inherits": "2"
},
"license": "ISC",
- "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n",
- "readmeFilename": "README.md",
- "gitHead": "807e0a8653ab793dc2e1b3b798e6256d09f972e7",
+ "gitHead": "4a95e1903f93dc122320349bb55e367ddd08ad6b",
"bugs": {
"url": "https://github.com/isaacs/fstream-npm/issues"
},
"homepage": "https://github.com/isaacs/fstream-npm",
- "_id": "fstream-npm@1.0.0",
+ "_id": "fstream-npm@1.0.1",
"scripts": {},
- "_shasum": "0262c95c771d393e7cf59fcfeabce621703f3d27",
- "_from": "fstream-npm@latest"
+ "_shasum": "1e35c77f0fa24f5d6367e6d447ae7d6ddb482db2",
+ "_from": "fstream-npm@>=1.0.1 <1.1.0",
+ "_npmVersion": "2.1.3",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "1e35c77f0fa24f5d6367e6d447ae7d6ddb482db2",
+ "tarball": "http://registry.npmjs.org/fstream-npm/-/fstream-npm-1.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.0.1.tgz"
}
diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md
index cc69164..82b7ef6 100644
--- a/deps/npm/node_modules/glob/README.md
+++ b/deps/npm/node_modules/glob/README.md
@@ -5,16 +5,7 @@ Match files using the patterns the shell uses, like stars and stuff.
This is a glob implementation in JavaScript. It uses the `minimatch`
library to do its matching.
-## Attention: node-glob users!
-
-The API has changed dramatically between 2.x and 3.x. This library is
-now 100% JavaScript, and the integer flags have been replaced with an
-options object.
-
-Also, there's an event emitter class, proper tests, and all the other
-things you've come to expect from node modules.
-
-And best of all, no compilation!
+![](oh-my-glob.gif)
## Usage
diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js
index 6941fc7..564f3b1 100644
--- a/deps/npm/node_modules/glob/glob.js
+++ b/deps/npm/node_modules/glob/glob.js
@@ -36,10 +36,8 @@
module.exports = glob
-var fs
-try { fs = require("graceful-fs") } catch (e) { fs = require("fs") }
-
-var minimatch = require("minimatch")
+var fs = require("graceful-fs")
+, minimatch = require("minimatch")
, Minimatch = minimatch.Minimatch
, inherits = require("inherits")
, EE = require("events").EventEmitter
diff --git a/deps/npm/node_modules/glob/oh-my-glob.gif b/deps/npm/node_modules/glob/oh-my-glob.gif
new file mode 100644
index 0000000..a1568c1
Binary files /dev/null and b/deps/npm/node_modules/glob/oh-my-glob.gif differ
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index 5905b40..6bf85e8 100644
--- a/deps/npm/node_modules/glob/package.json
+++ b/deps/npm/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "4.0.5",
+ "version": "4.0.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -15,14 +15,11 @@
"engines": {
"node": "*"
},
- "optionalDependencies": {
- "graceful-fs": "^3.0.2"
- },
"dependencies": {
+ "graceful-fs": "^3.0.2",
"inherits": "2",
"minimatch": "^1.0.0",
- "once": "^1.3.0",
- "graceful-fs": "^3.0.2"
+ "once": "^1.3.0"
},
"devDependencies": {
"tap": "~0.4.0",
@@ -34,15 +31,16 @@
"test-regen": "TEST_REGEN=1 node test/00-setup.js"
},
"license": "ISC",
- "gitHead": "a7d85acf4e89fa26d17396ab022ef98fbe1f8a4b",
+ "gitHead": "6825c425e738eaffa315d8cdb1a4c3255ededcb3",
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
"homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@4.0.5",
- "_shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063",
- "_from": "glob@latest",
- "_npmVersion": "1.4.21",
+ "_id": "glob@4.0.6",
+ "_shasum": "695c50bdd4e2fb5c5d370b091f388d3707e291a7",
+ "_from": "glob@>=4.0.6 <5.0.0",
+ "_npmVersion": "2.0.0",
+ "_nodeVersion": "0.10.31",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -54,9 +52,10 @@
}
],
"dist": {
- "shasum": "95e42c9efdb3ab1f4788fd7793dfded4a3378063",
- "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.5.tgz"
+ "shasum": "695c50bdd4e2fb5c5d370b091f388d3707e291a7",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.6.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.5.tgz"
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.6.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/glob/test/negation-test.js b/deps/npm/node_modules/glob/test/negation-test.js
new file mode 100644
index 0000000..fc679e2
--- /dev/null
+++ b/deps/npm/node_modules/glob/test/negation-test.js
@@ -0,0 +1,16 @@
+// Negation test
+// Show that glob respect's minimatch's negate flag
+
+var glob = require('../glob.js')
+var test = require('tap').test
+
+test('glob respects minimatch negate flag when activated with leading !', function(t) {
+ var expect = ["abcdef/g", "abcfed/g", "c/d", "cb/e", "symlink/a"]
+ var results = glob("!b**/*", {cwd: 'a'}, function (er, results) {
+ if (er)
+ throw er
+
+ t.same(results, expect)
+ t.end()
+ });
+});
diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json
index a77f90c..57ce648 100644
--- a/deps/npm/node_modules/graceful-fs/package.json
+++ b/deps/npm/node_modules/graceful-fs/package.json
@@ -6,7 +6,7 @@
},
"name": "graceful-fs",
"description": "A drop-in replacement for fs, making various improvements.",
- "version": "3.0.2",
+ "version": "3.0.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@@ -38,15 +38,20 @@
"EACCESS"
],
"license": "BSD",
- "gitHead": "0caa11544c0c9001db78bf593cf0c5805d149a41",
+ "devDependencies": {
+ "mkdirp": "^0.5.0",
+ "rimraf": "^2.2.8",
+ "tap": "^0.4.13"
+ },
+ "gitHead": "d3fd03247ccc4fa8a3eee399307fd266c70efb06",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
},
"homepage": "https://github.com/isaacs/node-graceful-fs",
- "_id": "graceful-fs@3.0.2",
- "_shasum": "2cb5bf7f742bea8ad47c754caeee032b7e71a577",
- "_from": "graceful-fs@~3.0.0",
- "_npmVersion": "1.4.14",
+ "_id": "graceful-fs@3.0.4",
+ "_shasum": "a0306d9b0940e0fc512d33b5df1014e88e0637a3",
+ "_from": "graceful-fs@>=3.0.4 <4.0.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -58,8 +63,9 @@
}
],
"dist": {
- "shasum": "2cb5bf7f742bea8ad47c754caeee032b7e71a577",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
+ "shasum": "a0306d9b0940e0fc512d33b5df1014e88e0637a3",
+ "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.4.tgz"
},
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.4.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/graceful-fs/test/max-open.js b/deps/npm/node_modules/graceful-fs/test/max-open.js
new file mode 100644
index 0000000..44d5267
--- /dev/null
+++ b/deps/npm/node_modules/graceful-fs/test/max-open.js
@@ -0,0 +1,69 @@
+var test = require('tap').test
+var fs = require('../')
+
+test('open lots of stuff', function (t) {
+ // Get around EBADF from libuv by making sure that stderr is opened
+ // Otherwise Darwin will refuse to give us a FD for stderr!
+ process.stderr.write('')
+
+ // How many parallel open()'s to do
+ var n = 1024
+ var opens = 0
+ var fds = []
+ var going = true
+ var closing = false
+ var doneCalled = 0
+
+ for (var i = 0; i < n; i++) {
+ go()
+ }
+
+ function go() {
+ opens++
+ fs.open(__filename, 'r', function (er, fd) {
+ if (er) throw er
+ fds.push(fd)
+ if (going) go()
+ })
+ }
+
+ // should hit ulimit pretty fast
+ setTimeout(function () {
+ going = false
+ t.equal(opens - fds.length, n)
+ done()
+ }, 100)
+
+
+ function done () {
+ if (closing) return
+ doneCalled++
+
+ if (fds.length === 0) {
+ //console.error('done called %d times', doneCalled)
+ // First because of the timeout
+ // Then to close the fd's opened afterwards
+ // Then this time, to complete.
+ // Might take multiple passes, depending on CPU speed
+ // and ulimit, but at least 3 in every case.
+ t.ok(doneCalled >= 3)
+ return t.end()
+ }
+
+ closing = true
+ setTimeout(function () {
+ // console.error('do closing again')
+ closing = false
+ done()
+ }, 100)
+
+ // console.error('closing time')
+ var closes = fds.slice(0)
+ fds.length = 0
+ closes.forEach(function (fd) {
+ fs.close(fd, function (er) {
+ if (er) throw er
+ })
+ })
+ }
+})
diff --git a/deps/npm/node_modules/graceful-fs/test/readdir-sort.js b/deps/npm/node_modules/graceful-fs/test/readdir-sort.js
index fe005aa..cb63a68 100644
--- a/deps/npm/node_modules/graceful-fs/test/readdir-sort.js
+++ b/deps/npm/node_modules/graceful-fs/test/readdir-sort.js
@@ -14,7 +14,6 @@ test("readdir reorder", function (t) {
g.readdir("whatevers", function (er, files) {
if (er)
throw er
- console.error(files)
t.same(files, [ "a", "b", "z" ])
t.end()
})
diff --git a/deps/npm/node_modules/graceful-fs/test/write-then-read.js b/deps/npm/node_modules/graceful-fs/test/write-then-read.js
new file mode 100644
index 0000000..3a3db54
--- /dev/null
+++ b/deps/npm/node_modules/graceful-fs/test/write-then-read.js
@@ -0,0 +1,45 @@
+var fs = require('../');
+var rimraf = require('rimraf');
+var mkdirp = require('mkdirp');
+var test = require('tap').test;
+var p = require('path').resolve(__dirname, 'files');
+
+// Make sure to reserve the stderr fd
+process.stderr.write('');
+
+var num = 4097;
+var paths = new Array(num);
+
+test('make files', function (t) {
+ rimraf.sync(p);
+ mkdirp.sync(p);
+
+ for (var i = 0; i < num; ++i) {
+ paths[i] = 'files/file-' + i;
+ fs.writeFileSync(paths[i], 'content');
+ }
+
+ t.end();
+})
+
+test('read files', function (t) {
+ // now read them
+ var done = 0;
+ for (var i = 0; i < num; ++i) {
+ fs.readFile(paths[i], function(err, data) {
+ if (err)
+ throw err;
+
+ ++done;
+ if (done === num) {
+ t.pass('success');
+ t.end()
+ }
+ });
+ }
+});
+
+test('cleanup', function (t) {
+ rimraf.sync(p);
+ t.end();
+});
diff --git a/deps/npm/node_modules/inflight/.eslintrc b/deps/npm/node_modules/inflight/.eslintrc
new file mode 100644
index 0000000..b7a1550
--- /dev/null
+++ b/deps/npm/node_modules/inflight/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "env" : {
+ "node" : true
+ },
+ "rules" : {
+ "semi": [2, "never"],
+ "strict": 0,
+ "quotes": [1, "single", "avoid-escape"],
+ "no-use-before-define": 0,
+ "curly": 0,
+ "no-underscore-dangle": 0,
+ "no-lonely-if": 1,
+ "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}],
+ "no-mixed-requires": 0,
+ "space-infix-ops": 0
+ }
+}
diff --git a/deps/npm/node_modules/inflight/inflight.js b/deps/npm/node_modules/inflight/inflight.js
index 1fe279f..8bc96cb 100644
--- a/deps/npm/node_modules/inflight/inflight.js
+++ b/deps/npm/node_modules/inflight/inflight.js
@@ -1,8 +1,9 @@
-module.exports = inflight
-
+var wrappy = require('wrappy')
var reqs = Object.create(null)
var once = require('once')
+module.exports = wrappy(inflight)
+
function inflight (key, cb) {
if (reqs[key]) {
reqs[key].push(cb)
@@ -13,13 +14,31 @@ function inflight (key, cb) {
}
}
-function makeres(key) {
- return once(res)
- function res(error, data) {
+function makeres (key) {
+ return once(function RES () {
var cbs = reqs[key]
- delete reqs[key]
- cbs.forEach(function(cb) {
- cb(error, data)
- })
- }
+ var len = cbs.length
+ var args = slice(arguments)
+ for (var i = 0; i < len; i++) {
+ cbs[i].apply(null, args)
+ }
+ if (cbs.length > len) {
+ // added more in the interim.
+ // de-zalgo, just in case, but don't call again.
+ cbs.splice(0, len)
+ process.nextTick(function () {
+ RES.apply(null, args)
+ })
+ } else {
+ delete reqs[key]
+ }
+ })
+}
+
+function slice (args) {
+ var length = args.length
+ var array = []
+
+ for (var i = 0; i < length; i++) array[i] = args[i]
+ return array
}
diff --git a/deps/npm/node_modules/inflight/package.json b/deps/npm/node_modules/inflight/package.json
index f4e294a..e0b6372 100644
--- a/deps/npm/node_modules/inflight/package.json
+++ b/deps/npm/node_modules/inflight/package.json
@@ -1,10 +1,11 @@
{
"name": "inflight",
- "version": "1.0.1",
+ "version": "1.0.4",
"description": "Add callbacks to requests in flight to avoid async duplication",
"main": "inflight.js",
"dependencies": {
- "once": "^1.3.0"
+ "once": "^1.3.0",
+ "wrappy": "1"
},
"devDependencies": {
"tap": "^0.4.10"
@@ -26,25 +27,10 @@
},
"homepage": "https://github.com/isaacs/inflight",
"license": "ISC",
- "_id": "inflight@1.0.1",
- "_shasum": "01f6911821535243c790ac0f998f54e9023ffb6f",
- "_from": "inflight@~1.0.1",
- "_npmVersion": "1.4.9",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "01f6911821535243c790ac0f998f54e9023ffb6f",
- "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.1.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n",
+ "readmeFilename": "README.md",
+ "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba",
+ "_id": "inflight@1.0.4",
+ "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a",
+ "_from": "inflight@>=1.0.4 <1.1.0"
}
diff --git a/deps/npm/node_modules/inflight/test.js b/deps/npm/node_modules/inflight/test.js
index 28fc145..2bb75b3 100644
--- a/deps/npm/node_modules/inflight/test.js
+++ b/deps/npm/node_modules/inflight/test.js
@@ -31,3 +31,67 @@ test('basic', function (t) {
t.notOk(b, 'second should get falsey inflight response')
})
+
+test('timing', function (t) {
+ var expect = [
+ 'method one',
+ 'start one',
+ 'end one',
+ 'two',
+ 'tick',
+ 'three'
+ ]
+ var i = 0
+
+ function log (m) {
+ t.equal(m, expect[i], m + ' === ' + expect[i])
+ ++i
+ if (i === expect.length)
+ t.end()
+ }
+
+ function method (name, cb) {
+ log('method ' + name)
+ process.nextTick(cb)
+ }
+
+ var one = inf('foo', function () {
+ log('start one')
+ var three = inf('foo', function () {
+ log('three')
+ })
+ if (three) method('three', three)
+ log('end one')
+ })
+
+ method('one', one)
+
+ var two = inf('foo', function () {
+ log('two')
+ })
+ if (two) method('one', two)
+
+ process.nextTick(log.bind(null, 'tick'))
+})
+
+test('parameters', function (t) {
+ t.plan(8)
+
+ var a = inf('key', function (first, second, third) {
+ t.equal(first, 1)
+ t.equal(second, 2)
+ t.equal(third, 3)
+ })
+ t.ok(a, 'first returned cb function')
+
+ var b = inf('key', function (first, second, third) {
+ t.equal(first, 1)
+ t.equal(second, 2)
+ t.equal(third, 3)
+ })
+ t.notOk(b, 'second should get falsey inflight response')
+
+ setTimeout(function () {
+ a(1, 2, 3)
+ })
+})
diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json
index 3b4843a..a0cd426 100644
--- a/deps/npm/node_modules/inherits/package.json
+++ b/deps/npm/node_modules/inherits/package.json
@@ -28,5 +28,24 @@
"url": "https://github.com/isaacs/inherits/issues"
},
"_id": "inherits@2.0.1",
- "_from": "inherits@"
+ "dist": {
+ "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
+ "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
+ },
+ "_from": "inherits@latest",
+ "_npmVersion": "1.3.8",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "homepage": "https://github.com/isaacs/inherits"
}
diff --git a/deps/npm/node_modules/ini/README.md b/deps/npm/node_modules/ini/README.md
index acbe8ec..33df258 100644
--- a/deps/npm/node_modules/ini/README.md
+++ b/deps/npm/node_modules/ini/README.md
@@ -1,7 +1,7 @@
An ini format parser and serializer for node.
-Sections are treated as nested objects. Items before the first heading
-are saved on the object directly.
+Sections are treated as nested objects. Items before the first
+heading are saved on the object directly.
## Usage
@@ -34,40 +34,62 @@ You can read, manipulate and write the ini-file like so:
delete config.paths.default.datadir
config.paths.default.array.push('fourth value')
- fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section'))
+ fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))
-This will result in a file called `config_modified.ini` being written to the filesystem with the following content:
+This will result in a file called `config_modified.ini` being written
+to the filesystem with the following content:
[section]
- scope = local
+ scope=local
[section.database]
- user = dbuser
- password = dbpassword
- database = use_another_database
+ user=dbuser
+ password=dbpassword
+ database=use_another_database
[section.paths.default]
- tmpdir = /tmp
- array[] = first value
- array[] = second value
- array[] = third value
- array[] = fourth value
+ tmpdir=/tmp
+ array[]=first value
+ array[]=second value
+ array[]=third value
+ array[]=fourth value
## API
### decode(inistring)
+
Decode the ini-style formatted `inistring` into a nested object.
### parse(inistring)
+
Alias for `decode(inistring)`
-### encode(object, [section])
-Encode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above.
+### encode(object, [options])
-### stringify(object, [section])
-Alias for `encode(object, [section])`
+Encode the object `object` into an ini-style formatted string. If the
+optional parameter `section` is given, then all top-level properties
+of the object are put into this section and the `section`-string is
+prepended to all sub-sections, see the usage example above.
+
+The `options` object may contain the following:
+
+* `section` A string which will be the first `section` in the encoded
+ ini data. Defaults to none.
+* `whitespace` Boolean to specify whether to put whitespace around the
+ `=` character. By default, whitespace is omitted, to be friendly to
+ some persnickety old parsers that don't tolerate it well. But some
+ find that it's more human-readable and pretty with the whitespace.
+
+For backwards compatibility reasons, if a `string` options is passed
+in, then it is assumed to be the `section` value.
+
+### stringify(object, [options])
+
+Alias for `encode(object, [options])`
### safe(val)
-Escapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example
+
+Escapes the string `val` such that it is safe to be used as a key or
+value in an ini-file. Basically escapes quotes. For example
ini.safe('"unsafe string"')
@@ -76,4 +98,5 @@ would result in
"\"unsafe string\""
### unsafe(val)
+
Unescapes the string `val`
diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js
index f5e4441..1e232e7 100644
--- a/deps/npm/node_modules/ini/ini.js
+++ b/deps/npm/node_modules/ini/ini.js
@@ -7,31 +7,47 @@ exports.unsafe = unsafe
var eol = process.platform === "win32" ? "\r\n" : "\n"
-function encode (obj, section) {
+function encode (obj, opt) {
var children = []
, out = ""
+ if (typeof opt === "string") {
+ opt = {
+ section: opt,
+ whitespace: false
+ }
+ } else {
+ opt = opt || {}
+ opt.whitespace = opt.whitespace === true
+ }
+
+ var separator = opt.whitespace ? " = " : "="
+
Object.keys(obj).forEach(function (k, _, __) {
var val = obj[k]
if (val && Array.isArray(val)) {
val.forEach(function(item) {
- out += safe(k + "[]") + "=" + safe(item) + "\n"
+ out += safe(k + "[]") + separator + safe(item) + "\n"
})
}
else if (val && typeof val === "object") {
children.push(k)
} else {
- out += safe(k) + "=" + safe(val) + eol
+ out += safe(k) + separator + safe(val) + eol
}
})
- if (section && out.length) {
- out = "[" + safe(section) + "]" + eol + out
+ if (opt.section && out.length) {
+ out = "[" + safe(opt.section) + "]" + eol + out
}
children.forEach(function (k, _, __) {
var nk = dotSplit(k).join('\\.')
- var child = encode(obj[k], (section ? section + "." : "") + nk)
+ var section = (opt.section ? opt.section + "." : "") + nk
+ var child = encode(obj[k], {
+ section: section,
+ whitespace: opt.whitespace
+ })
if (out.length && child.length) {
out += eol
}
diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json
index 5212afb..3042c40 100644
--- a/deps/npm/node_modules/ini/package.json
+++ b/deps/npm/node_modules/ini/package.json
@@ -6,7 +6,7 @@
},
"name": "ini",
"description": "An ini encoder/decoder for node",
- "version": "1.2.1",
+ "version": "1.3.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
@@ -22,15 +22,15 @@
"devDependencies": {
"tap": "~0.4.0"
},
- "gitHead": "13498ce1ba5a6a20cd77ed2b55de0e714786f70c",
+ "gitHead": "6c314944d0201f3199e1189aeb5687d0aaf1c575",
"bugs": {
"url": "https://github.com/isaacs/ini/issues"
},
"homepage": "https://github.com/isaacs/ini",
- "_id": "ini@1.2.1",
- "_shasum": "7f774e2f22752cd1dacbf9c63323df2a164ebca3",
- "_from": "ini@latest",
- "_npmVersion": "1.4.11",
+ "_id": "ini@1.3.0",
+ "_shasum": "625483e56c643a7721014c76604d3353f44bd429",
+ "_from": "ini@>=1.3.0 <2.0.0",
+ "_npmVersion": "2.0.0",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -42,9 +42,10 @@
}
],
"dist": {
- "shasum": "7f774e2f22752cd1dacbf9c63323df2a164ebca3",
- "tarball": "http://registry.npmjs.org/ini/-/ini-1.2.1.tgz"
+ "shasum": "625483e56c643a7721014c76604d3353f44bd429",
+ "tarball": "http://registry.npmjs.org/ini/-/ini-1.3.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/ini/-/ini-1.2.1.tgz"
+ "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/ini/test/foo.js b/deps/npm/node_modules/ini/test/foo.js
index 5c59890..9d34aa6 100644
--- a/deps/npm/node_modules/ini/test/foo.js
+++ b/deps/npm/node_modules/ini/test/foo.js
@@ -59,6 +59,16 @@ var i = require("../")
}
}
}
+ , expectF = '[prefix.log]\n'
+ + 'type=file\n\n'
+ + '[prefix.log.level]\n'
+ + 'label=debug\n'
+ + 'value=10\n'
+ , expectG = '[log]\n'
+ + 'type = file\n\n'
+ + '[log.level]\n'
+ + 'label = debug\n'
+ + 'value = 10\n'
test("decode from file", function (t) {
var d = i.decode(data)
@@ -77,3 +87,19 @@ test("encode from data", function (t) {
t.end()
})
+
+test("encode with option", function (t) {
+ var obj = {log: { type:'file', level: {label:'debug', value:10} } }
+ e = i.encode(obj, {section: 'prefix'})
+
+ t.equal(e, expectF)
+ t.end()
+})
+
+test("encode with whitespace", function (t) {
+ var obj = {log: { type:'file', level: {label:'debug', value:10} } }
+ e = i.encode(obj, {whitespace: true})
+
+ t.equal(e, expectG)
+ t.end()
+})
diff --git a/deps/npm/node_modules/init-package-json/.npmignore b/deps/npm/node_modules/init-package-json/.npmignore
new file mode 100644
index 0000000..44a3be1
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/.npmignore
@@ -0,0 +1,2 @@
+node_modules/
+.eslintrc
diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js
index 8b335f9..c86894b 100644
--- a/deps/npm/node_modules/init-package-json/default-input.js
+++ b/deps/npm/node_modules/init-package-json/default-input.js
@@ -38,11 +38,14 @@ function readDeps (test) { return function (cb) {
})
}}
+var name = package.name || basename
+exports.name = yes ? name : prompt('name', name)
+
+var version = package.version || config.get('init-version') || '1.0.0'
+exports.version = yes ? version : prompt('version', version)
-exports.name = prompt('name', package.name || basename)
-exports.version = prompt('version', package.version || config.get('init.version') || '1.0.0')
if (!package.description) {
- exports.description = prompt('description')
+ exports.description = yes ? '' : prompt('description')
}
if (!package.main) {
@@ -63,7 +66,8 @@ if (!package.main) {
else
f = f[0]
- return cb(null, prompt('entry point', f || 'index.js'))
+ var index = f ||Â 'index.js'
+ return cb(null, yes ? index : prompt('entry point', index))
})
}
}
@@ -121,26 +125,32 @@ function setupScripts (d, cb) {
function tx (test) {
return test || notest
}
-
if (!s.test || s.test === notest) {
- if (d.indexOf('tap') !== -1)
- s.test = prompt('test command', 'tap test/*.js', tx)
- else if (d.indexOf('expresso') !== -1)
- s.test = prompt('test command', 'expresso test', tx)
- else if (d.indexOf('mocha') !== -1)
- s.test = prompt('test command', 'mocha', tx)
- else
- s.test = prompt('test command', tx)
+ var commands = {
+ 'tap':'tap test/*.js'
+ , 'expresso':'expresso test'
+ , 'mocha':'mocha'
+ }
+ var command
+ Object.keys(commands).forEach(function (k) {
+ if (d.indexOf(k) !== -1) command = commands[k]
+ })
+ var ps = 'test command'
+ if (yes) {
+ s.test = command || notest
+ } else {
+ s.test = command ? prompt(ps, command, tx) : prompt(ps, tx)
+ }
}
-
return cb(null, s)
}
if (!package.repository) {
exports.repository = function (cb) {
fs.readFile('.git/config', 'utf8', function (er, gconf) {
- if (er || !gconf) return cb(null, prompt('git repository'))
-
+ if (er || !gconf) {
+ return cb(null, yes ? '' : prompt('git repository'))
+ }
gconf = gconf.split(/\r?\n/)
var i = gconf.indexOf('[remote "origin"]')
if (i !== -1) {
@@ -152,13 +162,13 @@ if (!package.repository) {
if (u && u.match(/^git@github.com:/))
u = u.replace(/^git@github.com:/, 'https://github.com/')
- return cb(null, prompt('git repository', u))
+ return cb(null, yes ? u : prompt('git repository', u))
})
}
}
if (!package.keywords) {
- exports.keywords = prompt('keywords', function (s) {
+ exports.keywords = yes ? '' : prompt('keywords', function (s) {
if (!s) return undefined
if (Array.isArray(s)) s = s.join(' ')
if (typeof s !== 'string') return s
@@ -167,15 +177,14 @@ if (!package.keywords) {
}
if (!package.author) {
- exports.author = config.get('init.author.name')
+ exports.author = config.get('init-author-name')
? {
- "name" : config.get('init.author.name'),
- "email" : config.get('init.author.email'),
- "url" : config.get('init.author.url')
+ "name" : config.get('init-author-name'),
+ "email" : config.get('init-author-email'),
+ "url" : config.get('init-author-url')
}
: prompt('author')
}
-exports.license = prompt('license', package.license ||
- config.get('init.license') ||
- 'ISC')
+var license = package.license || config.get('init-license') || 'ISC'
+exports.license = yes ? license : prompt('license', license)
diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js
index 2600e77..cac761c 100644
--- a/deps/npm/node_modules/init-package-json/init-package-json.js
+++ b/deps/npm/node_modules/init-package-json/init-package-json.js
@@ -1,5 +1,6 @@
module.exports = init
+module.exports.yes = yes
var PZ = require('promzard').PromZard
var path = require('path')
@@ -14,6 +15,13 @@ var read = require('read')
// readJson.extras(file, data, cb)
var readJson = require('read-package-json')
+function yes (conf) {
+ return !!(
+ conf.get('yes') || conf.get('y') ||
+ conf.get('force') || conf.get('f')
+ )
+}
+
function init (dir, input, config, cb) {
if (typeof config === 'function')
cb = config, config = {}
@@ -35,7 +43,7 @@ function init (dir, input, config, cb) {
var package = path.resolve(dir, 'package.json')
input = path.resolve(input)
var pkg
- var ctx = {}
+ var ctx = { yes: yes(config) }
var es = readJson.extraSet
readJson.extraSet = es.filter(function (fn) {
@@ -91,14 +99,21 @@ function init (dir, input, config, cb) {
delete pkg.repository
var d = JSON.stringify(pkg, null, 2) + '\n'
+ function write (yes) {
+ fs.writeFile(package, d, 'utf8', function (er) {
+ if (!er && yes) console.log('Wrote to %s:\n\n%s\n', package, d)
+ return cb(er, pkg)
+ })
+ }
+ if (ctx.yes) {
+ return write(true)
+ }
console.log('About to write to %s:\n\n%s\n', package, d)
read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) {
if (!ok || ok.toLowerCase().charAt(0) !== 'y') {
console.log('Aborted.')
} else {
- fs.writeFile(package, d, 'utf8', function (er) {
- return cb(er, pkg)
- })
+ return write()
}
})
})
diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
index 703b34a..f668575 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
+++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json
@@ -27,7 +27,7 @@
"homepage": "https://github.com/isaacs/promzard",
"_id": "promzard@0.2.2",
"_shasum": "918b9f2b29458cb001781a8856502e4a79b016e0",
- "_from": "promzard@>=0.2.0-0 <0.3.0-0",
+ "_from": "promzard@>=0.2.0 <0.3.0",
"_npmVersion": "1.4.10",
"_npmUser": {
"name": "isaacs",
@@ -44,5 +44,6 @@
"tarball": "http://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
+ "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json
index c716cd6..54aa7cb 100644
--- a/deps/npm/node_modules/init-package-json/package.json
+++ b/deps/npm/node_modules/init-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "init-package-json",
- "version": "1.0.1",
+ "version": "1.1.1",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
@@ -24,8 +24,9 @@
"semver": "2.x || 3.x || 4"
},
"devDependencies": {
- "tap": "~0.2.5",
- "rimraf": "~2.0.2"
+ "npm": "^2.1.4",
+ "rimraf": "^2.1.4",
+ "tap": "^0.4.13"
},
"keywords": [
"init",
@@ -37,29 +38,14 @@
"prompt",
"start"
],
- "gitHead": "e1a5917ba1723ab5dcedacbffb5b10208d203e2f",
+ "readme": "# init-package-json\n\nA node module to get your node module started.\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "a4df4e57f9b6a2bf906ad50612dbed7dcb2f2c2b",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
"homepage": "https://github.com/isaacs/init-package-json",
- "_id": "init-package-json@1.0.1",
- "_shasum": "c01b08cc90504ebc448d57b468e66fc08293e8a8",
- "_from": "init-package-json@>=1.0.0-0 <1.1.0-0",
- "_npmVersion": "2.0.0-beta.3",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "c01b08cc90504ebc448d57b468e66fc08293e8a8",
- "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.0.1.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.0.1.tgz"
+ "_id": "init-package-json@1.1.1",
+ "_shasum": "e09e9f1fb541e0fddc9175c5ce1736fd45ff4bf8",
+ "_from": "init-package-json@>=1.1.1 <2.0.0"
}
diff --git a/deps/npm/node_modules/init-package-json/test/npm-defaults.js b/deps/npm/node_modules/init-package-json/test/npm-defaults.js
new file mode 100644
index 0000000..8229c84
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/test/npm-defaults.js
@@ -0,0 +1,49 @@
+var test = require("tap").test
+var rimraf = require("rimraf")
+var resolve = require("path").resolve
+
+var npm = require("npm")
+var init = require("../")
+
+var EXPECTED = {
+ name : "test",
+ version : "3.1.4",
+ description : "",
+ main : "basic.js",
+ scripts : {
+ test : 'echo "Error: no test specified" && exit 1'
+ },
+ keywords : [],
+ author : "npmbot (http://npm.im)",
+ license : "WTFPL"
+}
+
+test("npm configuration values pulled from environment", function (t) {
+ /*eslint camelcase:0 */
+ process.env.npm_config_yes = "yes"
+
+ process.env.npm_config_init_author_name = "npmbot"
+ process.env.npm_config_init_author_email = "n@p.m"
+ process.env.npm_config_init_author_url = "http://npm.im"
+
+ process.env.npm_config_init_license = EXPECTED.license
+ process.env.npm_config_init_version = EXPECTED.version
+
+ npm.load({}, function (err) {
+ t.ifError(err, "npm loaded successfully")
+
+ process.chdir(resolve(__dirname))
+ init(__dirname, __dirname, npm.config, function (er, data) {
+ t.ifError(err, "init ran successfully")
+
+ t.same(data, EXPECTED, "got the package data from the environment")
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ rimraf.sync(resolve(__dirname, "package.json"))
+ t.pass("cleaned up")
+ t.end()
+})
diff --git a/deps/npm/node_modules/normalize-package-data/README.md b/deps/npm/node_modules/normalize-package-data/README.md
index bdcc8b0..1429e40 100644
--- a/deps/npm/node_modules/normalize-package-data/README.md
+++ b/deps/npm/node_modules/normalize-package-data/README.md
@@ -16,7 +16,7 @@ Basic usage is really simple. You call the function that normalize-package-data
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readfileSync("package.json")
+packageData = fs.readFileSync("package.json")
normalizeData(packageData)
// packageData is now normalized
```
@@ -27,7 +27,7 @@ You may activate strict validation by passing true as the second argument.
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readfileSync("package.json")
+packageData = fs.readFileSync("package.json")
warnFn = function(msg) { console.error(msg) }
normalizeData(packageData, true)
// packageData is now normalized
@@ -41,7 +41,7 @@ Optionally, you may pass a "warning" function. It gets called whenever the `norm
```javascript
normalizeData = require('normalize-package-data')
-packageData = fs.readfileSync("package.json")
+packageData = fs.readFileSync("package.json")
warnFn = function(msg) { console.error(msg) }
normalizeData(packageData, warnFn)
// packageData is now normalized. Any number of warnings may have been logged.
diff --git a/deps/npm/node_modules/normalize-package-data/lib/fixer.js b/deps/npm/node_modules/normalize-package-data/lib/fixer.js
index 7283600..14c0abc 100644
--- a/deps/npm/node_modules/normalize-package-data/lib/fixer.js
+++ b/deps/npm/node_modules/normalize-package-data/lib/fixer.js
@@ -111,6 +111,13 @@ var fixer = module.exports = {
this.warn("nonStringBundleDependency", bd)
return false
} else {
+ if (!data.dependencies) {
+ data.dependencies = {}
+ }
+ if (!data.dependencies.hasOwnProperty(bd)) {
+ this.warn("nonDependencyBundleDependency", bd)
+ data.dependencies[bd] = "*"
+ }
return true
}
}, this)
diff --git a/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json b/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json
index 9605f5c..1877fe5 100644
--- a/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json
+++ b/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json
@@ -8,6 +8,7 @@
,"invalidFilename": "Invalid filename in 'files' list: %s"
,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names"
,"nonStringBundleDependency": "Invalid bundleDependencies member: %s"
+ ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s"
,"nonObjectDependencies": "%s field must be an object"
,"nonStringDependency": "Invalid dependency: %s %s"
,"deprecatedArrayDependencies": "specifying %s as array is deprecated"
@@ -25,4 +26,4 @@
,"nonUrlHomepage": "homepage field must be a string url. Deleted."
,"missingProtocolHomepage": "homepage field must start with a protocol."
,"typo": "%s should probably be %s."
-}
\ No newline at end of file
+}
diff --git a/deps/npm/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/normalize-package-data/package.json
index 0471bcd..6da5469 100644
--- a/deps/npm/node_modules/normalize-package-data/package.json
+++ b/deps/npm/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "1.0.2",
+ "version": "1.0.3",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
@@ -38,15 +38,16 @@
"email": "rok@kowalski.gd"
}
],
- "gitHead": "05fafb91466ac634fa7d591d0796d64b0b432dc0",
+ "gitHead": "8c30091c83b1a41e113757148c4543ef61ff863d",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
"homepage": "https://github.com/meryn/normalize-package-data",
- "_id": "normalize-package-data@1.0.2",
- "_shasum": "32a902ad3cad3286f1106b9b9550062f44ee2118",
- "_from": "normalize-package-data@>=1.0.1-0 <1.1.0-0",
- "_npmVersion": "2.0.0-beta.3",
+ "_id": "normalize-package-data@1.0.3",
+ "_shasum": "8be955b8907af975f1a4584ea8bb9b41492312f5",
+ "_from": "normalize-package-data@>=1.0.3 <1.1.0",
+ "_npmVersion": "2.1.0",
+ "_nodeVersion": "0.10.31",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -66,9 +67,9 @@
}
],
"dist": {
- "shasum": "32a902ad3cad3286f1106b9b9550062f44ee2118",
- "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.2.tgz"
+ "shasum": "8be955b8907af975f1a4584ea8bb9b41492312f5",
+ "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.2.tgz"
+ "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.3.tgz"
}
diff --git a/deps/npm/node_modules/normalize-package-data/test/dependencies.js b/deps/npm/node_modules/normalize-package-data/test/dependencies.js
index dda24dc..3e493ab 100644
--- a/deps/npm/node_modules/normalize-package-data/test/dependencies.js
+++ b/deps/npm/node_modules/normalize-package-data/test/dependencies.js
@@ -37,7 +37,8 @@ tap.test("warn if bundleDependencies array contains anything else but strings",
var wanted1 = safeFormat(warningMessages.nonStringBundleDependency, 123)
var wanted2 = safeFormat(warningMessages.nonStringBundleDependency, {foo:"bar"})
+ var wanted2 = safeFormat(warningMessages.nonDependencyBundleDependency, "abc")
t.ok(~warnings.indexOf(wanted1), wanted1)
t.ok(~warnings.indexOf(wanted2), wanted2)
t.end()
-})
\ No newline at end of file
+})
diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json
index 45604cb..babbd73 100644
--- a/deps/npm/node_modules/npm-package-arg/package.json
+++ b/deps/npm/node_modules/npm-package-arg/package.json
@@ -1,13 +1,13 @@
{
"name": "npm-package-arg",
- "version": "2.1.2",
+ "version": "2.1.3",
"description": "Parse the things that can be arguments to `npm install`",
"main": "npa.js",
"directories": {
"test": "test"
},
"dependencies": {
- "semver": "^2.3.0 || 3.x || 4"
+ "semver": "4"
},
"devDependencies": {
"tap": "^0.4.9"
@@ -31,8 +31,8 @@
"homepage": "https://github.com/npm/npm-package-arg",
"readme": "# npm-package-arg\n\nParse the things that can be arguments to `npm install`\n\nTakes an argument like `foo@1.2`, or `foo@user/foo`, or\n`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`, and\nfigures out what type of thing it is.\n\n## USAGE\n\n```javascript\nvar assert = require(\"assert\")\nvar npa = require(\"npm-package-arg\")\n\n// Pass in the descriptor, and it'll return an object\nvar parsed = npa(\"foo@1.2\")\n\n// Returns an object like:\n// {\n// name: \"foo\", // The bit in front of the @\n// type: \"range\", // the type of descriptor this is\n// spec: \"1.2\" // the specifier for this descriptor\n// }\n\n// Completely unreasonable invalid garbage throws an error\n// Make sure you wrap this in a try/catch if you have not\n// already sanitized the inputs!\nassert.throws(function() {\n npa(\"this is not \\0 a valid package name or url\")\n})\n```\n\nFor more examples, see the test file.\n\n## Result Objects\n\nThe objects that are returned by npm-package-arg contain the following\nfields:\n\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `type` - One of the following strings:\n * `git` - A git repo\n * `github` - A github shorthand, like `user/project`\n * `tag` - A tagged version, like `\"foo@latest\"`\n * `version` - A specific version number, like `\"foo@1.2.3\"`\n * `range` - A version range, like `\"foo@2.x\"`\n * `local` - A local file or folder path\n * `remote` - An http url (presumably to a tgz)\n* `spec` - The \"thing\". URL, the range, git repo, etc.\n* `raw` - The original un-modified string that was provided.\n* `rawSpec` - The part after the `name@...`, as it was originally\n provided.\n* `scope` - If a name is something like `@org/module` then the `scope`\n field will be set to `org`. If it doesn't have a scoped name, then\n scope is `null`.\n",
"readmeFilename": "README.md",
- "gitHead": "ebb3c5ee4c362aca5722cf805adf871f86b5c4f2",
- "_id": "npm-package-arg@2.1.2",
- "_shasum": "14f9be32e203a77977dd8120cf749d0db8c93761",
- "_from": "npm-package-arg@>=2.1.2 <2.2.0"
+ "gitHead": "9aaabc2aae746371a05f54cdb57a5f9ada003d8f",
+ "_id": "npm-package-arg@2.1.3",
+ "_shasum": "dfba34bd82dd327c10cb43a65c8db6ef0b812bf7",
+ "_from": "npm-package-arg@~2.1.3"
}
diff --git a/deps/npm/node_modules/npm-package-arg/test/basic.js b/deps/npm/node_modules/npm-package-arg/test/basic.js
index 3bc984e..98206db 100644
--- a/deps/npm/node_modules/npm-package-arg/test/basic.js
+++ b/deps/npm/node_modules/npm-package-arg/test/basic.js
@@ -8,7 +8,7 @@ require("tap").test("basic", function (t) {
"foo@1.2": {
name: "foo",
type: "range",
- spec: ">=1.2.0-0 <1.3.0-0",
+ spec: ">=1.2.0 <1.3.0",
raw: "foo@1.2",
rawSpec: "1.2"
},
diff --git a/deps/npm/node_modules/npm-registry-client/lib/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/fetch.js
index 8dd6b28..75c52de 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/fetch.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/fetch.js
@@ -69,7 +69,11 @@ function makeRequest (remote, headers, cb) {
var parsed = url.parse(remote)
this.log.http("fetch", "GET", parsed.href)
- var er = this.authify(this.conf.get("always-auth"), parsed, headers)
+ var er = this.authify(
+ this.conf.getCredentialsByURI(remote).alwaysAuth,
+ parsed,
+ headers
+ )
if (er) return cb(er)
var opts = this.initialize(
diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js
index 498b326..910fe01 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/request.js
@@ -44,7 +44,8 @@ function regRequest (method, uri, options, cb_) {
, isUserChange = where.match(adduserChange)
, adduserNew = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)$/
, isNewUser = where.match(adduserNew)
- , alwaysAuth = this.conf.get("always-auth")
+ , registry = url.format(parsed)
+ , alwaysAuth = this.conf.getCredentialsByURI(registry).alwaysAuth
, isDelete = method === "DELETE"
, isWrite = what || isDelete
@@ -70,9 +71,7 @@ function regRequest (method, uri, options, cb_) {
}).join("/")
if (q) where += "?" + q
- var registry = url.format(parsed)
this.log.verbose("request", "resolving registry", [registry, where])
-
where = url.resolve(registry, where)
this.log.verbose("request", "after pass 2, where is", where)
}
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 5de4bd2..f9c447e 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -6,7 +6,7 @@
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "3.2.1",
+ "version": "3.2.4",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
@@ -22,7 +22,7 @@
"npm-cache-filename": "^1.0.0",
"once": "^1.3.0",
"request": "2 >=2.25.0",
- "retry": "0.6.0",
+ "retry": "^0.6.1",
"rimraf": "2",
"semver": "2 >=2.2.1 || 3.x || 4",
"slide": "^1.1.3",
@@ -30,6 +30,7 @@
},
"devDependencies": {
"concat-stream": "^1.4.6",
+ "npmconf": "^2.1.0",
"tap": ""
},
"optionalDependencies": {
@@ -38,12 +39,12 @@
"license": "ISC",
"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)\nvar uri = \"npm://registry.npmjs.org/npm\"\nvar options = {timeout: 1000}\n\nclient.get(uri, options, function (error, 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# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (for the base URL, any path\nwill be ignored). In addition to `http` and `https`, `npm` URLs are allowed.\n`npm` URLs are `https` URLs with the additional restrictions that they will\nalways include authorization credentials, and the response is always registry\nmetadata (and not tarballs or other attachments).\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* `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, uri, options, cb)\n\n* `method` {String} HTTP method\n* `uri` {String} URI pointing to the resource to request\n* `options` {Object} Object containing optional per-request properties.\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 * `follow` {Boolean} Follow 302/301 responses (defaults to true)\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 around\n`request`.\n\n# client.adduser(base, username, password, email, cb)\n\n* `base` {String} Base registry URL\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(uri, version, message, cb)\n\n* `uri` {String} Full registry URI for the deprecated package\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(uri, cb)\n\n* `uri` {String} Full registry URI for the package\n* `cb` {Function}\n\nGet the url for bugs of a package\n\n# client.get(uri, options, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `options` {Object} Object containing optional per-request properties.\n * `timeout` {Number} Duration before the request times out.\n * `follow` {Boolean} Follow 302/301 responses (defaults to true)\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 the cache folder\nwith the ETag.\n\n# client.publish(uri, data, tarball, cb)\n\n* `uri` {String} The registry URI to publish to\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it can\naccept a gzipped tar stream or a filename to a tarball.\n\n# client.star(uri, starred, cb)\n\n* `uri` {String} The complete registry URI 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 unstar a\npackage, though other writes do require that the user be the package owner.\n\n# client.stars(base, username, cb)\n\n* `base` {String} The base URL for the registry\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(uri, version, tag, cb)\n\n* `uri` {String} The complete registry URI to tag\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` will fetch the\nspecified version.\n\n# client.unpublish(uri, [ver], cb)\n\n* `uri` {String} The complete registry URI to unpublish\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 the\nlast version us unpublished, the entire document is removed from the database.\n\n# client.upload(uri, file, [etag], [nofollow], cb)\n\n* `uri` {String} The complete registry URI 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",
- "gitHead": "c60d91b1e8dceba21e33ec40eeaf1b0d02cac8c6",
+ "gitHead": "ddafd4913bdca30a1f9111660767f71653604b57",
"bugs": {
"url": "https://github.com/isaacs/npm-registry-client/issues"
},
"homepage": "https://github.com/isaacs/npm-registry-client",
- "_id": "npm-registry-client@3.2.1",
- "_shasum": "a502a818de273085e8e1a931ff7beac6e3fe2a7a",
- "_from": "npm-registry-client@>=3.2.1-0 <3.3.0-0"
+ "_id": "npm-registry-client@3.2.4",
+ "_shasum": "8659b3449e1c9a9f8181dad142cadb048bfe521f",
+ "_from": "npm-registry-client@>=3.2.4 <3.3.0"
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/fetch-authed.js b/deps/npm/node_modules/npm-registry-client/test/fetch-authed.js
new file mode 100644
index 0000000..da35929
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fetch-authed.js
@@ -0,0 +1,56 @@
+var resolve = require("path").resolve
+var createReadStream = require("graceful-fs").createReadStream
+var readFileSync = require("graceful-fs").readFileSync
+
+var tap = require("tap")
+var cat = require("concat-stream")
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+
+var tgz = resolve(__dirname, "./fixtures/underscore/1.3.3/package.tgz")
+
+tap.test("basic fetch with scoped always-auth enabled", function (t) {
+ server.expect("/underscore/-/underscore-1.3.3.tgz", function (req, res) {
+ t.equal(req.method, "GET", "got expected method")
+ t.equal(
+ req.headers.authorization,
+ "Basic dXNlcm5hbWU6JTEyMzRAYXNkZiU=",
+ "got expected auth header"
+ )
+
+ res.writeHead(200, {
+ "content-type" : "application/x-tar",
+ "content-encoding" : "gzip"
+ })
+
+ createReadStream(tgz).pipe(res)
+ })
+
+ var nerfed = "//localhost:" + server.port + "/:"
+ var configuration = {}
+ configuration[nerfed + "username"] = "username"
+ configuration[nerfed + "_password"] = new Buffer("%1234@asdf%").toString("base64")
+ configuration[nerfed + "email"] = "i@izs.me"
+ configuration[nerfed + "always-auth"] = true
+
+ var client = common.freshClient(configuration)
+ client.fetch(
+ "http://localhost:1337/underscore/-/underscore-1.3.3.tgz",
+ null,
+ function (er, res) {
+ t.ifError(er, "loaded successfully")
+
+ var sink = cat(function (data) {
+ t.deepEqual(data, readFileSync(tgz))
+ t.end()
+ })
+
+ res.on("error", function (error) {
+ t.ifError(error, "no errors on stream")
+ })
+
+ res.pipe(sink)
+ }
+ )
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/fetch-not-authed.js b/deps/npm/node_modules/npm-registry-client/test/fetch-not-authed.js
new file mode 100644
index 0000000..0275dc2
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fetch-not-authed.js
@@ -0,0 +1,52 @@
+var resolve = require("path").resolve
+var createReadStream = require("graceful-fs").createReadStream
+var readFileSync = require("graceful-fs").readFileSync
+
+var tap = require("tap")
+var cat = require("concat-stream")
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+
+var tgz = resolve(__dirname, "./fixtures/underscore/1.3.3/package.tgz")
+
+tap.test("basic fetch with scoped always-auth disabled", function (t) {
+ server.expect("/underscore/-/underscore-1.3.3.tgz", function (req, res) {
+ t.equal(req.method, "GET", "got expected method")
+ t.notOk(req.headers.authorization, "received no auth header")
+
+ res.writeHead(200, {
+ "content-type" : "application/x-tar",
+ "content-encoding" : "gzip"
+ })
+
+ createReadStream(tgz).pipe(res)
+ })
+
+ var nerfed = "//localhost:" + server.port + "/:"
+ var configuration = {}
+ configuration[nerfed + "username"] = "username"
+ configuration[nerfed + "_password"] = new Buffer("%1234@asdf%").toString("base64")
+ configuration[nerfed + "email"] = "i@izs.me"
+ configuration[nerfed + "always-auth"] = false
+
+ var client = common.freshClient(configuration)
+ client.fetch(
+ "http://localhost:1337/underscore/-/underscore-1.3.3.tgz",
+ null,
+ function (er, res) {
+ t.ifError(er, "loaded successfully")
+
+ var sink = cat(function (data) {
+ t.deepEqual(data, readFileSync(tgz))
+ t.end()
+ })
+
+ res.on("error", function (error) {
+ t.ifError(error, "no errors on stream")
+ })
+
+ res.pipe(sink)
+ }
+ )
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json
new file mode 100644
index 0000000..4561db5
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json
@@ -0,0 +1 @@
+{"_id":"@npm%2fnpm-registry-client","_rev":"213-0a1049cf56172b7d9a1184742c6477b9","name":"@npm/npm-registry-client","description":"Client for the npm registry","dist-tags":{"latest":"2.0.4","v2.0":"2.0.3"},"versions":{"0.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.1","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"693a08f6d2faea22bbd2bf412508a63d3e6229a7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.2","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"b48c0ec5563c6a6fdc253454fc56d2c60c5a26f4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.3","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"ccc0254c2d59e3ea9b9050e2b16edef78df1a1e8","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.3.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.4","_engineSupported":true,"_npmVersion":"1.1.25","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"faabd25ef477521c74ac21e0f4cf3a2f66d18fb3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.4.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.5","dist":{"shasum":"85219810c9d89ae8d28ea766e7cf74efbd9f1e52","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.5.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"The code that npm uses to talk to the registry","version":"0.0.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.6","dist":{"shasum":"cc6533b3b41df65e6e9db2601fbbf1a509a7e94c","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.6.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"The code that npm uses to talk to the registry","version":"0.0.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.7","dist":{"shasum":"0cee1d1c61f1c8e483774fe1f7bbb81c4f394a3a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.7.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.8","dist":{"shasum":"1b7411c3f7310ec2a96b055b00e7ca606e47bd07","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.8.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.9","dist":{"shasum":"6d5bfde431559ac9e2e52a7db85f5839b874f022","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.9.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.10","dist":{"shasum":"0c8b6a4615bce82aa6cc04a0d1f7dc89921f7a38","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.10.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.11","dist":{"shasum":"afab40be5bed1faa946d8e1827844698f2ec1db7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.11.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.0","dist":{"shasum":"1077d6bbb5e432450239dc6622a59474953ffbea","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.1","dist":{"shasum":"759765361d09b715270f59cf50f10908e4e9c5fc","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.2","dist":{"shasum":"541ce93abb3d35f5c325545c718dd3bbeaaa9ff0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.3","dist":{"shasum":"e9a40d7031e8f809af5fd85aa9aac979e17efc97","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.3.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.4","dist":{"shasum":"b211485b046191a1085362376530316f0cab0420","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.4.tgz"},"_npmVersion":"1.1.48","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.0","dist":{"shasum":"6508a4b4d96f31057d5200ca5779531bafd2b840","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.0.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.1","dist":{"shasum":"1bc8c4576c368cd88253d8a52daf40c55b89bb1a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.1.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.5","dist":{"shasum":"2f55d675dfb977403b1ad0d96874c1d30e8058d7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.5.tgz"},"_npmVersion":"1.1.51","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.6","dist":{"shasum":"f05df6695360360ad220e6e13a6a7bace7165fbe","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.6.tgz"},"_npmVersion":"1.1.56","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.7","dist":{"shasum":"867bad8854cae82ed89ee3b7f1d391af59491671","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.7.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.8","dist":{"shasum":"ef194cdb70f1ea03a576cff2c97392fa96e36563","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.8.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.9","dist":{"shasum":"3cec10431dfed1594adaf99c50f482ee56ecf9e4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.9.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.10","dist":{"shasum":"1e69726dae0944e78562fd77243f839c6a2ced1e","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.10.tgz"},"_npmVersion":"1.1.64","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.11","dist":{"shasum":"d92f33c297eb1bbd57fd597c3d8f5f7e9340a0b5","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.11.tgz"},"_npmVersion":"1.1.70","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.12":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.12","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.12","dist":{"shasum":"3bfb6fc0e4b131d665580cd1481c341fe521bfd3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.12.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.13":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.13","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.13","dist":{"shasum":"e03f2a4340065511b7184a3e2862cd5d459ef027","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.13.tgz"},"_from":".","_npmVersion":"1.2.4","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.14":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.14","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.14","dist":{"shasum":"186874a7790417a340d582b1cd4a7c338087ee12","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.14.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.15":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.15","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.15","dist":{"shasum":"f71f32b7185855f1f8b7a5ef49e49d2357c2c552","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.15.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.16":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.16","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.16","dist":{"shasum":"3331323b5050fc5afdf77c3a35913c16f3e43964","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.16.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.17":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.17","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.17","dist":{"shasum":"1df2bbecac6751f5d9600fb43722aef96d956773","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.17.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.18":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.18","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.18","dist":{"shasum":"198c8d15ed9b1ed546faf6e431eb63a6b18193ad","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.18.tgz"},"_from":".","_npmVersion":"1.2.13","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.19":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.19","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.19","dist":{"shasum":"106da826f0d2007f6e081f2b68fb6f26fa951b20","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.19.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.20":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.20","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.20","dist":{"shasum":"3fff194331e26660be2cf8ebf45ddf7d36add5f6","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.20.tgz"},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.21":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.21","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.21","dist":{"shasum":"d85dd32525f193925c46ff9eb0e0f529dfd1b254","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.21.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.22":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.22","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.22","dist":{"shasum":"caa22ff40a1ccd632a660b8b80c333c8f92d5a17","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.22.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.23":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.23","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.23","dist":{"shasum":"a320ab2b1d048b4f7b88e40bd86974ca322b4c24","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.23.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.24":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.24","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.24","dist":{"shasum":"e12f644338619319ee7f233363a1714a87f3c72d","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.24.tgz"},"_from":".","_npmVersion":"1.2.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.25":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.25","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.25","dist":{"shasum":"c2caeb1dcf937d6fcc4a187765d401f5e2f54027","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.25.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.26":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.26","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.26","dist":{"shasum":"4c5a2b3de946e383032f10fa497d0c15ee5f4c60","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.26.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.27":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.27","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~2.0.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.27","dist":{"shasum":"8f338189d32769267886a07ad7b7fd2267446adf","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.27.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.28":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.28","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"~2.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.28","dist":{"shasum":"959141fc0180d7b1ad089e87015a8a2142a8bffc","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.28.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.29":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.29","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.29","dist":{"shasum":"66ff2766f0c61d41e8a6139d3692d8833002c686","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.29.tgz"},"_from":".","_npmVersion":"1.3.12","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.30":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.30","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.30","dist":{"shasum":"f01cae5c51aa0a1c5dc2516cbad3ebde068d3eaa","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.30.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.31":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.31","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.31","dist":{"shasum":"24a23e24e43246677cb485f8391829e9536563d4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.31.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.0","dist":{"shasum":"66eab02a69be67f232ac14023eddfb8308c2eccd","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.1","dist":{"shasum":"16dba07cc304442edcece378218672d0a1258ef8","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.1.tgz"},"_from":".","_npmVersion":"1.3.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.2","dist":{"shasum":"ea3060bd0a87fb1d97b87433b50f38f7272b1686","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.2.tgz"},"_from":".","_npmVersion":"1.3.20","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.3","dist":{"shasum":"da08bb681fb24aa5c988ca71f8c10f27f09daf4a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.3.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.4","dist":{"shasum":"25d771771590b1ca39277aea4506af234c5f4342","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.4.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.5","dist":{"shasum":"98ba1ac851a3939a3fb9917c28fa8da522dc635f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.5.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.6","dist":{"shasum":"c48a2a03643769acc49672860f7920ec6bffac6e","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.6.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.0","dist":{"shasum":"30d0c178b7f2e54183a6a3fc9fe4071eb10290bf","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.0.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.1","dist":{"shasum":"9c49b3e44558e2072158fb085be8a083c5f83537","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.1.tgz"},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"npm-www","email":"npm@npmjs.com"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.2","dist":{"shasum":"d9568a9413bee14951201ce73f3b3992ec6658c0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.2.tgz"},"_from":".","_npmVersion":"1.4.1","_npmUser":{"name":"npm-www","email":"npm@npmjs.com"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.3","dist":{"shasum":"aa188fc5067158e991a57f4697c54994108f5389","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.3.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.4","dist":{"shasum":"f9dbc383a49069d8c7f67755a3ff6e424aff584f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.4.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.5","dist":{"shasum":"7d6fdca46139470715f9477ddb5ad3e770d4de7b","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.5.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.6","_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"657f69a79543fc4cc264c3b2de958bd15f7140fe","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.6.tgz"},"directories":{}},"0.4.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.7","dist":{"shasum":"f4369b59890da7882527eb7c427dd95d43707afb","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.7.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.8","_shasum":"a6685a161033101be6064b7af887ab440e8695d0","_from":".","_npmVersion":"1.4.8","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"a6685a161033101be6064b7af887ab440e8695d0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.8.tgz"},"directories":{}},"0.4.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.9","_shasum":"304d3d4726a58e33d8cc965afdc9ed70b996580c","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"304d3d4726a58e33d8cc965afdc9ed70b996580c","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.9.tgz"},"directories":{}},"0.4.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.10","_shasum":"ab7bf1be3ba07d769eaf74dee3c9347e02283116","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"ab7bf1be3ba07d769eaf74dee3c9347e02283116","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.10.tgz"},"directories":{}},"0.4.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"2 >=2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.11","_shasum":"032e9b6b050ed052ee9441841a945a184ea6bc33","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"032e9b6b050ed052ee9441841a945a184ea6bc33","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.11.tgz"},"directories":{}},"0.4.12":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.12","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"2 >=2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.12","_shasum":"34303422f6a3da93ca3a387a2650d707c8595b99","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"34303422f6a3da93ca3a387a2650d707c8595b99","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.12.tgz"},"directories":{}},"1.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"1.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@1.0.0","_shasum":"2a6f9dfdce5f8ebf4b9af4dbfd738384d25014e5","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"2a6f9dfdce5f8ebf4b9af4dbfd738384d25014e5","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-1.0.0.tgz"},"directories":{}},"1.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"1.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"98b1278c230cf6c159f189e2f8c69daffa727ab8","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@1.0.1","_shasum":"c5f6a87d285f2005a35d3f67d9c724bce551b0f1","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"c5f6a87d285f2005a35d3f67d9c724bce551b0f1","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-1.0.1.tgz"},"directories":{}},"2.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"47a98069b6a34e751cbd5b84ce92858cae5abe70","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.0","_shasum":"88810dac2d534c0df1d905c79e723392fcfc791a","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"88810dac2d534c0df1d905c79e723392fcfc791a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.0.tgz"},"directories":{}},"2.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"123e40131f83f7265f66ecd2a558cce44a3aea86","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.1","_shasum":"611c7cb7c8f7ff22be2ebc6398423b5de10db0e2","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"611c7cb7c8f7ff22be2ebc6398423b5de10db0e2","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.1.tgz"},"directories":{}},"2.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"6ecc311c9dd4890f2d9b6bae60447070a3321e12","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.2","_shasum":"a82b000354c7f830114fb18444764bc477d5740f","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"a82b000354c7f830114fb18444764bc477d5740f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.2.tgz"},"directories":{}},"3.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"6bb1aec1e85fa82ee075bd997d6fb9f2dbb7f643","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.0","_shasum":"4febc5cdb274e9fa06bc3008910e3fa1ec007994","_from":".","_npmVersion":"1.5.0-pre","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"4febc5cdb274e9fa06bc3008910e3fa1ec007994","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.0.tgz"},"directories":{}},"3.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"fe8382dde609ea1e3580fcdc5bc3d0bba119cfc6","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.1","_shasum":"5f3ee362ce5c237cfb798fce22c77875fc1a63c2","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"5f3ee362ce5c237cfb798fce22c77875fc1a63c2","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.1.tgz"},"directories":{}},"2.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"2578fb9a807d77417554ba235ba8fac39405e832","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.3","_shasum":"93dad3d9a162c99404badb71739c622c0f3b9a72","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"93dad3d9a162c99404badb71739c622c0f3b9a72","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.3.tgz"},"directories":{}},"3.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"15343019160ace0b9874cf0ec186b3425dbc7301","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.2","_shasum":"5dd0910157ce55f4286a1871d39f9a2128cd3c99","_from":".","_npmVersion":"1.5.0-alpha-2","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"5dd0910157ce55f4286a1871d39f9a2128cd3c99","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.2.tgz"},"directories":{}},"3.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1 || 3.x","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"b18a780d1185f27c06c27812147b83aba0d4a2f5","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.3","_shasum":"2377dc1cf69b4d374b3a95fb7feba8c804d8cb30","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"2377dc1cf69b4d374b3a95fb7feba8c804d8cb30","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.3.tgz"},"directories":{}},"3.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.5.0","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1 || 3.x","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"54900fe4b2eb5b99ee6dfe173f145732fdfae80e","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.4","_shasum":"d4a177d1f25615cfaef9b6844fa366ffbf5f578a","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"d4a177d1f25615cfaef9b6844fa366ffbf5f578a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.4.tgz"},"directories":{}},"3.0.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"0.5","normalize-package-data":"0.4","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"2","semver":"2 >=2.2.1 || 3.x","slide":"^1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"635db1654346bc86473df7b39626601425f46177","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.5","_shasum":"cdabaefa399b81ac8a86a48718aefd80e7b19ff3","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"cdabaefa399b81ac8a86a48718aefd80e7b19ff3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.5.tgz"},"directories":{}},"3.0.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"^0.5.0","normalize-package-data":"0.4","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"2","semver":"2 >=2.2.1 || 3.x","slide":"^1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"ISC","gitHead":"eba30fadd724ed5cad1aec95ac3ee907a59b7317","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.6","_shasum":"14a17d9a60ed2a80b04edcbc596dbce0d96540ee","_from":".","_npmVersion":"1.4.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"14a17d9a60ed2a80b04edcbc596dbce0d96540ee","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.6.tgz"},"directories":{}},"2.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"^0.5.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"ISC","gitHead":"a10f621d9cdc813b9d3092a14b661f65bfa6d40d","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.4","_shasum":"528e08900d7655c12096d1637d1c3a7a5b451019","_from":".","_npmVersion":"1.4.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"528e08900d7655c12096d1637d1c3a7a5b451019","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.4.tgz"},"directories":{}}},"readme":"# npm-registry-client\u000a\u000aThe code that npm uses to talk to the registry.\u000a\u000aIt handles all the caching and HTTP calls.\u000a\u000a## Usage\u000a\u000a```javascript\u000avar RegClient = require('npm-registry-client')\u000avar client = new RegClient(config)\u000avar uri = \"npm://registry.npmjs.org/npm\"\u000avar options = {timeout: 1000}\u000a\u000aclient.get(uri, options, function (error, data, raw, res) {\u000a // error is an error if there was a problem.\u000a // data is the parsed data object\u000a // raw is the json string\u000a // res is the response from couch\u000a})\u000a```\u000a\u000a# Registry URLs\u000a\u000aThe registry calls take either a full URL pointing to a resource in the\u000aregistry, or a base URL for the registry as a whole (for the base URL, any path\u000awill be ignored). In addition to `http` and `https`, `npm` URLs are allowed.\u000a`npm` URLs are `https` URLs with the additional restrictions that they will\u000aalways include authorization credentials, and the response is always registry\u000ametadata (and not tarballs or other attachments).\u000a\u000a# Configuration\u000a\u000aThis program is designed to work with\u000a[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\u000aa plain-jane object with the appropriate configs, and it'll shim it\u000afor you. Any configuration thingie that has get/set/del methods will\u000aalso be accepted.\u000a\u000a* `cache` **Required** {String} Path to the cache folder\u000a* `always-auth` {Boolean} Auth even for GET requests.\u000a* `auth` {String} A base64-encoded `username:password`\u000a* `email` {String} User's email address\u000a* `tag` {String} The default tag to use when publishing new packages.\u000a Default = `\"latest\"`\u000a* `ca` {String} Cerficate signing authority certificates to trust.\u000a* `cert` {String} Client certificate (PEM encoded). Enable access\u000a to servers that require client certificates\u000a* `key` {String} Private key (PEM encoded) for client certificate 'cert'\u000a* `strict-ssl` {Boolean} Whether or not to be strict with SSL\u000a certificates. Default = `true`\u000a* `user-agent` {String} User agent header to send. Default =\u000a `\"node/{process.version} {process.platform} {process.arch}\"`\u000a* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\u000a that works, otherwise logs are disabled.\u000a* `fetch-retries` {Number} Number of times to retry on GET failures.\u000a Default=2\u000a* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\u000a* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\u000a Default=10000 (10 seconds)\u000a* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\u000a Default=60000 (60 seconds)\u000a* `proxy` {URL} The url to proxy requests through.\u000a* `https-proxy` {URL} The url to proxy https requests through.\u000a Defaults to be the same as `proxy` if unset.\u000a* `_auth` {String} The base64-encoded authorization header.\u000a* `username` `_password` {String} Username/password to use to generate\u000a `_auth` if not supplied.\u000a* `_token` {Object} A token for use with\u000a [couch-login](https://npmjs.org/package/couch-login)\u000a\u000a# client.request(method, uri, options, cb)\u000a\u000a* `method` {String} HTTP method\u000a* `uri` {String} URI pointing to the resource to request\u000a* `options` {Object} Object containing optional per-request properties.\u000a * `what` {Stream | Buffer | String | Object} The request body. Objects\u000a that are not Buffers or Streams are encoded as JSON.\u000a * `etag` {String} The cached ETag\u000a * `follow` {Boolean} Follow 302/301 responses (defaults to true)\u000a* `cb` {Function}\u000a * `error` {Error | null}\u000a * `data` {Object} the parsed data object\u000a * `raw` {String} the json\u000a * `res` {Response Object} response from couch\u000a\u000aMake a request to the registry. All the other methods are wrappers around\u000a`request`.\u000a\u000a# client.adduser(base, username, password, email, cb)\u000a\u000a* `base` {String} Base registry URL\u000a* `username` {String}\u000a* `password` {String}\u000a* `email` {String}\u000a* `cb` {Function}\u000a\u000aAdd a user account to the registry, or verify the credentials.\u000a\u000a# client.deprecate(uri, version, message, cb)\u000a\u000a* `uri` {String} Full registry URI for the deprecated package\u000a* `version` {String} Semver version range\u000a* `message` {String} The message to use as a deprecation warning\u000a* `cb` {Function}\u000a\u000aDeprecate a version of a package in the registry.\u000a\u000a# client.bugs(uri, cb)\u000a\u000a* `uri` {String} Full registry URI for the package\u000a* `cb` {Function}\u000a\u000aGet the url for bugs of a package\u000a\u000a# client.get(uri, options, cb)\u000a\u000a* `uri` {String} The complete registry URI to fetch\u000a* `options` {Object} Object containing optional per-request properties.\u000a * `timeout` {Number} Duration before the request times out.\u000a * `follow` {Boolean} Follow 302/301 responses (defaults to true)\u000a * `staleOk` {Boolean} If there's cached data available, then return that\u000a to the callback quickly, and update the cache the background.\u000a\u000aFetches data from the registry via a GET request, saving it in the cache folder\u000awith the ETag.\u000a\u000a# client.publish(uri, data, tarball, cb)\u000a\u000a* `uri` {String} The registry URI to publish to\u000a* `data` {Object} Package data\u000a* `tarball` {String | Stream} Filename or stream of the package tarball\u000a* `cb` {Function}\u000a\u000aPublish a package to the registry.\u000a\u000aNote that this does not create the tarball from a folder. However, it can\u000aaccept a gzipped tar stream or a filename to a tarball.\u000a\u000a# client.star(uri, starred, cb)\u000a\u000a* `uri` {String} The complete registry URI to star\u000a* `starred` {Boolean} True to star the package, false to unstar it.\u000a* `cb` {Function}\u000a\u000aStar or unstar a package.\u000a\u000aNote that the user does not have to be the package owner to star or unstar a\u000apackage, though other writes do require that the user be the package owner.\u000a\u000a# client.stars(base, username, cb)\u000a\u000a* `base` {String} The base URL for the registry\u000a* `username` {String} Name of user to fetch starred packages for.\u000a* `cb` {Function}\u000a\u000aView your own or another user's starred packages.\u000a\u000a# client.tag(uri, version, tag, cb)\u000a\u000a* `uri` {String} The complete registry URI to tag\u000a* `version` {String} Version to tag\u000a* `tag` {String} Tag name to apply\u000a* `cb` {Function}\u000a\u000aMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\u000aspecified version.\u000a\u000a# client.unpublish(uri, [ver], cb)\u000a\u000a* `uri` {String} The complete registry URI to unpublish\u000a* `ver` {String} version to unpublish. Leave blank to unpublish all\u000a versions.\u000a* `cb` {Function}\u000a\u000aRemove a version of a package (or all versions) from the registry. When the\u000alast version us unpublished, the entire document is removed from the database.\u000a\u000a# client.upload(uri, file, [etag], [nofollow], cb)\u000a\u000a* `uri` {String} The complete registry URI to upload to\u000a* `file` {String | Stream} Either the filename or a readable stream\u000a* `etag` {String} Cache ETag\u000a* `nofollow` {Boolean} Do not follow 301/302 responses\u000a* `cb` {Function}\u000a\u000aUpload an attachment. Mostly used by `client.publish()`.\u000a","maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"time":{"modified":"2014-07-31T21:59:52.896Z","created":"2012-06-07T04:43:36.581Z","0.0.1":"2012-06-07T04:43:38.123Z","0.0.2":"2012-06-07T05:35:05.937Z","0.0.3":"2012-06-09T00:55:25.861Z","0.0.4":"2012-06-11T03:53:26.548Z","0.0.5":"2012-06-11T23:48:11.235Z","0.0.6":"2012-06-17T06:23:27.320Z","0.0.7":"2012-06-18T19:19:38.315Z","0.0.8":"2012-06-28T20:40:20.563Z","0.0.9":"2012-07-10T03:28:04.651Z","0.0.10":"2012-07-11T17:03:45.151Z","0.0.11":"2012-07-17T14:06:37.489Z","0.1.0":"2012-07-23T18:17:38.007Z","0.1.1":"2012-07-23T21:21:28.196Z","0.1.2":"2012-07-24T06:14:12.831Z","0.1.3":"2012-08-07T02:02:20.564Z","0.1.4":"2012-08-15T03:04:52.822Z","0.1.5":"2012-08-17T21:59:33.310Z","0.2.0":"2012-08-17T22:00:18.081Z","0.2.1":"2012-08-17T22:07:28.827Z","0.2.2":"2012-08-17T22:37:24.352Z","0.2.3":"2012-08-19T19:16:44.808Z","0.2.4":"2012-08-19T19:18:51.792Z","0.2.5":"2012-08-20T16:54:50.794Z","0.2.6":"2012-08-22T00:25:04.766Z","0.2.7":"2012-08-27T19:07:34.829Z","0.2.8":"2012-10-02T19:53:50.661Z","0.2.9":"2012-10-03T22:09:50.766Z","0.2.10":"2012-10-25T14:55:54.216Z","0.2.11":"2012-12-21T16:26:38.094Z","0.2.12":"2013-01-18T22:22:41.668Z","0.2.13":"2013-02-06T00:16:35.939Z","0.2.14":"2013-02-10T02:44:02.764Z","0.2.15":"2013-02-11T19:18:55.678Z","0.2.16":"2013-02-15T17:09:03.249Z","0.2.17":"2013-02-16T03:47:13.898Z","0.2.18":"2013-03-06T22:09:23.536Z","0.2.19":"2013-03-20T06:27:39.128Z","0.2.20":"2013-03-28T00:43:07.558Z","0.2.21":"2013-04-29T15:46:54.094Z","0.2.22":"2013-04-29T15:51:02.178Z","0.2.23":"2013-05-11T00:28:14.198Z","0.2.24":"2013-05-24T21:27:50.693Z","0.2.25":"2013-06-20T15:36:46.277Z","0.2.26":"2013-07-06T17:12:54.670Z","0.2.27":"2013-07-11T07:14:45.740Z","0.2.28":"2013-08-02T20:27:41.732Z","0.2.29":"2013-10-28T18:23:24.477Z","0.2.30":"2013-11-18T23:12:00.540Z","0.2.31":"2013-12-16T08:36:43.044Z","0.3.0":"2013-12-17T07:03:10.699Z","0.3.1":"2013-12-17T16:53:27.867Z","0.3.2":"2013-12-17T22:25:14.882Z","0.3.3":"2013-12-21T16:07:06.773Z","0.3.4":"2014-01-29T15:24:05.163Z","0.3.5":"2014-01-31T01:53:19.656Z","0.3.6":"2014-02-07T00:17:21.362Z","0.4.0":"2014-02-13T01:17:18.973Z","0.4.1":"2014-02-13T23:47:37.892Z","0.4.2":"2014-02-14T00:29:13.086Z","0.4.3":"2014-02-16T03:40:54.640Z","0.4.4":"2014-02-16T03:41:48.856Z","0.4.5":"2014-03-12T05:09:17.474Z","0.4.6":"2014-03-29T19:44:15.041Z","0.4.7":"2014-04-02T19:41:07.149Z","0.4.8":"2014-05-01T22:24:54.980Z","0.4.9":"2014-05-12T21:52:55.127Z","0.4.10":"2014-05-13T16:44:29.801Z","0.4.11":"2014-05-13T20:33:04.738Z","0.4.12":"2014-05-14T06:14:22.842Z","1.0.0":"2014-05-14T23:04:37.188Z","1.0.1":"2014-06-03T00:55:54.448Z","2.0.0":"2014-06-06T04:23:46.579Z","2.0.1":"2014-06-06T06:25:14.419Z","2.0.2":"2014-06-14T00:33:10.205Z","3.0.0":"2014-07-02T00:30:29.154Z","3.0.1":"2014-07-14T23:29:05.057Z","2.0.3":"2014-07-15T00:09:36.043Z","3.0.2":"2014-07-17T06:30:02.659Z","3.0.3":"2014-07-23T21:20:42.406Z","3.0.4":"2014-07-25T00:27:26.007Z","3.0.5":"2014-07-25T00:28:48.007Z","3.0.6":"2014-07-31T21:57:49.043Z","2.0.4":"2014-07-31T21:59:52.896Z"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"url":"git://github.com/isaacs/npm-registry-client"},"users":{"fgribreau":true,"fengmk2":true},"readmeFilename":"README.md","homepage":"https://github.com/isaacs/npm-registry-client","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"license":"ISC","_attachments":{}}
diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json
new file mode 100644
index 0000000..01da300
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json
@@ -0,0 +1 @@
+{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}
\ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz
new file mode 100644
index 0000000..19da9ba
Binary files /dev/null and b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz differ
diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json
new file mode 100644
index 0000000..d899f11
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json
@@ -0,0 +1 @@
+{"_id":"underscore","_rev":"72-47f2986bfd8e8b55068b204588bbf484","name":"underscore","description":"JavaScript's functional programming helper library.","dist-tags":{"latest":"1.3.3","stable":"1.3.3"},"versions":{"1.0.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.3","_id":"underscore@1.0.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.0.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.4","_id":"underscore@1.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.4.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.0":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.0","_id":"underscore@1.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.0.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.1":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.1","_id":"underscore@1.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.1.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.2":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.2","_id":"underscore@1.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.2.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.3","_id":"underscore@1.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.8-1","_nodeVersion":"v0.2.5","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore.js","version":"1.1.4","_id":"underscore@1.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.9","_nodeVersion":"v0.5.0-pre","dist":{"shasum":"9e82274902865625b3a6d4c315a38ffd80047dae","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.4.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.1.5":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.5","_id":"underscore@1.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.16","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"23601d62c75619998b2f0db24938102793336a56","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.5.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.6":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.6","_id":"underscore@1.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"6868da1bdd72d75285be0b4e50f228e70d001a2c","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.7":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.7","devDependencies":{},"_id":"underscore@1.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"40bab84bad19d230096e8d6ef628bff055d83db0","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz"},"scripts":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.0","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"b32ce32c8c118caa8031c10b54c7f65ab3b557fd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.0.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.1","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"74dd40e9face84e724eb2edae945b8aedc233ba3","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.2.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"11b874da70f4683d7d48bba2b44be1e600d2f6cf","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.3.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.4","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e8da6241aa06f64df2473bb2590b8c17c84c3c7e","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.4.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.0","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"253b2d79b7bb67943ced0fc744eb18267963ede8","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.0.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.1","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.1.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"1b4e455089ab1d1d38ab6794ffe6cf08f764394a","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.2.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"time":{"1.0.3":"2011-12-07T15:12:18.045Z","1.0.4":"2011-12-07T15:12:18.045Z","1.1.0":"2011-12-07T15:12:18.045Z","1.1.1":"2011-12-07T15:12:18.045Z","1.1.2":"2011-12-07T15:12:18.045Z","1.1.3":"2011-12-07T15:12:18.045Z","1.1.4":"2011-12-07T15:12:18.045Z","1.1.5":"2011-12-07T15:12:18.045Z","1.1.6":"2011-12-07T15:12:18.045Z","1.1.7":"2011-12-07T15:12:18.045Z","1.2.0":"2011-12-07T15:12:18.045Z","1.2.1":"2011-12-07T15:12:18.045Z","1.2.2":"2011-11-14T20:28:47.115Z","1.2.3":"2011-12-07T15:12:18.045Z","1.2.4":"2012-01-09T17:23:14.818Z","1.3.0":"2012-01-11T16:41:38.459Z","1.3.1":"2012-01-23T22:57:36.474Z","1.3.2":"2012-04-09T18:38:14.345Z","1.3.3":"2012-04-10T14:43:48.089Z"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"users":{"vesln":true,"mvolkmann":true,"lancehunt":true,"mikl":true,"linus":true,"vasc":true,"bat":true,"dmalam":true,"mbrevoort":true,"danielr":true,"rsimoes":true,"thlorenz":true}}
\ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/test/lib/common.js b/deps/npm/node_modules/npm-registry-client/test/lib/common.js
index bbf55ca..712f663 100644
--- a/deps/npm/node_modules/npm-registry-client/test/lib/common.js
+++ b/deps/npm/node_modules/npm-registry-client/test/lib/common.js
@@ -39,6 +39,10 @@ module.exports = {
c.email = this.get(nerfed + ":email")
}
+ if (this.get(nerfed + ":always-auth") !== undefined) {
+ c.alwaysAuth = this.get(nerfed + ":always-auth")
+ }
+
if (c.username && c.password) {
c.auth = new Buffer(c.username + ":" + c.password).toString("base64")
}
diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json
index b9377c7..cf44403 100644
--- a/deps/npm/node_modules/npm-user-validate/package.json
+++ b/deps/npm/node_modules/npm-user-validate/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-user-validate",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "User validations for npm",
"main": "npm-user-validate.js",
"devDependencies": {
@@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
- "url": "git://github.com/npm/npm-registry-mock.git"
+ "url": "git://github.com/npm/npm-user-validate.git"
},
"keywords": [
"npm",
@@ -23,13 +23,34 @@
"email": "rok@kowalski.gd"
},
"license": "BSD",
- "readme": "[![Build Status](https://travis-ci.org/npm/npm-user-validate.png?branch=master)](https://travis-ci.org/npm/npm-user-validate)\n[![devDependency Status](https://david-dm.org/npm/npm-user-validate/dev-status.png)](https://david-dm.org/npm/npm-user-validate#info=devDependencies)\n\n# npm-user-validate\n\nValidation for the npm client and npm-www (and probably other npm projects)\n",
- "readmeFilename": "README.md",
+ "gitHead": "64c9bd4ded742c41afdb3a8414fbbfdbfdcdf6b7",
"bugs": {
- "url": "https://github.com/npm/npm-registry-mock/issues"
+ "url": "https://github.com/npm/npm-user-validate/issues"
},
- "homepage": "https://github.com/npm/npm-registry-mock",
- "_id": "npm-user-validate@0.1.0",
- "_shasum": "358a5b5148ed3f79771d980388c6e34c4a61f638",
- "_from": "npm-user-validate@latest"
+ "homepage": "https://github.com/npm/npm-user-validate",
+ "_id": "npm-user-validate@0.1.1",
+ "_shasum": "ea7774636c3c8fe6d01e174bd9f2ee0e22eeed57",
+ "_from": "npm-user-validate@>=0.1.1 <0.2.0",
+ "_npmVersion": "2.1.3",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "robertkowalski",
+ "email": "rok@kowalski.gd"
+ },
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "ea7774636c3c8fe6d01e174bd9f2ee0e22eeed57",
+ "tarball": "http://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.1.tgz"
}
diff --git a/deps/npm/node_modules/npmconf/.npmignore b/deps/npm/node_modules/npmconf/.npmignore
deleted file mode 100644
index 4850077..0000000
--- a/deps/npm/node_modules/npmconf/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/test/fixtures/userconfig-with-gc
-.eslintrc
-.jshintrc
diff --git a/deps/npm/node_modules/npmconf/LICENSE b/deps/npm/node_modules/npmconf/LICENSE
deleted file mode 100644
index 0c44ae7..0000000
--- a/deps/npm/node_modules/npmconf/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Isaac Z. Schlueter ("Author")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/deps/npm/node_modules/npmconf/README.md b/deps/npm/node_modules/npmconf/README.md
deleted file mode 100644
index afc995d..0000000
--- a/deps/npm/node_modules/npmconf/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# npmconf
-
-The config thing npm uses
-
-If you are interested in interacting with the config settings that npm
-uses, then use this module.
-
-However, if you are writing a new Node.js program, and want
-configuration functionality similar to what npm has, but for your
-own thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),
-which is probably what you want.
-
-If I were to do it all over again, that's what I'd do for npm. But,
-alas, there are many systems depending on many of the particulars of
-npm's configuration setup, so it's not worth the cost of changing.
-
-## USAGE
-
-```javascript
-var npmconf = require('npmconf')
-
-// pass in the cli options that you read from the cli
-// or whatever top-level configs you want npm to use for now.
-npmconf.load({some:'configs'}, function (er, conf) {
- // do stuff with conf
- conf.get('some', 'cli') // 'configs'
- conf.get('username') // 'joebobwhatevers'
- conf.set('foo', 'bar', 'user')
- conf.save('user', function (er) {
- // foo = bar is now saved to ~/.npmrc or wherever
- })
-})
-```
diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json
deleted file mode 100644
index 2699e90..0000000
--- a/deps/npm/node_modules/npmconf/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "name": "npmconf",
- "version": "2.0.9",
- "description": "The config thing npm uses",
- "main": "npmconf.js",
- "directories": {
- "test": "test"
- },
- "dependencies": {
- "config-chain": "~1.1.8",
- "inherits": "~2.0.0",
- "ini": "^1.2.0",
- "mkdirp": "^0.5.0",
- "nopt": "~3.0.1",
- "once": "~1.3.0",
- "osenv": "^0.1.0",
- "semver": "2 || 3 || 4",
- "uid-number": "0.0.5"
- },
- "devDependencies": {
- "tap": "~0.4.0"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/npmconf"
- },
- "keywords": [
- "npm",
- "config",
- "config-chain",
- "conf",
- "ini"
- ],
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "license": "BSD",
- "gitHead": "1f07a91b86f3bbba00967d7079dc6a456e746734",
- "bugs": {
- "url": "https://github.com/isaacs/npmconf/issues"
- },
- "homepage": "https://github.com/isaacs/npmconf",
- "_id": "npmconf@2.0.9",
- "_shasum": "5c87e5fb308104eceeca781e3d9115d216351ef2",
- "_from": "npmconf@>=2.0.8-0 <2.1.0-0",
- "_npmVersion": "2.0.0-beta.3",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "dist": {
- "shasum": "5c87e5fb308104eceeca781e3d9115d216351ef2",
- "tarball": "http://registry.npmjs.org/npmconf/-/npmconf-2.0.9.tgz"
- },
- "_resolved": "https://registry.npmjs.org/npmconf/-/npmconf-2.0.9.tgz"
-}
diff --git a/deps/npm/node_modules/npmconf/test/00-setup.js b/deps/npm/node_modules/npmconf/test/00-setup.js
deleted file mode 100644
index 3f5109f..0000000
--- a/deps/npm/node_modules/npmconf/test/00-setup.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var path = require('path')
-var userconfigSrc = path.resolve(__dirname, 'fixtures', 'userconfig')
-exports.userconfig = userconfigSrc + '-with-gc'
-exports.globalconfig = path.resolve(__dirname, 'fixtures', 'globalconfig')
-exports.builtin = path.resolve(__dirname, 'fixtures', 'builtin')
-exports.ucData =
- { globalconfig: exports.globalconfig,
- email: 'i@izs.me',
- 'env-thing': 'asdf',
- 'init.author.name': 'Isaac Z. Schlueter',
- 'init.author.email': 'i@izs.me',
- 'init.author.url': 'http://blog.izs.me/',
- 'init.version': '1.2.3',
- 'proprietary-attribs': false,
- 'npm:publishtest': true,
- '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
- 'npm-www:nocache': '1',
- nodedir: '/Users/isaacs/dev/js/node-v0.8',
- 'sign-git-tag': true,
- message: 'v%s',
- 'strict-ssl': false,
- 'tmp': process.env.HOME + '/.tmp',
- _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
- _token:
- { AuthSession: 'yabba-dabba-doodle',
- version: '1',
- expires: '1345001053415',
- path: '/',
- httponly: true } }
-
-// set the userconfig in the env
-// unset anything else that npm might be trying to foist on us
-Object.keys(process.env).forEach(function (k) {
- if (k.match(/^npm_config_/i)) {
- delete process.env[k]
- }
-})
-process.env.npm_config_userconfig = exports.userconfig
-process.env.npm_config_other_env_thing = 1000
-process.env.random_env_var = 'asdf'
-process.env.npm_config__underbar_env_thing = 'underful'
-process.env.NPM_CONFIG_UPPERCASE_ENV_THING = 42
-
-exports.envData = {
- userconfig: exports.userconfig,
- '_underbar-env-thing': 'underful',
- 'uppercase-env-thing': '42',
- 'other-env-thing': '1000'
-}
-exports.envDataFix = {
- userconfig: exports.userconfig,
- '_underbar-env-thing': 'underful',
- 'uppercase-env-thing': 42,
- 'other-env-thing': 1000,
-}
-
-
-if (module === require.main) {
- // set the globalconfig in the userconfig
- var fs = require('fs')
- var uc = fs.readFileSync(userconfigSrc)
- var gcini = 'globalconfig = ' + exports.globalconfig + '\n'
- fs.writeFileSync(exports.userconfig, gcini + uc)
-
- console.log('0..1')
- console.log('ok 1 setup done')
-}
diff --git a/deps/npm/node_modules/npmconf/test/basic.js b/deps/npm/node_modules/npmconf/test/basic.js
deleted file mode 100644
index e3a684f..0000000
--- a/deps/npm/node_modules/npmconf/test/basic.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var path = require('path')
-
-var projectData = {}
-
-var ucData = common.ucData
-var envData = common.envData
-var envDataFix = common.envDataFix
-
-var gcData = { 'package-config:foo': 'boo' }
-
-var biData = {}
-
-var cli = { foo: 'bar', umask: 022 }
-
-var expectList =
-[ cli,
- envDataFix,
- projectData,
- ucData,
- gcData,
- biData ]
-
-var expectSources =
-{ cli: { data: cli },
- env:
- { data: envDataFix,
- source: envData,
- prefix: '' },
- project:
- { path: path.resolve(__dirname, '..', '.npmrc'),
- type: 'ini',
- data: projectData },
- user:
- { path: common.userconfig,
- type: 'ini',
- data: ucData },
- global:
- { path: common.globalconfig,
- type: 'ini',
- data: gcData },
- builtin: { data: biData } }
-
-test('no builtin', function (t) {
- npmconf.load(cli, function (er, conf) {
- if (er) throw er
- t.same(conf.list, expectList)
- t.same(conf.sources, expectSources)
- t.same(npmconf.rootConf.list, [])
- t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
- t.equal(conf.root, npmconf.defs.defaults)
- t.equal(conf.get('umask'), 022)
- t.equal(conf.get('heading'), 'npm')
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/builtin.js b/deps/npm/node_modules/npmconf/test/builtin.js
deleted file mode 100644
index c94de8a..0000000
--- a/deps/npm/node_modules/npmconf/test/builtin.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var path = require('path')
-
-var ucData = common.ucData
-
-var envData = common.envData
-var envDataFix = common.envDataFix
-
-var gcData = { 'package-config:foo': 'boo' }
-
-var biData = { 'builtin-config': true }
-
-var cli = { foo: 'bar', heading: 'foo', 'git-tag-version': false }
-
-var projectData = {}
-
-var expectList =
-[ cli,
- envDataFix,
- projectData,
- ucData,
- gcData,
- biData ]
-
-var expectSources =
-{ cli: { data: cli },
- env:
- { data: envDataFix,
- source: envData,
- prefix: '' },
- project:
- { path: path.resolve(__dirname, '..', '.npmrc'),
- type: 'ini',
- data: projectData },
- user:
- { path: common.userconfig,
- type: 'ini',
- data: ucData },
- global:
- { path: common.globalconfig,
- type: 'ini',
- data: gcData },
- builtin: { data: biData } }
-
-test('with builtin', function (t) {
- npmconf.load(cli, common.builtin, function (er, conf) {
- if (er) throw er
- t.same(conf.list, expectList)
- t.same(conf.sources, expectSources)
- t.same(npmconf.rootConf.list, [])
- t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
- t.equal(conf.root, npmconf.defs.defaults)
- t.equal(conf.get('heading'), 'foo')
- t.equal(conf.get('git-tag-version'), false)
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/certfile.js b/deps/npm/node_modules/npmconf/test/certfile.js
deleted file mode 100644
index 3dfb6e9..0000000
--- a/deps/npm/node_modules/npmconf/test/certfile.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var path = require('path')
-var fs = require('fs')
-
-test('cafile loads as ca', function (t) {
- var cafile = path.join(__dirname, 'fixtures', 'multi-ca')
-
- npmconf.load({cafile: cafile}, function (er, conf) {
- if (er) throw er
-
- t.same(conf.get('cafile'), cafile)
- t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim())
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/credentials.js b/deps/npm/node_modules/npmconf/test/credentials.js
deleted file mode 100644
index 85632f9..0000000
--- a/deps/npm/node_modules/npmconf/test/credentials.js
+++ /dev/null
@@ -1,166 +0,0 @@
-var test = require("tap").test
-
-var npmconf = require("../npmconf.js")
-var common = require("./00-setup.js")
-
-var URI = "https://registry.lvh.me:8661/"
-
-test("getting scope with no credentials set", function (t) {
- npmconf.load({}, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- var basic = conf.getCredentialsByURI(URI)
- t.equal(basic.scope, "//registry.lvh.me:8661/", "nerfed URL extracted")
-
- t.end()
- })
-})
-
-test("trying to set credentials with no URI", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- t.throws(function () {
- conf.setCredentialsByURI()
- }, "enforced missing URI")
-
- t.end()
- })
-})
-
-test("set with missing credentials object", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- t.throws(function () {
- conf.setCredentialsByURI(URI)
- }, "enforced missing credentials")
-
- t.end()
- })
-})
-
-test("set with empty credentials object", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- t.throws(function () {
- conf.setCredentialsByURI(URI, {})
- }, "enforced missing credentials")
-
- t.end()
- })
-})
-
-test("set with token", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- t.doesNotThrow(function () {
- conf.setCredentialsByURI(URI, {token : "simple-token"})
- }, "needs only token")
-
- var expected = {
- scope : "//registry.lvh.me:8661/",
- token : "simple-token"
- }
-
- t.same(conf.getCredentialsByURI(URI), expected, "got bearer token and scope")
-
- t.end()
- })
-})
-
-test("set with missing username", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- var credentials = {
- password : "password",
- email : "ogd@aoaioxxysz.net"
- }
-
- t.throws(function () {
- conf.setCredentialsByURI(URI, credentials)
- }, "enforced missing email")
-
- t.end()
- })
-})
-
-test("set with missing password", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- var credentials = {
- username : "username",
- email : "ogd@aoaioxxysz.net"
- }
-
- t.throws(function () {
- conf.setCredentialsByURI(URI, credentials)
- }, "enforced missing email")
-
- t.end()
- })
-})
-
-test("set with missing email", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- var credentials = {
- username : "username",
- password : "password"
- }
-
- t.throws(function () {
- conf.setCredentialsByURI(URI, credentials)
- }, "enforced missing email")
-
- t.end()
- })
-})
-
-test("set with old-style credentials", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- t.ifError(er, "configuration loaded")
-
- var credentials = {
- username : "username",
- password : "password",
- email : "ogd@aoaioxxysz.net"
- }
-
- t.doesNotThrow(function () {
- conf.setCredentialsByURI(URI, credentials)
- }, "requires all of username, password, and email")
-
- var expected = {
- scope : "//registry.lvh.me:8661/",
- username : "username",
- password : "password",
- email : "ogd@aoaioxxysz.net",
- auth : "dXNlcm5hbWU6cGFzc3dvcmQ="
- }
-
- t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
-
- t.end()
- })
-})
-
-test("get old-style credentials for default registry", function (t) {
- npmconf.load(common.builtin, function (er, conf) {
- var actual = conf.getCredentialsByURI(conf.get("registry"))
- var expected = {
- scope: '//registry.npmjs.org/',
- password: 'password',
- username: 'username',
- email: 'i@izs.me',
- auth: 'dXNlcm5hbWU6cGFzc3dvcmQ='
- }
- t.same(actual, expected)
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/project.js b/deps/npm/node_modules/npmconf/test/project.js
deleted file mode 100644
index d9a0bdb..0000000
--- a/deps/npm/node_modules/npmconf/test/project.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var path = require('path')
-var fix = path.resolve(__dirname, 'fixtures')
-var projectRc = path.resolve(fix, '.npmrc')
-
-var projectData = { just: 'testing' }
-
-var ucData = common.ucData
-var envData = common.envData
-var envDataFix = common.envDataFix
-
-var gcData = { 'package-config:foo': 'boo' }
-
-var biData = {}
-
-var cli = { foo: 'bar', umask: 022, prefix: fix }
-
-var expectList =
-[ cli,
- envDataFix,
- projectData,
- ucData,
- gcData,
- biData ]
-
-var expectSources =
-{ cli: { data: cli },
- env:
- { data: envDataFix,
- source: envData,
- prefix: '' },
- project:
- { path: projectRc,
- type: 'ini',
- data: projectData },
- user:
- { path: common.userconfig,
- type: 'ini',
- data: ucData },
- global:
- { path: common.globalconfig,
- type: 'ini',
- data: gcData },
- builtin: { data: biData } }
-
-test('no builtin', function (t) {
- npmconf.load(cli, function (er, conf) {
- if (er) throw er
- t.same(conf.list, expectList)
- t.same(conf.sources, expectSources)
- t.same(npmconf.rootConf.list, [])
- t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
- t.equal(conf.root, npmconf.defs.defaults)
- t.equal(conf.get('umask'), 022)
- t.equal(conf.get('heading'), 'npm')
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/save.js b/deps/npm/node_modules/npmconf/test/save.js
deleted file mode 100644
index 0d2f197..0000000
--- a/deps/npm/node_modules/npmconf/test/save.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var fs = require('fs')
-var ini = require('ini')
-var expectConf =
- [ 'globalconfig = ' + common.globalconfig,
- 'email = i@izs.me',
- 'env-thing = asdf',
- 'init.author.name = Isaac Z. Schlueter',
- 'init.author.email = i@izs.me',
- 'init.author.url = http://blog.izs.me/',
- 'init.version = 1.2.3',
- 'proprietary-attribs = false',
- 'npm:publishtest = true',
- '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
- 'npm-www:nocache = 1',
- 'sign-git-tag = false',
- 'message = v%s',
- 'strict-ssl = false',
- '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
- '',
- '[_token]',
- 'AuthSession = yabba-dabba-doodle',
- 'version = 1',
- 'expires = 1345001053415',
- 'path = /',
- 'httponly = true',
- '' ].join('\n')
-var expectFile =
- [ 'globalconfig = ' + common.globalconfig,
- 'email = i@izs.me',
- 'env-thing = asdf',
- 'init.author.name = Isaac Z. Schlueter',
- 'init.author.email = i@izs.me',
- 'init.author.url = http://blog.izs.me/',
- 'init.version = 1.2.3',
- 'proprietary-attribs = false',
- 'npm:publishtest = true',
- '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
- 'npm-www:nocache = 1',
- 'sign-git-tag = false',
- 'message = v%s',
- 'strict-ssl = false',
- '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
- '',
- '[_token]',
- 'AuthSession = yabba-dabba-doodle',
- 'version = 1',
- 'expires = 1345001053415',
- 'path = /',
- 'httponly = true',
- '' ].join('\n')
-
-test('saving configs', function (t) {
- npmconf.load(function (er, conf) {
- if (er)
- throw er
- conf.set('sign-git-tag', false, 'user')
- conf.del('nodedir')
- conf.del('tmp')
- var foundConf = ini.stringify(conf.sources.user.data)
- t.same(ini.parse(foundConf), ini.parse(expectConf))
- fs.unlinkSync(common.userconfig)
- conf.save('user', function (er) {
- if (er)
- throw er
- var uc = fs.readFileSync(conf.get('userconfig'), 'utf8')
- t.same(ini.parse(uc), ini.parse(expectFile))
- t.end()
- })
- })
-})
-
-test('setting prefix', function (t) {
- npmconf.load(function (er, conf) {
- if (er)
- throw er
-
- conf.prefix = 'newvalue'
- t.same(conf.prefix, 'newvalue');
- t.end();
- })
-})
diff --git a/deps/npm/node_modules/npmconf/test/semver-tag.js b/deps/npm/node_modules/npmconf/test/semver-tag.js
deleted file mode 100644
index b0ce27f..0000000
--- a/deps/npm/node_modules/npmconf/test/semver-tag.js
+++ /dev/null
@@ -1,65 +0,0 @@
-var test = require('tap').test
-var npmconf = require('../npmconf.js')
-var common = require('./00-setup.js')
-var path = require('path')
-
-var ucData = common.ucData
-
-var envData = common.envData
-var envDataFix = common.envDataFix
-
-var gcData = { 'package-config:foo': 'boo' }
-
-var biData = { 'builtin-config': true }
-
-var cli = { tag: 'v2.x' }
-
-var projectData = {}
-
-var expectList =
-[ cli,
- envDataFix,
- projectData,
- ucData,
- gcData,
- biData ]
-
-
-var expectSources =
-{ cli: { data: cli },
- env:
- { data: envDataFix,
- source: envData,
- prefix: '' },
- project:
- { path: path.resolve(__dirname, '..', '.npmrc'),
- type: 'ini',
- data: projectData },
- user:
- { path: common.userconfig,
- type: 'ini',
- data: ucData },
- global:
- { path: common.globalconfig,
- type: 'ini',
- data: gcData },
- builtin: { data: biData } }
-
-test('tag cannot be a SemVer', function (t) {
- var messages = []
- console.warn = function (m) {
- messages.push(m)
- }
-
- var expect = [
- 'invalid config tag="v2.x"',
- 'invalid config Tag must not be a SemVer range'
- ]
-
- npmconf.load(cli, common.builtin, function (er, conf) {
- if (er) throw er
- t.equal(conf.get('tag'), 'latest')
- t.same(messages, expect)
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/once/once.js b/deps/npm/node_modules/once/once.js
index 0770a73..2e1e721 100644
--- a/deps/npm/node_modules/once/once.js
+++ b/deps/npm/node_modules/once/once.js
@@ -1,4 +1,5 @@
-module.exports = once
+var wrappy = require('wrappy')
+module.exports = wrappy(once)
once.proto = once(function () {
Object.defineProperty(Function.prototype, 'once', {
diff --git a/deps/npm/node_modules/once/package.json b/deps/npm/node_modules/once/package.json
index 96af3de..eb8a421 100644
--- a/deps/npm/node_modules/once/package.json
+++ b/deps/npm/node_modules/once/package.json
@@ -1,12 +1,14 @@
{
"name": "once",
- "version": "1.3.0",
+ "version": "1.3.1",
"description": "Run a function exactly one time",
"main": "once.js",
"directories": {
"test": "test"
},
- "dependencies": {},
+ "dependencies": {
+ "wrappy": "1"
+ },
"devDependencies": {
"tap": "~0.3.0"
},
@@ -29,11 +31,30 @@
"url": "http://blog.izs.me/"
},
"license": "BSD",
- "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n",
- "readmeFilename": "README.md",
+ "gitHead": "c90ac02a74f433ce47f6938869e68dd6196ffc2c",
"bugs": {
"url": "https://github.com/isaacs/once/issues"
},
- "_id": "once@1.3.0",
- "_from": "once@latest"
+ "homepage": "https://github.com/isaacs/once",
+ "_id": "once@1.3.1",
+ "_shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f",
+ "_from": "once@>=1.3.1 <2.0.0",
+ "_npmVersion": "2.0.0",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f",
+ "tarball": "http://registry.npmjs.org/once/-/once-1.3.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/once/-/once-1.3.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/once/test/once.js b/deps/npm/node_modules/once/test/once.js
index a77951f..c618360 100644
--- a/deps/npm/node_modules/once/test/once.js
+++ b/deps/npm/node_modules/once/test/once.js
@@ -3,11 +3,14 @@ var once = require('../once.js')
test('once', function (t) {
var f = 0
- var foo = once(function (g) {
+ function fn (g) {
t.equal(f, 0)
f ++
return f + g + this
- })
+ }
+ fn.ownProperty = {}
+ var foo = once(fn)
+ t.equal(fn.ownProperty, foo.ownProperty)
t.notOk(foo.called)
for (var i = 0; i < 1E3; i++) {
t.same(f, i === 0 ? 0 : 1)
diff --git a/deps/npm/node_modules/opener/LICENSE.txt b/deps/npm/node_modules/opener/LICENSE.txt
index 6000885..0407ecd 100644
--- a/deps/npm/node_modules/opener/LICENSE.txt
+++ b/deps/npm/node_modules/opener/LICENSE.txt
@@ -1,14 +1,19 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2012 Domenic Denicola
-
- 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.
-
+Copyright © 2012â2014 Domenic Denicola
+
+This work is free. You can redistribute it and/or modify it under the
+terms of the Do What The Fuck You Want To Public License, Version 2,
+as published by Sam Hocevar. See below for more details.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar
+
+ 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.
diff --git a/deps/npm/node_modules/opener/README.md b/deps/npm/node_modules/opener/README.md
index fc64365..8a803f3 100644
--- a/deps/npm/node_modules/opener/README.md
+++ b/deps/npm/node_modules/opener/README.md
@@ -1,44 +1,57 @@
-# It Opens Stuff
-
-That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them:
-
-```bash
-npm install opener -g
-
-opener http://google.com
-opener ./my-file.txt
-opener firefox
-opener npm run lint
-```
-
-Also if you want to use it programmatically you can do that too:
-
-```js
-var opener = require("opener");
-
-opener("http://google.com");
-opener("./my-file.txt");
-opener("firefox");
-opener("npm run lint");
-```
-
-## Use It for Good
-
-Like opening the user's browser with a test harness in your package's test script:
-
-```json
-{
- "scripts": {
- "test": "opener ./test/runner.html"
- },
- "devDependencies": {
- "opener": "*"
- }
-}
-```
-
-## Why
-
-Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least
-[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all
-three. Like Node.js. And Opener.
+# It Opens Stuff
+
+That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them:
+
+```bash
+npm install opener -g
+
+opener http://google.com
+opener ./my-file.txt
+opener firefox
+opener npm run lint
+```
+
+Also if you want to use it programmatically you can do that too:
+
+```js
+var opener = require("opener");
+
+opener("http://google.com");
+opener("./my-file.txt");
+opener("firefox");
+opener("npm run lint");
+```
+
+Plus, it returns the child process created, so you can do things like let your script exit while the window stays open:
+
+```js
+var editor = opener("documentation.odt");
+editor.unref();
+// These other unrefs may be necessary if your OS's opener process
+// exits before the process it started is complete.
+editor.stdin.unref();
+editor.stdout.unref();
+editor.stderr.unref();
+```
+
+
+## Use It for Good
+
+Like opening the user's browser with a test harness in your package's test script:
+
+```json
+{
+ "scripts": {
+ "test": "opener ./test/runner.html"
+ },
+ "devDependencies": {
+ "opener": "*"
+ }
+}
+```
+
+## Why
+
+Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least
+[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all
+three. Like Node.js. And Opener.
diff --git a/deps/npm/node_modules/opener/opener.js b/deps/npm/node_modules/opener/opener.js
index 5477da5..3f95d06 100755
--- a/deps/npm/node_modules/opener/opener.js
+++ b/deps/npm/node_modules/opener/opener.js
@@ -38,7 +38,7 @@ function opener(args, options, callback) {
args = ["/c", "start", '""'].concat(args);
}
- childProcess.execFile(command, args, options, callback);
+ return childProcess.execFile(command, args, options, callback);
}
// Export `opener` for programmatic access.
diff --git a/deps/npm/node_modules/opener/package.json b/deps/npm/node_modules/opener/package.json
index 0d18470..b62915e 100644
--- a/deps/npm/node_modules/opener/package.json
+++ b/deps/npm/node_modules/opener/package.json
@@ -1,11 +1,11 @@
{
"name": "opener",
"description": "Opens stuff, like webpages and files and executables, cross-platform",
- "version": "1.3.0",
+ "version": "1.4.0",
"author": {
"name": "Domenic Denicola",
"email": "domenic@domenicdenicola.com",
- "url": "http://domenicdenicola.com"
+ "url": "http://domenic.me/"
},
"license": "WTFPL",
"repository": {
@@ -23,12 +23,28 @@
"lint": "jshint opener.js"
},
"devDependencies": {
- "jshint": ">= 0.9.0"
+ "jshint": "^2.5.4"
},
- "readme": "# It Opens Stuff\r\n\r\nThat is, in your desktop environment. This will make *actual windows pop up*, with stuff in them:\r\n\r\n```bash\r\nnpm install opener -g\r\n\r\nopener http://google.com\r\nopener ./my-file.txt\r\nopener firefox\r\nopener npm run lint\r\n```\r\n\r\nAlso if you want to use it programmatically you can do that too:\r\n\r\n```js\r\nvar opener = require(\"opener\");\r\n\r\nopener(\"http://google.com\");\r\nopener(\"./my-file.txt\");\r\nopener(\"firefox\");\r\nopener(\"npm run lint\");\r\n```\r\n\r\n## Use It for Good\r\n\r\nLike opening the user's browser with a test harness in your package's test script:\r\n\r\n```json\r\n{\r\n \"scripts\": {\r\n \"test\": \"opener ./test/runner.html\"\r\n },\r\n \"devDependencies\": {\r\n \"opener\": \"*\"\r\n }\r\n}\r\n```\r\n\r\n## Why\r\n\r\nBecause Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least\r\n[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all\r\nthree. Like Node.js. And Opener.\r\n",
- "_id": "opener@1.3.0",
+ "gitHead": "b9d36d4f82c26560acdadbabbb10ddba46a30dc5",
+ "homepage": "https://github.com/domenic/opener",
+ "_id": "opener@1.4.0",
+ "_shasum": "d11f86eeeb076883735c9d509f538fe82d10b941",
+ "_from": "opener@>=1.4.0 <1.5.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "domenic",
+ "email": "domenic@domenicdenicola.com"
+ },
+ "maintainers": [
+ {
+ "name": "domenic",
+ "email": "domenic@domenicdenicola.com"
+ }
+ ],
"dist": {
- "shasum": "d72b4b2e61b0a4ca7822a7554070620002fb90d9"
+ "shasum": "d11f86eeeb076883735c9d509f538fe82d10b941",
+ "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.0.tgz"
},
- "_from": "opener@latest"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.0.tgz"
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/readable-stream/.npmignore
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore
rename to deps/npm/node_modules/readable-stream/.npmignore
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/readable-stream/LICENSE
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE
rename to deps/npm/node_modules/readable-stream/LICENSE
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md
rename to deps/npm/node_modules/readable-stream/README.md
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/readable-stream/duplex.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js
rename to deps/npm/node_modules/readable-stream/duplex.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
rename to deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
rename to deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
rename to deps/npm/node_modules/readable-stream/lib/_stream_readable.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
rename to deps/npm/node_modules/readable-stream/lib/_stream_transform.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
rename to deps/npm/node_modules/readable-stream/lib/_stream_writable.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md
rename to deps/npm/node_modules/readable-stream/node_modules/core-util-is/README.md
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
rename to deps/npm/node_modules/readable-stream/node_modules/core-util-is/float.patch
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
rename to deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/package.json
similarity index 94%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
rename to deps/npm/node_modules/readable-stream/node_modules/core-util-is/package.json
index 8e79c3a..4eb9ce4 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
+++ b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -35,7 +35,7 @@
"shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
"tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
},
- "_from": "core-util-is@>=1.0.0-0 <1.1.0-0",
+ "_from": "core-util-is@>=1.0.0 <1.1.0",
"_npmVersion": "1.3.23",
"_npmUser": {
"name": "isaacs",
@@ -49,5 +49,6 @@
],
"directories": {},
"_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
- "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/util.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js
rename to deps/npm/node_modules/readable-stream/node_modules/core-util-is/util.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md
rename to deps/npm/node_modules/readable-stream/node_modules/isarray/README.md
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js b/deps/npm/node_modules/readable-stream/node_modules/isarray/build/build.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js
rename to deps/npm/node_modules/readable-stream/node_modules/isarray/build/build.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json
rename to deps/npm/node_modules/readable-stream/node_modules/isarray/component.json
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js
rename to deps/npm/node_modules/readable-stream/node_modules/isarray/index.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/readable-stream/node_modules/isarray/package.json
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
rename to deps/npm/node_modules/readable-stream/node_modules/isarray/package.json
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
rename to deps/npm/node_modules/readable-stream/node_modules/string_decoder/.npmignore
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
rename to deps/npm/node_modules/readable-stream/node_modules/string_decoder/LICENSE
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md
rename to deps/npm/node_modules/readable-stream/node_modules/string_decoder/README.md
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
rename to deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json
similarity index 96%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
rename to deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json
index 752eab6..0364d54 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
+++ b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -28,7 +28,7 @@
},
"_id": "string_decoder@0.10.31",
"_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
- "_from": "string_decoder@>=0.10.0-0 <0.11.0-0",
+ "_from": "string_decoder@>=0.10.0 <0.11.0",
"_npmVersion": "1.4.23",
"_npmUser": {
"name": "rvagg",
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
similarity index 78%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
rename to deps/npm/node_modules/readable-stream/package.json
index 6c73ab3..2fbd997 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "readable-stream",
- "version": "1.0.31",
+ "version": "1.0.32",
"description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x",
"main": "readable.js",
"dependencies": {
@@ -33,14 +33,16 @@
"url": "http://blog.izs.me/"
},
"license": "MIT",
+ "gitHead": "2024ad52b1e475465488b4ad39eb41d067ffcbb9",
"bugs": {
"url": "https://github.com/isaacs/readable-stream/issues"
},
"homepage": "https://github.com/isaacs/readable-stream",
- "_id": "readable-stream@1.0.31",
- "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae",
- "_from": "readable-stream@>=1.0.26-0 <1.1.0-0",
- "_npmVersion": "1.4.9",
+ "_id": "readable-stream@1.0.32",
+ "_shasum": "6b44a88ba984cd0ec0834ae7d59a47c39aef48ec",
+ "_from": "readable-stream@*",
+ "_npmVersion": "2.0.2",
+ "_nodeVersion": "0.10.31",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
@@ -60,10 +62,10 @@
}
],
"dist": {
- "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae",
- "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz"
+ "shasum": "6b44a88ba984cd0ec0834ae7d59a47c39aef48ec",
+ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.32.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.32.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/readable-stream/passthrough.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js
rename to deps/npm/node_modules/readable-stream/passthrough.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/readable.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
rename to deps/npm/node_modules/readable-stream/readable.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js b/deps/npm/node_modules/readable-stream/transform.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js
rename to deps/npm/node_modules/readable-stream/transform.js
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js b/deps/npm/node_modules/readable-stream/writable.js
similarity index 100%
rename from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js
rename to deps/npm/node_modules/readable-stream/writable.js
diff --git a/deps/npm/node_modules/realize-package-specifier/.npmignore b/deps/npm/node_modules/realize-package-specifier/.npmignore
new file mode 100644
index 0000000..926ddf6
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/.npmignore
@@ -0,0 +1,3 @@
+*~
+.#*
+node_modules
diff --git a/deps/npm/node_modules/realize-package-specifier/README.md b/deps/npm/node_modules/realize-package-specifier/README.md
new file mode 100644
index 0000000..577014a
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/README.md
@@ -0,0 +1,58 @@
+realize-package-specifier
+-------------------------
+
+Parse a package specifier, peeking at the disk to differentiate between
+local tarballs, directories and named modules. This implements the logic
+used by `npm install` and `npm cache` to determine where to get packages
+from.
+
+```javascript
+var realizePackageSpecifier = require("realize-package-specifier")
+realizePackageSpecifier("foo.tar.gz", ".", function (err, package) {
+ â¦
+})
+```
+
+* realizePackageSpecifier(*spec*, [*where*,] *callback*)
+
+Parses *spec* using `npm-package-arg` and then uses stat to check to see if
+it refers to a local tarball or package directory. Stats are done relative
+to *where*. If it does then the local module is loaded. If it doesn't then
+target is left as a remote package specifier. Package directories are
+recognized by the presence of a package.json in them.
+
+*spec* -- a package specifier, like: `foo@1.2`, or `foo@user/foo`, or
+`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`
+
+*where* (optional, default: .) -- The directory in which we should look for
+local tarballs or package directories.
+
+*callback* function(*err*, *result*) -- Called once we've determined what
+kind of specifier this is. The *result* object will be very like the one
+returned by `npm-package-arg` except with three differences: 1) There's a
+new type of `directory`. 2) The `local` type only refers to tarballs. 2)
+For all `local` and `directory` type results spec will contain the full path of
+the local package.
+
+## Result Objects
+
+The full definition of the result object is:
+
+* `name` - If known, the `name` field expected in the resulting pkg.
+* `type` - One of the following strings:
+ * `git` - A git repo
+ * `github` - A github shorthand, like `user/project`
+ * `tag` - A tagged version, like `"foo@latest"`
+ * `version` - A specific version number, like `"foo@1.2.3"`
+ * `range` - A version range, like `"foo@2.x"`
+ * `local` - A local file path
+ * `directory` - A local package directory
+ * `remote` - An http url (presumably to a tgz)
+* `spec` - The "thing". URL, the range, git repo, etc.
+* `raw` - The original un-modified string that was provided.
+* `rawSpec` - The part after the `name@...`, as it was originally
+ provided.
+* `scope` - If a name is something like `@org/module` then the `scope`
+ field will be set to `org`. If it doesn't have a scoped name, then
+ scope is `null`.
+
diff --git a/deps/npm/node_modules/realize-package-specifier/index.js b/deps/npm/node_modules/realize-package-specifier/index.js
new file mode 100644
index 0000000..261ad66
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/index.js
@@ -0,0 +1,38 @@
+"use strict"
+var fs = require("fs")
+var path = require("path")
+var dz = require("dezalgo")
+var npa = require("npm-package-arg")
+
+module.exports = function (spec, where, cb) {
+ if (where instanceof Function) { cb = where; where = null }
+ if (where == null) where = "."
+ cb = dz(cb)
+ try {
+ var dep = npa(spec)
+ }
+ catch (e) {
+ return cb(e)
+ }
+ var specpath = dep.type == "local"
+ ? path.resolve(where, dep.spec)
+ : path.resolve(dep.rawSpec? dep.rawSpec: dep.name)
+ fs.stat(specpath, function (er, s) {
+ if (er) return finalize()
+ if (!s.isDirectory()) return finalize("local")
+ fs.stat(path.join(specpath, "package.json"), function (er) {
+ finalize(er ? null : "directory")
+ })
+ })
+ function finalize(type) {
+ if (type != null && type != dep.type) {
+ dep.type = type
+ if (! dep.rawSpec) {
+ dep.rawSpec = dep.name
+ dep.name = null
+ }
+ }
+ if (dep.type == "local" || dep.type == "directory") dep.spec = specpath
+ cb(null, dep)
+ }
+}
diff --git a/deps/npm/node_modules/realize-package-specifier/package.json b/deps/npm/node_modules/realize-package-specifier/package.json
new file mode 100644
index 0000000..5364576
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "realize-package-specifier",
+ "version": "1.2.0",
+ "description": "Like npm-package-arg, but more so, producing full file paths and differentiating local tar and directory sources.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/realize-package-specifier.git"
+ },
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org",
+ "url": "http://re-becca.org"
+ },
+ "homepage": "https://github.com/npm/realize-package-specifier",
+ "dependencies": {
+ "dezalgo": "^1.0.1",
+ "npm-package-arg": "^2.1.3"
+ },
+ "devDependencies": {
+ "require-inject": "^1.1.0",
+ "tap": "^0.4.12"
+ },
+ "gitHead": "39016343d5bd5572ab39374323e9588e54985910",
+ "bugs": {
+ "url": "https://github.com/npm/realize-package-specifier/issues"
+ },
+ "_id": "realize-package-specifier@1.2.0",
+ "_shasum": "93364e40dee38369f92e9b0c76124500342132f2",
+ "_from": "realize-package-specifier@>=1.2.0 <1.3.0",
+ "_npmVersion": "2.1.2",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "dist": {
+ "shasum": "93364e40dee38369f92e9b0c76124500342132f2",
+ "tarball": "http://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-1.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-1.2.0.tgz"
+}
diff --git a/deps/npm/node_modules/realize-package-specifier/test/basic.js b/deps/npm/node_modules/realize-package-specifier/test/basic.js
new file mode 100644
index 0000000..d5d8fc6
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/test/basic.js
@@ -0,0 +1,121 @@
+"use strict"
+var test = require("tap").test
+var requireInject = require("require-inject")
+var path = require("path")
+
+var re = {
+ tarball: /[\/\\]a.tar.gz$/,
+ packagedir: /[\/\\]b$/,
+ packagejson: /[\/\\]b[\/\\]package.json$/,
+ nonpackagedir: /[\/\\]c$/,
+ nopackagejson: /[\/\\]c[\/\\]package.json$/,
+ remotename: /[\/\\]d$/,
+ packagedirlikegithub: /[\/\\]e[\/\\]1$/,
+ packagejsonlikegithub: /[\/\\]e[\/\\]1[\/\\]package.json$/,
+ github: /[\/\\]e[\/\\]2$/
+}
+
+var rps = requireInject("../index", {
+ "fs": {
+ "stat": function (path, callback) {
+ if (re.tarball.test(path)) {
+ callback(null,{isDirectory:function(){ return false }})
+ }
+ else if (re.packagedir.test(path)) {
+ callback(null,{isDirectory:function(){ return true }})
+ }
+ else if (re.packagejson.test(path)) {
+ callback(null,{})
+ }
+ else if (re.nonpackagedir.test(path)) {
+ callback(null,{isDirectory:function(){ return true }})
+ }
+ else if (re.nopackagejson.test(path)) {
+ callback(new Error("EFILENOTFOUND"))
+ }
+ else if (re.remotename.test(path)) {
+ callback(new Error("EFILENOTFOUND"))
+ }
+ else if (re.packagedirlikegithub.test(path)) {
+ callback(null,{isDirectory:function(){ return true }})
+ }
+ else if (re.packagejsonlikegithub.test(path)) {
+ callback(null,{})
+ }
+ else if (re.github.test(path)) {
+ callback(new Error("EFILENOTFOUND"))
+ }
+ else {
+ throw new Error("Unknown stat fixture path: "+path)
+ }
+ }
+ }
+})
+
+test("realize-package-specifier", function (t) {
+ t.plan(10)
+ rps("a.tar.gz", function (err, result) {
+ t.is(result.type, "local", "local tarball")
+ })
+ rps("b", function (err, result) {
+ t.is(result.type, "directory", "local package directory")
+ })
+ rps("c", function (err, result) {
+ t.is(result.type, "range", "remote package, non-package local directory")
+ })
+ rps("d", function (err, result) {
+ t.is(result.type, "range", "remote package, no local directory")
+ })
+ rps("file:./a.tar.gz", function (err, result) {
+ t.is(result.type, "local", "local tarball")
+ })
+ rps("file:./b", function (err, result) {
+ t.is(result.type, "directory", "local package directory")
+ })
+ rps("file:./c", function (err, result) {
+ t.is(result.type, "local", "non-package local directory, specified with a file URL")
+ })
+ rps("file:./d", function (err, result) {
+ t.is(result.type, "local", "no local directory, specified with a file URL")
+ })
+ rps("e/1", function (err, result) {
+ t.is(result.type, "directory", "local package directory")
+ })
+ rps("e/2", function (err, result) {
+ t.is(result.type, "github", "github package dependency")
+ })
+})
+test("named realize-package-specifier", function (t) {
+ t.plan(10)
+
+ rps("a@a.tar.gz", function (err, result) {
+ t.is(result.type, "local", "named local tarball")
+ })
+ rps("b@b", function (err, result) {
+ t.is(result.type, "directory", "named local package directory")
+ })
+ rps("c@c", function (err, result) {
+ t.is(result.type, "tag", "remote package, non-package local directory")
+ })
+ rps("d@d", function (err, result) {
+ t.is(result.type, "tag", "remote package, no local directory")
+ })
+ rps("a@file:./a.tar.gz", function (err, result) {
+ t.is(result.type, "local", "local tarball")
+ })
+ rps("b@file:./b", function (err, result) {
+ t.is(result.type, "directory", "local package directory")
+ })
+ rps("c@file:./c", function (err, result) {
+ t.is(result.type, "local", "non-package local directory, specified with a file URL")
+ })
+ rps("d@file:./d", function (err, result) {
+ t.is(result.type, "local", "no local directory, specified with a file URL")
+ })
+ rps("e@e/1", function (err, result) {
+ t.is(result.type, "directory", "local package directory")
+ })
+ rps("e@e/2", function (err, result) {
+ t.is(result.type, "github", "github package dependency")
+ })
+})
diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js b/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js
new file mode 100644
index 0000000..be07aa5
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js
@@ -0,0 +1,207 @@
+var test = require("tap").test;
+var rps = require("../index.js")
+var path = require("path")
+
+test("npa-basic", function (t) {
+ t.setMaxListeners(999)
+
+ var tests = {
+ "foo@1.2": {
+ name: "foo",
+ type: "range",
+ spec: ">=1.2.0 <1.3.0",
+ raw: "foo@1.2",
+ rawSpec: "1.2"
+ },
+
+ "@foo/bar": {
+ raw: "@foo/bar",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "",
+ spec: "*",
+ type: "range"
+ },
+
+ "@foo/bar@": {
+ raw: "@foo/bar@",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "",
+ spec: "*",
+ type: "range"
+ },
+
+ "@foo/bar@baz": {
+ raw: "@foo/bar@baz",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "baz",
+ spec: "baz",
+ type: "tag"
+ },
+
+ "@f fo o al/ a d s ;f ": {
+ raw: "@f fo o al/ a d s ;f",
+ name: null,
+ rawSpec: "@f fo o al/ a d s ;f",
+ spec: path.resolve("@f fo o al/ a d s ;f"),
+ type: "local"
+ },
+
+ "foo@1.2.3": {
+ name: "foo",
+ type: "version",
+ spec: "1.2.3",
+ raw: "foo@1.2.3"
+ },
+
+ "foo@=v1.2.3": {
+ name: "foo",
+ type: "version",
+ spec: "1.2.3",
+ raw: "foo@=v1.2.3",
+ rawSpec: "=v1.2.3"
+ },
+
+ "git+ssh://git@github.com/user/foo#1.2.3": {
+ name: null,
+ type: "git",
+ spec: "ssh://git@github.com/user/foo#1.2.3",
+ raw: "git+ssh://git@github.com/user/foo#1.2.3"
+ },
+
+ "git+file://path/to/repo#1.2.3": {
+ name: null,
+ type: "git",
+ spec: "file://path/to/repo#1.2.3",
+ raw: "git+file://path/to/repo#1.2.3"
+ },
+
+ "git://github.com/user/foo": {
+ name: null,
+ type: "git",
+ spec: "git://github.com/user/foo",
+ raw: "git://github.com/user/foo"
+ },
+
+ "@foo/bar@git+ssh://github.com/user/foo": {
+ name: "@foo/bar",
+ scope: "@foo",
+ spec: "ssh://github.com/user/foo",
+ rawSpec: "git+ssh://github.com/user/foo",
+ raw: "@foo/bar@git+ssh://github.com/user/foo"
+ },
+
+ "/path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "/path/to/foo",
+ raw: "/path/to/foo"
+ },
+
+ "file:path/to/foo": {
+ name: null,
+ type: "local",
+ spec: path.resolve(__dirname,"..","path/to/foo"),
+ raw: "file:path/to/foo"
+ },
+
+ "file:~/path/to/foo": {
+ name: null,
+ type: "local",
+ spec: path.resolve(__dirname,"..","~/path/to/foo"),
+ raw: "file:~/path/to/foo"
+ },
+
+ "file:../path/to/foo": {
+ name: null,
+ type: "local",
+ spec: path.resolve(__dirname,"..","../path/to/foo"),
+ raw: "file:../path/to/foo"
+ },
+
+ "file:///path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "/path/to/foo",
+ raw: "file:///path/to/foo"
+ },
+
+ "https://server.com/foo.tgz": {
+ name: null,
+ type: "remote",
+ spec: "https://server.com/foo.tgz",
+ raw: "https://server.com/foo.tgz"
+ },
+
+ "user/foo-js": {
+ name: null,
+ type: "github",
+ spec: "user/foo-js",
+ raw: "user/foo-js"
+ },
+
+ "user/foo-js#bar/baz": {
+ name: null,
+ type: "github",
+ spec: "user/foo-js#bar/baz",
+ raw: "user/foo-js#bar/baz"
+ },
+
+ "user..blerg--/..foo-js# . . . . . some . tags / / /": {
+ name: null,
+ type: "github",
+ spec: "user..blerg--/..foo-js# . . . . . some . tags / / /",
+ raw: "user..blerg--/..foo-js# . . . . . some . tags / / /"
+ },
+
+ "user/foo-js#bar/baz/bin": {
+ name: null,
+ type: "github",
+ spec: "user/foo-js#bar/baz/bin",
+ raw: "user/foo-js#bar/baz/bin"
+ },
+
+ "foo@user/foo-js": {
+ name: "foo",
+ type: "github",
+ spec: "user/foo-js",
+ raw: "foo@user/foo-js"
+ },
+
+ "foo@latest": {
+ name: "foo",
+ type: "tag",
+ spec: "latest",
+ raw: "foo@latest"
+ },
+
+ "foo": {
+ name: "foo",
+ type: "range",
+ spec: "*",
+ raw: "foo"
+ }
+ }
+
+ t.plan( 2 + Object.keys(tests).length * 3 )
+
+ Object.keys(tests).forEach(function (arg) {
+ rps(arg, path.resolve(__dirname,'..'), function(err, res) {
+ t.notOk(err, "No error")
+ t.type(res, "Result")
+ t.has(res, tests[arg])
+ })
+ })
+
+ // Completely unreasonable invalid garbage throws an error
+ rps("this is not a \0 valid package name or url", path.resolve(__dirname,'..'), function (err) {
+ t.ok(err, "error")
+ })
+
+ rps("gopher://yea right", path.resolve(__dirname,'..'), function (err) {
+ t.ok(err, "Unsupported URL Type: gopher://yea right")
+ })
+
+})
diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js b/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js
new file mode 100644
index 0000000..f6275be
--- /dev/null
+++ b/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js
@@ -0,0 +1,42 @@
+global.FAKE_WINDOWS = true
+
+var rps = require('../index.js')
+var test = require("tap").test
+var path = require("path")
+
+var cases = {
+ "C:\\x\\y\\z": {
+ raw: 'C:\\x\\y\\z',
+ scope: null,
+ name: null,
+ rawSpec: 'C:\\x\\y\\z',
+ spec: path.resolve('C:\\x\\y\\z'),
+ type: 'local'
+ },
+ "foo@C:\\x\\y\\z": {
+ raw: 'foo@C:\\x\\y\\z',
+ scope: null,
+ name: 'foo',
+ rawSpec: 'C:\\x\\y\\z',
+ spec: path.resolve('C:\\x\\y\\z'),
+ type: 'local'
+ },
+ "foo@/foo/bar/baz": {
+ raw: 'foo@/foo/bar/baz',
+ scope: null,
+ name: 'foo',
+ rawSpec: '/foo/bar/baz',
+ spec: path.resolve('/foo/bar/baz'),
+ type: 'local'
+ }
+}
+
+test("parse a windows path", function (t) {
+ t.plan( Object.keys(cases).length )
+ Object.keys(cases).forEach(function (c) {
+ var expect = cases[c]
+ rps(c, function(err, actual) {
+ t.same(actual, expect, c)
+ })
+ })
+})
diff --git a/deps/npm/node_modules/request/.eslintrc b/deps/npm/node_modules/request/.eslintrc
new file mode 100644
index 0000000..9c3350d
--- /dev/null
+++ b/deps/npm/node_modules/request/.eslintrc
@@ -0,0 +1,22 @@
+{
+ "env": {
+ "node": true
+ },
+ "rules": {
+ // Disallow semi-colons, unless needed to disambiguate statement
+ "semi": [2, "never"],
+ // Require strings to use single quotes
+ "quotes": [2, "single"],
+ // Require curly braces for all control statements
+ "curly": 2,
+ // Disallow using variables and functions before they've been defined
+ "no-use-before-define": 2,
+ // Allow any case for variable naming
+ "camelcase": 0,
+ // Disallow unused variables, except as function arguments
+ "no-unused-vars": [2, {"args":"none"}],
+ // Allow leading underscores for method names
+ // REASON: we use underscores to denote private methods
+ "no-underscore-dangle": 0
+ }
+}
diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml
index 6e4887a..742c7df 100644
--- a/deps/npm/node_modules/request/.travis.yml
+++ b/deps/npm/node_modules/request/.travis.yml
@@ -2,11 +2,8 @@ language: node_js
node_js:
- "0.8"
- "0.10"
-
-env:
- - OPTIONALS=Y
- - OPTIONALS=N
-
-install:
- - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi
- - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi
+webhooks:
+ urls: https://webhooks.gitter.im/e/237280ed4796c19cc626
+ on_success: change # options: [always|never|change] default: always
+ on_failure: always # options: [always|never|change] default: always
+ on_start: false # default: false
diff --git a/deps/npm/node_modules/request/CONTRIBUTING.md b/deps/npm/node_modules/request/CONTRIBUTING.md
index 06367a1..17d383e 100644
--- a/deps/npm/node_modules/request/CONTRIBUTING.md
+++ b/deps/npm/node_modules/request/CONTRIBUTING.md
@@ -4,7 +4,9 @@
## What?
-Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
+Individuals making significant and valuable contributions are given
+commit-access to the project to contribute as they see fit. This project is
+more like an open wiki than a standard guarded open source project.
## Rules
@@ -12,10 +14,21 @@ There are a few basic ground-rules for contributors:
1. **No `--force` pushes** or modifying the Git history in any way.
1. **Non-master branches** ought to be used for ongoing work.
-1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors.
-1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor.
-1. For significant changes wait a full 24 hours before merging so that active contributors who are distributed throughout the world have a chance to weigh in.
+1. **External API changes and significant modifications** ought to be subject
+ to an **internal pull-request** to solicit feedback from other contributors.
+1. Internal pull-requests to solicit feedback are *encouraged* for any other
+ non-trivial contribution but left to the discretion of the contributor.
+1. For significant changes wait a full 24 hours before merging so that active
+ contributors who are distributed throughout the world have a chance to weigh
+ in.
1. Contributors should attempt to adhere to the prevailing code-style.
+1. Run `npm test` locally before submitting your PR, to catch any easy to miss
+ style & testing issues. To diagnose test failures, there are two ways to
+ run a single test file:
+ - `node_modules/.bin/taper tests/test-file.js` - run using the default
+ [`taper`](/nylen/taper) test reporter.
+ - `node tests/test-file.js` - view the raw
+ [tap](https://testanything.org/) output.
## Releases
@@ -24,6 +37,8 @@ Declaring formal releases remains the prerogative of the project maintainer.
## Changes to this arrangement
-This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
+This is an experiment and feedback is welcome! This document may also be
+subject to pull-requests or changes by contributors where you believe you have
+something valuable to add or change.
-----------------------------------------
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 1878fdf..5660420 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -1,4 +1,5 @@
# Request â Simplified HTTP client
+[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/mikeal/request?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![NPM](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
@@ -35,6 +36,18 @@ Request can also `pipe` to itself. When doing so, `content-type` and `content-le
request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
```
+Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).
+
+```javascript
+request
+ .get('http://google.com/img.png')
+ .on('response', function(response) {
+ console.log(response.statusCode) // 200
+ console.log(response.headers['content-type']) // 'image/png'
+ })
+ .pipe(request.put('http://mysite.com/img.png'))
+```
+
Now letâs get fancy.
```javascript
@@ -108,9 +121,8 @@ HTTP/1.1 200 OK
At this point, the connection is left open, and the client is
communicating directly with the `endpoint-server.com` machine.
-See (the wikipedia page on HTTP
-Tunneling)[http://en.wikipedia.org/wiki/HTTP_tunnel] for more
-information.
+See [the wikipedia page on HTTP Tunneling](http://en.wikipedia.org/wiki/HTTP_tunnel)
+for more information.
By default, when proxying `http` traffic, request will simply make a
standard proxied `http` request. This is done by making the `url`
@@ -169,48 +181,128 @@ header is *never* sent to the endpoint server, but only to the proxy
server. All other headers are sent as-is over the established
connection.
-## UNIX Socket
+### Controlling proxy behaviour using environment variables
+
+The following environment variables are respected by `request`:
+
+ * `HTTP_PROXY` / `http_proxy`
+ * `HTTPS_PROXY` / `https_proxy`
+ * `NO_PROXY` / `no_proxy`
+
+When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.
+
+`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.
+
+Here's some examples of valid `no_proxy` values:
-`request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system.
+ * `google.com` - don't proxy HTTP/HTTPS requests to Google.
+ * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.
+ * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!
+ * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.
-HTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response.
+## UNIX Socket
-Thus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket`
+`request` supports making requests to [UNIX Domain Sockets](http://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:
```javascript
-request.get('unix://tmp/unix.socket/httppath')
+/* Pattern */ 'http://unix:SOCKET:PATH'
+/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
```
+Note: The `SOCKET` path is assumed to be absolute to the root of the host file system.
+
+
## Forms
`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
+#### application/x-www-form-urlencoded (URL-Encoded Forms)
+
URL-encoded forms are simple.
```javascript
request.post('http://service.com/upload', {form:{key:'value'}})
// or
request.post('http://service.com/upload').form({key:'value'})
+// or
+request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })
```
-For `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.
+#### multipart/form-data (Multipart Form Uploads)
+
+For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.
+
```javascript
-var r = request.post('http://service.com/upload', function optionalCallback (err, httpResponse, body) {
+var formData = {
+ // Pass a simple key-value pair
+ my_field: 'my_value',
+ // Pass data via Buffers
+ my_buffer: new Buffer([1, 2, 3]),
+ // Pass data via Streams
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+ // Pass multiple values /w an Array
+ attachments: [
+ fs.createReadStream(__dirname + '/attacment1.jpg')
+ fs.createReadStream(__dirname + '/attachment2.jpg')
+ ],
+ // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}
+ // See the `form-data` README for more information about options: https://github.com/felixge/node-form-data
+ custom_file: {
+ value: fs.createReadStream('/dev/urandom'),
+ options: {
+ filename: 'topsecret.jpg',
+ contentType: 'image/jpg'
+ }
+ }
+};
+request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) {
if (err) {
return console.error('upload failed:', err);
}
console.log('Upload successful! Server responded with:', body);
-})
-var form = r.form()
-form.append('my_field', 'my_value')
-form.append('my_buffer', new Buffer([1, 2, 3]))
-form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')))
-form.append('remote_file', request('http://google.com/doodle.png'))
+});
+```
+
+For advanced cases, you can the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)
+
+```javascript
+// NOTE: Advanced use-case, for normal use see 'formData' usage above
+var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) { // ...
-// Just like always, `r` is a writable stream, and can be used as such (you have until nextTick to pipe it, etc.)
-// Alternatively, you can provide a callback (that's what this example does â see `optionalCallback` above).
+var form = r.form();
+form.append('my_field', 'my_value');
+form.append('my_buffer', new Buffer([1, 2, 3]));
+form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});
```
+See the [form-data README](https://github.com/felixge/node-form-data) for more information & examples.
+
+#### multipart/related
+
+Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.
+
+```javascript
+ request(
+ { method: 'PUT'
+ , preambleCRLF: true
+ , postambleCRLF: true
+ , uri: 'http://service.com/upload'
+ , multipart:
+ [ { 'content-type': 'application/json'
+ , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
+ }
+ , { body: 'I am an attachment' }
+ ]
+ }
+ , function (error, response, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+ }
+ )
+```
+
## HTTP Authentication
@@ -238,7 +330,7 @@ If passed as an option, `auth` should be a hash containing values `user` || `use
`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).
-Note that you can also use for basic authentication a trick using the URL itself, as specified in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt).
+Note that you can also use for basic authentication a trick using the URL itself, as specified in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt).
Simply pass the `user:password` before the host with an `@` sign.
```javascript
@@ -331,35 +423,86 @@ function callback(error, response, body) {
request(options, callback);
```
+## TLS/SSL Protocol
+
+TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be
+set in the `agentOptions` property of the `options` object.
+In the example below, we call an API requires client side SSL certificate
+(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:
+
+```javascript
+var fs = require('fs')
+ , path = require('path')
+ , certFile = path.resolve(__dirname, 'ssl/client.crt')
+ , keyFile = path.resolve(__dirname, 'ssl/client.key')
+ , request = require('request');
+
+var options = {
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ 'cert': fs.readFileSync(certFile),
+ 'key': fs.readFileSync(keyFile),
+ // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:
+ // 'pfx': fs.readFileSync(pfxFilePath),
+ 'passphrase': 'password',
+ 'securityOptions': 'SSL_OP_NO_SSLv3'
+ }
+};
+
+request.get(options);
+```
+
+It is able to force using SSLv3 only by specifying `secureProtocol`:
+
+```javascript
+
+request.get({
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ 'secureProtocol': 'SSLv3_method'
+ }
+});
+```
+
## request(options, callback)
The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
* `qs` - object containing querystring values to be appended to the `uri`
+* `useQuerystring` - If true, use `querystring` to stringify and parse
+ querystrings, otherwise use `qs` (default: `false`). Set this option to
+ `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the
+ default `foo[0]=bar&foo[1]=baz`.
* `method` - http method (default: `"GET"`)
* `headers` - http headers (default: `{}`)
-* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.
-* `form` - when passed an object or a querystring, 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).
+* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object.
+* `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
+* `formData` - Data to pass for a `multipart/form-data` request. See "Forms" section above.
+* `multipart` - (experimental) Data to pass for a `multipart/related` request. See "Forms" section above
* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
+* `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
+* `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
* `maxRedirects` - the maximum number of redirects to follow (default: `10`)
-* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.
-* `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`)
-* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
+* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default).
+* `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as [your options allow for it](request.js#L747)). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool.
+ * A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
* `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`)
* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
* `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).
* `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.
+* `agentOptions` - Object containing user agent options. See documentation above. **Note:** [see tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
+
* `jar` - If `true` and `tough-cookie` is installed, remember cookies for future use (or define your custom cookie jar; see examples section)
* `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)
* `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.
* `localAddress` - Local interface to bind for network connections.
-* `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response.
+* `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
* `tunnel` - If `true`, then *always* use a tunneling proxy. If
`false` (default), then tunneling will only be used if the
destination is `https`, or if a previous request in the redirect
@@ -368,7 +511,7 @@ The first argument can be either a `url` or an `options` object. The only requir
tunneling proxy.
-The callback argument gets 3 arguments:
+The callback argument gets 3 arguments:
1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)
2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object
@@ -382,7 +525,7 @@ There are also shorthand methods for different HTTP METHODs and some other conve
This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.
-**Note:** You can call `.defaults()` on the wrapper that is returned from `request.defaults` to add/override defaults that were previously defaulted.
+**Note:** You can call `.defaults()` on the wrapper that is returned from `request.defaults` to add/override defaults that were previously defaulted.
For example:
```javascript
@@ -450,7 +593,7 @@ request.get(url)
Function that creates a new cookie.
```javascript
-request.cookie('cookie_string_here')
+request.cookie('key1=value1')
```
### request.jar
@@ -488,6 +631,37 @@ request.jar()
)
```
+For backwards-compatibility, response compression is not supported by default.
+To accept gzip-compressed responses, set the `gzip` option to `true`. Note
+that the body data passed through `request` is automatically decompressed
+while the response object is unmodified and will contain compressed data if
+the server sent a compressed response.
+
+```javascript
+ var request = require('request')
+ request(
+ { method: 'GET'
+ , uri: 'http://www.google.com'
+ , gzip: true
+ }
+ , function (error, response, body) {
+ // body is the decompressed response body
+ console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
+ console.log('the decoded data is: ' + body)
+ }
+ ).on('data', function(data) {
+ // decompressed data as it is received
+ console.log('decoded chunk: ' + data)
+ })
+ .on('response', function(response) {
+ // unmodified http.IncomingMessage object
+ response.on('data', function(data) {
+ // compressed data as it is received
+ console.log('received ' + data.length + ' bytes of compressed data')
+ })
+ })
+```
+
Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`) and install `tough-cookie`.
```javascript
@@ -511,10 +685,11 @@ OR
```javascript
// `npm install --save tough-cookie` before this works
-var j = request.jar()
-var cookie = request.cookie('your_cookie_here')
-j.setCookie(cookie, uri);
-request({url: 'http://www.google.com', jar: j}, function () {
+var j = request.jar();
+var cookie = request.cookie('key1=value1');
+var url = 'http://www.google.com';
+j.setCookie(cookie, url);
+request({url: url, jar: j}, function () {
request('http://images.google.com')
})
```
@@ -522,10 +697,10 @@ request({url: 'http://www.google.com', jar: j}, function () {
To inspect your cookie jar after a request
```javascript
-var j = request.jar()
+var j = request.jar()
request({url: 'http://www.google.com', jar: j}, function () {
var cookie_string = j.getCookieString(uri); // "key1=value1; key2=value2; ..."
- var cookies = j.getCookies(uri);
+ var cookies = j.getCookies(uri);
// [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...]
})
```
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index 8e8a133..0332684 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+'use strict'
+
var extend = require('util')._extend
, cookies = require('./lib/cookies')
- , copy = require('./lib/copy')
, helpers = require('./lib/helpers')
- , isFunction = helpers.isFunction
+
+var isFunction = helpers.isFunction
, constructObject = helpers.constructObject
, filterForCallback = helpers.filterForCallback
, constructOptionsFrom = helpers.constructOptionsFrom
, paramsHaveRequestBody = helpers.paramsHaveRequestBody
- ;
+
// organize params for patch, post, put, head, del
function initParams(uri, options, callback) {
@@ -36,8 +38,9 @@ function initParams(uri, options, callback) {
}
function request (uri, options, callback) {
- if (typeof uri === 'undefined')
+ if (typeof uri === 'undefined') {
throw new Error('undefined is not a valid uri or options object.')
+ }
var params = initParams(uri, options, callback)
options = params.options
@@ -48,8 +51,9 @@ function request (uri, options, callback) {
}
function requester(params) {
- if(typeof params.options._requester === 'function')
+ if(typeof params.options._requester === 'function') {
return params.options._requester
+ }
return request
}
@@ -63,8 +67,9 @@ request.head = function (uri, options, callback) {
var params = initParams(uri, options, callback)
params.options.method = 'HEAD'
- if (paramsHaveRequestBody(params))
- throw new Error("HTTP HEAD requests MUST NOT include a request body.")
+ if (paramsHaveRequestBody(params)) {
+ throw new Error('HTTP HEAD requests MUST NOT include a request body.')
+ }
return requester(params)(params.uri || null, params.options, params.callback)
}
@@ -102,7 +107,7 @@ request.cookie = function (str) {
}
request.defaults = function (options, requester) {
-
+ var self = this
var wrap = function (method) {
var headerlessOptions = function (options) {
options = extend({}, options)
@@ -119,13 +124,14 @@ request.defaults = function (options, requester) {
return function (uri, opts, callback) {
var params = initParams(uri, opts, callback)
- params.options = extend(params.options, headerlessOptions(options))
+ params.options = extend(headerlessOptions(options), params.options)
- if (options.headers)
+ if (options.headers) {
params.options.headers = getHeaders(params, options)
+ }
if (isFunction(requester)) {
- if (method === request) {
+ if (method === self) {
method = requester
} else {
params.options._requester = requester
@@ -136,23 +142,27 @@ request.defaults = function (options, requester) {
}
}
- defaults = wrap(this)
- defaults.get = wrap(this.get)
- defaults.patch = wrap(this.patch)
- defaults.post = wrap(this.post)
- defaults.put = wrap(this.put)
- defaults.head = wrap(this.head)
- defaults.del = wrap(this.del)
- defaults.cookie = wrap(this.cookie)
- defaults.jar = this.jar
- defaults.defaults = this.defaults
+ var defaults = wrap(self)
+ defaults.get = wrap(self.get)
+ defaults.patch = wrap(self.patch)
+ defaults.post = wrap(self.post)
+ defaults.put = wrap(self.put)
+ defaults.head = wrap(self.head)
+ defaults.del = wrap(self.del)
+ defaults.cookie = wrap(self.cookie)
+ defaults.jar = self.jar
+ defaults.defaults = self.defaults
return defaults
}
request.forever = function (agentOptions, optionsArg) {
var options = constructObject()
- if (optionsArg) options.extend(optionsArg)
- if (agentOptions) options.agentOptions = agentOptions
+ if (optionsArg) {
+ options.extend(optionsArg)
+ }
+ if (agentOptions) {
+ options.agentOptions = agentOptions
+ }
options.extend({forever: true})
return request.defaults(options.done())
diff --git a/deps/npm/node_modules/request/lib/cookies.js b/deps/npm/node_modules/request/lib/cookies.js
index 7e61c62..017bdb4 100644
--- a/deps/npm/node_modules/request/lib/cookies.js
+++ b/deps/npm/node_modules/request/lib/cookies.js
@@ -1,31 +1,41 @@
-var optional = require('./optional')
- , tough = optional('tough-cookie')
- , Cookie = tough && tough.Cookie
- , CookieJar = tough && tough.CookieJar
- ;
+'use strict'
+
+var tough = require('tough-cookie')
+
+var Cookie = tough.Cookie
+ , CookieJar = tough.CookieJar
+
exports.parse = function(str) {
- if (str && str.uri) str = str.uri
- if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
+ if (str && str.uri) {
+ str = str.uri
+ }
+ if (typeof str !== 'string') {
+ throw new Error('The cookie function only accepts STRING as param')
+ }
if (!Cookie) {
- return null;
+ return null
}
return Cookie.parse(str)
-};
+}
// Adapt the sometimes-Async api of tough.CookieJar to our requirements
function RequestJar() {
- this._jar = new CookieJar();
+ var self = this
+ self._jar = new CookieJar()
}
RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) {
- return this._jar.setCookieSync(cookieOrStr, uri, options || {});
-};
+ var self = this
+ return self._jar.setCookieSync(cookieOrStr, uri, options || {})
+}
RequestJar.prototype.getCookieString = function(uri) {
- return this._jar.getCookieStringSync(uri);
-};
+ var self = this
+ return self._jar.getCookieStringSync(uri)
+}
RequestJar.prototype.getCookies = function(uri) {
- return this._jar.getCookiesSync(uri);
-};
+ var self = this
+ return self._jar.getCookiesSync(uri)
+}
exports.jar = function() {
if (!CookieJar) {
@@ -34,7 +44,7 @@ exports.jar = function() {
setCookie: function(){},
getCookieString: function(){},
getCookies: function(){}
- };
+ }
}
- return new RequestJar();
-};
+ return new RequestJar()
+}
diff --git a/deps/npm/node_modules/request/lib/copy.js b/deps/npm/node_modules/request/lib/copy.js
index 56831ff..ad162a5 100644
--- a/deps/npm/node_modules/request/lib/copy.js
+++ b/deps/npm/node_modules/request/lib/copy.js
@@ -1,3 +1,5 @@
+'use strict'
+
module.exports =
function copy (obj) {
var o = {}
@@ -5,4 +7,4 @@ function copy (obj) {
o[i] = obj[i]
})
return o
-}
\ No newline at end of file
+}
diff --git a/deps/npm/node_modules/request/lib/debug.js b/deps/npm/node_modules/request/lib/debug.js
index d61ec88..25e3ded 100644
--- a/deps/npm/node_modules/request/lib/debug.js
+++ b/deps/npm/node_modules/request/lib/debug.js
@@ -1,6 +1,8 @@
+'use strict'
+
var util = require('util')
, request = require('../index')
- ;
+
module.exports = function debug() {
if (request.debug) {
diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js
index eb3f3e1..fa5712f 100644
--- a/deps/npm/node_modules/request/lib/helpers.js
+++ b/deps/npm/node_modules/request/lib/helpers.js
@@ -1,4 +1,16 @@
+'use strict'
+
var extend = require('util')._extend
+ , jsonSafeStringify = require('json-stringify-safe')
+ , crypto = require('crypto')
+
+function deferMethod() {
+ if(typeof setImmediate === 'undefined') {
+ return process.nextTick
+ }
+
+ return setImmediate
+}
function constructObject(initialObject) {
initialObject = initialObject || {}
@@ -15,21 +27,25 @@ function constructObject(initialObject) {
function constructOptionsFrom(uri, options) {
var params = constructObject()
- if (typeof uri === 'object') params.extend(uri)
- if (typeof uri === 'string') params.extend({uri: uri})
- params.extend(options)
+ if (typeof options === 'object') {
+ params.extend(options).extend({uri: uri})
+ } else if (typeof uri === 'string') {
+ params.extend({uri: uri})
+ } else {
+ params.extend(uri)
+ }
return params.done()
}
+function isFunction(value) {
+ return typeof value === 'function'
+}
+
function filterForCallback(values) {
var callbacks = values.filter(isFunction)
return callbacks[0]
}
-function isFunction(value) {
- return typeof value === 'function'
-}
-
function paramsHaveRequestBody(params) {
return (
params.options.body ||
@@ -39,8 +55,35 @@ function paramsHaveRequestBody(params) {
)
}
+function safeStringify (obj) {
+ var ret
+ try {
+ ret = JSON.stringify(obj)
+ } catch (e) {
+ ret = jsonSafeStringify(obj)
+ }
+ return ret
+}
+
+function md5 (str) {
+ return crypto.createHash('md5').update(str).digest('hex')
+}
+
+function isReadStream (rs) {
+ return rs.readable && rs.path && rs.mode
+}
+
+function toBase64 (str) {
+ return (new Buffer(str || '', 'ascii')).toString('base64')
+}
+
exports.isFunction = isFunction
exports.constructObject = constructObject
exports.constructOptionsFrom = constructOptionsFrom
exports.filterForCallback = filterForCallback
exports.paramsHaveRequestBody = paramsHaveRequestBody
+exports.safeStringify = safeStringify
+exports.md5 = md5
+exports.isReadStream = isReadStream
+exports.toBase64 = toBase64
+exports.defer = deferMethod()
diff --git a/deps/npm/node_modules/request/lib/optional.js b/deps/npm/node_modules/request/lib/optional.js
deleted file mode 100644
index af0cc15..0000000
--- a/deps/npm/node_modules/request/lib/optional.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = function(moduleName) {
- try {
- return module.parent.require(moduleName);
- } catch (e) {
- // This could mean that we are in a browser context.
- // Add another try catch like it used to be, for backwards compability
- // and browserify reasons.
- try {
- return require(moduleName);
- }
- catch (e) {}
- }
-};
diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
index d04010d..9104550 100644
--- a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
+++ b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
@@ -27,7 +27,7 @@
"shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63",
"tarball": "http://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
},
- "_from": "aws-sign2@>=0.5.0-0 <0.6.0-0",
+ "_from": "aws-sign2@>=0.5.0 <0.6.0",
"_npmVersion": "1.3.2",
"_npmUser": {
"name": "mikeal",
@@ -42,5 +42,6 @@
"directories": {},
"_shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63",
"_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
- "homepage": "https://github.com/mikeal/aws-sign"
+ "homepage": "https://github.com/mikeal/aws-sign",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/.jshintrc b/deps/npm/node_modules/request/node_modules/bl/.jshintrc
new file mode 100644
index 0000000..c8ef3ca
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/bl/.jshintrc
@@ -0,0 +1,59 @@
+{
+ "predef": [ ]
+ , "bitwise": false
+ , "camelcase": false
+ , "curly": false
+ , "eqeqeq": false
+ , "forin": false
+ , "immed": false
+ , "latedef": false
+ , "noarg": true
+ , "noempty": true
+ , "nonew": true
+ , "plusplus": false
+ , "quotmark": true
+ , "regexp": false
+ , "undef": true
+ , "unused": true
+ , "strict": false
+ , "trailing": true
+ , "maxlen": 120
+ , "asi": true
+ , "boss": true
+ , "debug": true
+ , "eqnull": true
+ , "esnext": true
+ , "evil": true
+ , "expr": true
+ , "funcscope": false
+ , "globalstrict": false
+ , "iterator": false
+ , "lastsemic": true
+ , "laxbreak": true
+ , "laxcomma": true
+ , "loopfunc": true
+ , "multistr": false
+ , "onecase": false
+ , "proto": false
+ , "regexdash": false
+ , "scripturl": true
+ , "smarttabs": false
+ , "shadow": false
+ , "sub": true
+ , "supernew": false
+ , "validthis": true
+ , "browser": true
+ , "couch": false
+ , "devel": false
+ , "dojo": false
+ , "mootools": false
+ , "node": true
+ , "nonstandard": true
+ , "prototypejs": false
+ , "rhino": false
+ , "worker": true
+ , "wsh": false
+ , "nomen": false
+ , "onevar": false
+ , "passfail": false
+}
\ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/LICENSE b/deps/npm/node_modules/request/node_modules/bl/LICENSE
deleted file mode 100644
index f6a0029..0000000
--- a/deps/npm/node_modules/request/node_modules/bl/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software.
\ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/LICENSE.md b/deps/npm/node_modules/request/node_modules/bl/LICENSE.md
new file mode 100644
index 0000000..ccb2479
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/bl/LICENSE.md
@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2014 bl contributors
+----------------------------------
+
+*bl contributors listed at *
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/bl/README.md b/deps/npm/node_modules/request/node_modules/bl/README.md
index 386fbd5..1753cc4 100644
--- a/deps/npm/node_modules/request/node_modules/bl/README.md
+++ b/deps/npm/node_modules/request/node_modules/bl/README.md
@@ -1,7 +1,5 @@
# bl *(BufferList)*
-[![Build Status](https://secure.travis-ci.org/rvagg/bl.png)](http://travis-ci.org/rvagg/bl)
-
**A Node.js Buffer list collector, reader and streamer thingy.**
[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/)
@@ -169,7 +167,7 @@ console.log(bl.toString())
--------------------------------------------------------
-### bl.readDoubleBE()
, bl.readDoubleLE()
, bl.readFloatBE()
, bl.readFloatLE()
, bl.readInt32BE()
, bl.readInt32LE()
, bl.readUInt32BE()
, bl.readUInt32LE()
, bl.readInt16BE()
, bl.readInt16LE()
, bl.readUInt16BE()
, bl.readUInt16LE()
, bl.readInt8()
, bl.readUInt8()
+### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
@@ -188,9 +186,10 @@ See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
<
* [Rod Vagg](https://github.com/rvagg)
* [Matteo Collina](https://github.com/mcollina)
+ * [Jarett Cruger](https://github.com/jcrugzz)
=======
## License
-**bl** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
+**bl** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/request/node_modules/bl/package.json b/deps/npm/node_modules/request/node_modules/bl/package.json
index e94473d..a5692e0 100644
--- a/deps/npm/node_modules/request/node_modules/bl/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/package.json
@@ -1,6 +1,6 @@
{
"name": "bl",
- "version": "0.9.1",
+ "version": "0.9.3",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
"main": "bl.js",
"scripts": {
@@ -14,7 +14,8 @@
"homepage": "https://github.com/rvagg/bl",
"authors": [
"Rod Vagg (https://github.com/rvagg)",
- "Matteo Collina (https://github.com/mcollina)"
+ "Matteo Collina (https://github.com/mcollina)",
+ "Jarett Cruger (https://github.com/jcrugzz)"
],
"keywords": [
"buffer",
@@ -32,14 +33,14 @@
"faucet": "~0.0.1",
"brtapsauce": "~0.3.0"
},
- "gitHead": "53d3d10e39be326feb049ab27437173b3ce47ec4",
+ "gitHead": "4987a76bf6bafd7616e62c7023c955e62f3a9461",
"bugs": {
"url": "https://github.com/rvagg/bl/issues"
},
- "_id": "bl@0.9.1",
- "_shasum": "d262c5b83aa5cf4386cea1d998c82b36d7ae2942",
- "_from": "bl@>=0.9.0-0 <0.10.0-0",
- "_npmVersion": "1.4.21",
+ "_id": "bl@0.9.3",
+ "_shasum": "c41eff3e7cb31bde107c8f10076d274eff7f7d44",
+ "_from": "bl@>=0.9.0 <0.10.0",
+ "_npmVersion": "1.4.27",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
@@ -51,10 +52,10 @@
}
],
"dist": {
- "shasum": "d262c5b83aa5cf4386cea1d998c82b36d7ae2942",
- "tarball": "http://registry.npmjs.org/bl/-/bl-0.9.1.tgz"
+ "shasum": "c41eff3e7cb31bde107c8f10076d274eff7f7d44",
+ "tarball": "http://registry.npmjs.org/bl/-/bl-0.9.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.1.tgz",
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.3.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/caseless/package.json b/deps/npm/node_modules/request/node_modules/caseless/package.json
index e3cd409..3725c10 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/package.json
+++ b/deps/npm/node_modules/request/node_modules/caseless/package.json
@@ -30,7 +30,7 @@
"homepage": "https://github.com/mikeal/caseless",
"_id": "caseless@0.6.0",
"_shasum": "8167c1ab8397fb5bb95f96d28e5a81c50f247ac4",
- "_from": "caseless@>=0.6.0-0 <0.7.0-0",
+ "_from": "caseless@>=0.6.0 <0.7.0",
"_npmVersion": "1.4.9",
"_npmUser": {
"name": "mikeal",
diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/package.json b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
index 65a6c55..1bb4441 100644
--- a/deps/npm/node_modules/request/node_modules/forever-agent/package.json
+++ b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
@@ -26,7 +26,7 @@
"shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130",
"tarball": "http://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
},
- "_from": "forever-agent@>=0.5.0-0 <0.6.0-0",
+ "_from": "forever-agent@>=0.5.0 <0.6.0",
"_npmVersion": "1.3.21",
"_npmUser": {
"name": "mikeal",
@@ -41,5 +41,6 @@
"directories": {},
"_shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130",
"_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
- "readme": "ERROR: No README data found!"
+ "readme": "ERROR: No README data found!",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
index 3b92153..e8f9ed8 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
@@ -41,7 +41,7 @@
"shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7",
"tarball": "http://registry.npmjs.org/async/-/async-0.9.0.tgz"
},
- "_from": "async@>=0.9.0-0 <0.10.0-0",
+ "_from": "async@>=0.9.0 <0.10.0",
"_npmVersion": "1.4.3",
"_npmUser": {
"name": "caolan",
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
index cbafd00..3324a13 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
@@ -33,8 +33,8 @@
"scripts": {},
"directories": {},
"_shasum": "d4b1f43a93e8296dfe02694f4680bc37a313c73f",
- "_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",
"bugs": {
"url": "https://github.com/felixge/node-delayed-stream/issues"
},
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
index fd82201..080953f 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
@@ -31,7 +31,7 @@
},
"_id": "combined-stream@0.0.5",
"_shasum": "29ed76e5c9aad07c4acf9ca3d32601cce28697a2",
- "_from": "combined-stream@>=0.0.4-0 <0.1.0-0",
+ "_from": "combined-stream@>=0.0.4 <0.1.0",
"_npmVersion": "1.4.14",
"_npmUser": {
"name": "alexindigo",
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json
index 8f4c392..b666b72 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json
@@ -35,7 +35,7 @@
"shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10",
"tarball": "http://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
},
- "_from": "mime@>=1.2.11-0 <1.3.0-0",
+ "_from": "mime@>=1.2.11 <1.3.0",
"_npmVersion": "1.3.6",
"_npmUser": {
"name": "broofa",
@@ -54,5 +54,6 @@
"directories": {},
"_shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10",
"_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
- "homepage": "https://github.com/broofa/node-mime"
+ "homepage": "https://github.com/broofa/node-mime",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json
index 04d7ec6..7700d99 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/package.json
@@ -42,7 +42,7 @@
"homepage": "https://github.com/felixge/node-form-data",
"_id": "form-data@0.1.4",
"_shasum": "91abd788aba9702b1aabfa8bc01031a2ac9e3b12",
- "_from": "form-data@>=0.1.0-0 <0.2.0-0",
+ "_from": "form-data@>=0.1.0 <0.2.0",
"_npmVersion": "1.4.14",
"_npmUser": {
"name": "alexindigo",
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
index c95faa9..c7875b4 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json
@@ -41,7 +41,7 @@
"shasum": "7a636e9ded4efcefb19cef4947a3c67dfaee911b",
"tarball": "http://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
},
- "_from": "boom@>=0.4.0-0 <0.5.0-0",
+ "_from": "boom@>=0.4.0 <0.5.0",
"_npmVersion": "1.2.18",
"_npmUser": {
"name": "hueniverse",
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
index 3ed098b..1248613 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
@@ -45,7 +45,7 @@
"shasum": "ed91ff1f17ad13d3748288594f8a48a0d26f325c",
"tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
},
- "_from": "cryptiles@>=0.2.0-0 <0.3.0-0",
+ "_from": "cryptiles@>=0.2.0 <0.3.0",
"_npmVersion": "1.2.24",
"_npmUser": {
"name": "hueniverse",
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
index bbc7031..789de2a 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
@@ -43,7 +43,7 @@
"shasum": "3d322462badf07716ea7eb85baf88079cddce505",
"tarball": "http://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
},
- "_from": "hoek@>=0.9.0-0 <0.10.0-0",
+ "_from": "hoek@>=0.9.0 <0.10.0",
"_npmVersion": "1.2.18",
"_npmUser": {
"name": "hueniverse",
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
index ff73fbc..0656c84 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
@@ -42,7 +42,7 @@
"shasum": "fb885f18b0f3aad189f824862536bceeec750900",
"tarball": "http://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
},
- "_from": "sntp@>=0.2.0-0 <0.3.0-0",
+ "_from": "sntp@>=0.2.0 <0.3.0",
"_npmVersion": "1.2.18",
"_npmUser": {
"name": "hueniverse",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
index ad8294e..8c68193 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
@@ -53,8 +53,8 @@
],
"directories": {},
"_shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
- "_from": "asn1@0.1.11",
"_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
+ "_from": "asn1@0.1.11",
"bugs": {
"url": "https://github.com/mcavage/node-asn1/issues"
},
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
index d55a6bd..d06cbfd 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
@@ -13,7 +13,6 @@
"engines": {
"node": ">=0.6"
},
- "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. (/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 .\n",
"_id": "assert-plus@0.1.2",
"dist": {
"shasum": "d93ffdbb67ac5507779be316a7d65146417beef8",
@@ -32,6 +31,8 @@
],
"directories": {},
"_shasum": "d93ffdbb67ac5507779be316a7d65146417beef8",
+ "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz",
"_from": "assert-plus@0.1.2",
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
+ "readme": "ERROR: No README data found!",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
index 474e54d..5840d05 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
@@ -29,7 +29,8 @@
],
"directories": {},
"_shasum": "fe8091d468a373a0b0c9ff8bbfb3425c00973a1d",
- "_from": "ctype@0.5.2",
"_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_from": "ctype@0.5.2",
+ "readme": "ERROR: No README data found!",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json
index 270f989..c6bfef9 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json
@@ -32,7 +32,7 @@
"shasum": "1494e4f5000a83c0f11bcc12d6007c530cb99582",
"tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz"
},
- "_from": "http-signature@>=0.10.0-0 <0.11.0-0",
+ "_from": "http-signature@>=0.10.0 <0.11.0",
"_npmVersion": "1.2.18",
"_npmUser": {
"name": "mcavage",
diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json b/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
index 2e415ac..90549cb 100644
--- a/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
+++ b/deps/npm/node_modules/request/node_modules/json-stringify-safe/package.json
@@ -22,8 +22,6 @@
"url": "http://blog.izs.me"
},
"license": "BSD",
- "readmeFilename": "README.md",
- "readme": "# json-stringify-safe\n\nLike JSON.stringify, but doesn't throw on circular references.\n\n## Usage\n\nTakes the same arguments as `JSON.stringify`.\n\n```javascript\nvar stringify = require('json-stringify-safe');\nvar circularObj = {};\ncircularObj.circularRef = circularObj;\ncircularObj.list = [ circularObj, circularObj ];\nconsole.log(stringify(circularObj, null, 2));\n```\n\nOutput:\n\n```json\n{\n \"circularRef\": \"[Circular]\",\n \"list\": [\n \"[Circular]\",\n \"[Circular]\"\n ]\n}\n```\n\n## Details\n\n```\nstringify(obj, serializer, indent, decycler)\n```\n\nThe first three arguments are the same as to JSON.stringify. The last\nis an argument that's only used when the object has been seen already.\n\nThe default `decycler` function returns the string `'[Circular]'`.\nIf, for example, you pass in `function(k,v){}` (return nothing) then it\nwill prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,\nthen cyclical objects will always be represented as `{\"foo\":\"bar\"}` in\nthe result.\n\n```\nstringify.getSerialize(serializer, decycler)\n```\n\nReturns a serializer that can be used elsewhere. This is the actual\nfunction that's passed to JSON.stringify.\n",
"bugs": {
"url": "https://github.com/isaacs/json-stringify-safe/issues"
},
@@ -32,7 +30,7 @@
"shasum": "4c1f228b5050837eba9d21f50c2e6e320624566e",
"tarball": "http://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
},
- "_from": "json-stringify-safe@>=5.0.0-0 <5.1.0-0",
+ "_from": "json-stringify-safe@>=5.0.0 <5.1.0",
"_npmVersion": "1.3.6",
"_npmUser": {
"name": "isaacs",
@@ -47,5 +45,6 @@
"directories": {},
"_shasum": "4c1f228b5050837eba9d21f50c2e6e320624566e",
"_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz",
+ "readme": "ERROR: No README data found!",
"homepage": "https://github.com/isaacs/json-stringify-safe"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/mime-types/package.json
index 9d59fb8..6743202 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/package.json
@@ -39,7 +39,7 @@
"homepage": "https://github.com/expressjs/mime-types",
"_id": "mime-types@1.0.2",
"_shasum": "995ae1392ab8affcbfcb2641dd054e943c0d5dce",
- "_from": "mime-types@>=1.0.1-0 <1.1.0-0",
+ "_from": "mime-types@>=1.0.1 <1.1.0",
"_npmVersion": "1.4.21",
"_npmUser": {
"name": "dougwilson",
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/package.json b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
index 491d93a..bead110 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/package.json
+++ b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
@@ -34,7 +34,7 @@
"shasum": "39aef510e5889a3dca9c895b506c73aae1bac048",
"tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
},
- "_from": "node-uuid@>=1.4.0-0 <1.5.0-0",
+ "_from": "node-uuid@>=1.4.0 <1.5.0",
"_npmVersion": "1.3.6",
"_npmUser": {
"name": "broofa",
@@ -49,5 +49,6 @@
"directories": {},
"_shasum": "39aef510e5889a3dca9c895b506c73aae1bac048",
"_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz",
- "homepage": "https://github.com/broofa/node-uuid"
+ "homepage": "https://github.com/broofa/node-uuid",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
index 16a7645..d8765b6 100644
--- a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
+++ b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json
@@ -30,7 +30,7 @@
"shasum": "f22956f31ea7151a821e5f2fb32c113cad8b9f69",
"tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.4.0.tgz"
},
- "_from": "oauth-sign@>=0.4.0-0 <0.5.0-0",
+ "_from": "oauth-sign@>=0.4.0 <0.5.0",
"_npmVersion": "1.3.2",
"_npmUser": {
"name": "mikeal",
diff --git a/deps/npm/node_modules/request/node_modules/qs/.jshintrc b/deps/npm/node_modules/request/node_modules/qs/.jshintrc
new file mode 100644
index 0000000..997b3f7
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/qs/.jshintrc
@@ -0,0 +1,10 @@
+{
+ "node": true,
+
+ "curly": true,
+ "latedef": true,
+ "quotmark": true,
+ "undef": true,
+ "unused": true,
+ "trailing": true
+}
diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json
index 51be52c..d653872 100755
--- a/deps/npm/node_modules/request/node_modules/qs/package.json
+++ b/deps/npm/node_modules/request/node_modules/qs/package.json
@@ -35,7 +35,7 @@
},
"_id": "qs@1.2.2",
"_shasum": "19b57ff24dc2a99ce1f8bdf6afcda59f8ef61f88",
- "_from": "qs@>=1.2.0-0 <1.3.0-0",
+ "_from": "qs@>=1.2.0 <1.3.0",
"_npmVersion": "1.4.21",
"_npmUser": {
"name": "hueniverse",
diff --git a/deps/npm/node_modules/request/node_modules/stringstream/package.json b/deps/npm/node_modules/request/node_modules/stringstream/package.json
index 980932c..b71cf28 100644
--- a/deps/npm/node_modules/request/node_modules/stringstream/package.json
+++ b/deps/npm/node_modules/request/node_modules/stringstream/package.json
@@ -39,10 +39,11 @@
],
"directories": {},
"_shasum": "0f0e3423f942960b5692ac324a57dd093bc41a92",
- "_from": "stringstream@>=0.0.4-0 <0.1.0-0",
"_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz",
+ "_from": "stringstream@>=0.0.4 <0.1.0",
"bugs": {
"url": "https://github.com/mhart/StringStream/issues"
},
- "homepage": "https://github.com/mhart/StringStream"
+ "homepage": "https://github.com/mhart/StringStream",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
index 97067e5..a41e0a7 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
@@ -1,4 +1,4 @@
-Copyright Mathias Bynens
+Copyright Mathias Bynens
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
index 577f2c7..831e637 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
@@ -124,7 +124,7 @@ punycode.toASCII('джÑмла@джpÑмлаÑеÑÑ.bÑÑa');
#### `punycode.ucs2.decode(string)`
-Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](http://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
+Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
```js
punycode.ucs2.decode('abc');
@@ -163,7 +163,7 @@ Feel free to fork if you see possible improvements!
| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
-| [Mathias Bynens](http://mathiasbynens.be/) |
+| [Mathias Bynens](https://mathiasbynens.be/) |
## Contributors
@@ -173,4 +173,4 @@ Feel free to fork if you see possible improvements!
## License
-Punycode.js is available under the [MIT](http://mths.be/mit) license.
+Punycode.js is available under the [MIT](https://mths.be/mit) license.
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
index ab13fc8..4f62713 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
@@ -1,8 +1,8 @@
{
"name": "punycode",
- "version": "1.3.1",
+ "version": "1.3.2",
"description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.",
- "homepage": "http://mths.be/punycode",
+ "homepage": "https://mths.be/punycode",
"main": "punycode.js",
"keywords": [
"punycode",
@@ -13,20 +13,15 @@
"url",
"domain"
],
- "licenses": [
- {
- "type": "MIT",
- "url": "http://mths.be/mit"
- }
- ],
+ "license": "MIT",
"author": {
"name": "Mathias Bynens",
- "url": "http://mathiasbynens.be/"
+ "url": "https://mathiasbynens.be/"
},
"contributors": [
{
"name": "Mathias Bynens",
- "url": "http://mathiasbynens.be/"
+ "url": "https://mathiasbynens.be/"
},
{
"name": "John-David Dalton",
@@ -44,9 +39,6 @@
"LICENSE-MIT.txt",
"punycode.js"
],
- "directories": {
- "test": "tests"
- },
"scripts": {
"test": "node tests/tests.js"
},
@@ -60,10 +52,11 @@
"qunitjs": "~1.11.0",
"requirejs": "^2.1.14"
},
- "_id": "punycode@1.3.1",
- "_shasum": "710afe5123c20a1530b712e3e682b9118fe8058e",
+ "gitHead": "38c8d3131a82567bfef18da09f7f4db68c84f8a3",
+ "_id": "punycode@1.3.2",
+ "_shasum": "9653a036fb7c1ee42342f2325cceefea3926c48d",
"_from": "punycode@>=0.2.0",
- "_npmVersion": "1.4.9",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "mathias",
"email": "mathias@qiwi.be"
@@ -79,9 +72,10 @@
}
],
"dist": {
- "shasum": "710afe5123c20a1530b712e3e682b9118fe8058e",
- "tarball": "http://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz"
+ "shasum": "9653a036fb7c1ee42342f2325cceefea3926c48d",
+ "tarball": "http://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz"
},
- "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz",
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
index 6ab1df3..ac68597 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
@@ -1,4 +1,4 @@
-/*! http://mths.be/punycode v1.3.1 by @mathias */
+/*! https://mths.be/punycode v1.3.2 by @mathias */
;(function(root) {
/** Detect free variables */
@@ -103,7 +103,9 @@
result = parts[0] + '@';
string = parts[1];
}
- var labels = string.split(regexSeparators);
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
var encoded = map(labels, fn).join('.');
return result + encoded;
}
@@ -115,7 +117,7 @@
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
- * @see
+ * @see
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
@@ -484,11 +486,11 @@
* @memberOf punycode
* @type String
*/
- 'version': '1.3.1',
+ 'version': '1.3.2',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
- * @see
+ * @see
* @memberOf punycode
* @type Object
*/
diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc
new file mode 100644
index 0000000..4c1c8d4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc
@@ -0,0 +1,5 @@
+{
+ "node": true,
+ "asi": true,
+ "laxcomma": true
+}
diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
index 12e2407..5b1ebba 100644
--- a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
+++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json
@@ -26,7 +26,7 @@
"shasum": "b1184e312ffbcf70b3b4c78e8c219de7ebb1c550",
"tarball": "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
},
- "_from": "tunnel-agent@>=0.4.0-0 <0.5.0-0",
+ "_from": "tunnel-agent@>=0.4.0 <0.5.0",
"_npmVersion": "1.3.21",
"_npmUser": {
"name": "mikeal",
@@ -41,5 +41,6 @@
"directories": {},
"_shasum": "b1184e312ffbcf70b3b4c78e8c219de7ebb1c550",
"_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz",
- "readme": "ERROR: No README data found!"
+ "readme": "ERROR: No README data found!",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index d2db65f..d68d512 100755
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -7,7 +7,7 @@
"util",
"utility"
],
- "version": "2.42.0",
+ "version": "2.46.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -20,30 +20,21 @@
"url": "http://github.com/mikeal/request/issues"
},
"license": "Apache-2.0",
- "engines": [
- "node >= 0.8.0"
- ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
"main": "index.js",
"dependencies": {
"bl": "~0.9.0",
"caseless": "~0.6.0",
"forever-agent": "~0.5.0",
- "qs": "~1.2.0",
+ "form-data": "~0.1.0",
"json-stringify-safe": "~5.0.0",
"mime-types": "~1.0.1",
"node-uuid": "~1.4.0",
+ "qs": "~1.2.0",
"tunnel-agent": "~0.4.0",
"tough-cookie": ">=0.12.0",
- "form-data": "~0.1.0",
- "http-signature": "~0.10.0",
- "oauth-sign": "~0.4.0",
- "hawk": "1.1.1",
- "aws-sign2": "~0.5.0",
- "stringstream": "~0.0.4"
- },
- "optionalDependencies": {
- "tough-cookie": ">=0.12.0",
- "form-data": "~0.1.0",
"http-signature": "~0.10.0",
"oauth-sign": "~0.4.0",
"hawk": "1.1.1",
@@ -51,31 +42,40 @@
"stringstream": "~0.0.4"
},
"scripts": {
- "test": "node tests/run.js"
+ "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js",
+ "lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed."
},
"devDependencies": {
- "rimraf": "~2.2.8"
+ "eslint": "0.5.1",
+ "rimraf": "~2.2.8",
+ "tape": "~3.0.0",
+ "taper": "~0.3.0"
},
+ "gitHead": "7cdd75ec184868bba3be88a780bfb6e10fe33be4",
"homepage": "https://github.com/mikeal/request",
- "_id": "request@2.42.0",
- "_shasum": "572bd0148938564040ac7ab148b96423a063304a",
- "_from": "request@>=2.42.0-0 <3.0.0-0",
- "_npmVersion": "1.4.9",
+ "_id": "request@2.46.0",
+ "_shasum": "359195d52eaf720bc69742579d04ad6d265a8274",
+ "_from": "request@>=2.46.0 <2.47.0",
+ "_npmVersion": "1.4.14",
"_npmUser": {
- "name": "mikeal",
- "email": "mikeal.rogers@gmail.com"
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
},
"maintainers": [
{
"name": "mikeal",
"email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
}
],
"dist": {
- "shasum": "572bd0148938564040ac7ab148b96423a063304a",
- "tarball": "http://registry.npmjs.org/request/-/request-2.42.0.tgz"
+ "shasum": "359195d52eaf720bc69742579d04ad6d265a8274",
+ "tarball": "http://registry.npmjs.org/request/-/request-2.46.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/request/-/request-2.42.0.tgz",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.46.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/release.sh b/deps/npm/node_modules/request/release.sh
new file mode 100755
index 0000000..05e7767
--- /dev/null
+++ b/deps/npm/node_modules/request/release.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+npm version minor && npm publish && npm version patch && git push --tags && git push origin master
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index e528dd5..466d916 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -1,47 +1,41 @@
-var optional = require('./lib/optional')
- , http = require('http')
- , https = optional('https')
- , tls = optional('tls')
+'use strict'
+
+var http = require('http')
+ , https = require('https')
, url = require('url')
, util = require('util')
, stream = require('stream')
, qs = require('qs')
, querystring = require('querystring')
- , crypto = require('crypto')
, zlib = require('zlib')
-
+ , helpers = require('./lib/helpers')
, bl = require('bl')
- , oauth = optional('oauth-sign')
- , hawk = optional('hawk')
- , aws = optional('aws-sign2')
- , httpSignature = optional('http-signature')
+ , oauth = require('oauth-sign')
+ , hawk = require('hawk')
+ , aws = require('aws-sign2')
+ , httpSignature = require('http-signature')
, uuid = require('node-uuid')
, mime = require('mime-types')
, tunnel = require('tunnel-agent')
- , _safeStringify = require('json-stringify-safe')
- , stringstream = optional('stringstream')
+ , stringstream = require('stringstream')
, caseless = require('caseless')
-
, ForeverAgent = require('forever-agent')
- , FormData = optional('form-data')
-
+ , FormData = require('form-data')
, cookies = require('./lib/cookies')
- , globalCookieJar = cookies.jar()
-
, copy = require('./lib/copy')
, debug = require('./lib/debug')
, net = require('net')
- ;
-function safeStringify (obj) {
- var ret
- try { ret = JSON.stringify(obj) }
- catch (e) { ret = _safeStringify(obj) }
- return ret
-}
+var safeStringify = helpers.safeStringify
+ , md5 = helpers.md5
+ , isReadStream = helpers.isReadStream
+ , toBase64 = helpers.toBase64
+ , defer = helpers.defer
+ , globalCookieJar = cookies.jar()
+
var globalPool = {}
-var isUrl = /^https?:|^unix:/
+ , isUrl = /^https?:/
var defaultProxyHeaderWhiteList = [
'accept',
@@ -70,148 +64,272 @@ var defaultProxyHeaderWhiteList = [
'via'
]
-function isReadStream (rs) {
- return rs.readable && rs.path && rs.mode;
+function filterForNonReserved(reserved, options) {
+ // Filter out properties that are not reserved.
+ // Reserved values are passed in at call site.
+
+ var object = {}
+ for (var i in options) {
+ var notReserved = (reserved.indexOf(i) === -1)
+ if (notReserved) {
+ object[i] = options[i]
+ }
+ }
+ return object
+}
+
+function filterOutReservedFunctions(reserved, options) {
+ // Filter out properties that are functions and are reserved.
+ // Reserved values are passed in at call site.
+
+ var object = {}
+ for (var i in options) {
+ var isReserved = !(reserved.indexOf(i) === -1)
+ var isFunction = (typeof options[i] === 'function')
+ if (!(isReserved && isFunction)) {
+ object[i] = options[i]
+ }
+ }
+ return object
+
+}
+
+function constructProxyHost(uriObject) {
+ var port = uriObject.portA
+ , protocol = uriObject.protocol
+ , proxyHost = uriObject.hostname + ':'
+
+ if (port) {
+ proxyHost += port
+ } else if (protocol === 'https:') {
+ proxyHost += '443'
+ } else {
+ proxyHost += '80'
+ }
+
+ return proxyHost
+}
+
+function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) {
+ return Object.keys(headers)
+ .filter(function (header) {
+ return proxyHeaderWhiteList.indexOf(header.toLowerCase()) !== -1
+ })
+ .reduce(function (set, header) {
+ set[header] = headers[header]
+ return set
+ }, {})
+}
+
+function construcTunnelOptions(request) {
+ var proxy = request.proxy
+ var proxyHeaders = request.proxyHeaders
+ var proxyAuth
+
+ if (proxy.auth) {
+ proxyAuth = proxy.auth
+ }
+
+ if (!proxy.auth && request.proxyAuthorization) {
+ proxyHeaders['Proxy-Authorization'] = request.proxyAuthorization
+ }
+
+ var tunnelOptions = {
+ proxy: {
+ host: proxy.hostname,
+ port: +proxy.port,
+ proxyAuth: proxyAuth,
+ headers: proxyHeaders
+ },
+ rejectUnauthorized: request.rejectUnauthorized,
+ headers: request.headers,
+ ca: request.ca,
+ cert: request.cert,
+ key: request.key
+ }
+
+ return tunnelOptions
}
-function toBase64 (str) {
- return (new Buffer(str || "", "ascii")).toString("base64")
+function constructTunnelFnName(uri, proxy) {
+ var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
+ var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
+ return [uriProtocol, proxyProtocol].join('Over')
}
-function md5 (str) {
- return crypto.createHash('md5').update(str).digest('hex')
+function getTunnelFn(request) {
+ var uri = request.uri
+ var proxy = request.proxy
+ var tunnelFnName = constructTunnelFnName(uri, proxy)
+ return tunnel[tunnelFnName]
+}
+
+// Decide the proper request proxy to use based on the request URI object and the
+// environmental variables (NO_PROXY, HTTP_PROXY, etc.)
+function getProxyFromURI(uri) {
+ // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
+ var noProxy = process.env.NO_PROXY || process.env.no_proxy || null
+
+ // easy case first - if NO_PROXY is '*'
+ if (noProxy === '*') {
+ return null
+ }
+
+ // otherwise, parse the noProxy value to see if it applies to the URL
+ if (noProxy !== null) {
+ var noProxyItem, hostname, port, noProxyItemParts, noProxyHost, noProxyPort, noProxyList
+
+ // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
+ hostname = uri.hostname.replace(/^\.*/, '.').toLowerCase()
+ noProxyList = noProxy.split(',')
+
+ for (var i = 0, len = noProxyList.length; i < len; i++) {
+ noProxyItem = noProxyList[i].trim().toLowerCase()
+
+ // no_proxy can be granular at the port level, which complicates things a bit.
+ if (noProxyItem.indexOf(':') > -1) {
+ noProxyItemParts = noProxyItem.split(':', 2)
+ noProxyHost = noProxyItemParts[0].replace(/^\.*/, '.')
+ noProxyPort = noProxyItemParts[1]
+ port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
+
+ // we've found a match - ports are same and host ends with no_proxy entry.
+ if (port === noProxyPort && hostname.indexOf(noProxyHost) === hostname.length - noProxyHost.length) {
+ return null
+ }
+ } else {
+ noProxyItem = noProxyItem.replace(/^\.*/, '.')
+ if (hostname.indexOf(noProxyItem) === hostname.length - noProxyItem.length) {
+ return null
+ }
+ }
+ }
+ }
+
+ // check for HTTP(S)_PROXY environment variables
+ if (uri.protocol === 'http:') {
+ return process.env.HTTP_PROXY || process.env.http_proxy || null
+ } else if (uri.protocol === 'https:') {
+ return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null
+ }
+
+ // return null if all else fails (What uri protocol are you using then?)
+ return null
+}
+
+// Function for properly handling a connection error
+function connectionErrorHandler(error) {
+ var socket = this
+ if (socket.res) {
+ if (socket.res.request) {
+ socket.res.request.emit('error', error)
+ } else {
+ socket.res.emit('error', error)
+ }
+ } else {
+ socket._httpMessage.emit('error', error)
+ }
}
// Return a simpler request object to allow serialization
function requestToJSON() {
+ var self = this
return {
- uri: this.uri,
- method: this.method,
- headers: this.headers
+ uri: self.uri,
+ method: self.method,
+ headers: self.headers
}
}
// Return a simpler response object to allow serialization
function responseToJSON() {
+ var self = this
return {
- statusCode: this.statusCode,
- body: this.body,
- headers: this.headers,
- request: requestToJSON.call(this.request)
+ statusCode: self.statusCode,
+ body: self.body,
+ headers: self.headers,
+ request: requestToJSON.call(self.request)
}
}
function Request (options) {
- stream.Stream.call(this)
- this.readable = true
- this.writable = true
+ // if tunnel property of options was not given default to false
+ // if given the method property in options, set property explicitMethod to true
- if (typeof options === 'string') {
- options = {uri:options}
- }
+ // extend the Request instance with any non-reserved properties
+ // remove any reserved functions from the options object
+ // set Request instance to be readable and writable
+ // call init
+ var self = this
+ stream.Stream.call(self)
var reserved = Object.keys(Request.prototype)
- for (var i in options) {
- if (reserved.indexOf(i) === -1) {
- this[i] = options[i]
- } else {
- if (typeof options[i] === 'function') {
- delete options[i]
- }
- }
- }
+ var nonReserved = filterForNonReserved(reserved, options)
+ stream.Stream.call(self)
+ util._extend(self, nonReserved)
+ options = filterOutReservedFunctions(reserved, options)
+
+ self.readable = true
+ self.writable = true
+ if (typeof options.tunnel === 'undefined') {
+ options.tunnel = false
+ }
if (options.method) {
- this.explicitMethod = true
+ self.explicitMethod = true
}
-
- // Assume that we're not going to tunnel unless we need to
- if (typeof options.tunnel === 'undefined') options.tunnel = false
-
- this.init(options)
+ self.canTunnel = options.tunnel !== false && tunnel
+ self.init(options)
}
-util.inherits(Request, stream.Stream)
+util.inherits(Request, stream.Stream)
-// Set up the tunneling agent if necessary
Request.prototype.setupTunnel = function () {
- var self = this
- if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
+ // Set up the tunneling agent if necessary
+ // Only send the proxy whitelisted header names.
+ // Turn on tunneling for the rest of request.
- if (!self.proxy) return false
+ var self = this
- // Don't need to use a tunneling proxy
- if (!self.tunnel && self.uri.protocol !== 'https:')
- return
+ if (typeof self.proxy === 'string') {
+ self.proxy = url.parse(self.proxy)
+ }
- // do the HTTP CONNECT dance using koichik/node-tunnel
+ if (!self.proxy) {
+ return false
+ }
- // The host to tell the proxy to CONNECT to
- var proxyHost = self.uri.hostname + ':'
- if (self.uri.port)
- proxyHost += self.uri.port
- else if (self.uri.protocol === 'https:')
- proxyHost += '443'
- else
- proxyHost += '80'
+ if (!self.tunnel && self.uri.protocol !== 'https:') {
+ return false
+ }
- if (!self.proxyHeaderWhiteList)
+ if (!self.proxyHeaderWhiteList) {
self.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
+ }
- // Only send the proxy the whitelisted header names.
- var proxyHeaders = Object.keys(self.headers).filter(function (h) {
- return self.proxyHeaderWhiteList.indexOf(h.toLowerCase()) !== -1
- }).reduce(function (set, h) {
- set[h] = self.headers[h]
- return set
- }, {})
-
- proxyHeaders.host = proxyHost
-
- var tunnelFnName =
- (self.uri.protocol === 'https:' ? 'https' : 'http') +
- 'Over' +
- (self.proxy.protocol === 'https:' ? 'Https' : 'Http')
+ var proxyHost = constructProxyHost(self.uri)
+ self.proxyHeaders = constructProxyHeaderWhiteList(self.headers, self.proxyHeaderWhiteList)
+ self.proxyHeaders.host = proxyHost
- var tunnelFn = tunnel[tunnelFnName]
-
- var proxyAuth
- if (self.proxy.auth)
- proxyAuth = self.proxy.auth
- else if (self.proxyAuthorization)
- proxyHeaders['Proxy-Authorization'] = self.proxyAuthorization
-
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: proxyAuth
- , headers: proxyHeaders }
- , rejectUnauthorized: self.rejectUnauthorized
- , headers: self.headers
- , ca: self.ca
- , cert: self.cert
- , key: self.key}
+ var tunnelFn = getTunnelFn(self)
+ var tunnelOptions = construcTunnelOptions(self)
self.agent = tunnelFn(tunnelOptions)
-
- // At this point, we know that the proxy will support tunneling
- // (or fail miserably), so we're going to tunnel all proxied requests
- // from here on out.
self.tunnel = true
-
return true
}
-
-
-
Request.prototype.init = function (options) {
// init() contains all the code to setup the request object.
// the actual outgoing request is not started until start() is called
// this function is called from both the constructor and on redirect.
var self = this
- if (!options) options = {}
+ if (!options) {
+ options = {}
+ }
+ self.headers = self.headers ? copy(self.headers) : {}
- caseless.httpify(self, self.headers || {})
+ caseless.httpify(self, self.headers)
// Never send proxy-auth to the endpoint!
if (self.hasHeader('proxy-authorization')) {
@@ -219,11 +337,19 @@ Request.prototype.init = function (options) {
self.removeHeader('proxy-authorization')
}
- if (!self.method) self.method = options.method || 'GET'
+ if (!self.method) {
+ self.method = options.method || 'GET'
+ }
self.localAddress = options.localAddress
+ if (!self.qsLib) {
+ self.qsLib = (options.useQuerystring ? querystring : qs)
+ }
+
debug(options)
- if (!self.pool && self.pool !== false) self.pool = globalPool
+ if (!self.pool && self.pool !== false) {
+ self.pool = globalPool
+ }
self.dests = self.dests || []
self.__isRequestRequest = true
@@ -231,7 +357,9 @@ Request.prototype.init = function (options) {
if (!self._callback && self.callback) {
self._callback = self.callback
self.callback = function () {
- if (self._callbackCalled) return // Print a warning maybe?
+ if (self._callbackCalled) {
+ return // Print a warning maybe?
+ }
self._callbackCalled = true
self._callback.apply(self, arguments)
}
@@ -239,17 +367,40 @@ Request.prototype.init = function (options) {
self.on('complete', self.callback.bind(self, null))
}
- if (self.url && !self.uri) {
- // People use this property instead all the time so why not just support it.
+ // People use this property instead all the time, so support it
+ if (!self.uri && self.url) {
self.uri = self.url
delete self.url
}
+ // A URI is needed by this point, throw if we haven't been able to get one
if (!self.uri) {
- // this will throw if unhandled but is handleable when in a redirect
- return self.emit('error', new Error("options.uri is a required argument"))
- } else {
- if (typeof self.uri == "string") self.uri = url.parse(self.uri)
+ return self.emit('error', new Error('options.uri is a required argument'))
+ }
+
+ // If a string URI/URL was given, parse it into a URL object
+ if(typeof self.uri === 'string') {
+ self.uri = url.parse(self.uri)
+ }
+
+ // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme
+ if (self.uri.protocol === 'unix:') {
+ return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`'))
+ }
+
+ // Support Unix Sockets
+ if(self.uri.host === 'unix') {
+ // Get the socket & request paths from the URL
+ var unixParts = self.uri.path.split(':')
+ , host = unixParts[0]
+ , path = unixParts[1]
+ // Apply unix properties to request
+ self.socketPath = host
+ self.uri.pathname = path
+ self.uri.path = path
+ self.uri.host = host
+ self.uri.hostname = host
+ self.uri.isUnix = true
}
if (self.strictSSL === false) {
@@ -257,13 +408,7 @@ Request.prototype.init = function (options) {
}
if(!self.hasOwnProperty('proxy')) {
- // check for HTTP(S)_PROXY environment variables
- if(self.uri.protocol == "http:") {
- self.proxy = process.env.HTTP_PROXY || process.env.http_proxy || null;
- } else if(self.uri.protocol == "https:") {
- self.proxy = process.env.HTTPS_PROXY || process.env.https_proxy ||
- process.env.HTTP_PROXY || process.env.http_proxy || null;
- }
+ self.proxy = getProxyFromURI(self.uri)
}
// Pass in `tunnel:true` to *always* tunnel through proxies
@@ -274,8 +419,8 @@ Request.prototype.init = function (options) {
if (!self.uri.pathname) {self.uri.pathname = '/'}
- if (!self.uri.host && !self.protocol=='unix:') {
- // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar
+ if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) {
+ // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar
// Detect and reject it as soon as possible
var faultyUri = url.format(self.uri)
var message = 'Invalid URI "' + faultyUri + '"'
@@ -285,27 +430,29 @@ Request.prototype.init = function (options) {
// they should be warned that it can be caused by a redirection (can save some hair)
message += '. This can be caused by a crappy redirection.'
}
- self.emit('error', new Error(message))
- return // This error was fatal
+ // This error was fatal
+ return self.emit('error', new Error(message))
}
self._redirectsFollowed = self._redirectsFollowed || 0
self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
self.allowRedirect = (typeof self.followRedirect === 'function') ? self.followRedirect : function(response) {
- return true;
- };
- self.followRedirect = (self.followRedirect !== undefined) ? !!self.followRedirect : true
+ return true
+ }
+ self.followRedirects = (self.followRedirect !== undefined) ? !!self.followRedirect : true
self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false
- if (self.followRedirect || self.followAllRedirects)
+ if (self.followRedirects || self.followAllRedirects) {
self.redirects = self.redirects || []
+ }
self.setHost = false
if (!self.hasHeader('host')) {
self.setHeader('host', self.uri.hostname)
if (self.uri.port) {
if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
- !(self.uri.port === 443 && self.uri.protocol === 'https:') )
- self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) )
+ !(self.uri.port === 443 && self.uri.protocol === 'https:') ) {
+ self.setHeader('host', self.getHeader('host') + (':' + self.uri.port) )
+ }
}
self.setHost = true
}
@@ -313,8 +460,8 @@ Request.prototype.init = function (options) {
self.jar(self._jar || options.jar)
if (!self.uri.port) {
- if (self.uri.protocol == 'http:') {self.uri.port = 80}
- else if (self.uri.protocol == 'https:') {self.uri.port = 443}
+ if (self.uri.protocol === 'http:') {self.uri.port = 80}
+ else if (self.uri.protocol === 'https:') {self.uri.port = 443}
}
if (self.proxy && !self.tunnel) {
@@ -325,317 +472,253 @@ Request.prototype.init = function (options) {
self.host = self.uri.hostname
}
- self.clientErrorHandler = function (error) {
- if (self._aborted) return
- if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
- && self.agent.addRequestNoreuse) {
- self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
- self.start()
- self.req.end()
- return
- }
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
- self.emit('error', error)
+ if (options.form) {
+ self.form(options.form)
}
- self._parserErrorHandler = function (error) {
- if (this.res) {
- if (this.res.request) {
- this.res.request.emit('error', error)
+ if (options.formData) {
+ var formData = options.formData
+ var requestForm = self.form()
+ var appendFormValue = function (key, value) {
+ if (value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
+ requestForm.append(key, value.value, value.options)
} else {
- this.res.emit('error', error)
+ requestForm.append(key, value)
+ }
+ }
+ for (var formKey in formData) {
+ if (formData.hasOwnProperty(formKey)) {
+ var formValue = formData[formKey]
+ if (formValue instanceof Array) {
+ for (var j = 0; j < formValue.length; j++) {
+ appendFormValue(formKey, formValue[j])
+ }
+ } else {
+ appendFormValue(formKey, formValue)
+ }
}
- } else {
- this._httpMessage.emit('error', error)
}
}
- self._buildRequest = function(){
- var self = this;
-
- if (options.form) {
- self.form(options.form)
- }
+ if (options.qs) {
+ self.qs(options.qs)
+ }
- if (options.qs) self.qs(options.qs)
+ if (self.uri.path) {
+ self.path = self.uri.path
+ } else {
+ self.path = self.uri.pathname + (self.uri.search || '')
+ }
- if (self.uri.path) {
- self.path = self.uri.path
- } else {
- self.path = self.uri.pathname + (self.uri.search || "")
- }
+ if (self.path.length === 0) {
+ self.path = '/'
+ }
- if (self.path.length === 0) self.path = '/'
+ // Auth must happen last in case signing is dependent on other headers
+ if (options.oauth) {
+ self.oauth(options.oauth)
+ }
+ if (options.aws) {
+ self.aws(options.aws)
+ }
- // Auth must happen last in case signing is dependent on other headers
- if (options.oauth) {
- self.oauth(options.oauth)
- }
+ if (options.hawk) {
+ self.hawk(options.hawk)
+ }
- if (options.aws) {
- self.aws(options.aws)
- }
+ if (options.httpSignature) {
+ self.httpSignature(options.httpSignature)
+ }
- if (options.hawk) {
- self.hawk(options.hawk)
+ if (options.auth) {
+ if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) {
+ options.auth.user = options.auth.username
}
-
- if (options.httpSignature) {
- self.httpSignature(options.httpSignature)
+ if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) {
+ options.auth.pass = options.auth.password
}
- if (options.auth) {
- if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username
- if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password
+ self.auth(
+ options.auth.user,
+ options.auth.pass,
+ options.auth.sendImmediately,
+ options.auth.bearer
+ )
+ }
- self.auth(
- options.auth.user,
- options.auth.pass,
- options.auth.sendImmediately,
- options.auth.bearer
- )
- }
+ if (self.gzip && !self.hasHeader('accept-encoding')) {
+ self.setHeader('accept-encoding', 'gzip')
+ }
- if (self.gzip && !self.hasHeader('accept-encoding')) {
- self.setHeader('accept-encoding', 'gzip')
- }
+ if (self.uri.auth && !self.hasHeader('authorization')) {
+ var uriAuthPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
+ self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true)
+ }
- if (self.uri.auth && !self.hasHeader('authorization')) {
- var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
- self.auth(authPieces[0], authPieces.slice(1).join(':'), true)
+ if (self.proxy && !self.tunnel) {
+ if (self.proxy.auth && !self.proxyAuthorization) {
+ var proxyAuthPieces = self.proxy.auth.split(':').map(function(item){
+ return querystring.unescape(item)
+ })
+ var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':'))
+ self.proxyAuthorization = authHeader
}
-
- if (self.proxy && !self.tunnel) {
- if (self.proxy.auth && !self.proxyAuthorization) {
- var authPieces = self.proxy.auth.split(':').map(function(item){
- return querystring.unescape(item)
- })
- var authHeader = 'Basic ' + toBase64(authPieces.join(':'))
- self.proxyAuthorization = authHeader
- }
- if (self.proxyAuthorization)
- self.setHeader('proxy-authorization', self.proxyAuthorization)
+ if (self.proxyAuthorization) {
+ self.setHeader('proxy-authorization', self.proxyAuthorization)
}
+ }
- if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+ if (self.proxy && !self.tunnel) {
+ self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+ }
- if (options.json) {
- self.json(options.json)
- } else if (options.multipart) {
- self.boundary = uuid()
- self.multipart(options.multipart)
- }
+ if (options.json) {
+ self.json(options.json)
+ } else if (options.multipart) {
+ self.boundary = uuid()
+ self.multipart(options.multipart)
+ }
- if (self.body) {
- var length = 0
- if (!Buffer.isBuffer(self.body)) {
- if (Array.isArray(self.body)) {
- for (var i = 0; i < self.body.length; i++) {
- length += self.body[i].length
- }
- } else {
- self.body = new Buffer(self.body)
- length = self.body.length
+ if (self.body) {
+ var length = 0
+ if (!Buffer.isBuffer(self.body)) {
+ if (Array.isArray(self.body)) {
+ for (var i = 0; i < self.body.length; i++) {
+ length += self.body[i].length
}
} else {
+ self.body = new Buffer(self.body)
length = self.body.length
}
- if (length) {
- if (!self.hasHeader('content-length')) self.setHeader('content-length', length)
- } else {
- throw new Error('Argument error, options.body.')
+ } else {
+ length = self.body.length
+ }
+ if (length) {
+ if (!self.hasHeader('content-length')) {
+ self.setHeader('content-length', length)
}
+ } else {
+ throw new Error('Argument error, options.body.')
}
+ }
- var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
- , defaultModules = {'http:':http, 'https:':https, 'unix:':http}
- , httpModules = self.httpModules || {}
- ;
- self.httpModule = httpModules[protocol] || defaultModules[protocol]
+ var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
+ , defaultModules = {'http:':http, 'https:':https}
+ , httpModules = self.httpModules || {}
- if (!self.httpModule) return this.emit('error', new Error("Invalid protocol: " + protocol))
+ self.httpModule = httpModules[protocol] || defaultModules[protocol]
- if (options.ca) self.ca = options.ca
+ if (!self.httpModule) {
+ return self.emit('error', new Error('Invalid protocol: ' + protocol))
+ }
- if (!self.agent) {
- if (options.agentOptions) self.agentOptions = options.agentOptions
+ if (options.ca) {
+ self.ca = options.ca
+ }
- if (options.agentClass) {
- self.agentClass = options.agentClass
- } else if (options.forever) {
- self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
- } else {
- self.agentClass = self.httpModule.Agent
- }
+ if (!self.agent) {
+ if (options.agentOptions) {
+ self.agentOptions = options.agentOptions
}
- if (self.pool === false) {
- self.agent = false
+ if (options.agentClass) {
+ self.agentClass = options.agentClass
+ } else if (options.forever) {
+ self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
} else {
- self.agent = self.agent || self.getAgent()
- if (self.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.maxSockets
- }
- if (self.pool.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.pool.maxSockets
- }
+ self.agentClass = self.httpModule.Agent
}
+ }
- self.on('pipe', function (src) {
- if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.")
- self.src = src
- if (isReadStream(src)) {
- if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path))
- } else {
- if (src.headers) {
- for (var i in src.headers) {
- if (!self.hasHeader(i)) {
- self.setHeader(i, src.headers[i])
- }
- }
- }
- if (self._json && !self.hasHeader('content-type'))
- self.setHeader('content-type', 'application/json')
- if (src.method && !self.explicitMethod) {
- self.method = src.method
- }
- }
-
- // self.on('pipe', function () {
- // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
- // })
- })
-
- process.nextTick(function () {
- if (self._aborted) return
+ if (self.pool === false) {
+ self.agent = false
+ } else {
+ self.agent = self.agent || self.getAgent()
+ if (self.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.maxSockets
+ }
+ if (self.pool.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.pool.maxSockets
+ }
+ }
- var end = function () {
- if (self._form) {
- self._form.pipe(self)
- }
- if (self.body) {
- if (Array.isArray(self.body)) {
- self.body.forEach(function (part) {
- self.write(part)
- })
- } else {
- self.write(self.body)
- }
- self.end()
- } else if (self.requestBodyStream) {
- console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
- self.requestBodyStream.pipe(self)
- } else if (!self.src) {
- if (self.method !== 'GET' && typeof self.method !== 'undefined') {
- self.setHeader('content-length', 0)
+ self.on('pipe', function (src) {
+ if (self.ntick && self._started) {
+ throw new Error('You cannot pipe to this stream after the outbound request has started.')
+ }
+ self.src = src
+ if (isReadStream(src)) {
+ if (!self.hasHeader('content-type')) {
+ self.setHeader('content-type', mime.lookup(src.path))
+ }
+ } else {
+ if (src.headers) {
+ for (var i in src.headers) {
+ if (!self.hasHeader(i)) {
+ self.setHeader(i, src.headers[i])
}
- self.end()
}
}
-
- if (self._form && !self.hasHeader('content-length')) {
- // Before ending the request, we had to compute the length of the whole form, asyncly
- self.setHeader(self._form.getHeaders())
- self._form.getLength(function (err, length) {
- if (!err) {
- self.setHeader('content-length', length)
- }
- end()
- })
- } else {
- end()
+ if (self._json && !self.hasHeader('content-type')) {
+ self.setHeader('content-type', 'application/json')
+ }
+ if (src.method && !self.explicitMethod) {
+ self.method = src.method
}
-
- self.ntick = true
- })
-
- } // End _buildRequest
-
- self._handleUnixSocketURI = function(self){
- // Parse URI and extract a socket path (tested as a valid socket using net.connect), and a http style path suffix
- // Thus http requests can be made to a socket using the uri unix://tmp/my.socket/urlpath
- // and a request for '/urlpath' will be sent to the unix socket at /tmp/my.socket
-
- self.unixsocket = true;
-
- var full_path = self.uri.href.replace(self.uri.protocol+'/', '');
-
- var lookup = full_path.split('/');
- var error_connecting = true;
-
- var lookup_table = {};
- do { lookup_table[lookup.join('/')]={} } while(lookup.pop())
- for (r in lookup_table){
- try_next(r);
- }
-
- function try_next(table_row){
- var client = net.connect( table_row );
- client.path = table_row
- client.on('error', function(){ lookup_table[this.path].error_connecting=true; this.end(); });
- client.on('connect', function(){ lookup_table[this.path].error_connecting=false; this.end(); });
- table_row.client = client;
}
- wait_for_socket_response();
-
- response_counter = 0;
+ // self.on('pipe', function () {
+ // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
+ // })
+ })
- function wait_for_socket_response(){
- var detach;
- if('undefined' == typeof setImmediate ) detach = process.nextTick
- else detach = setImmediate;
- detach(function(){
- // counter to prevent infinite blocking waiting for an open socket to be found.
- response_counter++;
- var trying = false;
- for (r in lookup_table){
- if('undefined' == typeof lookup_table[r].error_connecting)
- trying = true;
- }
- if(trying && response_counter<1000)
- wait_for_socket_response()
- else
- set_socket_properties();
- })
+ defer(function () {
+ if (self._aborted) {
+ return
}
- function set_socket_properties(){
- var host;
- for (r in lookup_table){
- if(lookup_table[r].error_connecting === false){
- host = r
- }
+ var end = function () {
+ if (self._form) {
+ self._form.pipe(self)
}
- if(!host){
- self.emit('error', new Error("Failed to connect to any socket in "+full_path))
+ if (self.body) {
+ if (Array.isArray(self.body)) {
+ self.body.forEach(function (part) {
+ self.write(part)
+ })
+ } else {
+ self.write(self.body)
+ }
+ self.end()
+ } else if (self.requestBodyStream) {
+ console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
+ self.requestBodyStream.pipe(self)
+ } else if (!self.src) {
+ if (self.method !== 'GET' && typeof self.method !== 'undefined') {
+ self.setHeader('content-length', 0)
+ }
+ self.end()
}
- var path = full_path.replace(host, '')
+ }
- self.socketPath = host
- self.uri.pathname = path
- self.uri.href = path
- self.uri.path = path
- self.host = ''
- self.hostname = ''
- delete self.host
- delete self.hostname
- self._buildRequest();
+ if (self._form && !self.hasHeader('content-length')) {
+ // Before ending the request, we had to compute the length of the whole form, asyncly
+ self.setHeader(self._form.getHeaders())
+ self._form.getLength(function (err, length) {
+ if (!err) {
+ self.setHeader('content-length', length)
+ }
+ end()
+ })
+ } else {
+ end()
}
- }
- // Intercept UNIX protocol requests to change properties to match socket
- if(/^unix:/.test(self.uri.protocol)){
- self._handleUnixSocketURI(self);
- } else {
- self._buildRequest();
- }
+ self.ntick = true
+ })
}
@@ -650,7 +733,9 @@ Request.prototype._updateProtocol = function () {
// previously was doing http, now doing https
// if it's https, then we might need to tunnel now.
if (self.proxy) {
- if (self.setupTunnel()) return
+ if (self.setupTunnel()) {
+ return
+ }
}
self.httpModule = https
@@ -667,7 +752,9 @@ Request.prototype._updateProtocol = function () {
}
// if there's an agent, we need to get a new one.
- if (self.agent) self.agent = self.getAgent()
+ if (self.agent) {
+ self.agent = self.getAgent()
+ }
} else {
// previously was doing https, now doing http
@@ -693,85 +780,114 @@ Request.prototype._updateProtocol = function () {
}
Request.prototype.getAgent = function () {
- var Agent = this.agentClass
+ var self = this
+ var Agent = self.agentClass
var options = {}
- if (this.agentOptions) {
- for (var i in this.agentOptions) {
- options[i] = this.agentOptions[i]
+ if (self.agentOptions) {
+ for (var i in self.agentOptions) {
+ options[i] = self.agentOptions[i]
}
}
- if (this.ca) options.ca = this.ca
- if (this.ciphers) options.ciphers = this.ciphers
- if (this.secureProtocol) options.secureProtocol = this.secureProtocol
- if (this.secureOptions) options.secureOptions = this.secureOptions
- if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized
+ if (self.ca) {
+ options.ca = self.ca
+ }
+ if (self.ciphers) {
+ options.ciphers = self.ciphers
+ }
+ if (self.secureProtocol) {
+ options.secureProtocol = self.secureProtocol
+ }
+ if (self.secureOptions) {
+ options.secureOptions = self.secureOptions
+ }
+ if (typeof self.rejectUnauthorized !== 'undefined') {
+ options.rejectUnauthorized = self.rejectUnauthorized
+ }
- if (this.cert && this.key) {
- options.key = this.key
- options.cert = this.cert
+ if (self.cert && self.key) {
+ options.key = self.key
+ options.cert = self.cert
}
var poolKey = ''
// different types of agents are in different pools
- if (Agent !== this.httpModule.Agent) {
+ if (Agent !== self.httpModule.Agent) {
poolKey += Agent.name
}
- if (!this.httpModule.globalAgent) {
+ if (!self.httpModule.globalAgent) {
// node 0.4.x
- options.host = this.host
- options.port = this.port
- if (poolKey) poolKey += ':'
- poolKey += this.host + ':' + this.port
+ options.host = self.host
+ options.port = self.port
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += self.host + ':' + self.port
}
// ca option is only relevant if proxy or destination are https
- var proxy = this.proxy
- if (typeof proxy === 'string') proxy = url.parse(proxy)
+ var proxy = self.proxy
+ if (typeof proxy === 'string') {
+ proxy = url.parse(proxy)
+ }
var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
+
if (isHttps) {
if (options.ca) {
- if (poolKey) poolKey += ':'
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.ca
}
if (typeof options.rejectUnauthorized !== 'undefined') {
- if (poolKey) poolKey += ':'
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.rejectUnauthorized
}
- if (options.cert)
+ if (options.cert) {
poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
+ }
if (options.ciphers) {
- if (poolKey) poolKey += ':'
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.ciphers
}
if (options.secureProtocol) {
- if (poolKey) poolKey += ':'
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.secureProtocol
}
if (options.secureOptions) {
- if (poolKey) poolKey += ':'
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.secureOptions
}
}
- if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) {
+ if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) {
// not doing anything special. Use the globalAgent
- return this.httpModule.globalAgent
+ return self.httpModule.globalAgent
}
// we're using a stored agent. Make sure it's protocol-specific
- poolKey = this.uri.protocol + poolKey
+ poolKey = self.uri.protocol + poolKey
- // already generated an agent for this setting
- if (this.pool[poolKey]) return this.pool[poolKey]
+ // generate a new agent for this setting if none yet exists
+ if (!self.pool[poolKey]) {
+ self.pool[poolKey] = new Agent(options)
+ }
- return this.pool[poolKey] = new Agent(options)
+ return self.pool[poolKey]
}
Request.prototype.start = function () {
@@ -779,7 +895,9 @@ Request.prototype.start = function () {
// this is usually called on the first write(), end() or on nextTick()
var self = this
- if (self._aborted) return
+ if (self._aborted) {
+ return
+ }
self._started = true
self.method = self.method || 'GET'
@@ -798,14 +916,14 @@ Request.prototype.start = function () {
delete reqOptions.auth
debug('make request', self.uri.href)
- self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self))
+ self.req = self.httpModule.request(reqOptions)
if (self.timeout && !self.timeoutTimer) {
self.timeoutTimer = setTimeout(function () {
- self.req.abort()
- var e = new Error("ETIMEDOUT")
- e.code = "ETIMEDOUT"
- self.emit("error", e)
+ self.abort()
+ var e = new Error('ETIMEDOUT')
+ e.code = 'ETIMEDOUT'
+ self.emit('error', e)
}, self.timeout)
// Set additional timeout on socket - in case if remote
@@ -814,43 +932,73 @@ Request.prototype.start = function () {
self.req.setTimeout(self.timeout, function () {
if (self.req) {
self.req.abort()
- var e = new Error("ESOCKETTIMEDOUT")
- e.code = "ESOCKETTIMEDOUT"
- self.emit("error", e)
+ var e = new Error('ESOCKETTIMEDOUT')
+ e.code = 'ESOCKETTIMEDOUT'
+ self.emit('error', e)
}
})
}
}
- self.req.on('error', self.clientErrorHandler)
+ self.req.on('response', self.onRequestResponse.bind(self))
+ self.req.on('error', self.onRequestError.bind(self))
self.req.on('drain', function() {
self.emit('drain')
})
+ self.req.on('socket', function(socket) {
+ self.emit('socket', socket)
+ })
+
self.on('end', function() {
- if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler)
+ if ( self.req.connection ) {
+ self.req.connection.removeListener('error', connectionErrorHandler)
+ }
})
self.emit('request', self.req)
}
-Request.prototype.onResponse = function (response) {
+
+Request.prototype.onRequestError = function (error) {
var self = this
- debug('onResponse', self.uri.href, response.statusCode, response.headers)
+ if (self._aborted) {
+ return
+ }
+ if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
+ && self.agent.addRequestNoreuse) {
+ self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
+ self.start()
+ self.req.end()
+ return
+ }
+ if (self.timeout && self.timeoutTimer) {
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ }
+ self.emit('error', error)
+}
+
+Request.prototype.onRequestResponse = function (response) {
+ var self = this
+ debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
response.on('end', function() {
debug('response end', self.uri.href, response.statusCode, response.headers)
- });
+ })
// The check on response.connection is a workaround for browserify.
- if (response.connection && response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) {
+ if (response.connection && response.connection.listeners('error').indexOf(connectionErrorHandler) === -1) {
response.connection.setMaxListeners(0)
- response.connection.once('error', self._parserErrorHandler)
+ response.connection.once('error', connectionErrorHandler)
}
if (self._aborted) {
debug('aborted', self.uri.href)
response.resume()
return
}
- if (self._paused) response.pause()
- // Check that response.resume is defined. Workaround for browserify.
- else response.resume && response.resume()
+ if (self._paused) {
+ response.pause()
+ } else if (response.resume) {
+ // response.resume should be defined, but check anyway before calling. Workaround for browserify.
+ response.resume()
+ }
self.response = response
response.request = self
@@ -861,24 +1009,29 @@ Request.prototype.onResponse = function (response) {
self.strictSSL && (!response.hasOwnProperty('client') ||
!response.client.authorized)) {
debug('strict ssl error', self.uri.href)
- var sslErr = response.hasOwnProperty('client') ? response.client.authorizationError : self.uri.href + " does not support SSL";
- self.emit('error', new Error('SSL Error: '+ sslErr))
+ var sslErr = response.hasOwnProperty('client') ? response.client.authorizationError : self.uri.href + ' does not support SSL'
+ self.emit('error', new Error('SSL Error: ' + sslErr))
return
}
- if (self.setHost) self.removeHeader('host')
+ // Save the original host before any redirect (if it changes, we need to
+ // remove any authorization headers)
+ self.originalHost = self.headers.host
+ if (self.setHost) {
+ self.removeHeader('host')
+ }
if (self.timeout && self.timeoutTimer) {
clearTimeout(self.timeoutTimer)
self.timeoutTimer = null
}
- var targetCookieJar = (self._jar && self._jar.setCookie)?self._jar:globalCookieJar;
+ var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
var addCookie = function (cookie) {
//set the cookie if it's domain in the href's domain.
try {
- targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true});
+ targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true})
} catch (e) {
- self.emit('error', e);
+ self.emit('error', e)
}
}
@@ -886,8 +1039,11 @@ Request.prototype.onResponse = function (response) {
if (response.caseless.has('set-cookie') && (!self._disableCookies)) {
var headerName = response.caseless.has('set-cookie')
- if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie)
- else addCookie(response.headers[headerName])
+ if (Array.isArray(response.headers[headerName])) {
+ response.headers[headerName].forEach(addCookie)
+ } else {
+ addCookie(response.headers[headerName])
+ }
}
var redirectTo = null
@@ -897,7 +1053,7 @@ Request.prototype.onResponse = function (response) {
if (self.followAllRedirects) {
redirectTo = location
- } else if (self.followRedirect) {
+ } else if (self.followRedirects) {
switch (self.method) {
case 'PATCH':
case 'PUT':
@@ -910,7 +1066,7 @@ Request.prototype.onResponse = function (response) {
break
}
}
- } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) {
+ } else if (response.statusCode === 401 && self._hasAuth && !self._sentAuth) {
var authHeader = response.caseless.get('www-authenticate')
var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
debug('reauth', authVerb)
@@ -943,8 +1099,10 @@ Request.prototype.onResponse = function (response) {
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];
+ if (!match) {
+ break
+ }
+ challenge[match[1]] = match[2] || match[3]
}
var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
@@ -968,12 +1126,12 @@ Request.prototype.onResponse = function (response) {
authHeader = []
for (var k in authValues) {
- if (!authValues[k]) {
- //ignore
- } else if (k === 'qop' || k === 'nc' || k === 'algorithm') {
- authHeader.push(k + '=' + authValues[k])
- } else {
- authHeader.push(k + '="' + authValues[k] + '"')
+ if (authValues[k]) {
+ if (k === 'qop' || k === 'nc' || k === 'algorithm') {
+ authHeader.push(k + '=' + authValues[k])
+ } else {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
}
}
authHeader = 'Digest ' + authHeader.join(', ')
@@ -990,10 +1148,12 @@ Request.prototype.onResponse = function (response) {
// ignore any potential response body. it cannot possibly be useful
// to us at this point.
- if (self._paused) response.resume()
+ if (self._paused) {
+ response.resume()
+ }
if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
+ self.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + self.uri.href))
return
}
self._redirectsFollowed += 1
@@ -1015,13 +1175,15 @@ Request.prototype.onResponse = function (response) {
, redirectUri: redirectTo
}
)
- if (self.followAllRedirects && response.statusCode != 401 && response.statusCode != 307) self.method = 'GET'
+ if (self.followAllRedirects && response.statusCode !== 401 && response.statusCode !== 307) {
+ self.method = 'GET'
+ }
// self.method = 'GET' // Force all redirects to use GET || commented out fixes #215
delete self.src
delete self.req
delete self.agent
delete self._started
- if (response.statusCode != 401 && response.statusCode != 307) {
+ if (response.statusCode !== 401 && response.statusCode !== 307) {
// Remove parameters from the previous response, unless this is the second request
// for a server that requires digest authentication.
delete self.body
@@ -1030,10 +1192,16 @@ Request.prototype.onResponse = function (response) {
self.removeHeader('host')
self.removeHeader('content-type')
self.removeHeader('content-length')
+ if (self.uri.hostname !== self.originalHost.split(':')[0]) {
+ // Remove authorization if changing hostnames (but not if just
+ // changing ports or protocols). This matches the behavior of curl:
+ // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
+ self.removeHeader('authorization')
+ }
}
}
- self.emit('redirect');
+ self.emit('redirect')
self.init()
return // Ignore the rest of the response
@@ -1042,7 +1210,9 @@ Request.prototype.onResponse = function (response) {
// Be a good stream and emit end when the response is finished.
// Hack to emit end on close because of a core bug that never fires end
response.on('close', function () {
- if (!self._ended) self.response.emit('end')
+ if (!self._ended) {
+ self.response.emit('end')
+ }
})
response.on('end', function () {
@@ -1051,17 +1221,17 @@ Request.prototype.onResponse = function (response) {
var dataStream
if (self.gzip) {
- var contentEncoding = response.headers["content-encoding"] || "identity"
+ var contentEncoding = response.headers['content-encoding'] || 'identity'
contentEncoding = contentEncoding.trim().toLowerCase()
- if (contentEncoding === "gzip") {
+ if (contentEncoding === 'gzip') {
dataStream = zlib.createGunzip()
response.pipe(dataStream)
} else {
// Since previous versions didn't check for Content-Encoding header,
// ignore any invalid values to preserve backwards-compatibility
- if (contentEncoding !== "identity") {
- debug("ignoring unrecognized Content-Encoding " + contentEncoding)
+ if (contentEncoding !== 'identity') {
+ debug('ignoring unrecognized Content-Encoding ' + contentEncoding)
}
dataStream = response
}
@@ -1071,7 +1241,7 @@ Request.prototype.onResponse = function (response) {
if (self.encoding) {
if (self.dests.length !== 0) {
- console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
+ console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
} else if (dataStream.setEncoding) {
dataStream.setEncoding(self.encoding)
} else {
@@ -1088,24 +1258,30 @@ Request.prototype.onResponse = function (response) {
self.pipeDest(dest)
})
- dataStream.on("data", function (chunk) {
+ dataStream.on('data', function (chunk) {
self._destdata = true
- self.emit("data", chunk)
+ self.emit('data', chunk)
})
- dataStream.on("end", function (chunk) {
- self.emit("end", chunk)
+ dataStream.on('end', function (chunk) {
+ self.emit('end', chunk)
})
- dataStream.on("close", function () {self.emit("close")})
+ dataStream.on('error', function (error) {
+ self.emit('error', error)
+ })
+ dataStream.on('close', function () {self.emit('close')})
if (self.callback) {
var buffer = bl()
, strings = []
- ;
- self.on("data", function (chunk) {
- if (Buffer.isBuffer(chunk)) buffer.append(chunk)
- else strings.push(chunk)
+
+ self.on('data', function (chunk) {
+ if (Buffer.isBuffer(chunk)) {
+ buffer.append(chunk)
+ } else {
+ strings.push(chunk)
+ }
})
- self.on("end", function () {
+ self.on('end', function () {
debug('end event', self.uri.href)
if (self._aborted) {
debug('aborted', self.uri.href)
@@ -1124,7 +1300,7 @@ Request.prototype.onResponse = function (response) {
} else if (strings.length) {
// The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
// Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
- if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === "\uFEFF") {
+ if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') {
strings[0] = strings[0].substring(1)
}
response.body = strings.join('')
@@ -1136,96 +1312,112 @@ Request.prototype.onResponse = function (response) {
} catch (e) {}
}
debug('emitting complete', self.uri.href)
- if(response.body == undefined && !self._json) {
- response.body = "";
+ if(typeof response.body === 'undefined' && !self._json) {
+ response.body = ''
}
self.emit('complete', response, response.body)
})
}
//if no callback
else{
- self.on("end", function () {
+ self.on('end', function () {
if (self._aborted) {
debug('aborted', self.uri.href)
return
}
- self.emit('complete', response);
- });
+ self.emit('complete', response)
+ })
}
}
debug('finish init function', self.uri.href)
}
Request.prototype.abort = function () {
- this._aborted = true
+ var self = this
+ self._aborted = true
- if (this.req) {
- this.req.abort()
+ if (self.req) {
+ self.req.abort()
}
- else if (this.response) {
- this.response.abort()
+ else if (self.response) {
+ self.response.abort()
}
- this.emit("abort")
+ self.emit('abort')
}
Request.prototype.pipeDest = function (dest) {
- var response = this.response
+ var self = this
+ var response = self.response
// Called after the response is received
if (dest.headers && !dest.headersSent) {
if (response.caseless.has('content-type')) {
var ctname = response.caseless.has('content-type')
- if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname])
- else dest.headers[ctname] = response.headers[ctname]
+ if (dest.setHeader) {
+ dest.setHeader(ctname, response.headers[ctname])
+ }
+ else {
+ dest.headers[ctname] = response.headers[ctname]
+ }
}
if (response.caseless.has('content-length')) {
var clname = response.caseless.has('content-length')
- if (dest.setHeader) dest.setHeader(clname, response.headers[clname])
- else dest.headers[clname] = response.headers[clname]
+ if (dest.setHeader) {
+ dest.setHeader(clname, response.headers[clname])
+ } else {
+ dest.headers[clname] = response.headers[clname]
+ }
}
}
if (dest.setHeader && !dest.headersSent) {
for (var i in response.headers) {
// If the response content is being decoded, the Content-Encoding header
// of the response doesn't represent the piped content, so don't pass it.
- if (!this.gzip || i !== 'content-encoding') {
+ if (!self.gzip || i !== 'content-encoding') {
dest.setHeader(i, response.headers[i])
}
}
dest.statusCode = response.statusCode
}
- if (this.pipefilter) this.pipefilter(response, dest)
+ if (self.pipefilter) {
+ self.pipefilter(response, dest)
+ }
}
Request.prototype.qs = function (q, clobber) {
+ var self = this
var base
- if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
- else base = {}
+ if (!clobber && self.uri.query) {
+ base = self.qsLib.parse(self.uri.query)
+ } else {
+ base = {}
+ }
for (var i in q) {
base[i] = q[i]
}
- if (qs.stringify(base) === ''){
- return this
+ if (self.qsLib.stringify(base) === ''){
+ return self
}
- this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
- this.url = this.uri
- this.path = this.uri.path
+ self.uri = url.parse(self.uri.href.split('?')[0] + '?' + self.qsLib.stringify(base))
+ self.url = self.uri
+ self.path = self.uri.path
- return this
+ return self
}
Request.prototype.form = function (form) {
+ var self = this
if (form) {
- this.setHeader('content-type', 'application/x-www-form-urlencoded; charset=utf-8')
- this.body = (typeof form === 'string') ? form.toString('utf8') : qs.stringify(form).toString('utf8')
- return this
+ self.setHeader('content-type', 'application/x-www-form-urlencoded')
+ self.body = (typeof form === 'string') ? form.toString('utf8') : self.qsLib.stringify(form).toString('utf8')
+ return self
}
// create form-data object
- this._form = new FormData()
- return this._form
+ self._form = new FormData()
+ return self._form
}
Request.prototype.multipart = function (multipart) {
var self = this
@@ -1234,11 +1426,13 @@ Request.prototype.multipart = function (multipart) {
if (!self.hasHeader('content-type')) {
self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
} else {
- var headerName = self.hasHeader('content-type');
+ var headerName = self.hasHeader('content-type')
self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary)
}
- if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
+ if (!multipart.forEach) {
+ throw new Error('Argument error, options.multipart.')
+ }
if (self.preambleCRLF) {
self.body.push(new Buffer('\r\n'))
@@ -1246,7 +1440,9 @@ Request.prototype.multipart = function (multipart) {
multipart.forEach(function (part) {
var body = part.body
- if(body == null) throw Error('Body attribute missing in multipart.')
+ if(typeof body === 'undefined') {
+ throw new Error('Body attribute missing in multipart.')
+ }
delete part.body
var preamble = '--' + self.boundary + '\r\n'
Object.keys(part).forEach(function (key) {
@@ -1258,85 +1454,104 @@ Request.prototype.multipart = function (multipart) {
self.body.push(new Buffer('\r\n'))
})
self.body.push(new Buffer('--' + self.boundary + '--'))
+
+ if (self.postambleCRLF) {
+ self.body.push(new Buffer('\r\n'))
+ }
+
return self
}
Request.prototype.json = function (val) {
var self = this
- if (!self.hasHeader('accept')) self.setHeader('accept', 'application/json')
+ if (!self.hasHeader('accept')) {
+ self.setHeader('accept', 'application/json')
+ }
- this._json = true
+ self._json = true
if (typeof val === 'boolean') {
- if (typeof this.body === 'object') {
- this.body = safeStringify(this.body)
- if (!self.hasHeader('content-type'))
+ if (typeof self.body === 'object') {
+ self.body = safeStringify(self.body)
+ if (!self.hasHeader('content-type')) {
self.setHeader('content-type', 'application/json')
+ }
}
} else {
- this.body = safeStringify(val)
- if (!self.hasHeader('content-type'))
+ self.body = safeStringify(val)
+ if (!self.hasHeader('content-type')) {
self.setHeader('content-type', 'application/json')
+ }
}
- return this
+ return self
}
Request.prototype.getHeader = function (name, headers) {
+ var self = this
var result, re, match
- if (!headers) headers = this.headers
+ if (!headers) {
+ headers = self.headers
+ }
Object.keys(headers).forEach(function (key) {
- if (key.length !== name.length) return
+ if (key.length !== name.length) {
+ return
+ }
re = new RegExp(name, 'i')
match = key.match(re)
- if (match) result = headers[key]
+ if (match) {
+ result = headers[key]
+ }
})
return result
}
var getHeader = Request.prototype.getHeader
Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
+ var self = this
if (bearer !== undefined) {
- this._bearer = bearer
- this._hasAuth = true
- if (sendImmediately || typeof sendImmediately == 'undefined') {
+ self._bearer = bearer
+ self._hasAuth = true
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
if (typeof bearer === 'function') {
bearer = bearer()
}
- this.setHeader('authorization', 'Bearer ' + bearer)
- this._sentAuth = true
+ self.setHeader('authorization', 'Bearer ' + bearer)
+ self._sentAuth = true
}
- return this
+ return self
}
if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
throw new Error('auth() received invalid user or password')
}
- this._user = user
- this._pass = pass
- this._hasAuth = true
+ self._user = user
+ self._pass = pass
+ self._hasAuth = true
var header = typeof pass !== 'undefined' ? user + ':' + pass : user
- if (sendImmediately || typeof sendImmediately == 'undefined') {
- this.setHeader('authorization', 'Basic ' + toBase64(header))
- this._sentAuth = true
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
+ self.setHeader('authorization', 'Basic ' + toBase64(header))
+ self._sentAuth = true
}
- return this
+ return self
}
Request.prototype.aws = function (opts, now) {
+ var self = this
+
if (!now) {
- this._aws = opts
- return this
+ self._aws = opts
+ return self
}
var date = new Date()
- this.setHeader('date', date.toUTCString())
+ self.setHeader('date', date.toUTCString())
var auth =
{ key: opts.key
, secret: opts.secret
- , verb: this.method.toUpperCase()
+ , verb: self.method.toUpperCase()
, date: date
- , contentType: this.getHeader('content-type') || ''
- , md5: this.getHeader('content-md5') || ''
- , amazonHeaders: aws.canonicalizeHeaders(this.headers)
+ , contentType: self.getHeader('content-type') || ''
+ , md5: self.getHeader('content-md5') || ''
+ , amazonHeaders: aws.canonicalizeHeaders(self.headers)
}
- var path = this.uri.path;
+ var path = self.uri.path
if (opts.bucket && path) {
auth.resource = '/' + opts.bucket + path
} else if (opts.bucket && !path) {
@@ -1347,50 +1562,61 @@ Request.prototype.aws = function (opts, now) {
auth.resource = '/'
}
auth.resource = aws.canonicalizeResource(auth.resource)
- this.setHeader('authorization', aws.authorization(auth))
+ self.setHeader('authorization', aws.authorization(auth))
- return this
+ return self
}
Request.prototype.httpSignature = function (opts) {
- var req = this
+ var self = this
httpSignature.signRequest({
getHeader: function(header) {
- return getHeader(header, req.headers)
+ return getHeader(header, self.headers)
},
setHeader: function(header, value) {
- req.setHeader(header, value)
+ self.setHeader(header, value)
},
- method: this.method,
- path: this.path
+ method: self.method,
+ path: self.path
}, opts)
- debug('httpSignature authorization', this.getHeader('authorization'))
+ debug('httpSignature authorization', self.getHeader('authorization'))
- return this
+ return self
}
Request.prototype.hawk = function (opts) {
- this.setHeader('Authorization', hawk.client.header(this.uri, this.method, opts).field)
+ var self = this
+ self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field)
}
Request.prototype.oauth = function (_oauth) {
+ var self = this
var form, query
- if (this.hasHeader('content-type') &&
- this.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) ===
+ if (self.hasHeader('content-type') &&
+ self.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) ===
'application/x-www-form-urlencoded'
) {
- form = this.body
+ form = self.body
}
- if (this.uri.query) {
- query = this.uri.query
+ if (self.uri.query) {
+ query = self.uri.query
}
var oa = {}
- for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
- if ('oauth_realm' in oa) delete oa.oauth_realm
-
- if (!oa.oauth_version) oa.oauth_version = '1.0'
- if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
- if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
+ for (var i in _oauth) {
+ oa['oauth_' + i] = _oauth[i]
+ }
+ if ('oauth_realm' in oa) {
+ delete oa.oauth_realm
+ }
+ if (!oa.oauth_version) {
+ oa.oauth_version = '1.0'
+ }
+ if (!oa.oauth_timestamp) {
+ oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
+ }
+ if (!oa.oauth_nonce) {
+ oa.oauth_nonce = uuid().replace(/-/g, '')
+ }
oa.oauth_signature_method = 'HMAC-SHA1'
@@ -1399,95 +1625,118 @@ Request.prototype.oauth = function (_oauth) {
var token_secret = oa.oauth_token_secret
delete oa.oauth_token_secret
- var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
- var params = qs.parse([].concat(query, form, qs.stringify(oa)).join('&'))
- var signature = oauth.hmacsign(this.method, baseurl, params, consumer_secret, token_secret)
+ var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname
+ var params = self.qsLib.parse([].concat(query, form, self.qsLib.stringify(oa)).join('&'))
+ var signature = oauth.hmacsign(self.method, baseurl, params, consumer_secret, token_secret)
- var realm = _oauth.realm ? 'realm="' + _oauth.realm + '",' : '';
+ var realm = _oauth.realm ? 'realm="' + _oauth.realm + '",' : ''
var authHeader = 'OAuth ' + realm +
- Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
+ Object.keys(oa).sort().map(function (i) {return i + '="' + oauth.rfc3986(oa[i]) + '"'}).join(',')
authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"'
- this.setHeader('Authorization', authHeader)
- return this
+ self.setHeader('Authorization', authHeader)
+ return self
}
Request.prototype.jar = function (jar) {
+ var self = this
var cookies
- if (this._redirectsFollowed === 0) {
- this.originalCookieHeader = this.getHeader('cookie')
+ if (self._redirectsFollowed === 0) {
+ self.originalCookieHeader = self.getHeader('cookie')
}
if (!jar) {
// disable cookies
cookies = false
- this._disableCookies = true
+ self._disableCookies = true
} else {
- var targetCookieJar = (jar && jar.getCookieString)?jar:globalCookieJar;
- var urihref = this.uri.href
+ var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar
+ var urihref = self.uri.href
//fetch cookie in the Specified host
if (targetCookieJar) {
- cookies = targetCookieJar.getCookieString(urihref);
+ cookies = targetCookieJar.getCookieString(urihref)
}
}
//if need cookie and cookie is not empty
if (cookies && cookies.length) {
- if (this.originalCookieHeader) {
+ if (self.originalCookieHeader) {
// Don't overwrite existing Cookie header
- this.setHeader('cookie', this.originalCookieHeader + '; ' + cookies)
+ self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies)
} else {
- this.setHeader('cookie', cookies)
+ self.setHeader('cookie', cookies)
}
}
- this._jar = jar
- return this
+ self._jar = jar
+ return self
}
// Stream API
Request.prototype.pipe = function (dest, opts) {
- if (this.response) {
- if (this._destdata) {
- throw new Error("You cannot pipe after data has been emitted from the response.")
- } else if (this._ended) {
- throw new Error("You cannot pipe after the response has been ended.")
+ var self = this
+
+ if (self.response) {
+ if (self._destdata) {
+ throw new Error('You cannot pipe after data has been emitted from the response.')
+ } else if (self._ended) {
+ throw new Error('You cannot pipe after the response has been ended.')
} else {
- stream.Stream.prototype.pipe.call(this, dest, opts)
- this.pipeDest(dest)
+ stream.Stream.prototype.pipe.call(self, dest, opts)
+ self.pipeDest(dest)
return dest
}
} else {
- this.dests.push(dest)
- stream.Stream.prototype.pipe.call(this, dest, opts)
+ self.dests.push(dest)
+ stream.Stream.prototype.pipe.call(self, dest, opts)
return dest
}
}
Request.prototype.write = function () {
- if (!this._started) this.start()
- return this.req.write.apply(this.req, arguments)
+ var self = this
+ if (!self._started) {
+ self.start()
+ }
+ return self.req.write.apply(self.req, arguments)
}
Request.prototype.end = function (chunk) {
- if (chunk) this.write(chunk)
- if (!this._started) this.start()
- this.req.end()
+ var self = this
+ if (chunk) {
+ self.write(chunk)
+ }
+ if (!self._started) {
+ self.start()
+ }
+ self.req.end()
}
Request.prototype.pause = function () {
- if (!this.response) this._paused = true
- else this.response.pause.apply(this.response, arguments)
+ var self = this
+ if (!self.response) {
+ self._paused = true
+ } else {
+ self.response.pause.apply(self.response, arguments)
+ }
}
Request.prototype.resume = function () {
- if (!this.response) this._paused = false
- else this.response.resume.apply(this.response, arguments)
+ var self = this
+ if (!self.response) {
+ self._paused = false
+ } else {
+ self.response.resume.apply(self.response, arguments)
+ }
}
Request.prototype.destroy = function () {
- if (!this._ended) this.end()
- else if (this.response) this.response.destroy()
+ var self = this
+ if (!self._ended) {
+ self.end()
+ } else if (self.response) {
+ self.response.destroy()
+ }
}
-Request.prototype.toJSON = requestToJSON
-
Request.defaultProxyHeaderWhiteList =
defaultProxyHeaderWhiteList.slice()
+// Exports
+Request.prototype.toJSON = requestToJSON
module.exports = Request
diff --git a/deps/npm/node_modules/retry/Readme.md b/deps/npm/node_modules/retry/Readme.md
index 2bb8650..ba66022 100644
--- a/deps/npm/node_modules/retry/Readme.md
+++ b/deps/npm/node_modules/retry/Readme.md
@@ -14,7 +14,7 @@ This module has been tested and is ready to be used.
The example below will retry a potentially failing `dns.resolve` operation
`10` times using an exponential backoff strategy. With the default settings, this
-means the last attempt is made after `34 minutes and 7 seconds`.
+means the last attempt is made after `17 minutes and 3 seconds`.
``` javascript
var dns = require('dns');
@@ -29,7 +29,7 @@ function faultTolerantResolve(address, cb) {
return;
}
- cb(operation.mainError(), addresses);
+ cb(err ? operation.mainError() : null, addresses);
});
});
}
@@ -69,8 +69,8 @@ milliseconds. If `options` is an array, a copy of that array is returned.
* `retries`: The maximum amount of times to retry the operation. Default is `10`.
* `factor`: The exponential factor to use. Default is `2`.
-* `minTimeout`: The amount of time before starting the first retry. Default is `1000`.
-* `maxTimeout`: The maximum amount of time between two retries. Default is `Infinity`.
+* `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.
+* `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.
* `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`.
The formula used to calculate the individual timeouts is:
diff --git a/deps/npm/node_modules/retry/package.json b/deps/npm/node_modules/retry/package.json
index 8f5e6d2..130fcae 100644
--- a/deps/npm/node_modules/retry/package.json
+++ b/deps/npm/node_modules/retry/package.json
@@ -6,11 +6,11 @@
},
"name": "retry",
"description": "Abstraction for exponential and custom retry strategies for failed operations.",
- "version": "0.6.0",
+ "version": "0.6.1",
"homepage": "https://github.com/tim-kos/node-retry",
"repository": {
"type": "git",
- "url": "git://github.com/felixge/node-retry.git"
+ "url": "git://github.com/tim-kos/node-retry.git"
},
"directories": {
"lib": "./lib"
@@ -24,6 +24,26 @@
"fake": "0.2.0",
"far": "0.0.1"
},
- "_id": "retry@0.6.0",
- "_from": "retry"
+ "bugs": {
+ "url": "https://github.com/tim-kos/node-retry/issues"
+ },
+ "_id": "retry@0.6.1",
+ "_shasum": "fdc90eed943fde11b893554b8cc63d0e899ba918",
+ "_from": "retry@>=0.6.1 <0.7.0",
+ "_npmVersion": "1.4.9",
+ "_npmUser": {
+ "name": "tim-kos",
+ "email": "tim@debuggable.com"
+ },
+ "maintainers": [
+ {
+ "name": "tim-kos",
+ "email": "tim@debuggable.com"
+ }
+ ],
+ "dist": {
+ "shasum": "fdc90eed943fde11b893554b8cc63d0e899ba918",
+ "tarball": "http://registry.npmjs.org/retry/-/retry-0.6.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/retry/-/retry-0.6.1.tgz"
}
diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md
index 0f8a755..7e1961d 100644
--- a/deps/npm/node_modules/semver/README.md
+++ b/deps/npm/node_modules/semver/README.md
@@ -140,7 +140,7 @@ numeric values in the `[major, minor, patch]` tuple.
A partial version range is treated as an X-Range, so the special
character is in fact optional.
-* `` (empty string) := `*` := `>=0.0.0`
+* `""` (empty string) := `*` := `>=0.0.0`
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
diff --git a/deps/npm/node_modules/semver/bin/semver b/deps/npm/node_modules/semver/bin/semver
index 41c148f..c5f2e85 100755
--- a/deps/npm/node_modules/semver/bin/semver
+++ b/deps/npm/node_modules/semver/bin/semver
@@ -12,6 +12,7 @@ var argv = process.argv.slice(2)
, inc = null
, version = require("../package.json").version
, loose = false
+ , identifier = undefined
, semver = require("../semver")
, reverse = false
@@ -47,6 +48,9 @@ function main () {
break
}
break
+ case "--preid":
+ identifier = argv.shift()
+ break
case "-r": case "--range":
range.push(argv.shift())
break
@@ -88,7 +92,7 @@ function success () {
}).map(function (v) {
return semver.clean(v, loose)
}).map(function (v) {
- return inc ? semver.inc(v, inc, loose) : v
+ return inc ? semver.inc(v, inc, loose, identifier) : v
}).forEach(function (v,i,_) { console.log(v) })
}
@@ -111,6 +115,10 @@ function help () {
," prepatch, or prerelease. Default level is 'patch'."
," Only one version may be specified."
,""
+ ,"--preid "
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
,"-l --loose"
," Interpret versions and ranges loosely"
,""
diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json
index a575f0e..a22dc97 100644
--- a/deps/npm/node_modules/semver/package.json
+++ b/deps/npm/node_modules/semver/package.json
@@ -1,6 +1,6 @@
{
"name": "semver",
- "version": "4.0.0",
+ "version": "4.1.0",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
"browser": "semver.browser.js",
@@ -21,15 +21,16 @@
"bin": {
"semver": "./bin/semver"
},
- "gitHead": "f71a46b52f5d413aff1cb3afa7d2f940b23ab1a0",
+ "gitHead": "f8db569b9fd00788d14064aaf81854ed81e1337a",
"bugs": {
"url": "https://github.com/isaacs/node-semver/issues"
},
"homepage": "https://github.com/isaacs/node-semver",
- "_id": "semver@4.0.0",
- "_shasum": "7be868416a5e669923a8e3af8bafa5faf62a151a",
- "_from": "semver@>=4.0.0-0 <5.0.0-0",
- "_npmVersion": "2.0.0-beta.3",
+ "_id": "semver@4.1.0",
+ "_shasum": "bc80a9ff68532814362cc3cfda3c7b75ed9c321c",
+ "_from": "semver@>=4.1.0 <5.0.0",
+ "_npmVersion": "2.1.3",
+ "_nodeVersion": "0.10.31",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -38,13 +39,17 @@
{
"name": "isaacs",
"email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
}
],
"dist": {
- "shasum": "7be868416a5e669923a8e3af8bafa5faf62a151a",
- "tarball": "http://registry.npmjs.org/semver/-/semver-4.0.0.tgz"
+ "shasum": "bc80a9ff68532814362cc3cfda3c7b75ed9c321c",
+ "tarball": "http://registry.npmjs.org/semver/-/semver-4.1.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/semver/-/semver-4.0.0.tgz",
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-4.1.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/semver/semver.browser.js b/deps/npm/node_modules/semver/semver.browser.js
index afb68ac..712de83 100644
--- a/deps/npm/node_modules/semver/semver.browser.js
+++ b/deps/npm/node_modules/semver/semver.browser.js
@@ -345,35 +345,35 @@ SemVer.prototype.comparePre = function(other) {
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release) {
+SemVer.prototype.inc = function(release, identifier) {
switch (release) {
case 'premajor':
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
- this.inc('pre');
+ this.inc('pre', identifier);
break;
case 'preminor':
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
- this.inc('pre');
+ this.inc('pre', identifier);
break;
case 'prepatch':
// If this is already a prerelease, it will bump to the next version
// drop any prereleases that might already exist, since they are not
// relevant at this point.
this.prerelease.length = 0;
- this.inc('patch');
- this.inc('pre');
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
break;
// If the input is a non-prerelease version, this acts the same as
// prepatch.
case 'prerelease':
if (this.prerelease.length === 0)
- this.inc('patch');
- this.inc('pre');
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
break;
case 'major':
@@ -407,7 +407,7 @@ SemVer.prototype.inc = function(release) {
this.prerelease = [];
break;
// This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0 which is the wrong direction.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
case 'pre':
if (this.prerelease.length === 0)
this.prerelease = [0];
@@ -422,6 +422,15 @@ SemVer.prototype.inc = function(release) {
if (i === -1) // didn't increment anything
this.prerelease.push(0);
}
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
break;
default:
@@ -432,9 +441,14 @@ SemVer.prototype.inc = function(release) {
};
exports.inc = inc;
-function inc(version, release, loose) {
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
try {
- return new SemVer(version, loose).inc(release).version;
+ return new SemVer(version, loose).inc(release, identifier).version;
} catch (er) {
return null;
}
@@ -846,10 +860,16 @@ function replaceXRange(comp, loose) {
if (gtlt === '=' && anyX)
gtlt = '';
- if (gtlt && anyX) {
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
// replace X with 0
- if (xM)
- M = 0;
if (xm)
m = 0;
if (xp)
@@ -860,9 +880,7 @@ function replaceXRange(comp, loose) {
// >1.2 => >=1.3.0
// >1.2.3 => >= 1.2.4
gtlt = '>=';
- if (xM) {
- // no change
- } else if (xm) {
+ if (xm) {
M = +M + 1;
m = 0;
p = 0;
@@ -870,13 +888,17 @@ function replaceXRange(comp, loose) {
m = +m + 1;
p = 0;
}
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm)
+ M = +M + 1
+ else
+ m = +m + 1
}
-
ret = gtlt + M + '.' + m + '.' + p;
- } else if (xM) {
- // allow any
- ret = '*';
} else if (xm) {
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
} else if (xp) {
diff --git a/deps/npm/node_modules/semver/semver.browser.js.gz b/deps/npm/node_modules/semver/semver.browser.js.gz
index 2d01ad9..e306605 100644
Binary files a/deps/npm/node_modules/semver/semver.browser.js.gz and b/deps/npm/node_modules/semver/semver.browser.js.gz differ
diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js
index 8b5b93f..22673fd 100644
--- a/deps/npm/node_modules/semver/semver.js
+++ b/deps/npm/node_modules/semver/semver.js
@@ -355,35 +355,35 @@ SemVer.prototype.comparePre = function(other) {
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release) {
+SemVer.prototype.inc = function(release, identifier) {
switch (release) {
case 'premajor':
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
- this.inc('pre');
+ this.inc('pre', identifier);
break;
case 'preminor':
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
- this.inc('pre');
+ this.inc('pre', identifier);
break;
case 'prepatch':
// If this is already a prerelease, it will bump to the next version
// drop any prereleases that might already exist, since they are not
// relevant at this point.
this.prerelease.length = 0;
- this.inc('patch');
- this.inc('pre');
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
break;
// If the input is a non-prerelease version, this acts the same as
// prepatch.
case 'prerelease':
if (this.prerelease.length === 0)
- this.inc('patch');
- this.inc('pre');
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
break;
case 'major':
@@ -417,7 +417,7 @@ SemVer.prototype.inc = function(release) {
this.prerelease = [];
break;
// This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0 which is the wrong direction.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
case 'pre':
if (this.prerelease.length === 0)
this.prerelease = [0];
@@ -432,6 +432,15 @@ SemVer.prototype.inc = function(release) {
if (i === -1) // didn't increment anything
this.prerelease.push(0);
}
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
break;
default:
@@ -442,9 +451,14 @@ SemVer.prototype.inc = function(release) {
};
exports.inc = inc;
-function inc(version, release, loose) {
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
try {
- return new SemVer(version, loose).inc(release).version;
+ return new SemVer(version, loose).inc(release, identifier).version;
} catch (er) {
return null;
}
@@ -856,10 +870,16 @@ function replaceXRange(comp, loose) {
if (gtlt === '=' && anyX)
gtlt = '';
- if (gtlt && anyX) {
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
// replace X with 0
- if (xM)
- M = 0;
if (xm)
m = 0;
if (xp)
@@ -870,9 +890,7 @@ function replaceXRange(comp, loose) {
// >1.2 => >=1.3.0
// >1.2.3 => >= 1.2.4
gtlt = '>=';
- if (xM) {
- // no change
- } else if (xm) {
+ if (xm) {
M = +M + 1;
m = 0;
p = 0;
@@ -880,13 +898,17 @@ function replaceXRange(comp, loose) {
m = +m + 1;
p = 0;
}
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm)
+ M = +M + 1
+ else
+ m = +m + 1
}
-
ret = gtlt + M + '.' + m + '.' + p;
- } else if (xM) {
- // allow any
- ret = '*';
} else if (xm) {
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
} else if (xp) {
diff --git a/deps/npm/node_modules/semver/semver.min.js b/deps/npm/node_modules/semver/semver.min.js
index 0dd841c..56c9249 100644
--- a/deps/npm/node_modules/semver/semver.min.js
+++ b/deps/npm/node_modules/semver/semver.min.js
@@ -1 +1 @@
-(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var o=n++;t[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var a=n++;t[a]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[o]+")";var l=n++;t[l]="(?:"+t[s]+"|"+t[o]+")";var c=n++;t[c]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var p=n++;t[p]="(?:-?("+t[l]+"(?:\\."+t[l]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[a]+t[c]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[p]+"?"+t[v]+"?";var y=n++;t[y]="^"+w+"$";var d=n++;t[d]="((?:<|>)?=?)";var b=n++;t[b]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var $=n++;t[$]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:"+t[c]+")?"+t[v]+"?"+")?)?";var k=n++;t[k]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:"+t[p]+")?"+t[v]+"?"+")?)?";var E=n++;t[E]="^"+t[d]+"\\s*"+t[$]+"$";var x=n++;t[x]="^"+t[d]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[$]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[$]+"$";var P=n++;t[P]="^"+t[A]+t[k]+"$";var Z=n++;t[Z]="^"+t[d]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[d]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[d]+"\\s*("+w+"|"+t[$]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[$]+")"+"\\s+-\\s+"+"("+t[$]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre");break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre");break;case"prepatch":this.prerelease.length=0;this.inc("patch");this.inc("pre");break;case"prerelease":if(this.prerelease.length===0)this.inc("patch");this.inc("pre");break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=or;function or(e,r,t){return W(e,r,t)!==0}e.gte=ar;function ar(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=or(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=ar(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=lr;function lr(e,r){if(e instanceof lr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof lr))return new lr(e,r);this.loose=r;this.parse(e);if(this.semver===cr)this.value="";else this.value=this.operator+this.semver.version}var cr={};lr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(this.operator==="=")this.operator="";if(!n[2])this.semver=cr;else this.semver=new H(n[2],this.loose)};lr.prototype.inspect=function(){return''};lr.prototype.toString=function(){return this.value};lr.prototype.test=function(e){if(this.semver===cr)return true;if(typeof e==="string")e=new H(e,this.loose);return ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return''};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,kr);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new lr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=yr(e,r);e=gr(e,r);e=br(e,r);e=$r(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(mr(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function yr(e,r){return e.trim().split(/\s+/).map(function(e){return dr(e,r)}).join(" ")}function dr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function br(e,r){return e.split(/\s+/).map(function(e){return jr(e,r)}).join(" ")}function jr(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var o=mr(t);var a=o||mr(n);var f=a||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(o)t=0;if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(o){}else if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i}else if(o){e="*"}else if(a){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function $r(e,t){return e.trim().replace(r[O],"")}function kr(e,r,t,n,i,s,o,a,f,u,l,c,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0";else if(mr(i))r=">="+t+"."+n+".0";else r=">="+r;if(mr(f))a="";else if(mr(u))a="<"+(+f+1)+".0.0";else if(mr(l))a="<"+f+"."+(+u+1)+".0";else if(c)a="<="+f+"."+u+"."+l+"-"+c;else a="<="+a;return(r+" "+a).trim()}pr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new H(e,this.loose);for(var r=0;r0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=xr;function xr(e,r,t){try{r=new pr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Rr;function Rr(e,r,t){return e.filter(function(e){return xr(e,r,t)}).sort(function(e,r){return er(e,r,t)})[0]||null}e.validRange=Sr;function Sr(e,r){try{return new pr(e,r).range||"*"}catch(t){return null}}e.ltr=Vr;function Vr(e,r,t){return Tr(e,r,"<",t)}e.gtr=Ir;function Ir(e,r,t){return Tr(e,r,">",t)}e.outside=Tr;function Tr(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,o,a,f;switch(t){case">":i=nr;s=fr;o=ir;a=">";f=">=";break;case"<":i=ir;s=ar;o=nr;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u)?=?)";var b=n++;t[b]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var $=n++;t[$]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:"+t[p]+")?"+t[v]+"?"+")?)?";var k=n++;t[k]="[v=\\s]*("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:\\.("+t[b]+")"+"(?:"+t[c]+")?"+t[v]+"?"+")?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[$]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[k]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[$]+"$";var T=n++;t[T]="^"+t[R]+t[k]+"$";var A=n++;t[A]="(?:\\^)";var C=n++;t[C]="(\\s*)"+t[A]+"\\s+";r[C]=new RegExp(t[C],"g");var M="$1^";var z=n++;t[z]="^"+t[A]+t[$]+"$";var N=n++;t[N]="^"+t[A]+t[k]+"$";var P=n++;t[P]="^"+t[y]+"\\s*("+w+")$|^$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+g+")$|^$";var q=n++;t[q]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[$]+")";r[q]=new RegExp(t[q],"g");var L="$1$2$3";var X=n++;t[X]="^\\s*("+t[$]+")"+"\\s+-\\s+"+"("+t[$]+")"+"\\s*$";var _=n++;t[_]="^\\s*("+t[k]+")"+"\\s+-\\s+"+"("+t[k]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new H(e,t).inc(r,n).version}catch(i){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=ar;function ar(e,r,t){return W(e,r,t)!==0}e.gte=or;function or(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=ar(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=or(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=lr;function lr(e,r){if(e instanceof lr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof lr))return new lr(e,r);this.loose=r;this.parse(e);if(this.semver===pr)this.value="";else this.value=this.operator+this.semver.version}var pr={};lr.prototype.parse=function(e){var t=this.loose?r[P]:r[Z];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(this.operator==="=")this.operator="";if(!n[2])this.semver=pr;else this.semver=new H(n[2],this.loose)};lr.prototype.inspect=function(){return''};lr.prototype.toString=function(){return this.value};lr.prototype.test=function(e){if(this.semver===pr)return true;if(typeof e==="string")e=new H(e,this.loose);return ur(e,this.operator,this.semver,this.loose)};e.Range=cr;function cr(e,r){if(e instanceof cr&&e.loose===r)return e;if(!(this instanceof cr))return new cr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}cr.prototype.inspect=function(){return''};cr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};cr.prototype.toString=function(){return this.range};cr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[_]:r[X];e=e.replace(n,kr);e=e.replace(r[q],L);e=e.replace(r[S],V);e=e.replace(r[C],M);e=e.split(/\s+/).join(" ");var i=t?r[P]:r[Z];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new lr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new cr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=br(e,r);e=$r(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[T]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(mr(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[N]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function br(e,r){return e.split(/\s+/).map(function(e){return jr(e,r)}).join(" ")}function jr(e,t){e=e.trim();var n=t?r[x]:r[E];return e.replace(n,function(e,r,t,n,i,s){var a=mr(t);var o=a||mr(n);var f=o||mr(i);var u=f;if(r==="="&&u)r="";if(a){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(o)n=0;if(f)i=0;if(r===">"){r=">=";if(o){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(o)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(o){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function $r(e,t){return e.trim().replace(r[O],"")}function kr(e,r,t,n,i,s,a,o,f,u,l,p,c){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0";else if(mr(i))r=">="+t+"."+n+".0";else r=">="+r;if(mr(f))o="";else if(mr(u))o="<"+(+f+1)+".0.0";else if(mr(l))o="<"+f+"."+(+u+1)+".0";else if(p)o="<="+f+"."+u+"."+l+"-"+p;else o="<="+o;return(r+" "+o).trim()}cr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new H(e,this.loose);for(var r=0;r0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=xr;function xr(e,r,t){try{r=new cr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Rr;function Rr(e,r,t){return e.filter(function(e){return xr(e,r,t)}).sort(function(e,r){return er(e,r,t)})[0]||null}e.validRange=Sr;function Sr(e,r){try{return new cr(e,r).range||"*"}catch(t){return null}}e.ltr=Vr;function Vr(e,r,t){return Tr(e,r,"<",t)}e.gtr=Ir;function Ir(e,r,t){return Tr(e,r,">",t)}e.outside=Tr;function Tr(e,r,t,n){e=new H(e,n);r=new cr(r,n);var i,s,a,o,f;switch(t){case">":i=nr;s=fr;a=ir;o=">";f=">=";break;case"<":i=ir;s=or;a=nr;o="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u1.2.3', null],
+ ['~1.2.3', null],
+ ['<=1.2.3', null],
+ ['1.2.x', null]
].forEach(function(tuple) {
var range = tuple[0];
var version = tuple[1];
diff --git a/deps/npm/node_modules/semver/test/gtr.js b/deps/npm/node_modules/semver/test/gtr.js
index 8537fac..bbb8789 100644
--- a/deps/npm/node_modules/semver/test/gtr.js
+++ b/deps/npm/node_modules/semver/test/gtr.js
@@ -66,7 +66,7 @@ test('\ngtr tests', function(t) {
['<1', '1.0.0beta', true],
['< 1', '1.0.0beta', true],
['=0.7.x', '0.8.2'],
- ['<=0.7.x', '0.7.2']
+ ['<0.7.x', '0.7.2']
].forEach(function(tuple) {
var range = tuple[0];
var version = tuple[1];
diff --git a/deps/npm/node_modules/semver/test/index.js b/deps/npm/node_modules/semver/test/index.js
index 9f9a36d..de8acae 100644
--- a/deps/npm/node_modules/semver/test/index.js
+++ b/deps/npm/node_modules/semver/test/index.js
@@ -201,6 +201,7 @@ test('\nrange tests', function(t) {
['~v0.5.4-pre', '0.5.5'],
['~v0.5.4-pre', '0.5.4'],
['=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.7.2'],
['>=0.7.x', '0.7.2'],
['<=0.7.x', '0.6.2'],
['~1.2.1 >=1.2.3', '1.2.3'],
@@ -290,7 +291,7 @@ test('\nnegative range tests', function(t) {
['~v0.5.4-beta', '0.5.4-alpha'],
['=0.7.x', '0.8.2'],
['>=0.7.x', '0.6.2'],
- ['<=0.7.x', '0.7.2'],
+ ['<0.7.x', '0.7.2'],
['<1.2.3', '1.2.3-beta'],
['=1.2.3', '1.2.3-beta'],
['>1.2', '1.2.8'],
@@ -312,8 +313,8 @@ test('\nnegative range tests', function(t) {
});
test('\nincrement versions test', function(t) {
- // [version, inc, result]
- // inc(version, inc) -> result
+// [version, inc, result, identifier]
+// inc(version, inc) -> result
[['1.2.3', 'major', '2.0.0'],
['1.2.3', 'minor', '1.3.0'],
['1.2.3', 'patch', '1.2.4'],
@@ -352,14 +353,59 @@ test('\nincrement versions test', function(t) {
['1.2.0', 'premajor', '2.0.0-0'],
['1.2.3-1', 'premajor', '2.0.0-0'],
['1.2.0-1', 'minor', '1.2.0'],
- ['1.0.0-1', 'major', '1.0.0']
+ ['1.0.0-1', 'major', '1.0.0'],
+
+ ['1.2.3', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3', 'patch', '1.2.4', false, 'dev'],
+ ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
+ ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'fake', null, false, 'dev'],
+ ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
+ ['fake', 'major', null, false, 'dev'],
+ ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
+ ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
+ ['1.2.0', 'prepatch', '1.2.1-dev.0', 'dev'],
+ ['1.2.0-1', 'prepatch', '1.2.1-dev.0', 'dev'],
+ ['1.2.0', 'preminor', '1.3.0-dev.0', 'dev'],
+ ['1.2.3-1', 'preminor', '1.3.0-dev.0', 'dev'],
+ ['1.2.0', 'premajor', '2.0.0-dev.0', 'dev'],
+ ['1.2.3-1', 'premajor', '2.0.0-dev.0', 'dev'],
+ ['1.2.0-1', 'minor', '1.2.0', 'dev'],
+ ['1.0.0-1', 'major', '1.0.0', 'dev'],
+ ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
+
].forEach(function(v) {
var pre = v[0];
var what = v[1];
var wanted = v[2];
var loose = v[3];
- var found = inc(pre, what, loose);
- t.equal(found, wanted, 'inc(' + pre + ', ' + what + ') === ' + wanted);
+ var id = v[4];
+ var found = inc(pre, what, loose, id);
+ var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
+ t.equal(found, wanted, cmd + ' === ' + wanted);
});
t.end();
@@ -371,7 +417,7 @@ test('\nvalid range test', function(t) {
// translate ranges into their canonical form
[['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
['1.0.0', '1.0.0'],
- ['>=*', '>=0.0.0'],
+ ['>=*', '*'],
['', '*'],
['*', '*'],
['*', '*'],
@@ -458,7 +504,7 @@ test('\ncomparators test', function(t) {
// turn range into a set of individual comparators
[['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
['1.0.0', [['1.0.0']]],
- ['>=*', [['>=0.0.0']]],
+ ['>=*', [['']]],
['', [['']]],
['*', [['']]],
['*', [['']]],
@@ -522,7 +568,9 @@ test('\ncomparators test', function(t) {
['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
- ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]]
+ ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
+ ['>*', [['<0.0.0']]],
+ ['<*', [['<0.0.0']]]
].forEach(function(v) {
var pre = v[0];
var wanted = v[1];
diff --git a/deps/npm/node_modules/sha/.npmignore b/deps/npm/node_modules/sha/.npmignore
index ac4d7d1..fcfd944 100644
--- a/deps/npm/node_modules/sha/.npmignore
+++ b/deps/npm/node_modules/sha/.npmignore
@@ -1,4 +1,4 @@
-node_modules
-test
-.gitignore
+node_modules
+test
+.gitignore
.travis.yml
\ No newline at end of file
diff --git a/deps/npm/node_modules/sha/LICENSE b/deps/npm/node_modules/sha/LICENSE
index 3d8f089..048a6f9 100644
--- a/deps/npm/node_modules/sha/LICENSE
+++ b/deps/npm/node_modules/sha/LICENSE
@@ -1,46 +1,46 @@
-Copyright (c) 2013 Forbes Lindesay
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The MIT License (MIT)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+Copyright (c) 2013 Forbes Lindesay
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The MIT License (MIT)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
diff --git a/deps/npm/node_modules/sha/README.md b/deps/npm/node_modules/sha/README.md
index c881194..a2b300c 100644
--- a/deps/npm/node_modules/sha/README.md
+++ b/deps/npm/node_modules/sha/README.md
@@ -1,49 +1,49 @@
-# sha
-
-Check and get file hashes (using any algorithm)
-
-[![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha)
-[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/sha.svg)](https://gemnasium.com/ForbesLindesay/sha)
-[![NPM version](https://img.shields.io/npm/v/sha.svg)](http://badge.fury.io/js/sha)
-
-## Installation
-
- $ npm install sha
-
-## API
-
-### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
-
-Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### get(fileName, [options,] cb) / getSync(filename, [options])
-
-Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### stream(expected, [options])
-
-Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
-
-```js
-fs.createReadStream('src')
- .pipe(sha.stream('expected'))
- .pipe(fs.createWriteStream('dest'))
-```
-
-`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-## License
-
+# sha
+
+Check and get file hashes (using any algorithm)
+
+[![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha)
+[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/sha.svg)](https://gemnasium.com/ForbesLindesay/sha)
+[![NPM version](https://img.shields.io/npm/v/sha.svg)](http://badge.fury.io/js/sha)
+
+## Installation
+
+ $ npm install sha
+
+## API
+
+### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
+
+Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+### get(fileName, [options,] cb) / getSync(filename, [options])
+
+Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+### stream(expected, [options])
+
+Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
+
+```js
+fs.createReadStream('src')
+ .pipe(sha.stream('expected'))
+ .pipe(fs.createWriteStream('dest'))
+```
+
+`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
+
+Options:
+
+- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
+
+## License
+
You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.
\ No newline at end of file
diff --git a/deps/npm/node_modules/sha/index.js b/deps/npm/node_modules/sha/index.js
index 45f152c..d50ac2f 100644
--- a/deps/npm/node_modules/sha/index.js
+++ b/deps/npm/node_modules/sha/index.js
@@ -1,120 +1,120 @@
-'use strict'
-
-var Transform = require('stream').Transform || require('readable-stream').Transform
-var crypto = require('crypto')
-var fs
-try {
- fs = require('graceful-fs')
-} catch (ex) {
- fs = require('fs')
-}
-try {
- process.binding('crypto')
-} catch (e) {
- var er = new Error( 'crypto binding not found.\n'
- + 'Please build node with openssl.\n'
- + e.message )
- throw er
-}
-
-exports.check = check
-exports.checkSync = checkSync
-exports.get = get
-exports.getSync = getSync
-exports.stream = stream
-
-function check(file, expected, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- expected = expected.toLowerCase().trim()
- get(file, options, function (er, actual) {
- if (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- return cb(er)
- }
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual))
- })
-}
-function checkSync(file, expected, options) {
- expected = expected.toLowerCase().trim()
- var actual
- try {
- actual = getSync(file, options)
- } catch (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- throw er
- }
- if (actual !== expected) {
- var ex = new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual)
- throw ex
- }
-}
-
-
-function get(file, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.createReadStream(file)
- var errState = null
- source
- .on('error', function (er) {
- if (errState) return
- return cb(errState = er)
- })
- .on('data', function (chunk) {
- if (errState) return
- hash.update(chunk)
- })
- .on('end', function () {
- if (errState) return
- var actual = hash.digest("hex").toLowerCase().trim()
- cb(null, actual)
- })
-}
-
-function getSync(file, options) {
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.readFileSync(file)
- hash.update(source)
- return hash.digest("hex").toLowerCase().trim()
-}
-
-function stream(expected, options) {
- expected = expected.toLowerCase().trim()
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
-
- var stream = new Transform()
- stream._transform = function (chunk, encoding, callback) {
- hash.update(chunk)
- stream.push(chunk)
- callback()
- }
- stream._flush = function (cb) {
- var actual = hash.digest("hex").toLowerCase().trim()
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for:\n'
- + ' Expected: ' + expected + '\n'
- + ' Actual: ' + actual))
- this.push(null)
- }
- return stream
+'use strict'
+
+var Transform = require('stream').Transform || require('readable-stream').Transform
+var crypto = require('crypto')
+var fs
+try {
+ fs = require('graceful-fs')
+} catch (ex) {
+ fs = require('fs')
+}
+try {
+ process.binding('crypto')
+} catch (e) {
+ var er = new Error( 'crypto binding not found.\n'
+ + 'Please build node with openssl.\n'
+ + e.message )
+ throw er
+}
+
+exports.check = check
+exports.checkSync = checkSync
+exports.get = get
+exports.getSync = getSync
+exports.stream = stream
+
+function check(file, expected, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = undefined
+ }
+ expected = expected.toLowerCase().trim()
+ get(file, options, function (er, actual) {
+ if (er) {
+ if (er.message) er.message += ' while getting shasum for ' + file
+ return cb(er)
+ }
+ if (actual === expected) return cb(null)
+ cb(new Error(
+ 'shasum check failed for ' + file + '\n'
+ + 'Expected: ' + expected + '\n'
+ + 'Actual: ' + actual))
+ })
+}
+function checkSync(file, expected, options) {
+ expected = expected.toLowerCase().trim()
+ var actual
+ try {
+ actual = getSync(file, options)
+ } catch (er) {
+ if (er.message) er.message += ' while getting shasum for ' + file
+ throw er
+ }
+ if (actual !== expected) {
+ var ex = new Error(
+ 'shasum check failed for ' + file + '\n'
+ + 'Expected: ' + expected + '\n'
+ + 'Actual: ' + actual)
+ throw ex
+ }
+}
+
+
+function get(file, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = undefined
+ }
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+ var source = fs.createReadStream(file)
+ var errState = null
+ source
+ .on('error', function (er) {
+ if (errState) return
+ return cb(errState = er)
+ })
+ .on('data', function (chunk) {
+ if (errState) return
+ hash.update(chunk)
+ })
+ .on('end', function () {
+ if (errState) return
+ var actual = hash.digest("hex").toLowerCase().trim()
+ cb(null, actual)
+ })
+}
+
+function getSync(file, options) {
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+ var source = fs.readFileSync(file)
+ hash.update(source)
+ return hash.digest("hex").toLowerCase().trim()
+}
+
+function stream(expected, options) {
+ expected = expected.toLowerCase().trim()
+ options = options || {}
+ var algorithm = options.algorithm || 'sha1'
+ var hash = crypto.createHash(algorithm)
+
+ var stream = new Transform()
+ stream._transform = function (chunk, encoding, callback) {
+ hash.update(chunk)
+ stream.push(chunk)
+ callback()
+ }
+ stream._flush = function (cb) {
+ var actual = hash.digest("hex").toLowerCase().trim()
+ if (actual === expected) return cb(null)
+ cb(new Error(
+ 'shasum check failed for:\n'
+ + ' Expected: ' + expected + '\n'
+ + ' Actual: ' + actual))
+ this.push(null)
+ }
+ return stream
}
\ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE
index 0c44ae7..e3d4e69 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE
@@ -1,27 +1,18 @@
-Copyright (c) Isaac Z. Schlueter ("Author")
-All rights reserved.
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The BSD License
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md
index 34c1189..e46b823 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md
@@ -2,8 +2,8 @@
***Node-core streams for userland***
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/)
This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch
new file mode 100644
index 0000000..b984607
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch
@@ -0,0 +1,923 @@
+diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js
+index c5a741c..a2e0d8e 100644
+--- a/lib/_stream_duplex.js
++++ b/lib/_stream_duplex.js
+@@ -26,8 +26,8 @@
+
+ module.exports = Duplex;
+ var util = require('util');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('./_stream_readable');
++var Writable = require('./_stream_writable');
+
+ util.inherits(Duplex, Readable);
+
+diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
+index a5e9864..330c247 100644
+--- a/lib/_stream_passthrough.js
++++ b/lib/_stream_passthrough.js
+@@ -25,7 +25,7 @@
+
+ module.exports = PassThrough;
+
+-var Transform = require('_stream_transform');
++var Transform = require('./_stream_transform');
+ var util = require('util');
+ util.inherits(PassThrough, Transform);
+
+diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
+index 0c3fe3e..90a8298 100644
+--- a/lib/_stream_readable.js
++++ b/lib/_stream_readable.js
+@@ -23,10 +23,34 @@ module.exports = Readable;
+ Readable.ReadableState = ReadableState;
+
+ var EE = require('events').EventEmitter;
++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
++ return emitter.listeners(type).length;
++};
++
++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) {
++ return setTimeout(fn, 0);
++};
++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) {
++ return clearTimeout(i);
++};
++
+ var Stream = require('stream');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var StringDecoder;
+-var debug = util.debuglog('stream');
++var debug;
++if (util.debuglog)
++ debug = util.debuglog('stream');
++else try {
++ debug = require('debuglog')('stream');
++} catch (er) {
++ debug = function() {};
++}
+
+ util.inherits(Readable, Stream);
+
+@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) {
+
+
+ function onEofChunk(stream, state) {
+- if (state.decoder && !state.ended) {
++ if (state.decoder && !state.ended && state.decoder.end) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
+index b1f9fcc..b0caf57 100644
+--- a/lib/_stream_transform.js
++++ b/lib/_stream_transform.js
+@@ -64,8 +64,14 @@
+
+ module.exports = Transform;
+
+-var Duplex = require('_stream_duplex');
++var Duplex = require('./_stream_duplex');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ util.inherits(Transform, Duplex);
+
+
+diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
+index ba2e920..f49288b 100644
+--- a/lib/_stream_writable.js
++++ b/lib/_stream_writable.js
+@@ -27,6 +27,12 @@ module.exports = Writable;
+ Writable.WritableState = WritableState;
+
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var Stream = require('stream');
+
+ util.inherits(Writable, Stream);
+@@ -119,7 +125,7 @@ function WritableState(options, stream) {
+ function Writable(options) {
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex')))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js
+index e3787e4..8cd2127 100644
+--- a/test/simple/test-stream-big-push.js
++++ b/test/simple/test-stream-big-push.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var str = 'asdfasdfasdfasdfasdf';
+
+ var r = new stream.Readable({
+diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js
+index bb73777..d40efc7 100644
+--- a/test/simple/test-stream-end-paused.js
++++ b/test/simple/test-stream-end-paused.js
+@@ -25,7 +25,7 @@ var gotEnd = false;
+
+ // Make sure we don't miss the end event for paused 0-length streams
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var stream = new Readable();
+ var calledRead = false;
+ stream._read = function() {
+diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js
+index b46ee90..0be8366 100644
+--- a/test/simple/test-stream-pipe-after-end.js
++++ b/test/simple/test-stream-pipe-after-end.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var util = require('util');
+
+ util.inherits(TestReadable, Readable);
+diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js
+deleted file mode 100644
+index f689358..0000000
+--- a/test/simple/test-stream-pipe-cleanup.js
++++ /dev/null
+@@ -1,122 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-// This test asserts that Stream.prototype.pipe does not leave listeners
+-// hanging on the source or dest.
+-
+-var common = require('../common');
+-var stream = require('stream');
+-var assert = require('assert');
+-var util = require('util');
+-
+-function Writable() {
+- this.writable = true;
+- this.endCalls = 0;
+- stream.Stream.call(this);
+-}
+-util.inherits(Writable, stream.Stream);
+-Writable.prototype.end = function() {
+- this.endCalls++;
+-};
+-
+-Writable.prototype.destroy = function() {
+- this.endCalls++;
+-};
+-
+-function Readable() {
+- this.readable = true;
+- stream.Stream.call(this);
+-}
+-util.inherits(Readable, stream.Stream);
+-
+-function Duplex() {
+- this.readable = true;
+- Writable.call(this);
+-}
+-util.inherits(Duplex, Writable);
+-
+-var i = 0;
+-var limit = 100;
+-
+-var w = new Writable();
+-
+-var r;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('end');
+-}
+-assert.equal(0, r.listeners('end').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('close');
+-}
+-assert.equal(0, r.listeners('close').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-r = new Readable();
+-
+-for (i = 0; i < limit; i++) {
+- w = new Writable();
+- r.pipe(w);
+- w.emit('close');
+-}
+-assert.equal(0, w.listeners('close').length);
+-
+-r = new Readable();
+-w = new Writable();
+-var d = new Duplex();
+-r.pipe(d); // pipeline A
+-d.pipe(w); // pipeline B
+-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup
+-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-r.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 0);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-d.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 1);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 0);
+-assert.equal(d.listeners('close').length, 0);
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 0);
+diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js
+index c5d724b..c7d6b7d 100644
+--- a/test/simple/test-stream-pipe-error-handling.js
++++ b/test/simple/test-stream-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Stream = require('stream').Stream;
++var Stream = require('../../').Stream;
+
+ (function testErrorListenerCatches() {
+ var source = new Stream();
+diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js
+index cb9d5fe..56f8d61 100644
+--- a/test/simple/test-stream-pipe-event.js
++++ b/test/simple/test-stream-pipe-event.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common');
+-var stream = require('stream');
++var stream = require('../../');
+ var assert = require('assert');
+ var util = require('util');
+
+diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js
+index f2e6ec2..a5c9bf9 100644
+--- a/test/simple/test-stream-push-order.js
++++ b/test/simple/test-stream-push-order.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var assert = require('assert');
+
+ var s = new Readable({
+diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js
+index 06f43dc..1701a9a 100644
+--- a/test/simple/test-stream-push-strings.js
++++ b/test/simple/test-stream-push-strings.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var util = require('util');
+
+ util.inherits(MyStream, Readable);
+diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js
+index ba6a577..a8e6f7b 100644
+--- a/test/simple/test-stream-readable-event.js
++++ b/test/simple/test-stream-readable-event.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ (function first() {
+ // First test, not reading when the readable is added.
+diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js
+index 2891ad6..11689ba 100644
+--- a/test/simple/test-stream-readable-flow-recursion.js
++++ b/test/simple/test-stream-readable-flow-recursion.js
+@@ -27,7 +27,7 @@ var assert = require('assert');
+ // more data continuously, but without triggering a nextTick
+ // warning or RangeError.
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ // throw an error if we trigger a nextTick warning.
+ process.throwDeprecation = true;
+diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js
+index 0c96476..7827538 100644
+--- a/test/simple/test-stream-unshift-empty-chunk.js
++++ b/test/simple/test-stream-unshift-empty-chunk.js
+@@ -24,7 +24,7 @@ var assert = require('assert');
+
+ // This test verifies that stream.unshift(Buffer(0)) or
+ // stream.unshift('') does not set state.reading=false.
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ var r = new Readable();
+ var nChunks = 10;
+diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js
+index 83fd9fa..17c18aa 100644
+--- a/test/simple/test-stream-unshift-read-race.js
++++ b/test/simple/test-stream-unshift-read-race.js
+@@ -29,7 +29,7 @@ var assert = require('assert');
+ // 3. push() after the EOF signaling null is an error.
+ // 4. _read() is not called after pushing the EOF null chunk.
+
+-var stream = require('stream');
++var stream = require('../../');
+ var hwm = 10;
+ var r = stream.Readable({ highWaterMark: hwm });
+ var chunks = 10;
+@@ -51,7 +51,14 @@ r._read = function(n) {
+
+ function push(fast) {
+ assert(!pushedNull, 'push() after null push');
+- var c = pos >= data.length ? null : data.slice(pos, pos + n);
++ var c;
++ if (pos >= data.length)
++ c = null;
++ else {
++ if (n + pos > data.length)
++ n = data.length - pos;
++ c = data.slice(pos, pos + n);
++ }
+ pushedNull = c === null;
+ if (fast) {
+ pos += n;
+diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js
+index 5b49e6e..b5321f3 100644
+--- a/test/simple/test-stream-writev.js
++++ b/test/simple/test-stream-writev.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+
+ var queue = [];
+ for (var decode = 0; decode < 2; decode++) {
+diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js
+index 3814bf0..248c1be 100644
+--- a/test/simple/test-stream2-basic.js
++++ b/test/simple/test-stream2-basic.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js
+index 6cdd4e9..f0fa84b 100644
+--- a/test/simple/test-stream2-compatibility.js
++++ b/test/simple/test-stream2-compatibility.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js
+index 39b274f..006a19b 100644
+--- a/test/simple/test-stream2-finish-pipe.js
++++ b/test/simple/test-stream2-finish-pipe.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Buffer = require('buffer').Buffer;
+
+ var r = new stream.Readable();
+diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js
+deleted file mode 100644
+index e162406..0000000
+--- a/test/simple/test-stream2-fs.js
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-
+-var common = require('../common.js');
+-var R = require('_stream_readable');
+-var assert = require('assert');
+-
+-var fs = require('fs');
+-var FSReadable = fs.ReadStream;
+-
+-var path = require('path');
+-var file = path.resolve(common.fixturesDir, 'x1024.txt');
+-
+-var size = fs.statSync(file).size;
+-
+-var expectLengths = [1024];
+-
+-var util = require('util');
+-var Stream = require('stream');
+-
+-util.inherits(TestWriter, Stream);
+-
+-function TestWriter() {
+- Stream.apply(this);
+- this.buffer = [];
+- this.length = 0;
+-}
+-
+-TestWriter.prototype.write = function(c) {
+- this.buffer.push(c.toString());
+- this.length += c.length;
+- return true;
+-};
+-
+-TestWriter.prototype.end = function(c) {
+- if (c) this.buffer.push(c.toString());
+- this.emit('results', this.buffer);
+-}
+-
+-var r = new FSReadable(file);
+-var w = new TestWriter();
+-
+-w.on('results', function(res) {
+- console.error(res, w.length);
+- assert.equal(w.length, size);
+- var l = 0;
+- assert.deepEqual(res.map(function (c) {
+- return c.length;
+- }), expectLengths);
+- console.log('ok');
+-});
+-
+-r.pipe(w);
+diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js
+deleted file mode 100644
+index 15cffc2..0000000
+--- a/test/simple/test-stream2-httpclient-response-end.js
++++ /dev/null
+@@ -1,52 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-var common = require('../common.js');
+-var assert = require('assert');
+-var http = require('http');
+-var msg = 'Hello';
+-var readable_event = false;
+-var end_event = false;
+-var server = http.createServer(function(req, res) {
+- res.writeHead(200, {'Content-Type': 'text/plain'});
+- res.end(msg);
+-}).listen(common.PORT, function() {
+- http.get({port: common.PORT}, function(res) {
+- var data = '';
+- res.on('readable', function() {
+- console.log('readable event');
+- readable_event = true;
+- data += res.read();
+- });
+- res.on('end', function() {
+- console.log('end event');
+- end_event = true;
+- assert.strictEqual(msg, data);
+- server.close();
+- });
+- });
+-});
+-
+-process.on('exit', function() {
+- assert(readable_event);
+- assert(end_event);
+-});
+-
+diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js
+index 2fbfbca..667985b 100644
+--- a/test/simple/test-stream2-large-read-stall.js
++++ b/test/simple/test-stream2-large-read-stall.js
+@@ -30,7 +30,7 @@ var PUSHSIZE = 20;
+ var PUSHCOUNT = 1000;
+ var HWM = 50;
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable({
+ highWaterMark: HWM
+ });
+@@ -39,23 +39,23 @@ var rs = r._readableState;
+ r._read = push;
+
+ r.on('readable', function() {
+- console.error('>> readable');
++ //console.error('>> readable');
+ do {
+- console.error(' > read(%d)', READSIZE);
++ //console.error(' > read(%d)', READSIZE);
+ var ret = r.read(READSIZE);
+- console.error(' < %j (%d remain)', ret && ret.length, rs.length);
++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length);
+ } while (ret && ret.length === READSIZE);
+
+- console.error('<< after read()',
+- ret && ret.length,
+- rs.needReadable,
+- rs.length);
++ //console.error('<< after read()',
++ // ret && ret.length,
++ // rs.needReadable,
++ // rs.length);
+ });
+
+ var endEmitted = false;
+ r.on('end', function() {
+ endEmitted = true;
+- console.error('end');
++ //console.error('end');
+ });
+
+ var pushes = 0;
+@@ -64,11 +64,11 @@ function push() {
+ return;
+
+ if (pushes++ === PUSHCOUNT) {
+- console.error(' push(EOF)');
++ //console.error(' push(EOF)');
+ return r.push(null);
+ }
+
+- console.error(' push #%d', pushes);
++ //console.error(' push #%d', pushes);
+ if (r.push(new Buffer(PUSHSIZE)))
+ setTimeout(push);
+ }
+diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js
+index 3e6931d..ff47d89 100644
+--- a/test/simple/test-stream2-objects.js
++++ b/test/simple/test-stream2-objects.js
+@@ -21,8 +21,8 @@
+
+
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var assert = require('assert');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js
+index cf7531c..e3f3e4e 100644
+--- a/test/simple/test-stream2-pipe-error-handling.js
++++ b/test/simple/test-stream2-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ (function testErrorListenerCatches() {
+ var count = 1000;
+diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js
+index 5e8e3cb..53b2616 100755
+--- a/test/simple/test-stream2-pipe-error-once-listener.js
++++ b/test/simple/test-stream2-pipe-error-once-listener.js
+@@ -24,7 +24,7 @@ var common = require('../common.js');
+ var assert = require('assert');
+
+ var util = require('util');
+-var stream = require('stream');
++var stream = require('../../');
+
+
+ var Read = function() {
+diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js
+index b63edc3..eb2b0e9 100644
+--- a/test/simple/test-stream2-push.js
++++ b/test/simple/test-stream2-push.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+ var assert = require('assert');
+diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js
+index e8a7305..9740a47 100644
+--- a/test/simple/test-stream2-read-sync-stack.js
++++ b/test/simple/test-stream2-read-sync-stack.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable();
+ var N = 256 * 1024;
+
+diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+index cd30178..4b1659d 100644
+--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js
++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+@@ -22,10 +22,9 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ test1();
+-test2();
+
+ function test1() {
+ var r = new Readable();
+@@ -88,31 +87,3 @@ function test1() {
+ console.log('ok');
+ });
+ }
+-
+-function test2() {
+- var r = new Readable({ encoding: 'base64' });
+- var reads = 5;
+- r._read = function(n) {
+- if (!reads--)
+- return r.push(null); // EOF
+- else
+- return r.push(new Buffer('x'));
+- };
+-
+- var results = [];
+- function flow() {
+- var chunk;
+- while (null !== (chunk = r.read()))
+- results.push(chunk + '');
+- }
+- r.on('readable', flow);
+- r.on('end', function() {
+- results.push('EOF');
+- });
+- flow();
+-
+- process.on('exit', function() {
+- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]);
+- console.log('ok');
+- });
+-}
+diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js
+index 7c96ffe..04a96f5 100644
+--- a/test/simple/test-stream2-readable-from-list.js
++++ b/test/simple/test-stream2-readable-from-list.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var fromList = require('_stream_readable')._fromList;
++var fromList = require('../../lib/_stream_readable')._fromList;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js
+index 675da8e..51fd3d5 100644
+--- a/test/simple/test-stream2-readable-legacy-drain.js
++++ b/test/simple/test-stream2-readable-legacy-drain.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Stream = require('stream');
++var Stream = require('../../');
+ var Readable = Stream.Readable;
+
+ var r = new Readable();
+diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js
+index 7314ae7..c971898 100644
+--- a/test/simple/test-stream2-readable-non-empty-end.js
++++ b/test/simple/test-stream2-readable-non-empty-end.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+
+ var len = 0;
+ var chunks = new Array(10);
+diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js
+index 2e5cf25..fd8a3dc 100644
+--- a/test/simple/test-stream2-readable-wrap-empty.js
++++ b/test/simple/test-stream2-readable-wrap-empty.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+ var EE = require('events').EventEmitter;
+
+ var oldStream = new EE();
+diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js
+index 90eea01..6b177f7 100644
+--- a/test/simple/test-stream2-readable-wrap.js
++++ b/test/simple/test-stream2-readable-wrap.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var EE = require('events').EventEmitter;
+
+ var testRuns = 0, completedRuns = 0;
+diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js
+index 5d2c32a..685531b 100644
+--- a/test/simple/test-stream2-set-encoding.js
++++ b/test/simple/test-stream2-set-encoding.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var util = require('util');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js
+index 9c9ddd8..a0cacc6 100644
+--- a/test/simple/test-stream2-transform.js
++++ b/test/simple/test-stream2-transform.js
+@@ -21,8 +21,8 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var PassThrough = require('_stream_passthrough');
+-var Transform = require('_stream_transform');
++var PassThrough = require('../../').PassThrough;
++var Transform = require('../../').Transform;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js
+index d66dc3c..365b327 100644
+--- a/test/simple/test-stream2-unpipe-drain.js
++++ b/test/simple/test-stream2-unpipe-drain.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var crypto = require('crypto');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js
+index 99f8746..17c92ae 100644
+--- a/test/simple/test-stream2-unpipe-leak.js
++++ b/test/simple/test-stream2-unpipe-leak.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ var chunk = new Buffer('hallo');
+
+diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js
+index 704100c..209c3a6 100644
+--- a/test/simple/test-stream2-writable.js
++++ b/test/simple/test-stream2-writable.js
+@@ -20,8 +20,8 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var W = require('_stream_writable');
+-var D = require('_stream_duplex');
++var W = require('../../').Writable;
++var D = require('../../').Duplex;
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js
+index b91bde3..2f72c15 100644
+--- a/test/simple/test-stream3-pause-then-read.js
++++ b/test/simple/test-stream3-pause-then-read.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
index 6307220..19ab358 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
@@ -49,15 +49,29 @@ util.inherits = require('inherits');
var StringDecoder;
+
+/**/
+var debug = require('util');
+if (debug && debug.debuglog) {
+ debug = debug.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/* */
+
+
util.inherits(Readable, Stream);
function ReadableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
options = options || {};
// the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
@@ -66,19 +80,13 @@ function ReadableState(options, stream) {
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
- this.flowing = false;
+ this.flowing = null;
this.ended = false;
this.endEmitted = false;
this.reading = false;
- // In streams that never have any data, and do push(null) right away,
- // the consumer can miss the 'end' event if they do some I/O before
- // consuming the stream. So, we don't emit('end') until some reading
- // happens.
- this.calledRead = false;
-
// a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
+ // or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
@@ -94,6 +102,9 @@ function ReadableState(options, stream) {
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
@@ -120,6 +131,8 @@ function ReadableState(options, stream) {
}
function Readable(options) {
+ var Duplex = require('./_stream_duplex');
+
if (!(this instanceof Readable))
return new Readable(options);
@@ -138,7 +151,7 @@ function Readable(options) {
Readable.prototype.push = function(chunk, encoding) {
var state = this._readableState;
- if (typeof chunk === 'string' && !state.objectMode) {
+ if (util.isString(chunk) && !state.objectMode) {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
chunk = new Buffer(chunk, encoding);
@@ -159,7 +172,7 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
- } else if (chunk === null || chunk === undefined) {
+ } else if (util.isNullOrUndefined(chunk)) {
state.reading = false;
if (!state.ended)
onEofChunk(stream, state);
@@ -174,17 +187,24 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) {
if (state.decoder && !addToFront && !encoding)
chunk = state.decoder.write(chunk);
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) {
- state.buffer.unshift(chunk);
- } else {
+ if (!addToFront)
state.reading = false;
- state.buffer.push(chunk);
- }
- if (state.needReadable)
- emitReadable(stream);
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
maybeReadMore(stream, state);
}
@@ -217,6 +237,7 @@ Readable.prototype.setEncoding = function(enc) {
StringDecoder = require('string_decoder/').StringDecoder;
this._readableState.decoder = new StringDecoder(enc);
this._readableState.encoding = enc;
+ return this;
};
// Don't raise the hwm > 128MB
@@ -240,7 +261,7 @@ function howMuchToRead(n, state) {
if (state.objectMode)
return n === 0 ? 0 : 1;
- if (n === null || isNaN(n)) {
+ if (isNaN(n) || util.isNull(n)) {
// only flow one buffer at a time
if (state.flowing && state.buffer.length)
return state.buffer[0].length;
@@ -272,12 +293,11 @@ function howMuchToRead(n, state) {
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
+ debug('read', n);
var state = this._readableState;
- state.calledRead = true;
var nOrig = n;
- var ret;
- if (typeof n !== 'number' || n > 0)
+ if (!util.isNumber(n) || n > 0)
state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
@@ -286,7 +306,11 @@ Readable.prototype.read = function(n) {
if (n === 0 &&
state.needReadable &&
(state.length >= state.highWaterMark || state.ended)) {
- emitReadable(this);
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
return null;
}
@@ -294,28 +318,9 @@ Readable.prototype.read = function(n) {
// if we've ended, and we're now clear, then finish it up.
if (n === 0 && state.ended) {
- ret = null;
-
- // In cases where the decoder did not receive enough data
- // to produce a full chunk, then immediately received an
- // EOF, state.buffer will contain [, ].
- // howMuchToRead will see this and coerce the amount to
- // read to zero (because it's looking at the length of the
- // first in state.buffer), and we'll end up here.
- //
- // This can only happen via state.decoder -- no other venue
- // exists for pushing a zero-length chunk into state.buffer
- // and triggering this behavior. In this case, we return our
- // remaining data and end the stream, if appropriate.
- if (state.length > 0 && state.decoder) {
- ret = fromList(n, state);
- state.length -= ret.length;
- }
-
if (state.length === 0)
endReadable(this);
-
- return ret;
+ return null;
}
// All the actual chunk generation logic needs to be
@@ -342,17 +347,23 @@ Readable.prototype.read = function(n) {
// if we need a readable event, then we need to do some reading.
var doRead = state.needReadable;
+ debug('need readable', doRead);
// if we currently have less than the highWaterMark, then also read some
- if (state.length - n <= state.highWaterMark)
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
doRead = true;
+ debug('length less than watermark', doRead);
+ }
// however, if we've ended, then there's no point, and if we're already
// reading, then it's unnecessary.
- if (state.ended || state.reading)
+ if (state.ended || state.reading) {
doRead = false;
+ debug('reading or ended', doRead);
+ }
if (doRead) {
+ debug('do read');
state.reading = true;
state.sync = true;
// if the length is currently zero, then we *need* a readable event.
@@ -363,18 +374,18 @@ Readable.prototype.read = function(n) {
state.sync = false;
}
- // If _read called its callback synchronously, then `reading`
- // will be false, and we need to re-evaluate how much data we
- // can return to the user.
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
if (doRead && !state.reading)
n = howMuchToRead(nOrig, state);
+ var ret;
if (n > 0)
ret = fromList(n, state);
else
ret = null;
- if (ret === null) {
+ if (util.isNull(ret)) {
state.needReadable = true;
n = 0;
}
@@ -386,21 +397,21 @@ Readable.prototype.read = function(n) {
if (state.length === 0 && !state.ended)
state.needReadable = true;
- // If we happened to read() exactly the remaining amount in the
- // buffer, and the EOF has been seen at this point, then make sure
- // that we emit 'end' on the very next tick.
- if (state.ended && !state.endEmitted && state.length === 0)
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
endReadable(this);
+ if (!util.isNull(ret))
+ this.emit('data', ret);
+
return ret;
};
function chunkInvalid(state, chunk) {
var er = null;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
!state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
@@ -418,12 +429,8 @@ function onEofChunk(stream, state) {
}
state.ended = true;
- // if we've ended and we have some data left, then emit
- // 'readable' now to make sure it gets picked up.
- if (state.length > 0)
- emitReadable(stream);
- else
- endReadable(stream);
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
}
// Don't emit readable right away in sync mode, because this can trigger
@@ -432,20 +439,22 @@ function onEofChunk(stream, state) {
function emitReadable(stream) {
var state = stream._readableState;
state.needReadable = false;
- if (state.emittedReadable)
- return;
-
- state.emittedReadable = true;
- if (state.sync)
- process.nextTick(function() {
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
emitReadable_(stream);
- });
- else
- emitReadable_(stream);
+ }
}
function emitReadable_(stream) {
+ debug('emit readable');
stream.emit('readable');
+ flow(stream);
}
@@ -468,6 +477,7 @@ function maybeReadMore_(stream, state) {
var len = state.length;
while (!state.reading && !state.flowing && !state.ended &&
state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
stream.read(0);
if (len === state.length)
// didn't get any data, stop spinning.
@@ -502,6 +512,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
break;
}
state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
dest !== process.stdout &&
@@ -515,11 +526,14 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
dest.on('unpipe', onunpipe);
function onunpipe(readable) {
- if (readable !== src) return;
- cleanup();
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
}
function onend() {
+ debug('onend');
dest.end();
}
@@ -531,6 +545,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
dest.on('drain', ondrain);
function cleanup() {
+ debug('cleanup');
// cleanup event handlers once the pipe is broken
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
@@ -539,19 +554,34 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
dest.removeListener('unpipe', onunpipe);
src.removeListener('end', onend);
src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
// if the reader is waiting for a drain event from this
// specific writer, then it would cause it to never start
// flowing again.
// So, if this is awaiting a drain, then we just call it now.
// If we don't know, then assume that we are waiting for one.
- if (!dest._writableState || dest._writableState.needDrain)
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
ondrain();
}
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ debug('false write response, pause',
+ src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ src.pause();
+ }
+ }
+
// if the dest has an error, then stop piping into it.
// however, don't suppress the throwing behavior for this.
function onerror(er) {
+ debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
if (EE.listenerCount(dest, 'error') === 0)
@@ -575,12 +605,14 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
}
dest.once('close', onclose);
function onfinish() {
+ debug('onfinish');
dest.removeListener('close', onclose);
unpipe();
}
dest.once('finish', onfinish);
function unpipe() {
+ debug('unpipe');
src.unpipe(dest);
}
@@ -589,16 +621,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
// start the flow if it hasn't been started already.
if (!state.flowing) {
- // the handler that waits for readable events after all
- // the data gets sucked out in flow.
- // This would be easier to follow with a .once() handler
- // in flow(), but that is too slow.
- this.on('readable', pipeOnReadable);
-
- state.flowing = true;
- process.nextTick(function() {
- flow(src);
- });
+ debug('pipe resume');
+ src.resume();
}
return dest;
@@ -606,63 +630,15 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
function pipeOnDrain(src) {
return function() {
- var dest = this;
var state = src._readableState;
- state.awaitDrain--;
- if (state.awaitDrain === 0)
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
+ state.flowing = true;
flow(src);
- };
-}
-
-function flow(src) {
- var state = src._readableState;
- var chunk;
- state.awaitDrain = 0;
-
- function write(dest, i, list) {
- var written = dest.write(chunk);
- if (false === written) {
- state.awaitDrain++;
}
- }
-
- while (state.pipesCount && null !== (chunk = src.read())) {
-
- if (state.pipesCount === 1)
- write(state.pipes, 0, null);
- else
- forEach(state.pipes, write);
-
- src.emit('data', chunk);
-
- // if anyone needs a drain, then we have to wait for that.
- if (state.awaitDrain > 0)
- return;
- }
-
- // if every destination was unpiped, either before entering this
- // function, or in the while loop, then stop flowing.
- //
- // NB: This is a pretty rare edge case.
- if (state.pipesCount === 0) {
- state.flowing = false;
-
- // if there were data event listeners added, then switch to old mode.
- if (EE.listenerCount(src, 'data') > 0)
- emitDataEvents(src);
- return;
- }
-
- // at this point, no one needed a drain, so we just ran out of data
- // on the next readable event, start it over again.
- state.ranOut = true;
-}
-
-function pipeOnReadable() {
- if (this._readableState.ranOut) {
- this._readableState.ranOut = false;
- flow(this);
- }
+ };
}
@@ -685,7 +661,6 @@ Readable.prototype.unpipe = function(dest) {
// got a match.
state.pipes = null;
state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
state.flowing = false;
if (dest)
dest.emit('unpipe', this);
@@ -700,7 +675,6 @@ Readable.prototype.unpipe = function(dest) {
var len = state.pipesCount;
state.pipes = null;
state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
state.flowing = false;
for (var i = 0; i < len; i++)
@@ -728,8 +702,11 @@ Readable.prototype.unpipe = function(dest) {
Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
- if (ev === 'data' && !this._readableState.flowing)
- emitDataEvents(this);
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
if (ev === 'readable' && this.readable) {
var state = this._readableState;
@@ -738,7 +715,11 @@ Readable.prototype.on = function(ev, fn) {
state.emittedReadable = false;
state.needReadable = true;
if (!state.reading) {
- this.read(0);
+ var self = this;
+ process.nextTick(function() {
+ debug('readable nexttick read 0');
+ self.read(0);
+ });
} else if (state.length) {
emitReadable(this, state);
}
@@ -752,63 +733,54 @@ Readable.prototype.addListener = Readable.prototype.on;
// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
- emitDataEvents(this);
- this.read(0);
- this.emit('resume');
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ if (!state.reading) {
+ debug('resume read 0');
+ this.read(0);
+ }
+ resume(this, state);
+ }
+ return this;
};
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(function() {
+ resume_(stream, state);
+ });
+ }
+}
+
+function resume_(stream, state) {
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
Readable.prototype.pause = function() {
- emitDataEvents(this, true);
- this.emit('pause');
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
};
-function emitDataEvents(stream, startPaused) {
+function flow(stream) {
var state = stream._readableState;
-
+ debug('flow', state.flowing);
if (state.flowing) {
- // https://github.com/isaacs/readable-stream/issues/16
- throw new Error('Cannot switch to old mode now.');
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
}
-
- var paused = startPaused || false;
- var readable = false;
-
- // convert to an old-style stream.
- stream.readable = true;
- stream.pipe = Stream.prototype.pipe;
- stream.on = stream.addListener = Stream.prototype.on;
-
- stream.on('readable', function() {
- readable = true;
-
- var c;
- while (!paused && (null !== (c = stream.read())))
- stream.emit('data', c);
-
- if (c === null) {
- readable = false;
- stream._readableState.needReadable = true;
- }
- });
-
- stream.pause = function() {
- paused = true;
- this.emit('pause');
- };
-
- stream.resume = function() {
- paused = false;
- if (readable)
- process.nextTick(function() {
- stream.emit('readable');
- });
- else
- this.read(0);
- this.emit('resume');
- };
-
- // now make it start, just in case it hadn't already.
- stream.emit('readable');
}
// wrap an old-style stream as the async data source.
@@ -820,6 +792,7 @@ Readable.prototype.wrap = function(stream) {
var self = this;
stream.on('end', function() {
+ debug('wrapped end');
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length)
@@ -830,14 +803,10 @@ Readable.prototype.wrap = function(stream) {
});
stream.on('data', function(chunk) {
+ debug('wrapped data');
if (state.decoder)
chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- //if (state.objectMode && util.isNullOrUndefined(chunk))
- if (state.objectMode && (chunk === null || chunk === undefined))
- return;
- else if (!state.objectMode && (!chunk || !chunk.length))
+ if (!chunk || !state.objectMode && !chunk.length)
return;
var ret = self.push(chunk);
@@ -850,8 +819,7 @@ Readable.prototype.wrap = function(stream) {
// proxy all the other methods.
// important when wrapping filters and duplexes.
for (var i in stream) {
- if (typeof stream[i] === 'function' &&
- typeof this[i] === 'undefined') {
+ if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
this[i] = function(method) { return function() {
return stream[method].apply(stream, arguments);
}}(i);
@@ -867,6 +835,7 @@ Readable.prototype.wrap = function(stream) {
// when we try to consume some more bytes, simply unpause the
// underlying stream.
self._read = function(n) {
+ debug('wrapped _read', n);
if (paused) {
paused = false;
stream.resume();
@@ -955,7 +924,7 @@ function endReadable(stream) {
if (state.length > 0)
throw new Error('endReadable called on non-empty stream');
- if (!state.endEmitted && state.calledRead) {
+ if (!state.endEmitted) {
state.ended = true;
process.nextTick(function() {
// Check that we didn't get one last unshift.
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
index eb188df..905c5e4 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
@@ -97,7 +97,7 @@ function afterTransform(stream, er, data) {
ts.writechunk = null;
ts.writecb = null;
- if (data !== null && data !== undefined)
+ if (!util.isNullOrUndefined(data))
stream.push(data);
if (cb)
@@ -117,7 +117,7 @@ function Transform(options) {
Duplex.call(this, options);
- var ts = this._transformState = new TransformState(options, this);
+ this._transformState = new TransformState(options, this);
// when the writable side finishes, then flush out anything remaining.
var stream = this;
@@ -130,8 +130,8 @@ function Transform(options) {
// sync guard flag.
this._readableState.sync = false;
- this.once('finish', function() {
- if ('function' === typeof this._flush)
+ this.once('prefinish', function() {
+ if (util.isFunction(this._flush))
this._flush(function(er) {
done(stream, er);
});
@@ -179,7 +179,7 @@ Transform.prototype._write = function(chunk, encoding, cb) {
Transform.prototype._read = function(n) {
var ts = this._transformState;
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
@@ -197,7 +197,6 @@ function done(stream, er) {
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
var ws = stream._writableState;
- var rs = stream._readableState;
var ts = stream._transformState;
if (ws.length)
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
index 4bdaa4f..db8539c 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
@@ -48,18 +48,24 @@ function WriteReq(chunk, encoding, cb) {
}
function WritableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
options = options || {};
// the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
@@ -90,8 +96,11 @@ function WritableState(options, stream) {
// a flag to see when we're in the middle of a write.
this.writing = false;
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
// a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
+ // or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
@@ -114,6 +123,14 @@ function WritableState(options, stream) {
this.buffer = [];
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false;
}
@@ -156,10 +173,9 @@ function writeAfterEnd(stream, state, cb) {
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
var valid = true;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
!state.objectMode) {
var er = new TypeError('Invalid non-string/buffer chunk');
stream.emit('error', er);
@@ -175,31 +191,54 @@ Writable.prototype.write = function(chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
- if (typeof encoding === 'function') {
+ if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
- if (Buffer.isBuffer(chunk))
+ if (util.isBuffer(chunk))
encoding = 'buffer';
else if (!encoding)
encoding = state.defaultEncoding;
- if (typeof cb !== 'function')
+ if (!util.isFunction(cb))
cb = function() {};
if (state.ended)
writeAfterEnd(this, state, cb);
- else if (validChunk(this, state, chunk, cb))
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
return ret;
};
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.buffer.length)
+ clearBuffer(this, state);
+ }
+};
+
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode &&
state.decodeStrings !== false &&
- typeof chunk === 'string') {
+ util.isString(chunk)) {
chunk = new Buffer(chunk, encoding);
}
return chunk;
@@ -210,7 +249,7 @@ function decodeChunk(state, chunk, encoding) {
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
chunk = decodeChunk(state, chunk, encoding);
- if (Buffer.isBuffer(chunk))
+ if (util.isBuffer(chunk))
encoding = 'buffer';
var len = state.objectMode ? 1 : chunk.length;
@@ -221,30 +260,36 @@ function writeOrBuffer(stream, state, chunk, encoding, cb) {
if (!ret)
state.needDrain = true;
- if (state.writing)
+ if (state.writing || state.corked)
state.buffer.push(new WriteReq(chunk, encoding, cb));
else
- doWrite(stream, state, len, chunk, encoding, cb);
+ doWrite(stream, state, false, len, chunk, encoding, cb);
return ret;
}
-function doWrite(stream, state, len, chunk, encoding, cb) {
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
- stream._write(chunk, encoding, state.onwrite);
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}
function onwriteError(stream, state, sync, er, cb) {
if (sync)
process.nextTick(function() {
+ state.pendingcb--;
cb(er);
});
- else
+ else {
+ state.pendingcb--;
cb(er);
+ }
stream._writableState.errorEmitted = true;
stream.emit('error', er);
@@ -270,8 +315,12 @@ function onwrite(stream, er) {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(stream, state);
- if (!finished && !state.bufferProcessing && state.buffer.length)
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.buffer.length) {
clearBuffer(stream, state);
+ }
if (sync) {
process.nextTick(function() {
@@ -286,9 +335,9 @@ function onwrite(stream, er) {
function afterWrite(stream, state, finished, cb) {
if (!finished)
onwriteDrain(stream, state);
+ state.pendingcb--;
cb();
- if (finished)
- finishMaybe(stream, state);
+ finishMaybe(stream, state);
}
// Must force callback to be called on nextTick, so that we don't
@@ -306,51 +355,82 @@ function onwriteDrain(stream, state) {
function clearBuffer(stream, state) {
state.bufferProcessing = true;
- for (var c = 0; c < state.buffer.length; c++) {
- var entry = state.buffer[c];
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, len, chunk, encoding, cb);
-
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- c++;
- break;
+ if (stream._writev && state.buffer.length > 1) {
+ // Fast case, write everything using _writev()
+ var cbs = [];
+ for (var c = 0; c < state.buffer.length; c++)
+ cbs.push(state.buffer[c].callback);
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ state.buffer = [];
+ } else {
+ // Slow case, write chunks one-by-one
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
}
+
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
}
state.bufferProcessing = false;
- if (c < state.buffer.length)
- state.buffer = state.buffer.slice(c);
- else
- state.buffer.length = 0;
}
Writable.prototype._write = function(chunk, encoding, cb) {
cb(new Error('not implemented'));
+
};
+Writable.prototype._writev = null;
+
Writable.prototype.end = function(chunk, encoding, cb) {
var state = this._writableState;
- if (typeof chunk === 'function') {
+ if (util.isFunction(chunk)) {
cb = chunk;
chunk = null;
encoding = null;
- } else if (typeof encoding === 'function') {
+ } else if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
- if (typeof chunk !== 'undefined' && chunk !== null)
+ if (!util.isNullOrUndefined(chunk))
this.write(chunk, encoding);
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
// ignore unnecessary end() calls.
if (!state.ending && !state.finished)
endWritable(this, state, cb);
@@ -364,11 +444,22 @@ function needFinish(stream, state) {
!state.writing);
}
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
function finishMaybe(stream, state) {
var need = needFinish(stream, state);
if (need) {
- state.finished = true;
- stream.emit('finish');
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else
+ prefinish(stream, state);
}
return need;
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is/package.json
index 2155d11..4eb9ce4 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is/package.json
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -49,5 +49,6 @@
],
"directories": {},
"_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538",
- "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz"
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz",
+ "scripts": {}
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray/package.json
index 04d6a3f..fc7904b 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray/package.json
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray/package.json
@@ -47,5 +47,8 @@
],
"directories": {},
"_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
+ "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "bugs": {
+ "url": "https://github.com/juliangruber/isarray/issues"
+ }
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder/package.json
index 21c9cd5..0364d54 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder/package.json
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -49,5 +49,6 @@
"tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
index 7483ebb..9344b0f 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
@@ -1,7 +1,7 @@
{
"name": "readable-stream",
- "version": "1.0.31",
- "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x",
+ "version": "1.1.13",
+ "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x",
"main": "readable.js",
"dependencies": {
"core-util-is": "~1.0.0",
@@ -33,14 +33,15 @@
"url": "http://blog.izs.me/"
},
"license": "MIT",
+ "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051",
"bugs": {
"url": "https://github.com/isaacs/readable-stream/issues"
},
"homepage": "https://github.com/isaacs/readable-stream",
- "_id": "readable-stream@1.0.31",
- "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae",
- "_from": "readable-stream@>=1.0.0 <1.1.0",
- "_npmVersion": "1.4.9",
+ "_id": "readable-stream@1.1.13",
+ "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e",
+ "_from": "readable-stream@>=1.1.0 <1.2.0",
+ "_npmVersion": "1.4.23",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
@@ -60,9 +61,10 @@
}
],
"dist": {
- "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae",
- "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz"
+ "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e",
+ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz"
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js
index 4d1ddfc..09b8bf5 100644
--- a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js
@@ -1,4 +1,5 @@
exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = require('stream');
exports.Readable = exports;
exports.Writable = require('./lib/_stream_writable.js');
exports.Duplex = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/sha/package.json b/deps/npm/node_modules/sha/package.json
index 1b8b2aa..f5aff49 100644
--- a/deps/npm/node_modules/sha/package.json
+++ b/deps/npm/node_modules/sha/package.json
@@ -1,6 +1,6 @@
{
"name": "sha",
- "version": "1.2.4",
+ "version": "1.3.0",
"description": "Check and get file hashes",
"scripts": {
"test": "mocha -R spec"
@@ -12,29 +12,27 @@
"license": "BSD",
"optionalDependencies": {
"graceful-fs": "2 || 3",
- "readable-stream": "1.0"
+ "readable-stream": "~1.1"
},
"devDependencies": {
"mocha": "~1.9.0"
},
+ "gitHead": "f1985eefbf7538e5809a2157c728d2f740901600",
"bugs": {
"url": "https://github.com/ForbesLindesay/sha/issues"
},
"homepage": "https://github.com/ForbesLindesay/sha",
"dependencies": {
"graceful-fs": "2 || 3",
- "readable-stream": "1.0"
+ "readable-stream": "~1.1"
},
- "_id": "sha@1.2.4",
- "dist": {
- "shasum": "1f9a377f27b6fdee409b9b858e43da702be48a4d",
- "tarball": "http://registry.npmjs.org/sha/-/sha-1.2.4.tgz"
- },
- "_from": "sha@>=1.2.1 <1.3.0",
- "_npmVersion": "1.4.3",
+ "_id": "sha@1.3.0",
+ "_shasum": "79f4787045d0ede7327d702c25c443460dbc6764",
+ "_from": "sha@>=1.3.0 <1.4.0",
+ "_npmVersion": "1.5.0-alpha-4",
"_npmUser": {
"name": "forbeslindesay",
- "email": "forbes@lindeay.co.uk"
+ "email": "forbes@lindesay.co.uk"
},
"maintainers": [
{
@@ -42,7 +40,10 @@
"email": "forbes@lindesay.co.uk"
}
],
+ "dist": {
+ "shasum": "79f4787045d0ede7327d702c25c443460dbc6764",
+ "tarball": "http://registry.npmjs.org/sha/-/sha-1.3.0.tgz"
+ },
"directories": {},
- "_shasum": "1f9a377f27b6fdee409b9b858e43da702be48a4d",
- "_resolved": "https://registry.npmjs.org/sha/-/sha-1.2.4.tgz"
+ "_resolved": "https://registry.npmjs.org/sha/-/sha-1.3.0.tgz"
}
diff --git a/deps/npm/node_modules/wrappy/LICENSE b/deps/npm/node_modules/wrappy/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/deps/npm/node_modules/wrappy/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/wrappy/README.md b/deps/npm/node_modules/wrappy/README.md
new file mode 100644
index 0000000..98eab25
--- /dev/null
+++ b/deps/npm/node_modules/wrappy/README.md
@@ -0,0 +1,36 @@
+# wrappy
+
+Callback wrapping utility
+
+## USAGE
+
+```javascript
+var wrappy = require("wrappy")
+
+// var wrapper = wrappy(wrapperFunction)
+
+// make sure a cb is called only once
+// See also: http://npm.im/once for this specific use case
+var once = wrappy(function (cb) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return cb.apply(this, arguments)
+ }
+})
+
+function printBoo () {
+ console.log('boo')
+}
+// has some rando property
+printBoo.iAmBooPrinter = true
+
+var onlyPrintOnce = once(printBoo)
+
+onlyPrintOnce() // prints 'boo'
+onlyPrintOnce() // does nothing
+
+// random property is retained!
+assert.equal(onlyPrintOnce.iAmBooPrinter, true)
+```
diff --git a/deps/npm/node_modules/wrappy/package.json b/deps/npm/node_modules/wrappy/package.json
new file mode 100644
index 0000000..b88e662
--- /dev/null
+++ b/deps/npm/node_modules/wrappy/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "wrappy",
+ "version": "1.0.1",
+ "description": "Callback wrapping utility",
+ "main": "wrappy.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "^0.4.12"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/wrappy"
+ },
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/wrappy/issues"
+ },
+ "homepage": "https://github.com/npm/wrappy",
+ "gitHead": "006a8cbac6b99988315834c207896eed71fd069a",
+ "_id": "wrappy@1.0.1",
+ "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739",
+ "_from": "wrappy@1.0.1",
+ "_npmVersion": "2.0.0",
+ "_nodeVersion": "0.10.31",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739",
+ "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/wrappy/test/basic.js b/deps/npm/node_modules/wrappy/test/basic.js
new file mode 100644
index 0000000..5ed0fcd
--- /dev/null
+++ b/deps/npm/node_modules/wrappy/test/basic.js
@@ -0,0 +1,51 @@
+var test = require('tap').test
+var wrappy = require('../wrappy.js')
+
+test('basic', function (t) {
+ function onceifier (cb) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return cb.apply(this, arguments)
+ }
+ }
+ onceifier.iAmOnce = {}
+ var once = wrappy(onceifier)
+ t.equal(once.iAmOnce, onceifier.iAmOnce)
+
+ var called = 0
+ function boo () {
+ t.equal(called, 0)
+ called++
+ }
+ // has some rando property
+ boo.iAmBoo = true
+
+ var onlyPrintOnce = once(boo)
+
+ onlyPrintOnce() // prints 'boo'
+ onlyPrintOnce() // does nothing
+ t.equal(called, 1)
+
+ // random property is retained!
+ t.equal(onlyPrintOnce.iAmBoo, true)
+
+ var logs = []
+ var logwrap = wrappy(function (msg, cb) {
+ logs.push(msg + ' wrapping cb')
+ return function () {
+ logs.push(msg + ' before cb')
+ var ret = cb.apply(this, arguments)
+ logs.push(msg + ' after cb')
+ }
+ })
+
+ var c = logwrap('foo', function () {
+ t.same(logs, [ 'foo wrapping cb', 'foo before cb' ])
+ })
+ c()
+ t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ])
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/wrappy/wrappy.js b/deps/npm/node_modules/wrappy/wrappy.js
new file mode 100644
index 0000000..bb7e7d6
--- /dev/null
+++ b/deps/npm/node_modules/wrappy/wrappy.js
@@ -0,0 +1,33 @@
+// Returns a wrapper function that returns a wrapped callback
+// The wrapper function should do some stuff, and return a
+// presumably different callback function.
+// This makes sure that own properties are retained, so that
+// decorations and such are not lost along the way.
+module.exports = wrappy
+function wrappy (fn, cb) {
+ if (fn && cb) return wrappy(fn)(cb)
+
+ if (typeof fn !== 'function')
+ throw new TypeError('need wrapper function')
+
+ Object.keys(fn).forEach(function (k) {
+ wrapper[k] = fn[k]
+ })
+
+ return wrapper
+
+ function wrapper() {
+ var args = new Array(arguments.length)
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+ var ret = fn.apply(this, args)
+ var cb = args[args.length-1]
+ if (typeof ret === 'function' && ret !== cb) {
+ Object.keys(cb).forEach(function (k) {
+ ret[k] = cb[k]
+ })
+ }
+ return ret
+ }
+}
diff --git a/deps/npm/node_modules/write-file-atomic/.npmignore b/deps/npm/node_modules/write-file-atomic/.npmignore
new file mode 100644
index 0000000..4543826
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/.npmignore
@@ -0,0 +1,4 @@
+*~
+DEADJOE
+.#*
+node_modules
\ No newline at end of file
diff --git a/deps/npm/node_modules/write-file-atomic/README.md b/deps/npm/node_modules/write-file-atomic/README.md
new file mode 100644
index 0000000..26e434d
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/README.md
@@ -0,0 +1,44 @@
+write-file-atomic
+-----------------
+
+This is an extension for node's `fs.writeFile` that makes its operation
+atomic and allows you set ownership (uid/gid of the file).
+
+### var writeFileAtomic = require('write-file-atomic') writeFileAtomic(filename, data, [options], callback)
+
+* filename **String**
+* data **String** | **Buffer**
+* options **Object**
+ * chown **Object**
+ * uid **Number**
+ * gid **Number**
+ * encoding **String** | **Null** default = 'utf8'
+ * mode **Number** default = 438 (aka 0666 in Octal)
+callback **Function**
+
+Atomically and asynchronously writes data to a file, replacing the file if it already
+exists. data can be a string or a buffer.
+
+The file is initially named `filename + "." + md5hex(__filename, process.pid, ++invocations)`.
+If writeFile completes successfully then, if passed the **chown** option it will change
+the ownership of the file. Finally it renames the file back to the filename you specified. If
+it encounters errors at any of these steps it will attempt to unlink the temporary file and then
+pass the error back to the caller.
+
+If provided, the **chown** option requires both **uid** and **gid** properties or else
+you'll get an error.
+
+The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
+
+Example:
+
+```javascript
+writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {
+ if (err) throw err;
+ console.log('It\'s saved!');
+});
+```
+
+### var writeFileAtomicSync = require('write-file-atomic').sync writeFileAtomicSync(filename, data, [options])
+
+The synchronous version of **writeFileAtomic**.
diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js
new file mode 100644
index 0000000..f61a170
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/index.js
@@ -0,0 +1,45 @@
+'use strict'
+var fs = require('graceful-fs');
+var chain = require('slide').chain;
+var crypto = require('crypto');
+
+var md5hex = function () {
+ var hash = crypto.createHash('md5');
+ for (var ii=0; ii=1.1.0 <2.0.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "dist": {
+ "shasum": "e114cfb8f82188353f98217c5945451c9b4dc060",
+ "tarball": "http://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.0.tgz"
+}
diff --git a/deps/npm/node_modules/write-file-atomic/test/basic.js b/deps/npm/node_modules/write-file-atomic/test/basic.js
new file mode 100644
index 0000000..a3227ea
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/test/basic.js
@@ -0,0 +1,97 @@
+"use strict";
+var test = require('tap').test;
+var requireInject = require('require-inject');
+var writeFileAtomic = requireInject('../index', {
+ 'graceful-fs': {
+ writeFile: function (tmpfile, data, options, cb) {
+ if (/nowrite/.test(tmpfile)) return cb('ENOWRITE');
+ cb();
+ },
+ chown: function (tmpfile, uid, gid, cb) {
+ if (/nochown/.test(tmpfile)) return cb('ENOCHOWN');
+ cb();
+ },
+ rename: function (tmpfile, filename, cb) {
+ if (/norename/.test(tmpfile)) return cb('ENORENAME');
+ cb();
+ },
+ unlink: function (tmpfile, cb) {
+ if (/nounlink/.test(tmpfile)) return cb('ENOUNLINK');
+ cb();
+ },
+ writeFileSync: function (tmpfile, data, options) {
+ if (/nowrite/.test(tmpfile)) throw 'ENOWRITE';
+ },
+ chownSync: function (tmpfile, uid, gid) {
+ if (/nochown/.test(tmpfile)) throw 'ENOCHOWN';
+ },
+ renameSync: function (tmpfile, filename) {
+ if (/norename/.test(tmpfile)) throw 'ENORENAME';
+ },
+ unlinkSync: function (tmpfile) {
+ if (/nounlink/.test(tmpfile)) throw 'ENOUNLINK';
+ },
+ }
+});
+var writeFileAtomicSync = writeFileAtomic.sync;
+
+test('async tests', function (t) {
+ t.plan(7);
+ writeFileAtomic('good', 'test', {mode: '0777'}, function (err) {
+ t.notOk(err, 'No errors occur when passing in options');
+ });
+ writeFileAtomic('good', 'test', function (err) {
+ t.notOk(err, 'No errors occur when NOT passing in options');
+ });
+ writeFileAtomic('nowrite', 'test', function (err) {
+ t.is(err, 'ENOWRITE', 'writeFile failures propagate');
+ });
+ writeFileAtomic('nochown', 'test', {chown: {uid:100,gid:100}}, function (err) {
+ t.is(err, 'ENOCHOWN', 'Chown failures propagate');
+ });
+ writeFileAtomic('nochown', 'test', function (err) {
+ t.notOk(err, 'No attempt to chown when no uid/gid passed in');
+ });
+ writeFileAtomic('norename', 'test', function (err) {
+ t.is(err, 'ENORENAME', 'Rename errors propagate');
+ });
+ writeFileAtomic('norename nounlink', 'test', function (err) {
+ t.is(err, 'ENORENAME', 'Failure to unlink the temp file does not clobber the original error');
+ });
+});
+
+test('sync tests', function (t) {
+ t.plan(7);
+ var throws = function (shouldthrow, msg, todo) {
+ var err;
+ try { todo() } catch (e) { err = e }
+ t.is(shouldthrow,err,msg);
+ }
+ var noexception = function (msg, todo) {
+ var err;
+ try { todo() } catch (e) { err = e }
+ t.notOk(err,msg);
+ }
+
+ noexception('No errors occur when passing in options',function (){
+ writeFileAtomicSync('good', 'test', {mode: '0777'});
+ })
+ noexception('No errors occur when NOT passing in options',function (){
+ writeFileAtomicSync('good', 'test');
+ });
+ throws('ENOWRITE', 'writeFile failures propagate', function () {
+ writeFileAtomicSync('nowrite', 'test');
+ });
+ throws('ENOCHOWN', 'Chown failures propagate', function () {
+ writeFileAtomicSync('nochown', 'test', {chown: {uid:100,gid:100}});
+ });
+ noexception('No attempt to chown when no uid/gid passed in', function (){
+ writeFileAtomicSync('nochown', 'test');
+ });
+ throws('ENORENAME', 'Rename errors propagate', function (){
+ writeFileAtomicSync('norename', 'test');
+ });
+ throws('ENORENAME', 'Failure to unlink the temp file does not clobber the original error', function (){
+ writeFileAtomicSync('norename nounlink', 'test');
+ });
+});
diff --git a/deps/npm/package.json b/deps/npm/package.json
index f371e57..761c8c8 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.0.0",
+ "version": "2.1.6",
"name": "npm",
"description": "A package manager for node",
"keywords": [
@@ -35,7 +35,7 @@
"ansi": "~0.3.0",
"ansicolors": "~0.3.2",
"ansistyles": "~0.1.3",
- "archy": "0",
+ "archy": "~1.0.0",
"async-some": "~1.0.1",
"block-stream": "0.0.7",
"char-spinner": "~1.0.1",
@@ -44,49 +44,56 @@
"chownr": "0",
"cmd-shim": "~2.0.1",
"columnify": "~1.2.1",
+ "config-chain": "~1.1.8",
+ "dezalgo": "~1.0.1",
"editor": "~0.1.0",
"fs-vacuum": "~1.2.1",
+ "fs-write-stream-atomic": "~1.0.2",
"fstream": "~1.0.2",
- "fstream-npm": "~1.0.0",
+ "fstream-npm": "~1.0.1",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
- "glob": "~4.0.5",
- "graceful-fs": "~3.0.0",
- "inflight": "~1.0.1",
- "ini": "~1.2.0",
- "init-package-json": "~1.0.0",
+ "glob": "~4.0.6",
+ "graceful-fs": "~3.0.4",
+ "inflight": "~1.0.4",
+ "inherits": "~2.0.1",
+ "ini": "~1.3.0",
+ "init-package-json": "~1.1.1",
"lockfile": "~1.0.0",
"lru-cache": "~2.5.0",
"minimatch": "~1.0.0",
"mkdirp": "~0.5.0",
"node-gyp": "~1.0.1",
"nopt": "~3.0.1",
- "normalize-package-data": "~1.0.1",
+ "normalize-package-data": "~1.0.3",
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.2",
- "npm-package-arg": "~2.1.2",
- "npm-registry-client": "~3.2.1",
- "npm-user-validate": "~0.1.0",
- "npmconf": "~2.0.8",
+ "npm-package-arg": "~2.1.3",
+ "npm-registry-client": "~3.2.4",
+ "npm-user-validate": "~0.1.1",
"npmlog": "~0.1.1",
- "once": "~1.3.0",
- "opener": "~1.3.0",
+ "once": "~1.3.1",
+ "opener": "~1.4.0",
"osenv": "~0.1.0",
"path-is-inside": "~1.0.0",
"read": "~1.0.4",
"read-installed": "~3.1.2",
"read-package-json": "~1.2.7",
- "request": "~2.42.0",
- "retry": "~0.6.0",
+ "readable-stream": "~1.0.32",
+ "realize-package-specifier": "~1.2.0",
+ "request": "~2.46.0",
+ "retry": "~0.6.1",
"rimraf": "~2.2.8",
- "semver": "~4.0.0",
- "sha": "~1.2.1",
+ "semver": "~4.1.0",
+ "sha": "~1.3.0",
"slide": "~1.1.6",
"sorted-object": "~1.0.0",
"tar": "~1.0.1",
"text-table": "~0.2.0",
"uid-number": "0.0.5",
- "which": "1"
+ "which": "1",
+ "wrappy": "~1.0.1",
+ "write-file-atomic": "~1.1.0"
},
"bundleDependencies": [
"abbrev",
@@ -102,9 +109,11 @@
"chownr",
"cmd-shim",
"columnify",
+ "config-chain",
"dezalgo",
"editor",
"fs-vacuum",
+ "fs-write-stream-atomic",
"fstream",
"fstream-npm",
"github-url-from-git",
@@ -127,7 +136,6 @@
"npm-package-arg",
"npm-registry-client",
"npm-user-validate",
- "npmconf",
"npmlog",
"once",
"opener",
@@ -136,6 +144,8 @@
"read",
"read-installed",
"read-package-json",
+ "readable-stream",
+ "realize-package-specifier",
"request",
"retry",
"rimraf",
@@ -146,15 +156,17 @@
"tar",
"text-table",
"uid-number",
- "which"
+ "which",
+ "wrappy",
+ "write-file-atomic"
],
"devDependencies": {
"marked": "~0.3.2",
- "marked-man": "~0.1.3",
- "nock": "~0.34.1",
- "npm-registry-couchapp": "~2.5.3",
+ "marked-man": "~0.1.4",
+ "nock": "~0.48.1",
+ "npm-registry-couchapp": "~2.6.2",
"npm-registry-mock": "~0.6.3",
- "require-inject": "~1.0.0",
+ "require-inject": "~1.1.0",
"tap": "~0.4.12"
},
"scripts": {
diff --git a/deps/npm/scripts/doc-build.sh b/deps/npm/scripts/doc-build.sh
index 3728259..79629c6 100755
--- a/deps/npm/scripts/doc-build.sh
+++ b/deps/npm/scripts/doc-build.sh
@@ -66,44 +66,59 @@ version=$(node cli.js -v)
mkdir -p $(dirname $dest)
+html_replace_tokens () {
+ local url=$1
+ sed "s|@NAME@|$name|g" \
+ | sed "s|@DATE@|$date|g" \
+ | sed "s|@URL@|$url|g" \
+ | sed "s|@VERSION@|$version|g" \
+ | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/\2<\/h1> \3<\/p>/g' \
+ | perl -p -e 's/npm-npm/npm/g' \
+ | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \
+ | perl -p -e 's/README<\/a><\/title>/README<\/title>/g' \
+ | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1\2\3<\/a>/g' \
+ | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1 \2\3<\/a>/g' \
+ | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1 \2\3<\/a>/g' \
+ | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1 \2\3<\/a>/g' \
+ | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \
+ | (if [ $(basename $(dirname $dest)) == "doc" ]; then
+ perl -p -e 's/ href="\.\.\// href="/g'
+ else
+ cat
+ fi)
+}
+
+man_replace_tokens () {
+ sed "s|@VERSION@|$version|g" \
+ | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \
+ | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \
+ | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \
+ | perl -p -e 's/npm\(1\)/npm help npm/g' \
+ | perl -p -e 's/npm\(3\)/npm apihelp npm/g'
+}
+
case $dest in
*.[1357])
./node_modules/.bin/marked-man --roff $src \
- | sed "s|@VERSION@|$version|g" \
- | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \
- | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \
- | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \
- | perl -pi -e 's/npm\(1\)/npm help npm/g' \
- | perl -pi -e 's/npm\(3\)/npm apihelp npm/g' \
- > $dest
+ | man_replace_tokens > $dest
exit $?
;;
- *.html)
+
+ html/partial/*.html)
+ url=${dest/html\/partial\//}
+ cat $src | ./node_modules/.bin/marked | html_replace_tokens $url > $dest
+ ;;
+
+ html/*.html)
url=${dest/html\//}
(cat html/dochead.html && \
- cat $src | ./node_modules/.bin/marked &&
+ cat $src && \
cat html/docfoot.html)\
- | sed "s|@NAME@|$name|g" \
- | sed "s|@DATE@|$date|g" \
- | sed "s|@URL@|$url|g" \
- | sed "s|@VERSION@|$version|g" \
- | perl -pi -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/\2<\/h1> \3<\/p>/g' \
- | perl -pi -e 's/npm-npm/npm/g' \
- | perl -pi -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \
- | perl -pi -e 's/README<\/a><\/title>/README<\/title>/g' \
- | perl -pi -e 's/([^"-])([^\(> ]+)(\(1\))/\1\2\3<\/a>/g' \
- | perl -pi -e 's/([^"-])([^\(> ]+)(\(3\))/\1 \2\3<\/a>/g' \
- | perl -pi -e 's/([^"-])([^\(> ]+)(\(5\))/\1 \2\3<\/a>/g' \
- | perl -pi -e 's/([^"-])([^\(> ]+)(\(7\))/\1 \2\3<\/a>/g' \
- | perl -pi -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \
- | (if [ $(basename $(dirname $dest)) == "doc" ]; then
- perl -pi -e 's/ href="\.\.\// href="/g'
- else
- cat
- fi) \
+ | html_replace_tokens $url \
> $dest
exit $?
;;
+
*)
echo "Invalid destination type: $dest" >&2
exit 1
diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js
index 3a1f584..2efca30 100644
--- a/deps/npm/test/common-tap.js
+++ b/deps/npm/test/common-tap.js
@@ -1,16 +1,27 @@
var spawn = require("child_process").spawn
+var path = require("path")
+var fs = require("fs")
var port = exports.port = 1337
exports.registry = "http://localhost:" + port
process.env.npm_config_loglevel = "error"
+var npm_config_cache = path.resolve(__dirname, "npm_cache")
+exports.npm_config_cache = npm_config_cache
+
var bin = exports.bin = require.resolve("../bin/npm-cli.js")
var once = require("once")
+
exports.npm = function (cmd, opts, cb) {
cb = once(cb)
cmd = [bin].concat(cmd)
opts = opts || {}
+ opts.env = opts.env ? opts.env : process.env
+ if (!opts.env.npm_config_cache) {
+ opts.env.npm_config_cache = npm_config_cache
+ }
+
var stdout = ""
, stderr = ""
, node = process.execPath
@@ -29,4 +40,28 @@ exports.npm = function (cmd, opts, cb) {
child.on("close", function (code) {
cb(null, code, stdout, stderr)
})
+ return child
+}
+
+// based on http://bit.ly/1tkI6DJ
+function deleteNpmCacheRecursivelySync(cache) {
+ cache = cache ? cache : npm_config_cache
+ var files = []
+ var res
+ if( fs.existsSync(cache) ) {
+ files = fs.readdirSync(cache)
+ files.forEach(function(file,index) {
+ var curPath = path.resolve(cache, file)
+ if(fs.lstatSync(curPath).isDirectory()) { // recurse
+ deleteNpmCacheRecursivelySync(curPath)
+ } else { // delete file
+ if (res = fs.unlinkSync(curPath))
+ throw Error("Failed to delete file " + curPath + ", error " + res)
+ }
+ })
+ if (res = fs.rmdirSync(cache))
+ throw Error("Failed to delete directory " + cache + ", error " + res)
+ }
+ return 0
}
+exports.deleteNpmCacheRecursivelySync = deleteNpmCacheRecursivelySync
\ No newline at end of file
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/.npmrc b/deps/npm/test/fixtures/config/.npmrc
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/.npmrc
rename to deps/npm/test/fixtures/config/.npmrc
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/builtin b/deps/npm/test/fixtures/config/builtin
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/builtin
rename to deps/npm/test/fixtures/config/builtin
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/globalconfig b/deps/npm/test/fixtures/config/globalconfig
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/globalconfig
rename to deps/npm/test/fixtures/config/globalconfig
diff --git a/deps/npm/test/fixtures/config/malformed b/deps/npm/test/fixtures/config/malformed
new file mode 100644
index 0000000..182c4d2
--- /dev/null
+++ b/deps/npm/test/fixtures/config/malformed
@@ -0,0 +1 @@
+email = """
\ No newline at end of file
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/multi-ca b/deps/npm/test/fixtures/config/multi-ca
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/multi-ca
rename to deps/npm/test/fixtures/config/multi-ca
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/package.json b/deps/npm/test/fixtures/config/package.json
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/package.json
rename to deps/npm/test/fixtures/config/package.json
diff --git a/deps/npm/node_modules/npmconf/test/fixtures/userconfig b/deps/npm/test/fixtures/config/userconfig
similarity index 100%
rename from deps/npm/node_modules/npmconf/test/fixtures/userconfig
rename to deps/npm/test/fixtures/config/userconfig
diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc
new file mode 100644
index 0000000..3e5d605
--- /dev/null
+++ b/deps/npm/test/fixtures/config/userconfig-with-gc
@@ -0,0 +1,22 @@
+globalconfig=/Users/ogd/Documents/projects/npm/npm/test/fixtures/config/globalconfig
+email=i@izs.me
+env-thing=asdf
+init.author.name=Isaac Z. Schlueter
+init.author.email=i@izs.me
+init.author.url=http://blog.izs.me/
+init.version=1.2.3
+proprietary-attribs=false
+npm:publishtest=true
+_npmjs.org:couch=https://admin:password@localhost:5984/registry
+npm-www:nocache=1
+sign-git-tag=false
+message=v%s
+strict-ssl=false
+_auth=dXNlcm5hbWU6cGFzc3dvcmQ=
+
+[_token]
+AuthSession=yabba-dabba-doodle
+version=1
+expires=1345001053415
+path=/
+httponly=true
diff --git a/deps/npm/test/tap/00-check-mock-dep.js b/deps/npm/test/tap/00-check-mock-dep.js
index c4d2ff2..1c86231 100644
--- a/deps/npm/test/tap/00-check-mock-dep.js
+++ b/deps/npm/test/tap/00-check-mock-dep.js
@@ -1,6 +1,7 @@
console.log("TAP Version 13")
-process.on("uncaughtException", function(er) {
+process.on("uncaughtException", function (er) {
+ if (er) { throw er }
console.log("not ok - Failed checking mock registry dep. Expect much fail!")
console.log("1..1")
process.exit(1)
@@ -10,6 +11,7 @@ var assert = require("assert")
var semver = require("semver")
var mock = require("npm-registry-mock/package.json").version
var req = require("../../package.json").devDependencies["npm-registry-mock"]
+
assert(semver.satisfies(mock, req))
console.log("ok")
console.log("1..1")
diff --git a/deps/npm/test/tap/00-config-setup.js b/deps/npm/test/tap/00-config-setup.js
new file mode 100644
index 0000000..aaad546
--- /dev/null
+++ b/deps/npm/test/tap/00-config-setup.js
@@ -0,0 +1,68 @@
+var path = require("path")
+var userconfigSrc = path.resolve(__dirname, "..", "fixtures", "config", "userconfig")
+exports.userconfig = userconfigSrc + "-with-gc"
+exports.globalconfig = path.resolve(__dirname, "..", "fixtures", "config", "globalconfig")
+exports.builtin = path.resolve(__dirname, "..", "fixtures", "config", "builtin")
+exports.malformed = path.resolve(__dirname, "..", "fixtures", "config", "malformed")
+exports.ucData =
+ { globalconfig: exports.globalconfig,
+ email: "i@izs.me",
+ "env-thing": "asdf",
+ "init.author.name": "Isaac Z. Schlueter",
+ "init.author.email": "i@izs.me",
+ "init.author.url": "http://blog.izs.me/",
+ "init.version": "1.2.3",
+ "proprietary-attribs": false,
+ "npm:publishtest": true,
+ "_npmjs.org:couch": "https://admin:password@localhost:5984/registry",
+ "npm-www:nocache": "1",
+ nodedir: "/Users/isaacs/dev/js/node-v0.8",
+ "sign-git-tag": true,
+ message: "v%s",
+ "strict-ssl": false,
+ "tmp": process.env.HOME + "/.tmp",
+ _auth: "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ _token:
+ { AuthSession: "yabba-dabba-doodle",
+ version: "1",
+ expires: "1345001053415",
+ path: "/",
+ httponly: true } }
+
+// set the userconfig in the env
+// unset anything else that npm might be trying to foist on us
+Object.keys(process.env).forEach(function (k) {
+ if (k.match(/^npm_config_/i)) {
+ delete process.env[k]
+ }
+})
+process.env.npm_config_userconfig = exports.userconfig
+process.env.npm_config_other_env_thing = 1000
+process.env.random_env_var = "asdf"
+process.env.npm_config__underbar_env_thing = "underful"
+process.env.NPM_CONFIG_UPPERCASE_ENV_THING = 42
+
+exports.envData = {
+ userconfig: exports.userconfig,
+ "_underbar-env-thing": "underful",
+ "uppercase-env-thing": "42",
+ "other-env-thing": "1000"
+}
+exports.envDataFix = {
+ userconfig: exports.userconfig,
+ "_underbar-env-thing": "underful",
+ "uppercase-env-thing": 42,
+ "other-env-thing": 1000
+}
+
+
+if (module === require.main) {
+ // set the globalconfig in the userconfig
+ var fs = require("fs")
+ var uc = fs.readFileSync(userconfigSrc)
+ var gcini = "globalconfig = " + exports.globalconfig + "\n"
+ fs.writeFileSync(exports.userconfig, gcini + uc)
+
+ console.log("0..1")
+ console.log("ok 1 setup done")
+}
diff --git a/deps/npm/test/tap/00-verify-bundle-deps.js b/deps/npm/test/tap/00-verify-bundle-deps.js
index 00291a6..9d16b2d 100644
--- a/deps/npm/test/tap/00-verify-bundle-deps.js
+++ b/deps/npm/test/tap/00-verify-bundle-deps.js
@@ -16,7 +16,7 @@ test("all deps are bundled deps or dev deps", function (t) {
})
t.same(
- fs.readdirSync(path.resolve(__dirname, '../../node_modules')).filter(function (name) {
+ fs.readdirSync(path.resolve(__dirname, "../../node_modules")).filter(function (name) {
return (dev.indexOf(name) === -1) && (name !== ".bin")
}).sort(),
bundled.sort(),
diff --git a/deps/npm/test/tap/00-verify-ls-ok.js b/deps/npm/test/tap/00-verify-ls-ok.js
index 7209e7d..aa6acdb 100644
--- a/deps/npm/test/tap/00-verify-ls-ok.js
+++ b/deps/npm/test/tap/00-verify-ls-ok.js
@@ -1,15 +1,18 @@
+var common = require("../common-tap")
var test = require("tap").test
-var node = process.execPath
var path = require("path")
var cwd = path.resolve(__dirname, "..", "..")
-var npm = path.resolve(cwd, "cli.js")
-var spawn = require("child_process").spawn
+var fs = require("fs")
test("npm ls in npm", function (t) {
+ t.ok(fs.existsSync(cwd), "ensure that the path we are calling ls within exists")
+ var files = fs.readdirSync(cwd)
+ t.notEqual(files.length, 0, "ensure there are files in the directory we are to ls")
+
var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] }
- var child = spawn(node, [npm, "ls"], opt)
- child.on("close", function (code) {
- t.notOk(code)
+ common.npm(["ls"], opt, function (err, code) {
+ t.ifError(err, "error should not exist")
+ t.equal(code, 0, "npm ls exited with code")
t.end()
})
})
diff --git a/deps/npm/test/tap/404-parent.js b/deps/npm/test/tap/404-parent.js
index b3c3538..e40d850 100644
--- a/deps/npm/test/tap/404-parent.js
+++ b/deps/npm/test/tap/404-parent.js
@@ -1,26 +1,25 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var osenv = require('osenv')
-var path = require('path')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var pkg = path.resolve(__dirname, '404-parent')
+var common = require("../common-tap.js")
+var test = require("tap").test
+var npm = require("../../")
+var osenv = require("osenv")
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var pkg = path.resolve(__dirname, "404-parent")
var mr = require("npm-registry-mock")
-test('404-parent: if parent exists, specify parent in error message', function(t) {
+test("404-parent: if parent exists, specify parent in error message", function (t) {
setup()
- rimraf.sync(path.resolve(pkg, 'node_modules'))
- performInstall(function(err) {
- t.ok(err instanceof Error)
- t.pass('error was returned')
- t.ok(err.parent === '404-parent-test')
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ performInstall(function (err) {
+ t.ok(err instanceof Error, "error was returned")
+ t.ok(err.parent === "404-parent-test", "error's parent set")
t.end()
})
})
-test('cleanup', function(t) {
+test("cleanup", function (t) {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
t.end()
@@ -28,23 +27,23 @@ test('cleanup', function(t) {
function setup() {
mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, 'cache'))
- fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({
- author: 'Evan Lucas',
- name: '404-parent-test',
- version: '0.0.0',
- description: 'Test for 404-parent',
+ mkdirp.sync(path.resolve(pkg, "cache"))
+ fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({
+ author: "Evan Lucas",
+ name: "404-parent-test",
+ version: "0.0.0",
+ description: "Test for 404-parent",
dependencies: {
- 'test-npm-404-parent-test': '*'
+ "test-npm-404-parent-test": "*"
}
- }), 'utf8')
+ }), "utf8")
process.chdir(pkg)
}
function performInstall(cb) {
mr(common.port, function (s) { // create mock registry.
- npm.load({registry: common.registry}, function() {
- npm.commands.install(pkg, [], function(err) {
+ npm.load({registry: common.registry}, function () {
+ npm.commands.install(pkg, [], function (err) {
cb(err)
s.close() // shutdown mock npm server.
})
diff --git a/deps/npm/test/tap/builtin-config.js b/deps/npm/test/tap/builtin-config.js
new file mode 100644
index 0000000..75acd2b
--- /dev/null
+++ b/deps/npm/test/tap/builtin-config.js
@@ -0,0 +1,125 @@
+var fs = require("fs")
+
+if (process.argv[2] === "write-builtin") {
+ var pid = process.argv[3]
+ fs.writeFileSync("npmrc", "foo=bar\npid=" + pid + "\n")
+ return
+}
+
+var rcdata = "foo=bar\npid=" + process.pid + "\n"
+var common = require("../common-tap.js")
+var path = require("path")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var folder = path.resolve(__dirname, "builtin-config")
+var test = require("tap").test
+var npm = path.resolve(__dirname, "../..")
+var spawn = require("child_process").spawn
+var node = process.execPath
+
+test("setup", function (t) {
+ rimraf.sync(folder)
+ mkdirp.sync(folder + "/first")
+ mkdirp.sync(folder + "/second")
+ mkdirp.sync(folder + "/cache")
+ mkdirp.sync(folder + "/tmp")
+
+ t.pass("finished setup")
+ t.end()
+})
+
+
+test("install npm into first folder", function (t) {
+ var args = ["install", npm, "-g",
+ "--prefix=" + folder + "/first",
+ "--cache=" + folder + "/cache",
+ "--no-spin",
+ "--loglevel=silent",
+ "--tmp=" + folder + "/tmp"]
+ common.npm(args, {stdio: "inherit"}, function (er, code) {
+ if (er) throw er
+ t.equal(code, 0)
+ t.end()
+ })
+})
+
+test("write npmrc file", function (t) {
+ common.npm(["explore", "npm", "-g",
+ "--prefix=" + folder + "/first",
+ "--cache=" + folder + "/cache",
+ "--tmp=" + folder + "/tmp",
+ "--no-spin",
+ "--",
+ node, __filename, "write-builtin", process.pid
+ ],
+ {"stdio": "inherit"},
+ function (er, code) {
+ if (er) throw er
+ t.equal(code, 0)
+ t.end()
+ })
+})
+
+test("use first npm to install second npm", function (t) {
+ // get the root location
+ common.npm([ "root", "-g",
+ "--prefix=" + folder + "/first",
+ "--cache=" + folder + "/cache",
+ "--tmp=" + folder + "/tmp",
+ "--no-spin"
+ ], {}, function (er, code, so) {
+ if (er) throw er
+ t.equal(code, 0)
+ var root = so.trim()
+ t.ok(fs.statSync(root).isDirectory())
+
+ var bin = path.resolve(root, "npm/bin/npm-cli.js")
+ spawn( node
+ , [ bin
+ , "install", npm
+ , "-g"
+ , "--prefix=" + folder + "/second"
+ , "--cache=" + folder + "/cache"
+ , "--tmp=" + folder + "/tmp"
+ , "--no-spin"
+ ])
+ .on("error", function (er) { throw er })
+ .on("close", function (code) {
+ t.equal(code, 0, "code is zero")
+ t.end()
+ })
+ })
+})
+
+test("verify that the builtin config matches", function (t) {
+ common.npm([ "root", "-g",
+ "--prefix=" + folder + "/first",
+ "--cache=" + folder + "/cache",
+ "--tmp=" + folder + "/tmp"
+ ], {}, function (er, code, so) {
+ if (er) throw er
+ t.equal(code, 0)
+ var firstRoot = so.trim()
+ common.npm([ "root", "-g",
+ "--prefix=" + folder + "/second",
+ "--cache=" + folder + "/cache",
+ "--tmp=" + folder + "/tmp"
+ ], {}, function (er, code, so) {
+ if (er) throw er
+ t.equal(code, 0)
+ var secondRoot = so.trim()
+ var firstRc = path.resolve(firstRoot, "npm", "npmrc")
+ var secondRc = path.resolve(secondRoot, "npm", "npmrc")
+ var firstData = fs.readFileSync(firstRc, "utf8")
+ var secondData = fs.readFileSync(secondRc, "utf8")
+ t.equal(firstData, secondData)
+ t.end()
+ })
+ })
+})
+
+
+test("clean", function (t) {
+ rimraf.sync(folder)
+ t.end()
+})
diff --git a/deps/npm/test/tap/cache-add-localdir-fallback.js b/deps/npm/test/tap/cache-add-localdir-fallback.js
index 6b036c3..facd95c 100644
--- a/deps/npm/test/tap/cache-add-localdir-fallback.js
+++ b/deps/npm/test/tap/cache-add-localdir-fallback.js
@@ -3,45 +3,49 @@ var test = require("tap").test
var npm = require("../../lib/npm.js")
var requireInject = require("require-inject")
-npm.load({loglevel : "silent"}, function () {
- var resolved = path.resolve(__dirname, "dir-with-package")
- var resolvedPackage = path.join(resolved, "package.json")
+var realizePackageSpecifier = requireInject("realize-package-specifier", {
+ "fs": {
+ stat: function (file, cb) {
+ process.nextTick(function () {
+ switch (file) {
+ case path.resolve("named"):
+ cb(new Error("ENOENT"))
+ break
+ case path.resolve("file.tgz"):
+ cb(null, { isDirectory: function () { return false } })
+ break
+ case path.resolve("dir-no-package"):
+ cb(null, { isDirectory: function () { return true } })
+ break
+ case path.resolve("dir-no-package/package.json"):
+ cb(new Error("ENOENT"))
+ break
+ case path.resolve("dir-with-package"):
+ cb(null, { isDirectory: function () { return true } })
+ break
+ case path.resolve("dir-with-package/package.json"):
+ cb(null, {})
+ break
+ case path.resolve(__dirname, "dir-with-package"):
+ cb(null, { isDirectory: function () { return true } })
+ break
+ case path.join(__dirname, "dir-with-package", "package.json"):
+ cb(null, {})
+ break
+ case path.resolve(__dirname, "file.tgz"):
+ cb(null, { isDirectory: function () { return false } })
+ break
+ default:
+ throw new Error("Unknown test file passed to stat: " + file)
+ }
+ })
+ }
+ }
+})
+npm.load({loglevel : "silent"}, function () {
var cache = requireInject("../../lib/cache.js", {
- "graceful-fs": {
- stat: function (file, cb) {
- process.nextTick(function () {
- switch (file) {
- case "named":
- cb(new Error("ENOENT"))
- break
- case "file.tgz":
- cb(null, { isDirectory: function () { return false } })
- break
- case "dir-no-package":
- cb(null, { isDirectory: function () { return true } })
- break
- case "dir-no-package/package.json":
- cb(new Error("ENOENT"))
- break
- case "dir-with-package":
- cb(null, { isDirectory: function () { return true } })
- break
- case "dir-with-package/package.json":
- cb(null, {})
- break
- case resolved:
- cb(null, { isDirectory: function () { return true } })
- break
- case resolvedPackage:
- cb(null, {})
- break
- default:
- throw new Error("Unknown test file passed to stat: " + file)
- }
- })
- }
- },
+ "realize-package-specifier": realizePackageSpecifier,
"../../lib/cache/add-named.js": function addNamed (name, version, data, cb) {
cb(null, "addNamed")
},
@@ -51,7 +55,7 @@ npm.load({loglevel : "silent"}, function () {
})
test("npm install localdir fallback", function (t) {
- t.plan(10)
+ t.plan(12)
cache.add("named", null, null, false, function (er, which) {
t.ifError(er, "named was cached")
t.is(which, "addNamed", "registry package name")
@@ -72,5 +76,9 @@ npm.load({loglevel : "silent"}, function () {
t.ifError(er, "local directory (as URI) with package was cached")
t.is(which, "addLocal", "file: URI to local directory with package.json")
})
+ cache.add("file:./file.tgz", null, __dirname, false, function (er, which) {
+ t.ifError(er, "local file (as URI) with package was cached")
+ t.is(which, "addLocal", "file: URI to local file with package.json")
+ })
})
})
diff --git a/deps/npm/test/tap/cache-add-unpublished.js b/deps/npm/test/tap/cache-add-unpublished.js
index e313213..46f0db2 100644
--- a/deps/npm/test/tap/cache-add-unpublished.js
+++ b/deps/npm/test/tap/cache-add-unpublished.js
@@ -1,61 +1,12 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-
-var server
-
-var port = common.port
-var http = require("http")
-
-var doc = {
- "_id": "superfoo",
- "_rev": "5-d11adeec0fdfea6b96b120610d2bed71",
- "name": "superfoo",
- "time": {
- "modified": "2014-02-18T18:35:02.930Z",
- "created": "2014-02-18T18:34:08.437Z",
- "1.1.0": "2014-02-18T18:34:08.437Z",
- "unpublished": {
- "name": "isaacs",
- "time": "2014-04-30T18:26:45.584Z",
- "tags": {
- "latest": "1.1.0"
- },
- "maintainers": [
- {
- "name": "foo",
- "email": "foo@foo.com"
- }
- ],
- "description": "do lots a foo",
- "versions": [
- "1.1.0"
- ]
- }
- },
- "_attachments": {}
-}
-
-test("setup", function (t) {
- server = http.createServer(function(req, res) {
- res.end(JSON.stringify(doc))
- })
- server.listen(port, function() {
- t.end()
- })
-})
+var common = require("../common-tap.js")
+var test = require("tap").test
test("cache add", function (t) {
common.npm(["cache", "add", "superfoo"], {}, function (er, c, so, se) {
if (er) throw er
- t.ok(c)
- t.equal(so, "")
- t.similar(se, /404 Not Found: superfoo/)
- t.end()
- })
-})
-
-test("cleanup", function (t) {
- server.close(function() {
+ t.ok(c, "got non-zero exit code")
+ t.equal(so, "", "nothing printed to stdout")
+ t.similar(se, /404 Not Found: superfoo/, "got expected error")
t.end()
})
})
diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js
new file mode 100644
index 0000000..383f08c
--- /dev/null
+++ b/deps/npm/test/tap/cache-shasum-fork.js
@@ -0,0 +1,83 @@
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var mr = require("npm-registry-mock")
+var common = require("../common-tap.js")
+var cache = path.resolve(__dirname, "cache-shasum-fork", "CACHE")
+var cwd = path.resolve(__dirname, "cache-shasum-fork", "CWD")
+var server
+
+// Test for https://github.com/npm/npm/issues/3265
+
+test("mock reg", function (t) {
+ rimraf.sync(cache)
+ mkdirp.sync(cache)
+ rimraf.sync(cwd)
+ mkdirp.sync(path.join(cwd, "node_modules"))
+ mr(common.port, function (s) {
+ server = s
+ t.pass("ok")
+ t.end()
+ })
+})
+
+test("npm cache - install from fork", function (t) {
+ // Install from a tarball that thinks it is underscore@1.5.1
+ // (but is actually a fork)
+ var forkPath = path.resolve(
+ __dirname, "cache-shasum-fork", "underscore-1.5.1.tgz")
+ common.npm(["install", forkPath], {
+ cwd: cwd,
+ env: {
+ "npm_config_cache" : cache,
+ "npm_config_registry" : common.registry,
+ "npm_config_loglevel" : "silent"
+ }
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, "install finished without error")
+ t.notOk(stderr, "Should not get data on stderr: " + stderr)
+ t.equal(code, 0, "install finished successfully")
+
+ t.equal(stdout, "underscore@1.5.1 node_modules/underscore\n")
+ var index = fs.readFileSync(
+ path.join(cwd, "node_modules", "underscore", "index.js"),
+ "utf8"
+ )
+ t.equal(index, 'console.log("This is the fork");\n\n')
+ t.end()
+ })
+})
+
+test("npm cache - install from origin", function (t) {
+ // Now install the real 1.5.1.
+ rimraf.sync(path.join(cwd, "node_modules"))
+ mkdirp.sync(path.join(cwd, "node_modules"))
+ common.npm(["install", "underscore"], {
+ cwd: cwd,
+ env: {
+ "npm_config_cache" : cache,
+ "npm_config_registry" : common.registry,
+ "npm_config_loglevel" : "silent"
+ }
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, "install finished without error")
+ t.equal(code, 0, "install finished successfully")
+ t.notOk(stderr, "Should not get data on stderr: " + stderr)
+ t.equal(stdout, "underscore@1.5.1 node_modules/underscore\n")
+ var index = fs.readFileSync(
+ path.join(cwd, "node_modules", "underscore", "index.js"),
+ "utf8"
+ )
+ t.equal(index, "module.exports = require('./underscore');\n")
+ t.end()
+ })
+})
+
+test("cleanup", function (t) {
+ server.close()
+ rimraf.sync(cache)
+ rimraf.sync(cwd)
+ t.end()
+})
diff --git a/deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz b/deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz
new file mode 100644
index 0000000..5aca624
Binary files /dev/null and b/deps/npm/test/tap/cache-shasum-fork/underscore-1.5.1.tgz differ
diff --git a/deps/npm/test/tap/cache-shasum.js b/deps/npm/test/tap/cache-shasum.js
index 7450d3e..c7784ec 100644
--- a/deps/npm/test/tap/cache-shasum.js
+++ b/deps/npm/test/tap/cache-shasum.js
@@ -10,7 +10,7 @@ var spawn = require("child_process").spawn
var sha = require("sha")
var server
-test("mock reg", function(t) {
+test("mock reg", function (t) {
rimraf.sync(cache)
mkdirp.sync(cache)
mr(common.port, function (s) {
@@ -20,7 +20,7 @@ test("mock reg", function(t) {
})
})
-test("npm cache add request", function(t) {
+test("npm cache add request", function (t) {
var c = spawn(process.execPath, [
npm, "cache", "add", "request@2.27.0",
"--cache=" + cache,
@@ -29,17 +29,17 @@ test("npm cache add request", function(t) {
])
c.stderr.pipe(process.stderr)
- c.stdout.on("data", function(d) {
+ c.stdout.on("data", function (d) {
t.fail("Should not get data on stdout: " + d)
})
- c.on("close", function(code) {
+ c.on("close", function (code) {
t.notOk(code, "exit ok")
t.end()
})
})
-test("compare", function(t) {
+test("compare", function (t) {
var d = path.resolve(__dirname, "cache-shasum/request")
var p = path.resolve(d, "2.27.0/package.tgz")
var r = require("./cache-shasum/localhost_1337/request/.cache.json")
@@ -52,7 +52,7 @@ test("compare", function(t) {
})
})
-test("cleanup", function(t) {
+test("cleanup", function (t) {
server.close()
rimraf.sync(cache)
t.end()
diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js
index 533f464..60487dd 100644
--- a/deps/npm/test/tap/circular-dep.js
+++ b/deps/npm/test/tap/circular-dep.js
@@ -17,12 +17,12 @@ test("installing a package that depends on the current package", function (t) {
setup(function () {
npm.install("optimist", function (err) {
if (err) return t.fail(err)
- npm.dedupe(function(err) {
+ npm.dedupe(function (err) {
if (err) return t.fail(err)
t.ok(existsSync(path.resolve(pkg,
"minimist", "node_modules", "optimist",
"node_modules", "minimist"
- )))
+ )), "circular dependency uncircled")
cleanup()
server.close()
})
diff --git a/deps/npm/test/tap/config-basic.js b/deps/npm/test/tap/config-basic.js
new file mode 100644
index 0000000..d5a950a
--- /dev/null
+++ b/deps/npm/test/tap/config-basic.js
@@ -0,0 +1,66 @@
+var test = require("tap").test
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+var path = require("path")
+
+var projectData = {
+ "save-prefix": "~",
+ "proprietary-attribs": false
+}
+
+var ucData = common.ucData
+var envData = common.envData
+var envDataFix = common.envDataFix
+
+var gcData = { "package-config:foo": "boo" }
+
+var biData = {}
+
+var cli = { foo: "bar", umask: 022 }
+
+var expectList =
+[ cli,
+ envDataFix,
+ projectData,
+ ucData,
+ gcData,
+ biData ]
+
+var expectSources = {
+ cli: { data: cli },
+ env: {
+ data: envDataFix,
+ source: envData,
+ prefix: ""
+ },
+ project: {
+ path: path.resolve(__dirname, "..", "..", ".npmrc"),
+ type: "ini",
+ data: projectData
+ },
+ user: {
+ path: common.userconfig,
+ type: "ini",
+ data: ucData
+ },
+ global: {
+ path: common.globalconfig,
+ type: "ini",
+ data: gcData
+ },
+ builtin: { data: biData }
+}
+
+test("no builtin", function (t) {
+ npmconf.load(cli, function (er, conf) {
+ if (er) throw er
+ t.same(conf.list, expectList)
+ t.same(conf.sources, expectSources)
+ t.same(npmconf.rootConf.list, [])
+ t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
+ t.equal(conf.root, npmconf.defs.defaults)
+ t.equal(conf.get("umask"), 022)
+ t.equal(conf.get("heading"), "npm")
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-builtin.js b/deps/npm/test/tap/config-builtin.js
new file mode 100644
index 0000000..5a1589f
--- /dev/null
+++ b/deps/npm/test/tap/config-builtin.js
@@ -0,0 +1,68 @@
+var test = require("tap").test
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+var path = require("path")
+
+var ucData = common.ucData
+
+var envData = common.envData
+var envDataFix = common.envDataFix
+
+var gcData = { "package-config:foo": "boo" }
+
+var biData = { "builtin-config": true }
+
+var cli = { foo: "bar", heading: "foo", "git-tag-version": false }
+
+var projectData = {
+ "save-prefix": "~",
+ "proprietary-attribs": false
+}
+
+var expectList = [
+ cli,
+ envDataFix,
+ projectData,
+ ucData,
+ gcData,
+ biData
+]
+
+var expectSources = {
+ cli: { data: cli },
+ env: {
+ data: envDataFix,
+ source: envData,
+ prefix: ""
+ },
+ project: {
+ path: path.resolve(__dirname, "..", "..", ".npmrc"),
+ type: "ini",
+ data: projectData
+ },
+ user: {
+ path: common.userconfig,
+ type: "ini",
+ data: ucData
+ },
+ global: {
+ path: common.globalconfig,
+ type: "ini",
+ data: gcData
+ },
+ builtin: { data: biData }
+}
+
+test("with builtin", function (t) {
+ npmconf.load(cli, common.builtin, function (er, conf) {
+ if (er) throw er
+ t.same(conf.list, expectList)
+ t.same(conf.sources, expectSources)
+ t.same(npmconf.rootConf.list, [])
+ t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
+ t.equal(conf.root, npmconf.defs.defaults)
+ t.equal(conf.get("heading"), "foo")
+ t.equal(conf.get("git-tag-version"), false)
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-certfile.js b/deps/npm/test/tap/config-certfile.js
new file mode 100644
index 0000000..25de996
--- /dev/null
+++ b/deps/npm/test/tap/config-certfile.js
@@ -0,0 +1,18 @@
+require("./00-config-setup.js")
+
+var path = require("path")
+var fs = require("fs")
+var test = require("tap").test
+var npmconf = require("../../lib/config/core.js")
+
+test("cafile loads as ca", function (t) {
+ var cafile = path.join(__dirname, "..", "fixtures", "config", "multi-ca")
+
+ npmconf.load({cafile: cafile}, function (er, conf) {
+ if (er) throw er
+
+ t.same(conf.get("cafile"), cafile)
+ t.same(conf.get("ca").join("\n"), fs.readFileSync(cafile, "utf8").trim())
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-credentials.js b/deps/npm/test/tap/config-credentials.js
new file mode 100644
index 0000000..c24bb7e
--- /dev/null
+++ b/deps/npm/test/tap/config-credentials.js
@@ -0,0 +1,295 @@
+var test = require("tap").test
+
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+
+var URI = "https://registry.lvh.me:8661/"
+
+test("getting scope with no credentials set", function (t) {
+ npmconf.load({}, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var basic = conf.getCredentialsByURI(URI)
+ t.equal(basic.scope, "//registry.lvh.me:8661/", "nerfed URL extracted")
+
+ t.end()
+ })
+})
+
+test("trying to set credentials with no URI", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ t.throws(function () {
+ conf.setCredentialsByURI()
+ }, "enforced missing URI")
+
+ t.end()
+ })
+})
+
+test("set with missing credentials object", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ t.throws(function () {
+ conf.setCredentialsByURI(URI)
+ }, "enforced missing credentials")
+
+ t.end()
+ })
+})
+
+test("set with empty credentials object", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ t.throws(function () {
+ conf.setCredentialsByURI(URI, {})
+ }, "enforced missing credentials")
+
+ t.end()
+ })
+})
+
+test("set with token", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ t.doesNotThrow(function () {
+ conf.setCredentialsByURI(URI, {token : "simple-token"})
+ }, "needs only token")
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : "simple-token",
+ username : undefined,
+ password : undefined,
+ email : undefined,
+ auth : undefined,
+ alwaysAuth : undefined
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got bearer token and scope")
+
+ t.end()
+ })
+})
+
+test("set with missing username", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ password : "password",
+ email : "ogd@aoaioxxysz.net"
+ }
+
+ t.throws(function () {
+ conf.setCredentialsByURI(URI, credentials)
+ }, "enforced missing email")
+
+ t.end()
+ })
+})
+
+test("set with missing password", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ username : "username",
+ email : "ogd@aoaioxxysz.net"
+ }
+
+ t.throws(function () {
+ conf.setCredentialsByURI(URI, credentials)
+ }, "enforced missing email")
+
+ t.end()
+ })
+})
+
+test("set with missing email", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ username : "username",
+ password : "password"
+ }
+
+ t.throws(function () {
+ conf.setCredentialsByURI(URI, credentials)
+ }, "enforced missing email")
+
+ t.end()
+ })
+})
+
+test("set with old-style credentials", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net"
+ }
+
+ t.doesNotThrow(function () {
+ conf.setCredentialsByURI(URI, credentials)
+ }, "requires all of username, password, and email")
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : undefined,
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : false
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
+
+ t.end()
+ })
+})
+
+test("get old-style credentials for default registry", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ var actual = conf.getCredentialsByURI(conf.get("registry"))
+ var expected = {
+ scope : "//registry.npmjs.org/",
+ token : undefined,
+ password : "password",
+ username : "username",
+ email : "i@izs.me",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : false
+ }
+ t.same(actual, expected)
+ t.end()
+ })
+})
+
+test("set with always-auth enabled", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ alwaysAuth : true
+ }
+
+ conf.setCredentialsByURI(URI, credentials)
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : undefined,
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : true
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
+
+ t.end()
+ })
+})
+
+test("set with always-auth disabled", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+
+ var credentials = {
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ alwaysAuth : false
+ }
+
+ conf.setCredentialsByURI(URI, credentials)
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : undefined,
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : false
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
+
+ t.end()
+ })
+})
+
+test("set with global always-auth enabled", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+ var original = conf.get("always-auth")
+ conf.set("always-auth", true)
+
+ var credentials = {
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net"
+ }
+
+ conf.setCredentialsByURI(URI, credentials)
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : undefined,
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : true
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
+
+ conf.set("always-auth", original)
+ t.end()
+ })
+})
+
+test("set with global always-auth disabled", function (t) {
+ npmconf.load(common.builtin, function (er, conf) {
+ t.ifError(er, "configuration loaded")
+ var original = conf.get("always-auth")
+ conf.set("always-auth", false)
+
+ var credentials = {
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net"
+ }
+
+ conf.setCredentialsByURI(URI, credentials)
+
+ var expected = {
+ scope : "//registry.lvh.me:8661/",
+ token : undefined,
+ username : "username",
+ password : "password",
+ email : "ogd@aoaioxxysz.net",
+ auth : "dXNlcm5hbWU6cGFzc3dvcmQ=",
+ alwaysAuth : false
+ }
+
+ t.same(conf.getCredentialsByURI(URI), expected, "got credentials")
+
+ conf.set("always-auth", original)
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-malformed.js b/deps/npm/test/tap/config-malformed.js
new file mode 100644
index 0000000..0450221
--- /dev/null
+++ b/deps/npm/test/tap/config-malformed.js
@@ -0,0 +1,14 @@
+var test = require('tap').test
+
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+
+test('with malformed', function (t) {
+ npmconf.load({}, common.malformed, function (er, conf) {
+ t.ok(er, 'Expected parse error')
+ if (!(er && /Failed parsing JSON config key email/.test(er.message))) {
+ throw er
+ }
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-meta.js b/deps/npm/test/tap/config-meta.js
index 26ca6f2..faced80 100644
--- a/deps/npm/test/tap/config-meta.js
+++ b/deps/npm/test/tap/config-meta.js
@@ -51,16 +51,16 @@ test("get files", function (t) {
test("get lines", function (t) {
FILES.forEach(function (f) {
- var lines = fs.readFileSync(f, 'utf8').split(/\r|\n/)
+ var lines = fs.readFileSync(f, "utf8").split(/\r|\n/)
lines.forEach(function (l, i) {
var matches = l.split(/conf(?:ig)?\.get\(/g)
matches.shift()
matches.forEach(function (m) {
- m = m.split(')').shift()
+ m = m.split(")").shift()
var literal = m.match(/^['"].+['"]$/)
if (literal) {
m = m.slice(1, -1)
- if (!m.match(/^\_/) && m !== 'argv')
+ if (!m.match(/^\_/) && m !== "argv")
CONFS[m] = {
file: f,
line: i
@@ -81,48 +81,46 @@ test("get docs", function (t) {
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
+ DOC[ d[i].replace(/^### /, "").trim() ] = true
}
t.pass("read the docs")
t.end()
})
test("check configs", function (t) {
- var defs = require("npmconf/config-defs.js")
+ var defs = require("../../lib/config/defaults.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 c1 in CONFS) {
+ if (CONFS[c1].file.indexOf(lib) === 0) {
+ t.ok(DOC[c1], "should be documented " + c1 + " "
+ + CONFS[c1].file + ":" + CONFS[c1].line)
+ t.ok(types.indexOf(c1) !== -1, "should be defined in npmconf " + c1)
+ t.ok(defaults.indexOf(c1) !== -1, "should have default in npmconf " + c1)
}
}
- for (var c in DOC) {
- if (c !== "versions" && c !== "version" && c !== "init.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)
+ for (var c2 in DOC) {
+ if (c2 !== "versions" && c2 !== "version" && c2 !== "init.version") {
+ t.ok(CONFS[c2], "config in doc should be used somewhere " + c2)
+ t.ok(types.indexOf(c2) !== -1, "should be defined in npmconf " + c2)
+ t.ok(defaults.indexOf(c2) !== -1, "should have default in npmconf " + c2)
}
}
- 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)
+ 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)
+ 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)
}
})
diff --git a/deps/npm/test/tap/config-project.js b/deps/npm/test/tap/config-project.js
new file mode 100644
index 0000000..337355b
--- /dev/null
+++ b/deps/npm/test/tap/config-project.js
@@ -0,0 +1,66 @@
+var test = require("tap").test
+var path = require("path")
+var fix = path.resolve(__dirname, "..", "fixtures", "config")
+var projectRc = path.resolve(fix, ".npmrc")
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+
+var projectData = { just: "testing" }
+
+var ucData = common.ucData
+var envData = common.envData
+var envDataFix = common.envDataFix
+
+var gcData = { "package-config:foo": "boo" }
+
+var biData = {}
+
+var cli = { foo: "bar", umask: 022, prefix: fix }
+
+var expectList = [
+ cli,
+ envDataFix,
+ projectData,
+ ucData,
+ gcData,
+ biData
+]
+
+var expectSources = {
+ cli: { data: cli },
+ env: {
+ data: envDataFix,
+ source: envData,
+ prefix: ""
+ },
+ project: {
+ path: projectRc,
+ type: "ini",
+ data: projectData
+ },
+ user: {
+ path: common.userconfig,
+ type: "ini",
+ data: ucData
+ },
+ global: {
+ path: common.globalconfig,
+ type: "ini",
+ data: gcData
+ },
+ builtin: { data: biData }
+}
+
+test("no builtin", function (t) {
+ npmconf.load(cli, function (er, conf) {
+ if (er) throw er
+ t.same(conf.list, expectList)
+ t.same(conf.sources, expectSources)
+ t.same(npmconf.rootConf.list, [])
+ t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
+ t.equal(conf.root, npmconf.defs.defaults)
+ t.equal(conf.get("umask"), 022)
+ t.equal(conf.get("heading"), "npm")
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-save.js b/deps/npm/test/tap/config-save.js
new file mode 100644
index 0000000..88526a3
--- /dev/null
+++ b/deps/npm/test/tap/config-save.js
@@ -0,0 +1,88 @@
+var fs = require("fs")
+var ini = require("ini")
+var test = require("tap").test
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+
+var expectConf = [
+ "globalconfig = " + common.globalconfig,
+ "email = i@izs.me",
+ "env-thing = asdf",
+ "init.author.name = Isaac Z. Schlueter",
+ "init.author.email = i@izs.me",
+ "init.author.url = http://blog.izs.me/",
+ "init.version = 1.2.3",
+ "proprietary-attribs = false",
+ "npm:publishtest = true",
+ "_npmjs.org:couch = https://admin:password@localhost:5984/registry",
+ "npm-www:nocache = 1",
+ "sign-git-tag = false",
+ "message = v%s",
+ "strict-ssl = false",
+ "_auth = dXNlcm5hbWU6cGFzc3dvcmQ=",
+ "",
+ "[_token]",
+ "AuthSession = yabba-dabba-doodle",
+ "version = 1",
+ "expires = 1345001053415",
+ "path = /",
+ "httponly = true",
+ ""
+].join("\n")
+
+var expectFile = [
+ "globalconfig = " + common.globalconfig,
+ "email = i@izs.me",
+ "env-thing = asdf",
+ "init.author.name = Isaac Z. Schlueter",
+ "init.author.email = i@izs.me",
+ "init.author.url = http://blog.izs.me/",
+ "init.version = 1.2.3",
+ "proprietary-attribs = false",
+ "npm:publishtest = true",
+ "_npmjs.org:couch = https://admin:password@localhost:5984/registry",
+ "npm-www:nocache = 1",
+ "sign-git-tag = false",
+ "message = v%s",
+ "strict-ssl = false",
+ "_auth = dXNlcm5hbWU6cGFzc3dvcmQ=",
+ "",
+ "[_token]",
+ "AuthSession = yabba-dabba-doodle",
+ "version = 1",
+ "expires = 1345001053415",
+ "path = /",
+ "httponly = true",
+ ""
+].join("\n")
+
+test("saving configs", function (t) {
+ npmconf.load(function (er, conf) {
+ if (er)
+ throw er
+ conf.set("sign-git-tag", false, "user")
+ conf.del("nodedir")
+ conf.del("tmp")
+ var foundConf = ini.stringify(conf.sources.user.data)
+ t.same(ini.parse(foundConf), ini.parse(expectConf))
+ fs.unlinkSync(common.userconfig)
+ conf.save("user", function (er) {
+ if (er)
+ throw er
+ var uc = fs.readFileSync(conf.get("userconfig"), "utf8")
+ t.same(ini.parse(uc), ini.parse(expectFile))
+ t.end()
+ })
+ })
+})
+
+test("setting prefix", function (t) {
+ npmconf.load(function (er, conf) {
+ if (er)
+ throw er
+
+ conf.prefix = "newvalue"
+ t.same(conf.prefix, "newvalue")
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-semver-tag.js b/deps/npm/test/tap/config-semver-tag.js
new file mode 100644
index 0000000..4ce1cb2
--- /dev/null
+++ b/deps/npm/test/tap/config-semver-tag.js
@@ -0,0 +1,27 @@
+var util = require("util")
+var test = require("tap").test
+var npmconf = require("../../lib/config/core.js")
+var common = require("./00-config-setup.js")
+
+var cli = { tag: "v2.x" }
+
+var log = require("npmlog")
+
+test("tag cannot be a SemVer", function (t) {
+ var messages = []
+ log.warn = function (m) {
+ messages.push(m + " " + util.format.apply(util, [].slice.call(arguments, 1)))
+ }
+
+ var expect = [
+ 'invalid config tag="v2.x"',
+ "invalid config Tag must not be a SemVer range"
+ ]
+
+ npmconf.load(cli, common.builtin, function (er, conf) {
+ if (er) throw er
+ t.equal(conf.get("tag"), "latest")
+ t.same(messages, expect)
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/dedupe.js b/deps/npm/test/tap/dedupe.js
index b4b7495..c0a648e 100644
--- a/deps/npm/test/tap/dedupe.js
+++ b/deps/npm/test/tap/dedupe.js
@@ -2,17 +2,26 @@ var test = require("tap").test
, fs = require("fs")
, path = require("path")
, existsSync = fs.existsSync || path.existsSync
- , npm = require("../../")
, rimraf = require("rimraf")
, mr = require("npm-registry-mock")
- , common = require('../common-tap.js')
+ , common = require("../common-tap.js")
+
+var EXEC_OPTS = {}
test("dedupe finds the common module and moves it up one level", function (t) {
setup(function (s) {
- npm.install(".", function (err) {
- if (err) return t.fail(err)
- npm.dedupe(function(err) {
- if (err) return t.fail(err)
+ common.npm(
+ [
+ "install", ".",
+ "--registry", common.registry
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, "successfully installed directory")
+ t.equal(code, 0, "npm install exited with code")
+ common.npm(["dedupe"], {}, function (err, code) {
+ t.ifError(err, "successfully deduped against previous install")
+ t.notOk(code, "npm dedupe exited with code")
t.ok(existsSync(path.join(__dirname, "dedupe", "node_modules", "minimist")))
t.ok(!existsSync(path.join(__dirname, "dedupe", "node_modules", "checker")))
s.close() // shutdown mock registry.
@@ -25,10 +34,8 @@ test("dedupe finds the common module and moves it up one level", function (t) {
function setup (cb) {
process.chdir(path.join(__dirname, "dedupe"))
mr(common.port, function (s) { // create mock registry.
- npm.load({registry: common.registry}, function() {
- rimraf.sync(path.join(__dirname, "dedupe", "node_modules"))
- fs.mkdirSync(path.join(__dirname, "dedupe", "node_modules"))
- cb(s)
- })
+ rimraf.sync(path.join(__dirname, "dedupe", "node_modules"))
+ fs.mkdirSync(path.join(__dirname, "dedupe", "node_modules"))
+ cb(s)
})
}
diff --git a/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json b/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json
new file mode 100644
index 0000000..355039a
--- /dev/null
+++ b/deps/npm/test/tap/dev-dep-duplicate/desired-ls-results.json
@@ -0,0 +1,9 @@
+{
+ "name": "dev-dep-duplicate",
+ "version": "0.0.0",
+ "dependencies": {
+ "underscore": {
+ "version": "1.5.1"
+ }
+ }
+}
diff --git a/deps/npm/test/tap/dev-dep-duplicate/package.json b/deps/npm/test/tap/dev-dep-duplicate/package.json
new file mode 100644
index 0000000..87061b9
--- /dev/null
+++ b/deps/npm/test/tap/dev-dep-duplicate/package.json
@@ -0,0 +1,11 @@
+{
+ "author": "Anders Janmyr",
+ "name": "dev-dep-duplicate",
+ "version": "0.0.0",
+ "dependencies": {
+ "underscore": "1.5.1"
+ },
+ "devDependencies": {
+ "underscore": "1.3.1"
+ }
+}
diff --git a/deps/npm/test/tap/false_name.js b/deps/npm/test/tap/false_name.js
index 5ab1a67..b02eafe 100644
--- a/deps/npm/test/tap/false_name.js
+++ b/deps/npm/test/tap/false_name.js
@@ -11,41 +11,45 @@ var test = require("tap").test
, fs = require("fs")
, path = require("path")
, existsSync = fs.existsSync || path.existsSync
- , spawn = require("child_process").spawn
- , npm = require("../../")
, rimraf = require("rimraf")
, common = require("../common-tap.js")
, mr = require("npm-registry-mock")
- , pkg = __dirname + "/false_name"
+ , pkg = path.resolve(__dirname, "false_name")
+ , cache = path.resolve(pkg, "cache")
+ , nodeModules = path.resolve(pkg, "node_modules")
-test("not every pkg.name can be required", function (t) {
- rimraf.sync(pkg + "/cache")
+var EXEC_OPTS = { cwd: pkg }
- t.plan(1)
+test("setup", function(t) {
+ cleanup()
+ fs.mkdirSync(nodeModules)
+ t.end()
+})
+
+test("not every pkg.name can be required", function (t) {
+ t.plan(3)
mr(common.port, function (s) {
- setup(function () {
- npm.install(".", function (err) {
- if (err) return t.fail(err)
- s.close()
- t.ok(existsSync(pkg + "/node_modules/test-package-with-one-dep/" +
- "node_modules/test-package"))
- })
+ common.npm([
+ "install", ".",
+ "--cache", cache,
+ "--registry", common.registry
+ ], EXEC_OPTS, function (err, code) {
+ s.close()
+ t.ifErr(err, "install finished without error")
+ t.equal(code, 0, "install exited ok")
+ t.ok(existsSync(path.resolve(pkg,
+ "node_modules/test-package-with-one-dep",
+ "node_modules/test-package")))
})
})
})
+function cleanup() {
+ rimraf.sync(cache)
+ rimraf.sync(nodeModules)
+}
+
test("cleanup", function (t) {
- rimraf.sync(pkg + "/cache")
- rimraf.sync(pkg + "/node_modules")
+ cleanup()
t.end()
})
-
-function setup (cb) {
- process.chdir(pkg)
- npm.load({cache: pkg + "/cache", registry: common.registry},
- function () {
- rimraf.sync(pkg + "/node_modules")
- fs.mkdirSync(pkg + "/node_modules")
- cb()
- })
-}
diff --git a/deps/npm/test/tap/git-cache-locking.js b/deps/npm/test/tap/git-cache-locking.js
index b9b328f..39f8b27 100644
--- a/deps/npm/test/tap/git-cache-locking.js
+++ b/deps/npm/test/tap/git-cache-locking.js
@@ -1,10 +1,8 @@
var test = require("tap").test
+ , common = require("../common-tap")
, path = require("path")
, rimraf = require("rimraf")
, mkdirp = require("mkdirp")
- , spawn = require("child_process").spawn
- , npm = require.resolve("../../bin/npm-cli.js")
- , node = process.execPath
, pkg = path.resolve(__dirname, "git-cache-locking")
, tmp = path.join(pkg, "tmp")
, cache = path.join(pkg, "cache")
@@ -12,10 +10,7 @@ var test = require("tap").test
test("setup", function (t) {
rimraf.sync(pkg)
- mkdirp.sync(pkg)
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
- mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
t.end()
})
@@ -26,27 +21,28 @@ test("git-cache-locking: install a git dependency", function (t) {
// package c depends on a.git#master and b.git#master
// package b depends on a.git#master
- var child = spawn(node, [npm, "install", "git://github.com/nigelzor/npm-4503-c.git"], {
+ common.npm([
+ "install",
+ "git://github.com/nigelzor/npm-4503-c.git"
+ ], {
cwd: pkg,
env: {
- npm_config_cache: cache,
- npm_config_tmp: tmp,
- npm_config_prefix: pkg,
- npm_config_global: "false",
+ "npm_config_cache": cache,
+ "npm_config_tmp": tmp,
+ "npm_config_prefix": pkg,
+ "npm_config_global": "false",
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH
- },
- stdio: "inherit"
- })
-
- child.on("close", function (code) {
+ }
+ }, function (err, code) {
+ t.ifErr(err, "npm install finished without error")
t.equal(0, code, "npm install should succeed")
t.end()
})
})
-test('cleanup', function(t) {
+test("cleanup", function(t) {
rimraf.sync(pkg)
t.end()
})
diff --git a/deps/npm/test/tap/git-cache-no-hooks.js b/deps/npm/test/tap/git-cache-no-hooks.js
new file mode 100644
index 0000000..32731fa
--- /dev/null
+++ b/deps/npm/test/tap/git-cache-no-hooks.js
@@ -0,0 +1,63 @@
+var test = require("tap").test
+ , fs = require("fs")
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , mkdirp = require("mkdirp")
+ , spawn = require("child_process").spawn
+ , npmCli = require.resolve("../../bin/npm-cli.js")
+ , node = process.execPath
+ , pkg = path.resolve(__dirname, "git-cache-no-hooks")
+ , tmp = path.join(pkg, "tmp")
+ , cache = path.join(pkg, "cache")
+
+
+test("setup", function (t) {
+ rimraf.sync(pkg)
+ mkdirp.sync(pkg)
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
+ t.end()
+})
+
+test("git-cache-no-hooks: install a git dependency", function (t) {
+
+ // disable git integration tests on Travis.
+ if (process.env.TRAVIS) return t.end()
+
+ var command = [ npmCli
+ , "install"
+ , "git://github.com/nigelzor/npm-4503-a.git"
+ ]
+ var child = spawn(node, command, {
+ cwd: pkg,
+ env: {
+ "npm_config_cache" : cache,
+ "npm_config_tmp" : tmp,
+ "npm_config_prefix" : pkg,
+ "npm_config_global" : "false",
+ "npm_config_umask" : "00",
+ HOME : process.env.HOME,
+ Path : process.env.PATH,
+ PATH : process.env.PATH
+ },
+ stdio: "inherit"
+ })
+
+ child.on("close", function (code) {
+ t.equal(code, 0, "npm install should succeed")
+
+ // verify permissions on git hooks
+ var repoDir = "git-github-com-nigelzor-npm-4503-a-git-40c5cb24"
+ var hooksPath = path.join(cache, "_git-remotes", repoDir, "hooks")
+ fs.readdir(hooksPath, function (err) {
+ t.equal(err && err.code, "ENOENT", "hooks are not brought along with repo")
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ rimraf.sync(pkg)
+ t.end()
+})
diff --git a/deps/npm/test/tap/git-cache-permissions.js b/deps/npm/test/tap/git-cache-permissions.js
deleted file mode 100644
index 27905fb..0000000
--- a/deps/npm/test/tap/git-cache-permissions.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var test = require("tap").test
- , fs = require("fs")
- , path = require("path")
- , rimraf = require("rimraf")
- , mkdirp = require("mkdirp")
- , spawn = require("child_process").spawn
- , npm = require("../../lib/npm")
- , npmCli = require.resolve("../../bin/npm-cli.js")
- , node = process.execPath
- , pkg = path.resolve(__dirname, "git-cache-permissions")
- , tmp = path.join(pkg, "tmp")
- , cache = path.join(pkg, "cache")
-
-
-test("setup", function (t) {
- rimraf.sync(pkg)
- mkdirp.sync(pkg)
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
- mkdirp.sync(path.resolve(pkg, 'node_modules'))
- t.end()
-})
-
-test("git-cache-permissions: install a git dependency", function (t) {
-
- // disable git integration tests on Travis.
- if (process.env.TRAVIS) return t.end()
-
- var command = [ npmCli
- , "install"
- , "git://github.com/nigelzor/npm-4503-a.git"
- ]
- var child = spawn(node, command, {
- cwd: pkg,
- env: {
- npm_config_cache: cache,
- npm_config_tmp: tmp,
- npm_config_prefix: pkg,
- npm_config_global: "false",
- npm_config_umask: "00",
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- },
- stdio: "inherit"
- })
-
- child.on("close", function (code) {
- t.equal(code, 0, "npm install should succeed")
-
- // verify permissions on git hooks
- var repoDir = "git-github-com-nigelzor-npm-4503-a-git-40c5cb24"
- var hooksPath = path.join(cache, "_git-remotes", repoDir, "hooks")
- fs.readdir(hooksPath, function (err, files) {
- if (err) {
- t.ok(false, "error reading hooks: " + err)
- t.end()
- }
-
- files.forEach(function (file) {
- var stats = fs.statSync(path.join(hooksPath, file))
- var message = "hook [" + file + "] should have correct permissions"
-
- // Possible error conditions and the resulting file modes on hooks
- // npm.modes.file is used directly -> "100666"
- // permissions are left untouched -> "100755"
- // we do not want permissions left untouched because of
- // https://github.com/npm/npm/issues/3117
- t.equal(stats.mode.toString(8), "100777", message)
- })
-
- t.end()
- })
- })
-})
-
-test('cleanup', function(t) {
- rimraf.sync(pkg)
- t.end()
-})
diff --git a/deps/npm/test/tap/global-prefix-set-in-userconfig.js b/deps/npm/test/tap/global-prefix-set-in-userconfig.js
index 85fa4f6..f820a27 100644
--- a/deps/npm/test/tap/global-prefix-set-in-userconfig.js
+++ b/deps/npm/test/tap/global-prefix-set-in-userconfig.js
@@ -15,9 +15,9 @@ test("setup", function (t) {
test("run command", function (t) {
var args = ["prefix", "-g", "--userconfig=" + rcfile]
- common.npm(args, {env: {}}, function (er, code, so, se) {
+ common.npm(args, {env: {}}, function (er, code, so) {
if (er) throw er
- t.equal(code, 0)
+ t.notOk(code, "npm prefix exited with code 0")
t.equal(so.trim(), prefix)
t.end()
})
diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js
index 44ae541..45db51d 100644
--- a/deps/npm/test/tap/ignore-install-link.js
+++ b/deps/npm/test/tap/ignore-install-link.js
@@ -52,7 +52,7 @@ test("ignore install if package is linked", function (t) {
stdio: "inherit"
}, function (er, code) {
if (er) throw er
- t.equal(code, 0)
+ t.equal(code, 0, "npm install exited with code")
t.end()
})
})
diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js
index 0115b75..9526443 100644
--- a/deps/npm/test/tap/ignore-scripts.js
+++ b/deps/npm/test/tap/ignore-scripts.js
@@ -1,24 +1,24 @@
+var common = require("../common-tap")
var test = require("tap").test
-var npm = require.resolve("../../bin/npm-cli.js")
-
-var spawn = require("child_process").spawn
-var node = process.execPath
+var path = require("path")
// 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"
+var pkg = path.resolve(__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)
+test("ignore-scripts: install using the option", function (t) {
+ createChild(["install", "--ignore-scripts"], function (err, code) {
+ t.ifError(err, "install with scripts ignored finished successfully")
+ t.equal(code, 0, "npm install exited with code")
t.end()
})
})
-test("ignore-scripts: install NOT using the option", function(t) {
- createChild([npm, "install"]).on("close", function(code) {
- t.notEqual(code, 0)
+test("ignore-scripts: install NOT using the option", function (t) {
+ createChild(["install"], function (err, code) {
+ t.ifError(err, "install with scripts successful")
+ t.notEqual(code, 0, "npm install exited with code")
t.end()
})
})
@@ -34,39 +34,40 @@ var scripts = [
"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+" using the option", function (t) {
+ createChild(["--ignore-scripts", "run-script", script], function (err, code) {
+ t.ifError(err, "run-script " + script + " with ignore-scripts successful")
+ t.equal(code, 0, "npm run-script exited with code")
+ 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)
+scripts.forEach(function (script) {
+ test("ignore-scripts: run-script "+script+" NOT using the option", function (t) {
+ createChild(["run-script", script], function (err, code) {
+ t.ifError(err, "run-script " + script + " finished successfully")
+ t.notEqual(code, 0, "npm run-script exited with code")
t.end()
})
})
})
-function createChild (args) {
+function createChild (args, cb) {
var env = {
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH,
- npm_config_loglevel: "silent"
+ "npm_config_loglevel": "silent"
}
if (process.platform === "win32")
env.npm_config_cache = "%APPDATA%\\npm-cache"
- return spawn(node, args, {
+ return common.npm(args, {
cwd: pkg,
stdio: "inherit",
env: env
- })
+ }, cb)
}
diff --git a/deps/npm/test/tap/ignore-shrinkwrap.js b/deps/npm/test/tap/ignore-shrinkwrap.js
index ce1c664..6744a86 100644
--- a/deps/npm/test/tap/ignore-shrinkwrap.js
+++ b/deps/npm/test/tap/ignore-shrinkwrap.js
@@ -1,10 +1,9 @@
var common = require("../common-tap.js")
var test = require("tap").test
-var pkg = './ignore-shrinkwrap'
+var pkg = require("path").join(__dirname,"ignore-shrinkwrap")
var mr = require("npm-registry-mock")
-var child
var spawn = require("child_process").spawn
var npm = require.resolve("../../bin/npm-cli.js")
var node = process.execPath
@@ -18,7 +17,7 @@ var customMocks = {
test("ignore-shrinkwrap: using the option", function (t) {
mr({port: common.port, mocks: customMocks}, function (s) {
- s._server.on("request", function (req, res) {
+ s._server.on("request", function (req) {
switch (req.url) {
case "/shrinkwrap.js":
t.fail()
@@ -28,7 +27,7 @@ test("ignore-shrinkwrap: using the option", function (t) {
}
})
var child = createChild(true)
- child.on("close", function (m) {
+ child.on("close", function () {
s.close()
t.end()
})
@@ -37,7 +36,7 @@ test("ignore-shrinkwrap: using the option", function (t) {
test("ignore-shrinkwrap: NOT using the option", function (t) {
mr({port: common.port, mocks: customMocks}, function (s) {
- s._server.on("request", function (req, res) {
+ s._server.on("request", function (req) {
switch (req.url) {
case "/shrinkwrap.js":
t.pass("shrinkwrap used")
@@ -47,7 +46,7 @@ test("ignore-shrinkwrap: NOT using the option", function (t) {
}
})
var child = createChild(false)
- child.on("close", function (m) {
+ child.on("close", function () {
s.close()
t.end()
})
@@ -65,13 +64,12 @@ function createChild (ignoreShrinkwrap) {
return spawn(node, args, {
cwd: pkg,
env: {
- npm_config_registry: common.registry,
- npm_config_cache_lock_stale: 1000,
- npm_config_cache_lock_wait: 1000,
+ "npm_config_registry": common.registry,
+ "npm_config_cache_lock_stale": 1000,
+ "npm_config_cache_lock_wait": 1000,
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH
}
})
-
}
diff --git a/deps/npm/test/tap/install-at-locally.js b/deps/npm/test/tap/install-at-locally.js
index f6290e1..02874d0 100644
--- a/deps/npm/test/tap/install-at-locally.js
+++ b/deps/npm/test/tap/install-at-locally.js
@@ -1,42 +1,42 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var path = require('path')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var pkg = path.join(__dirname, 'install-at-locally')
+var common = require("../common-tap.js")
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var pkg = path.join(__dirname, "install-at-locally")
+
+var EXEC_OPTS = { }
test("setup", function (t) {
mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
process.chdir(pkg)
t.end()
})
-test('"npm install ./package@1.2.3" should install local pkg', function(t) {
- npm.load(function() {
- npm.commands.install(['./package@1.2.3'], function(err) {
- var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json')
- t.ok(JSON.parse(fs.readFileSync(p, 'utf8')))
- t.end()
- })
+test("\"npm install ./package@1.2.3\" should install local pkg", function(t) {
+ common.npm(["install", "./package@1.2.3"], EXEC_OPTS, function(err, code) {
+ var p = path.resolve(pkg, "node_modules/install-at-locally/package.json")
+ t.ifError(err, "install local package successful")
+ t.equal(code, 0, "npm install exited with code")
+ t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
+ t.end()
})
})
-test('"npm install install/at/locally@./package@1.2.3" should install local pkg', function(t) {
- npm.load(function() {
- npm.commands.install(['./package@1.2.3'], function(err) {
- var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json')
- t.ok(JSON.parse(fs.readFileSync(p, 'utf8')))
- t.end()
- })
+test("\"npm install install/at/locally@./package@1.2.3\" should install local pkg", function(t) {
+ common.npm(["install", "./package@1.2.3"], EXEC_OPTS, function(err, code) {
+ var p = path.resolve(pkg, "node_modules/install-at-locally/package.json")
+ t.ifError(err, "install local package in explicit directory successful")
+ t.equal(code, 0, "npm install exited with code")
+ t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
+ t.end()
})
})
-test('cleanup', function(t) {
+test("cleanup", function(t) {
process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, 'node_modules'))
+ rimraf.sync(path.resolve(pkg, "node_modules"))
t.end()
})
-
diff --git a/deps/npm/test/tap/install-cli-production.js b/deps/npm/test/tap/install-cli-production.js
new file mode 100644
index 0000000..00c9355
--- /dev/null
+++ b/deps/npm/test/tap/install-cli-production.js
@@ -0,0 +1,44 @@
+var common = require("../common-tap.js")
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var pkg = path.join(__dirname, "install-cli-production")
+
+var EXEC_OPTS = {
+ cwd: pkg
+}
+
+test("setup", function(t) {
+ mkdirp.sync(pkg)
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
+ process.chdir(pkg)
+ t.end()
+})
+
+test("\"npm install --production\" should install dependencies", function(t) {
+ common.npm(["install", "--production"], EXEC_OPTS, function(err, code) {
+ t.ifError(err, "install production successful")
+ t.equal(code, 0, "npm install exited with code")
+ var p = path.resolve(pkg, "node_modules/dependency/package.json")
+ t.ok(JSON.parse(fs.readFileSync(p, "utf8")))
+ t.end()
+ })
+})
+
+test("\"npm install --production\" should not install dev dependencies", function(t) {
+ common.npm(["install", "--production"], EXEC_OPTS, function(err, code) {
+ t.ifError(err, "install production successful")
+ t.equal(code, 0, "npm install exited with code")
+ var p = path.resolve(pkg, "node_modules/dev-dependency/package.json")
+ t.ok(!fs.existsSync(p), "")
+ t.end()
+ })
+})
+
+test("cleanup", function(t) {
+ process.chdir(__dirname)
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ t.end()
+})
diff --git a/deps/npm/test/tap/install-cli-production/dependency/package.json b/deps/npm/test/tap/install-cli-production/dependency/package.json
new file mode 100644
index 0000000..6ee6be0
--- /dev/null
+++ b/deps/npm/test/tap/install-cli-production/dependency/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "dependency",
+ "description": "fixture",
+ "version": "0.0.0"
+}
diff --git a/deps/npm/test/tap/install-cli-production/dev-dependency/package.json b/deps/npm/test/tap/install-cli-production/dev-dependency/package.json
new file mode 100644
index 0000000..a6a8f69
--- /dev/null
+++ b/deps/npm/test/tap/install-cli-production/dev-dependency/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "dev-dependency",
+ "description": "fixture",
+ "version": "0.0.0"
+}
diff --git a/deps/npm/test/tap/install-cli-production/package.json b/deps/npm/test/tap/install-cli-production/package.json
new file mode 100644
index 0000000..8f2f0e2
--- /dev/null
+++ b/deps/npm/test/tap/install-cli-production/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "install-cli-production",
+ "description": "fixture",
+ "version": "0.0.0",
+ "scripts": {
+ "prepublish": "exit 123"
+ },
+ "dependencies": {
+ "dependency": "file:./dependency"
+ },
+ "devDependencies": {
+ "dev-dependency": "file:./dev-dependency"
+ }
+}
diff --git a/deps/npm/test/tap/install-cli-unicode.js b/deps/npm/test/tap/install-cli-unicode.js
index bb9b4f5..7318def 100644
--- a/deps/npm/test/tap/install-cli-unicode.js
+++ b/deps/npm/test/tap/install-cli-unicode.js
@@ -1,23 +1,24 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var mkdirp = require('mkdirp')
-var mr = require('npm-registry-mock')
-var exec = require('child_process').exec
+var common = require("../common-tap.js")
+var test = require("tap").test
+var mr = require("npm-registry-mock")
+var path = require("path")
-var pkg = __dirname + '/install-cli'
-var NPM_BIN = __dirname + '/../../bin/npm-cli.js'
+var pkg = path.resolve(__dirname, "install-cli")
function hasOnlyAscii (s) {
- return /^[\000-\177]*$/.test(s) ;
+ return /^[\000-\177]*$/.test(s)
}
-test('does not use unicode with --unicode false', function (t) {
- t.plan(3)
+var EXEC_OPTS = {
+ cwd : pkg
+}
+
+test("does not use unicode with --unicode false", function (t) {
+ t.plan(5)
mr(common.port, function (s) {
- exec('node ' + NPM_BIN + ' install --unicode false read', {
- cwd: pkg
- }, function(err, stdout) {
+ common.npm(["install", "--unicode", "false", "read"], EXEC_OPTS, function (err, code, stdout) {
+ t.ifError(err, "install package read without unicode success")
+ t.notOk(code, "npm install exited with code 0")
t.ifError(err)
t.ok(stdout, stdout.length)
t.ok(hasOnlyAscii(stdout))
@@ -26,11 +27,11 @@ test('does not use unicode with --unicode false', function (t) {
})
})
-test('cleanup', function (t) {
+test("cleanup", function (t) {
mr(common.port, function (s) {
- exec('node ' + NPM_BIN + ' uninstall read', {
- cwd: pkg
- }, function(err, stdout) {
+ common.npm(["uninstall", "read"], EXEC_OPTS, function (err, code) {
+ t.ifError(err, "uninstall read package success")
+ t.notOk(code, "npm uninstall exited with code 0")
s.close()
})
})
diff --git a/deps/npm/test/tap/install-from-local.js b/deps/npm/test/tap/install-from-local.js
index 2dc3b57..d1fbb3b 100644
--- a/deps/npm/test/tap/install-from-local.js
+++ b/deps/npm/test/tap/install-from-local.js
@@ -1,33 +1,34 @@
+var common = require("../common-tap")
var test = require("tap").test
-var npm = require("../../")
var path = require("path")
var fs = require("fs")
var rimraf = require("rimraf")
var pkg = path.join(__dirname, "install-from-local", "package-with-local-paths")
+var EXEC_OPTS = { }
+
test("setup", function (t) {
process.chdir(pkg)
t.end()
})
test('"npm install" should install local packages', function (t) {
- npm.load({loglevel : "silent"}, function () {
- npm.commands.install(["."], function (err) {
- t.ifError(err, "local packages installed")
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
- t.ok(
- JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")),
- "package with local dependency installed"
- )
+ common.npm(["install", "."], EXEC_OPTS, function (err, code) {
+ t.ifError(err, "error should not exist")
+ t.notOk(code, "npm install exited with code 0")
+ var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
+ t.ok(
+ JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")),
+ "package with local dependency installed"
+ )
- var devDependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
- t.ok(
- JSON.parse(fs.readFileSync(devDependencyPackageJson, "utf8")),
- "package with local dev dependency installed"
- )
+ var devDependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
+ t.ok(
+ JSON.parse(fs.readFileSync(devDependencyPackageJson, "utf8")),
+ "package with local dev dependency installed"
+ )
- t.end()
- })
+ t.end()
})
})
diff --git a/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json b/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json
new file mode 100644
index 0000000..ec3e132
--- /dev/null
+++ b/deps/npm/test/tap/install-from-local/package-scoped-dependency/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@scoped/package",
+ "version": "0.0.0",
+ "description": "Test for local installs"
+}
diff --git a/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json b/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json
new file mode 100644
index 0000000..262aa57
--- /dev/null
+++ b/deps/npm/test/tap/install-from-local/package-with-scoped-paths/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "package-with-scoped-paths",
+ "version": "0.0.0",
+ "dependencies": {
+ "package-local-dependency": "file:../package-local-dependency",
+ "@scoped/package-scoped-dependency": "file:../package-scoped-dependency"
+ }
+}
diff --git a/deps/npm/test/tap/install-save-exact.js b/deps/npm/test/tap/install-save-exact.js
index c9f4866..ef785f2 100644
--- a/deps/npm/test/tap/install-save-exact.js
+++ b/deps/npm/test/tap/install-save-exact.js
@@ -1,40 +1,41 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var path = require('path')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var pkg = path.join(__dirname, 'install-save-exact')
+var common = require("../common-tap.js")
+var test = require("tap").test
+var npm = require("../../")
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var pkg = path.join(__dirname, "install-save-exact")
var mr = require("npm-registry-mock")
test("setup", function (t) {
mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
process.chdir(pkg)
t.end()
})
-test('"npm install --save --save-exact should install local pkg', function(t) {
+test("\"npm install --save --save-exact\" should install local pkg", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save', true)
- npm.config.set('save-exact', true)
- npm.commands.install(['underscore@1.3.1'], function(err) {
+ npm.config.set("save", true)
+ npm.config.set("save-exact", true)
+ npm.commands.install(["underscore@1.3.1"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ p = path.resolve(pkg, "package.json")
+ var pkgJson = JSON.parse(fs.readFileSync(p, "utf8"))
t.deepEqual(pkgJson.dependencies, {
- 'underscore': '1.3.1'
- }, 'Underscore dependency should specify exactly 1.3.1')
- npm.config.set('save', undefined)
- npm.config.set('save-exact', undefined)
+ "underscore": "1.3.1"
+ }, "Underscore dependency should specify exactly 1.3.1")
+ npm.config.set("save", undefined)
+ npm.config.set("save-exact", undefined)
s.close()
t.end()
})
@@ -42,50 +43,50 @@ test('"npm install --save --save-exact should install local pkg', function(t) {
})
})
-test('"npm install --save-dev --save-exact should install local pkg', function(t) {
+test("\"npm install --save-dev --save-exact\" should install local pkg", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save-dev', true)
- npm.config.set('save-exact', true)
- npm.commands.install(['underscore@1.3.1'], function(err) {
+ npm.config.set("save-dev", true)
+ npm.config.set("save-exact", true)
+ npm.commands.install(["underscore@1.3.1"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ p = path.resolve(pkg, "package.json")
+ var pkgJson = JSON.parse(fs.readFileSync(p, "utf8"))
console.log(pkgJson)
t.deepEqual(pkgJson.devDependencies, {
- 'underscore': '1.3.1'
- }, 'underscore devDependency should specify exactly 1.3.1')
+ "underscore": "1.3.1"
+ }, "underscore devDependency should specify exactly 1.3.1")
s.close()
- npm.config.set('save-dev', undefined)
- npm.config.set('save-exact', undefined)
+ npm.config.set("save-dev", undefined)
+ npm.config.set("save-exact", undefined)
t.end()
})
})
})
})
-test('cleanup', function(t) {
+test("cleanup", function (t) {
process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, 'node_modules'))
- rimraf.sync(path.resolve(pkg, 'cache'))
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ rimraf.sync(path.resolve(pkg, "cache"))
resetPackageJSON(pkg)
t.end()
})
function resetPackageJSON(pkg) {
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
delete pkgJson.dependencies
delete pkgJson.devDependencies
delete pkgJson.optionalDependencies
var json = JSON.stringify(pkgJson, null, 2) + "\n"
- fs.writeFileSync(pkg + '/package.json', json, "ascii")
+ var p = path.resolve(pkg, "package.json")
+ fs.writeFileSync(p, json, "ascii")
}
-
-
diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js
index 52396f4..2a1f839 100644
--- a/deps/npm/test/tap/install-save-local.js
+++ b/deps/npm/test/tap/install-save-local.js
@@ -1,58 +1,55 @@
+var common = require("../common-tap.js")
var test = require("tap").test
-var npm = require("../../")
var path = require("path")
var fs = require("fs")
var rimraf = require("rimraf")
var pkg = path.join(__dirname, "install-save-local", "package")
+var EXEC_OPTS = { }
+
test("setup", function (t) {
resetPackageJSON(pkg)
process.chdir(pkg)
t.end()
})
-test('"npm install --save ../local/path" should install local package and save to package.json', function(t) {
- resetPackageJSON(pkg)
- npm.load({loglevel : "silent"}, function() {
- npm.config.set("save", true)
- npm.commands.install(["../package-local-dependency"], function(err) {
- t.ifError(err)
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
- t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
+test('"npm install --save ../local/path" should install local package and save to package.json', function (t) {
+ resetPackageJSON(pkg)
+ common.npm(["install", "--save", "../package-local-dependency"], EXEC_OPTS, function (err, code) {
+ t.ifError(err)
+ t.notOk(code, "npm install exited with code 0")
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.dependencies, {
- "package-local-dependency": "file:../package-local-dependency"
- })
- npm.config.set("save", undefined)
+ var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dependency/package.json")
+ t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
- t.end()
- })
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
+ t.deepEqual(pkgJson.dependencies, {
+ "package-local-dependency": "file:../package-local-dependency"
+ })
+ t.end()
})
})
-test('"npm install --save-dev ../local/path" should install local package and save to package.json', function(t) {
+test('"npm install --save-dev ../local/path" should install local package and save to package.json', function (t) {
resetPackageJSON(pkg)
- npm.load({loglevel : "silent"}, function() {
- npm.config.set("save-dev", true)
- npm.commands.install(["../package-local-dev-dependency"], function(err) {
- t.ifError(err)
+ common.npm(["install", "--save-dev", "../package-local-dev-dependency"], EXEC_OPTS, function (err, code) {
+ t.ifError(err)
+ t.notOk(code, "npm install exited with code 0")
- var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
- t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
+ var dependencyPackageJson = path.resolve(pkg, "node_modules/package-local-dev-dependency/package.json")
+ t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.deepEqual(pkgJson.devDependencies, {
- "package-local-dev-dependency": "file:../package-local-dev-dependency"
- })
- npm.config.set("save", undefined)
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
+ t.deepEqual(pkgJson.devDependencies, {
+ "package-local-dev-dependency": "file:../package-local-dev-dependency"
+ })
- t.end()
- })
+ t.end()
})
})
-test("cleanup", function(t) {
+
+test("cleanup", function (t) {
resetPackageJSON(pkg)
process.chdir(__dirname)
rimraf.sync(path.resolve(pkg, "node_modules"))
diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js
index 0e78005..d4efef4 100644
--- a/deps/npm/test/tap/install-save-prefix.js
+++ b/deps/npm/test/tap/install-save-prefix.js
@@ -1,39 +1,39 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var path = require('path')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var pkg = path.join(__dirname, 'install-save-prefix')
+var common = require("../common-tap.js")
+var test = require("tap").test
+var npm = require("../../")
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var pkg = path.join(__dirname, "install-save-prefix")
var mr = require("npm-registry-mock")
test("setup", function (t) {
mkdirp.sync(pkg)
- mkdirp.sync(path.resolve(pkg, 'node_modules'))
+ mkdirp.sync(path.resolve(pkg, "node_modules"))
process.chdir(pkg)
t.end()
})
-test('"npm install --save with default save-prefix should install local pkg versioned to allow minor updates', function(t) {
+test("npm install --save with default save-prefix should install local pkg versioned to allow minor updates", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- 'save-prefix': '^',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ "save-prefix": "^",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save', true)
- npm.commands.install(['underscore@latest'], function(err) {
+ npm.config.set("save", true)
+ npm.commands.install(["underscore@latest"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
t.deepEqual(pkgJson.dependencies, {
- 'underscore': '^1.5.1'
- }, 'Underscore dependency should specify ^1.5.1')
- npm.config.set('save', undefined)
+ "underscore": "^1.5.1"
+ }, "Underscore dependency should specify ^1.5.1")
+ npm.config.set("save", undefined)
s.close()
t.end()
})
@@ -41,25 +41,25 @@ test('"npm install --save with default save-prefix should install local pkg vers
})
})
-test('"npm install --save-dev with default save-prefix should install local pkg to dev dependencies versioned to allow minor updates', function(t) {
+test("npm install --save-dev with default save-prefix should install local pkg to dev dependencies versioned to allow minor updates", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- 'save-prefix': '^',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ "save-prefix": "^",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save-dev', true)
- npm.commands.install(['underscore@1.3.1'], function(err) {
+ npm.config.set("save-dev", true)
+ npm.commands.install(["underscore@1.3.1"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
t.deepEqual(pkgJson.devDependencies, {
- 'underscore': '^1.3.1'
- }, 'Underscore devDependency should specify ^1.3.1')
- npm.config.set('save-dev', undefined)
+ "underscore": "^1.3.1"
+ }, "Underscore devDependency should specify ^1.3.1")
+ npm.config.set("save-dev", undefined)
s.close()
t.end()
})
@@ -67,26 +67,26 @@ test('"npm install --save-dev with default save-prefix should install local pkg
})
})
-test('"npm install --save with "~" save-prefix should install local pkg versioned to allow patch updates', function(t) {
+test("npm install --save with \"~\" save-prefix should install local pkg versioned to allow patch updates", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save', true)
- npm.config.set('save-prefix', '~')
- npm.commands.install(['underscore@1.3.1'], function(err) {
+ npm.config.set("save", true)
+ npm.config.set("save-prefix", "~")
+ npm.commands.install(["underscore@1.3.1"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
t.deepEqual(pkgJson.dependencies, {
- 'underscore': '~1.3.1'
- }, 'Underscore dependency should specify ~1.3.1')
- npm.config.set('save', undefined)
- npm.config.set('save-prefix', undefined)
+ "underscore": "~1.3.1"
+ }, "Underscore dependency should specify ~1.3.1")
+ npm.config.set("save", undefined)
+ npm.config.set("save-prefix", undefined)
s.close()
t.end()
})
@@ -94,26 +94,26 @@ test('"npm install --save with "~" save-prefix should install local pkg versione
})
})
-test('"npm install --save-dev with "~" save-prefix should install local pkg to dev dependencies versioned to allow patch updates', function(t) {
+test("npm install --save-dev with \"~\" save-prefix should install local pkg to dev dependencies versioned to allow patch updates", function (t) {
resetPackageJSON(pkg)
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
- registry: common.registry }, function(err) {
+ loglevel: "silent",
+ registry: common.registry }, function (err) {
t.ifError(err)
- npm.config.set('save-dev', true)
- npm.config.set('save-prefix', '~')
- npm.commands.install(['underscore@1.3.1'], function(err) {
+ npm.config.set("save-dev", true)
+ npm.config.set("save-prefix", "~")
+ npm.commands.install(["underscore@1.3.1"], function (err) {
t.ifError(err)
- var p = path.resolve(pkg, 'node_modules/underscore/package.json')
+ var p = path.resolve(pkg, "node_modules/underscore/package.json")
t.ok(JSON.parse(fs.readFileSync(p)))
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
t.deepEqual(pkgJson.devDependencies, {
- 'underscore': '~1.3.1'
- }, 'Underscore devDependency should specify ~1.3.1')
- npm.config.set('save-dev', undefined)
- npm.config.set('save-prefix', undefined)
+ "underscore": "~1.3.1"
+ }, "Underscore devDependency should specify ~1.3.1")
+ npm.config.set("save-dev", undefined)
+ npm.config.set("save-prefix", undefined)
s.close()
t.end()
})
@@ -121,21 +121,19 @@ test('"npm install --save-dev with "~" save-prefix should install local pkg to d
})
})
-test('cleanup', function(t) {
+test("cleanup", function (t) {
process.chdir(__dirname)
- rimraf.sync(path.resolve(pkg, 'node_modules'))
- rimraf.sync(path.resolve(pkg, 'cache'))
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ rimraf.sync(path.resolve(pkg, "cache"))
resetPackageJSON(pkg)
t.end()
})
function resetPackageJSON(pkg) {
- var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
+ var pkgJson = JSON.parse(fs.readFileSync(pkg + "/package.json", "utf8"))
delete pkgJson.dependencies
delete pkgJson.devDependencies
delete pkgJson.optionalDependencies
var json = JSON.stringify(pkgJson, null, 2) + "\n"
- fs.writeFileSync(pkg + '/package.json', json, "ascii")
+ fs.writeFileSync(pkg + "/package.json", json, "ascii")
}
-
-
diff --git a/deps/npm/test/tap/install-scoped-already-installed.js b/deps/npm/test/tap/install-scoped-already-installed.js
new file mode 100644
index 0000000..a355a4a
--- /dev/null
+++ b/deps/npm/test/tap/install-scoped-already-installed.js
@@ -0,0 +1,86 @@
+var common = require("../common-tap")
+var existsSync = require("fs").existsSync
+var join = require("path").join
+
+var test = require("tap").test
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+
+var pkg = join(__dirname, "install-from-local", "package-with-scoped-paths")
+var modules = join(pkg, "node_modules")
+
+var EXEC_OPTS = {
+ cwd : pkg
+}
+
+test("setup", function (t) {
+ rimraf.sync(modules)
+ rimraf.sync(join(pkg, "cache"))
+ process.chdir(pkg)
+ mkdirp.sync(modules)
+ t.end()
+})
+
+test("installing already installed local scoped package", function (t) {
+ common.npm(["install", "--loglevel", "silent"], EXEC_OPTS, function (err, code, stdout) {
+ var installed = parseNpmInstallOutput(stdout)
+ t.ifError(err, "error should not exist")
+ t.notOk(code, "npm install exited with code 0")
+ t.ifError(err, "install ran to completion without error")
+ t.ok(
+ existsSync(join(modules, "@scoped", "package", "package.json")),
+ "package installed"
+ )
+ t.ok(
+ contains(installed, "node_modules/@scoped/package"),
+ "installed @scoped/package"
+ )
+ t.ok(
+ contains(installed, "node_modules/package-local-dependency"),
+ "installed package-local-dependency"
+ )
+
+ common.npm(["install", "--loglevel", "silent"], EXEC_OPTS, function (err, code, stdout) {
+ installed = parseNpmInstallOutput(stdout)
+ t.ifError(err, "error should not exist")
+ t.notOk(code, "npm install exited with code 0")
+
+ t.ifError(err, "install ran to completion without error")
+
+ t.ok(
+ existsSync(join(modules, "@scoped", "package", "package.json")),
+ "package installed"
+ )
+
+ t.notOk(
+ contains(installed, "node_modules/@scoped/package"),
+ "did not reinstall @scoped/package"
+ )
+ t.notOk(
+ contains(installed, "node_modules/package-local-dependency"),
+ "did not reinstall package-local-dependency"
+ )
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ process.chdir(__dirname)
+ rimraf.sync(join(modules))
+ rimraf.sync(join(pkg, "cache"))
+ t.end()
+})
+
+function contains(list, element) {
+ for (var i=0; i < list.length; ++i) {
+ if (list[i] === element) {
+ return true
+ }
+ }
+ return false
+}
+
+function parseNpmInstallOutput(stdout) {
+ return stdout.trim().split(/\n\n|\s+/)
+}
diff --git a/deps/npm/test/tap/install-scoped-link.js b/deps/npm/test/tap/install-scoped-link.js
index c411b66..b1e6ca0 100644
--- a/deps/npm/test/tap/install-scoped-link.js
+++ b/deps/npm/test/tap/install-scoped-link.js
@@ -1,18 +1,18 @@
-var exec = require("child_process").exec
+var common = require("../common-tap.js")
var existsSync = require("fs").existsSync
var join = require("path").join
-// var resolve = require("path").resolve
+var exec = require("child_process").exec
var test = require("tap").test
var rimraf = require("rimraf")
var mkdirp = require("mkdirp")
-var npm = require("../../")
-
var pkg = join(__dirname, "install-scoped")
var work = join(__dirname, "install-scoped-TEST")
var modules = join(work, "node_modules")
+var EXEC_OPTS = {}
+
test("setup", function (t) {
mkdirp.sync(modules)
process.chdir(work)
@@ -21,31 +21,30 @@ test("setup", function (t) {
})
test("installing package with links", function (t) {
- npm.load(function() {
- npm.commands.install([pkg], function (err) {
- t.ifError(err, "install ran to completion without error")
-
- t.ok(
- existsSync(join(modules, "@scoped", "package", "package.json")),
- "package installed"
- )
- t.ok(existsSync(join(modules, ".bin")), "binary link directory exists")
-
- var hello = join(modules, ".bin", "hello")
- t.ok(existsSync(hello), "binary link exists")
-
- exec("node " + hello, function (err, stdout, stderr) {
- t.ifError(err, "command ran fine")
- t.notOk(stderr, "got no error output back")
- t.equal(stdout, "hello blrbld\n", "output was as expected")
-
- t.end()
- })
+ common.npm(["install", pkg], EXEC_OPTS, function (err, code) {
+ t.ifError(err, "install ran to completion without error")
+ t.notOk(code, "npm install exited with code 0")
+
+ t.ok(
+ existsSync(join(modules, "@scoped", "package", "package.json")),
+ "package installed"
+ )
+ t.ok(existsSync(join(modules, ".bin")), "binary link directory exists")
+
+ var hello = join(modules, ".bin", "hello")
+ t.ok(existsSync(hello), "binary link exists")
+
+ exec("node " + hello, function (err, stdout, stderr) {
+ t.ifError(err, "command ran fine")
+ t.notOk(stderr, "got no error output back")
+ t.equal(stdout, "hello blrbld\n", "output was as expected")
+
+ t.end()
})
})
})
-test("cleanup", function(t) {
+test("cleanup", function (t) {
process.chdir(__dirname)
rimraf.sync(work)
t.end()
diff --git a/deps/npm/test/tap/install-with-dev-dep-duplicate.js b/deps/npm/test/tap/install-with-dev-dep-duplicate.js
new file mode 100644
index 0000000..d0f86aa
--- /dev/null
+++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js
@@ -0,0 +1,57 @@
+var npm = npm = require("../../")
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+var osenv = require("osenv")
+var rimraf = require("rimraf")
+var mr = require("npm-registry-mock")
+var common = require("../common-tap.js")
+
+var pkg = path.resolve(__dirname, "dev-dep-duplicate")
+var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
+
+test("prefers version from dependencies over devDependencies", function (t) {
+ t.plan(1)
+
+ mr(common.port, function (s) {
+ setup(function (err) {
+ if (err) return t.fail(err)
+
+ npm.install(".", function (err) {
+ if (err) return t.fail(err)
+
+ npm.commands.ls([], true, function (err, _, results) {
+ if (err) return t.fail(err)
+
+ fs.readFile(desiredResultsPath, function (err, desired) {
+ if (err) return t.fail(err)
+
+ t.deepEqual(results, JSON.parse(desired))
+ s.close()
+ t.end()
+ })
+ })
+ })
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
+})
+
+
+function setup (cb) {
+ cleanup()
+ process.chdir(pkg)
+
+ var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
+ npm.load(opts, cb)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ rimraf.sync(path.resolve(pkg, "cache"))
+}
diff --git a/deps/npm/test/tap/invalid-cmd-exit-code.js b/deps/npm/test/tap/invalid-cmd-exit-code.js
index 14db866..c9918e5 100644
--- a/deps/npm/test/tap/invalid-cmd-exit-code.js
+++ b/deps/npm/test/tap/invalid-cmd-exit-code.js
@@ -1,10 +1,9 @@
var test = require("tap").test
-var node = process.execPath
var common = require("../common-tap.js")
var opts = { cwd: process.cwd() }
-test("npm asdf should return exit code 1", function(t) {
+test("npm asdf should return exit code 1", function (t) {
common.npm(["asdf"], opts, function (er, c) {
if (er) throw er
t.ok(c, "exit code should not be zero")
@@ -12,7 +11,7 @@ test("npm asdf should return exit code 1", function(t) {
})
})
-test("npm help should return exit code 0", function(t) {
+test("npm help should return exit code 0", function (t) {
common.npm(["help"], opts, function (er, c) {
if (er) throw er
t.equal(c, 0, "exit code should be 0")
@@ -20,7 +19,7 @@ test("npm help should return exit code 0", function(t) {
})
})
-test("npm help fadf should return exit code 0", function(t) {
+test("npm help fadf should return exit code 0", function (t) {
common.npm(["help", "fadf"], opts, function (er, c) {
if (er) throw er
t.equal(c, 0, "exit code should be 0")
diff --git a/deps/npm/test/tap/lifecycle-path.js b/deps/npm/test/tap/lifecycle-path.js
index 34684a0..cf4bbdc 100644
--- a/deps/npm/test/tap/lifecycle-path.js
+++ b/deps/npm/test/tap/lifecycle-path.js
@@ -2,7 +2,6 @@ var test = require("tap").test
var common = require("../common-tap.js")
var path = require("path")
var rimraf = require("rimraf")
-var mkdirp = require("mkdirp")
var pkg = path.resolve(__dirname, "lifecycle-path")
var fs = require("fs")
var link = path.resolve(pkg, "node-bin")
@@ -28,7 +27,7 @@ test("make sure the path is correct", function (t) {
PATH: PATH,
stdio: [ 0, "pipe", 2 ]
}
- }, function (er, code, stdout, stderr) {
+ }, function (er, code, stdout) {
if (er) throw er
t.equal(code, 0, "exit code")
// remove the banner, we just care about the last line
@@ -58,4 +57,3 @@ test("clean", function (t) {
rimraf.sync(link)
t.end()
})
-
diff --git a/deps/npm/test/tap/lifecycle.js b/deps/npm/test/tap/lifecycle.js
index 288329c..aa0efc5 100644
--- a/deps/npm/test/tap/lifecycle.js
+++ b/deps/npm/test/tap/lifecycle.js
@@ -1,12 +1,12 @@
var test = require("tap").test
-var npm = require('../../')
-var lifecycle = require('../../lib/utils/lifecycle')
+var npm = require("../../")
+var lifecycle = require("../../lib/utils/lifecycle")
test("lifecycle: make env correctly", function (t) {
- npm.load({enteente: Infinity}, function() {
+ npm.load({enteente: Infinity}, function () {
var env = lifecycle.makeEnv({}, null, process.env)
- t.equal('Infinity', env.npm_config_enteente)
+ t.equal("Infinity", env.npm_config_enteente)
t.end()
})
})
diff --git a/deps/npm/test/tap/locker.js b/deps/npm/test/tap/locker.js
new file mode 100644
index 0000000..bc43c30
--- /dev/null
+++ b/deps/npm/test/tap/locker.js
@@ -0,0 +1,89 @@
+var test = require("tap").test
+ , path = require("path")
+ , fs = require("graceful-fs")
+ , crypto = require("crypto")
+ , rimraf = require("rimraf")
+ , osenv = require("osenv")
+ , mkdirp = require("mkdirp")
+ , npm = require("../../")
+ , locker = require("../../lib/utils/locker.js")
+ , lock = locker.lock
+ , unlock = locker.unlock
+
+var pkg = path.join(__dirname, "/locker")
+ , cache = path.join(pkg, "/cache")
+ , tmp = path.join(pkg, "/tmp")
+ , nm = path.join(pkg, "/node_modules")
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+test("setup", function (t) {
+ cleanup()
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
+ t.end()
+})
+
+test("locking file puts lock in correct place", function (t) {
+ npm.load({cache: cache, tmpdir: tmp}, function (er) {
+ t.ifError(er, "npm bootstrapped OK")
+
+ var n = "correct"
+ , c = n.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
+ , p = path.resolve(nm, n)
+ , h = crypto.createHash("sha1").update(p).digest("hex")
+ , l = c.substr(0, 24)+"-"+h.substr(0, 16)+".lock"
+ , v = path.join(cache, "_locks", l)
+
+ lock(nm, n, function (er) {
+ t.ifError(er, "locked path")
+
+ fs.exists(v, function (found) {
+ t.ok(found, "lock found OK")
+
+ unlock(nm, n, function (er) {
+ t.ifError(er, "unlocked path")
+
+ fs.exists(v, function (found) {
+ t.notOk(found, "lock deleted OK")
+ t.end()
+ })
+ })
+ })
+ })
+ })
+})
+
+test("unlocking out of order errors out", function (t) {
+ npm.load({cache: cache, tmpdir: tmp}, function (er) {
+ t.ifError(er, "npm bootstrapped OK")
+
+ var n = "busted"
+ , c = n.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
+ , p = path.resolve(nm, n)
+ , h = crypto.createHash("sha1").update(p).digest("hex")
+ , l = c.substr(0, 24)+"-"+h.substr(0, 16)+".lock"
+ , v = path.join(cache, "_locks", l)
+
+ fs.exists(v, function (found) {
+ t.notOk(found, "no lock to unlock")
+
+ t.throws(function () {
+ unlock(nm, n, function () {
+ t.fail("shouldn't get here")
+ t.end()
+ })
+ }, "blew up as expected")
+
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
+})
diff --git a/deps/npm/test/tap/login-always-auth.js b/deps/npm/test/tap/login-always-auth.js
new file mode 100644
index 0000000..8311096
--- /dev/null
+++ b/deps/npm/test/tap/login-always-auth.js
@@ -0,0 +1,142 @@
+var fs = require("fs")
+var path = require("path")
+var rimraf = require("rimraf")
+var mr = require("npm-registry-mock")
+
+var test = require("tap").test
+var common = require("../common-tap.js")
+
+var opts = {cwd : __dirname}
+var outfile = path.resolve(__dirname, "_npmrc")
+var responses = {
+ "Username" : "u\n",
+ "Password" : "p\n",
+ "Email" : "u@p.me\n"
+}
+
+function mocks(server) {
+ server.filteringRequestBody(function (r) {
+ if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) {
+ return "auth"
+ }
+ })
+ server.put("/-/user/org.couchdb.user:u", "auth")
+ .reply(201, {username : "u", password : "p", email : "u@p.me"})
+}
+
+test("npm login", function (t) {
+ mr({port : common.port, mocks : mocks}, function (s) {
+ var runner = common.npm(
+ [
+ "login",
+ "--registry", common.registry,
+ "--loglevel", "silent",
+ "--userconfig", outfile
+ ],
+ opts,
+ function (err, code) {
+ t.notOk(code, "exited OK")
+ t.notOk(err, "no error output")
+ var config = fs.readFileSync(outfile, "utf8")
+ t.like(config, /:always-auth=false/, "always-auth is scoped and false (by default)")
+ s.close()
+ rimraf(outfile, function (err) {
+ t.ifError(err, "removed config file OK")
+ t.end()
+ })
+ })
+
+ var o = "", e = "", remaining = Object.keys(responses).length
+ runner.stdout.on("data", function (chunk) {
+ remaining--
+ o += chunk
+
+ var label = chunk.toString("utf8").split(":")[0]
+ runner.stdin.write(responses[label])
+
+ if (remaining === 0) runner.stdin.end()
+ })
+ runner.stderr.on("data", function (chunk) { e += chunk })
+ })
+})
+
+test("npm login --always-auth", function (t) {
+ mr({port : common.port, mocks : mocks}, function (s) {
+ var runner = common.npm(
+ [
+ "login",
+ "--registry", common.registry,
+ "--loglevel", "silent",
+ "--userconfig", outfile,
+ "--always-auth"
+ ],
+ opts,
+ function (err, code) {
+ t.notOk(code, "exited OK")
+ t.notOk(err, "no error output")
+ var config = fs.readFileSync(outfile, "utf8")
+ t.like(config, /:always-auth=true/, "always-auth is scoped and true")
+ s.close()
+ rimraf(outfile, function (err) {
+ t.ifError(err, "removed config file OK")
+ t.end()
+ })
+ })
+
+ var o = "", e = "", remaining = Object.keys(responses).length
+ runner.stdout.on("data", function (chunk) {
+ remaining--
+ o += chunk
+
+ var label = chunk.toString("utf8").split(":")[0]
+ runner.stdin.write(responses[label])
+
+ if (remaining === 0) runner.stdin.end()
+ })
+ runner.stderr.on("data", function (chunk) { e += chunk })
+ })
+})
+
+test("npm login --no-always-auth", function (t) {
+ mr({port : common.port, mocks : mocks}, function (s) {
+ var runner = common.npm(
+ [
+ "login",
+ "--registry", common.registry,
+ "--loglevel", "silent",
+ "--userconfig", outfile,
+ "--no-always-auth"
+ ],
+ opts,
+ function (err, code) {
+ t.notOk(code, "exited OK")
+ t.notOk(err, "no error output")
+ var config = fs.readFileSync(outfile, "utf8")
+ t.like(config, /:always-auth=false/, "always-auth is scoped and false")
+ s.close()
+ rimraf(outfile, function (err) {
+ t.ifError(err, "removed config file OK")
+ t.end()
+ })
+ })
+
+ var o = "", e = "", remaining = Object.keys(responses).length
+ runner.stdout.on("data", function (chunk) {
+ remaining--
+ o += chunk
+
+ var label = chunk.toString("utf8").split(":")[0]
+ runner.stdin.write(responses[label])
+
+ if (remaining === 0) runner.stdin.end()
+ })
+ runner.stderr.on("data", function (chunk) { e += chunk })
+ })
+})
+
+
+test("cleanup", function (t) {
+ rimraf.sync(outfile)
+ t.pass("cleaned up")
+ t.end()
+})
diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js
index fcbc436..89c4cc3 100644
--- a/deps/npm/test/tap/ls-depth-cli.js
+++ b/deps/npm/test/tap/ls-depth-cli.js
@@ -1,31 +1,27 @@
-var common = require('../common-tap')
- , test = require('tap').test
- , path = require('path')
- , rimraf = require('rimraf')
- , osenv = require('osenv')
- , mkdirp = require('mkdirp')
- , pkg = __dirname + '/ls-depth'
- , cache = pkg + '/cache'
- , tmp = pkg + '/tmp'
- , node = process.execPath
- , npm = path.resolve(__dirname, '../../cli.js')
- , mr = require('npm-registry-mock')
+var common = require("../common-tap")
+ , test = require("tap").test
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , osenv = require("osenv")
+ , mkdirp = require("mkdirp")
+ , pkg = path.resolve(__dirname, "ls-depth")
+ , mr = require("npm-registry-mock")
, opts = {cwd: pkg}
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
- rimraf.sync(pkg + '/node_modules')
+ rimraf.sync(pkg + "/cache")
+ rimraf.sync(pkg + "/tmp")
+ rimraf.sync(pkg + "/node_modules")
}
-test('setup', function (t) {
+test("setup", function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(pkg + "/cache")
+ mkdirp.sync(pkg + "/tmp")
mr(common.port, function (s) {
- var cmd = ['install', '--registry=' + common.registry]
+ var cmd = ["install", "--registry=" + common.registry]
common.npm(cmd, opts, function (er, c) {
if (er) throw er
t.equal(c, 0)
@@ -35,8 +31,8 @@ test('setup', function (t) {
})
})
-test('npm ls --depth=0', function (t) {
- common.npm(['ls', '--depth=0'], opts, function (er, c, out) {
+test("npm ls --depth=0", function (t) {
+ common.npm(["ls", "--depth=0"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 0)
t.has(out, /test-package-with-one-dep@0\.0\.0/
@@ -47,8 +43,8 @@ test('npm ls --depth=0', function (t) {
})
})
-test('npm ls --depth=1', function (t) {
- common.npm(['ls', '--depth=1'], opts, function (er, c, out) {
+test("npm ls --depth=1", function (t) {
+ common.npm(["ls", "--depth=1"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 0)
t.has(out, /test-package-with-one-dep@0\.0\.0/
@@ -59,10 +55,10 @@ test('npm ls --depth=1', function (t) {
})
})
-test('npm ls --depth=Infinity', function (t) {
+test("npm ls --depth=Infinity", function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
- common.npm(['ls', '--depth=Infinity'], opts, function (er, c, out) {
+ common.npm(["ls", "--depth=Infinity"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 0)
t.has(out, /test-package-with-one-dep@0\.0\.0/
@@ -73,7 +69,7 @@ test('npm ls --depth=Infinity', function (t) {
})
})
-test('cleanup', function (t) {
+test("cleanup", function (t) {
cleanup()
t.end()
})
diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js
index 1ac85ef..37a0cb5 100644
--- a/deps/npm/test/tap/ls-depth-unmet.js
+++ b/deps/npm/test/tap/ls-depth-unmet.js
@@ -1,31 +1,30 @@
-var common = require('../common-tap')
- , test = require('tap').test
- , path = require('path')
- , rimraf = require('rimraf')
- , osenv = require('osenv')
- , mkdirp = require('mkdirp')
- , pkg = __dirname + '/ls-depth-unmet'
- , cache = pkg + '/cache'
- , tmp = pkg + '/tmp'
- , node = process.execPath
- , npm = path.resolve(__dirname, '../../cli.js')
- , mr = require('npm-registry-mock')
+var common = require("../common-tap")
+ , test = require("tap").test
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , osenv = require("osenv")
+ , mkdirp = require("mkdirp")
+ , pkg = path.resolve(__dirname, "ls-depth-unmet")
+ , mr = require("npm-registry-mock")
, opts = {cwd: pkg}
+ , cache = path.resolve(pkg, "cache")
+ , tmp = path.resolve(pkg, "tmp")
+ , nodeModules = path.resolve(pkg, "node_modules")
function cleanup () {
process.chdir(osenv.tmpdir())
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
- rimraf.sync(pkg + '/node_modules')
+ rimraf.sync(cache)
+ rimraf.sync(tmp)
+ rimraf.sync(nodeModules)
}
-test('setup', function (t) {
+test("setup", function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
mr(common.port, function (s) {
- var cmd = ['install', 'underscore@1.3.1', 'mkdirp', 'test-package-with-one-dep', '--registry=' + common.registry]
+ var cmd = ["install", "underscore@1.3.1", "mkdirp", "test-package-with-one-dep", "--registry=" + common.registry]
common.npm(cmd, opts, function (er, c) {
if (er) throw er
t.equal(c, 0)
@@ -35,8 +34,8 @@ test('setup', function (t) {
})
})
-test('npm ls --depth=0', function (t) {
- common.npm(['ls', '--depth=0'], opts, function (er, c, out) {
+test("npm ls --depth=0", function (t) {
+ common.npm(["ls", "--depth=0"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -53,8 +52,8 @@ test('npm ls --depth=0', function (t) {
})
})
-test('npm ls --depth=1', function (t) {
- common.npm(['ls', '--depth=1'], opts, function (er, c, out) {
+test("npm ls --depth=1", function (t) {
+ common.npm(["ls", "--depth=1"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -71,10 +70,10 @@ test('npm ls --depth=1', function (t) {
})
})
-test('npm ls --depth=Infinity', function (t) {
+test("npm ls --depth=Infinity", function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
- common.npm(['ls', '--depth=Infinity'], opts, function (er, c, out) {
+ common.npm(["ls", "--depth=Infinity"], opts, function (er, c, out) {
if (er) throw er
t.equal(c, 1)
t.has(out, /UNMET DEPENDENCY optimist@0\.6\.0/
@@ -91,7 +90,7 @@ test('npm ls --depth=Infinity', function (t) {
})
})
-test('cleanup', function (t) {
+test("cleanup", function (t) {
cleanup()
t.end()
})
diff --git a/deps/npm/test/tap/ls-no-results.js b/deps/npm/test/tap/ls-no-results.js
index 9792774..10f3ce0 100644
--- a/deps/npm/test/tap/ls-no-results.js
+++ b/deps/npm/test/tap/ls-no-results.js
@@ -1,11 +1,11 @@
-var test = require('tap').test
-var spawn = require('child_process').spawn
+var test = require("tap").test
+var spawn = require("child_process").spawn
var node = process.execPath
-var npm = require.resolve('../../')
-var args = [ npm, 'ls', 'ceci nâest pas une package' ]
-test('ls exits non-zero when nothing found', function (t) {
+var npm = require.resolve("../../")
+var args = [ npm, "ls", "ceci nâest pas une package" ]
+test("ls exits non-zero when nothing found", function (t) {
var child = spawn(node, args)
- child.on('exit', function (code) {
+ child.on("exit", function (code) {
t.notEqual(code, 0)
t.end()
})
diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js
index c821000..328da7d 100644
--- a/deps/npm/test/tap/noargs-install-config-save.js
+++ b/deps/npm/test/tap/noargs-install-config-save.js
@@ -11,8 +11,8 @@ var mr = require("npm-registry-mock")
var spawn = require("child_process").spawn
var node = process.execPath
-var pkg = process.env.npm_config_tmp || "/tmp"
-pkg += path.sep + "noargs-install-config-save"
+var pkg = path.resolve(process.env.npm_config_tmp || "/tmp",
+ "noargs-install-config-save")
function writePackageJson() {
rimraf.sync(pkg)
@@ -26,14 +26,14 @@ function writePackageJson() {
"devDependencies": {
"underscore": "1.3.1"
}
- }), 'utf8')
+ }), "utf8")
}
function createChild (args) {
var env = {
- npm_config_save: true,
- npm_config_registry: common.registry,
- npm_config_cache: pkg + "/cache",
+ "npm_config_save": true,
+ "npm_config_registry": common.registry,
+ "npm_config_cache": pkg + "/cache",
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH
@@ -56,7 +56,7 @@ test("does not update the package.json with empty arguments", function (t) {
var child = createChild([npm, "install"])
child.on("close", function () {
var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.ok(text.indexOf('"dependencies') === -1)
+ t.ok(text.indexOf("\"dependencies") === -1)
s.close()
t.end()
})
@@ -71,7 +71,7 @@ test("updates the package.json (adds dependencies) with an argument", function (
var child = createChild([npm, "install", "underscore"])
child.on("close", function () {
var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
- t.ok(text.indexOf('"dependencies') !== -1)
+ t.ok(text.indexOf("\"dependencies") !== -1)
s.close()
t.end()
})
diff --git a/deps/npm/test/tap/npm-api-not-loaded-error.js b/deps/npm/test/tap/npm-api-not-loaded-error.js
index 3fd0731..afedfbc 100644
--- a/deps/npm/test/tap/npm-api-not-loaded-error.js
+++ b/deps/npm/test/tap/npm-api-not-loaded-error.js
@@ -21,7 +21,7 @@ test("calling set/get on config pre-load should throw", function (t) {
t.ok(threw, "get before load should throw")
}
- var threw = true
+ threw = true
try {
npm.config.set("foo", "bar")
threw = false
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js
index 29db793..f864584 100644
--- a/deps/npm/test/tap/optional-metadep-rollback-collision.js
+++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js
@@ -25,7 +25,7 @@ test("go go test racer", function (t) {
stdio: [ 0, "pipe", 2 ]
}, function (er, code, sout) {
if (er) throw er
- t.equal(code, 0)
+ t.notOk(code, "npm install exited with code 0")
t.equal(sout, "ok\nok\n")
t.notOk(/not ok/.test(sout), "should not contain the string 'not ok'")
t.end()
diff --git a/deps/npm/test/tap/outdated-color.js b/deps/npm/test/tap/outdated-color.js
index f20bcea..4e90277 100644
--- a/deps/npm/test/tap/outdated-color.js
+++ b/deps/npm/test/tap/outdated-color.js
@@ -1,15 +1,17 @@
var common = require("../common-tap.js")
var test = require("tap").test
-var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
var mr = require("npm-registry-mock")
-var exec = require('child_process').exec
-var mr = require("npm-registry-mock")
+var path = require("path")
+
+var pkg = path.resolve(__dirname, "outdated")
+var cache = path.resolve(pkg, "cache")
+mkdirp.sync(cache)
-var pkg = __dirname + '/outdated'
-var NPM_BIN = __dirname + '/../../bin/npm-cli.js'
-mkdirp.sync(pkg + "/cache")
+var EXEC_OPTS = {
+ cwd: pkg
+}
function hasControlCodes(str) {
return str.length !== ansiTrim(str).length
@@ -17,20 +19,26 @@ function hasControlCodes(str) {
function ansiTrim (str) {
var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" +
- "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g");
+ "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g")
return str.replace(r, "")
}
// note hard to automate tests for color = true
// as npm kills the color config when it detects
-// it's not running in a tty
+// it"s not running in a tty
test("does not use ansi styling", function (t) {
- t.plan(3)
+ t.plan(4)
mr(common.port, function (s) { // create mock registry.
- exec('node ' + NPM_BIN + ' outdated --registry ' + common.registry + ' --color false underscore', {
- cwd: pkg
- }, function(err, stdout) {
+ common.npm(
+ [
+ "outdated",
+ "--registry", common.registry,
+ "underscore"
+ ],
+ EXEC_OPTS,
+ function (err, code, stdout) {
t.ifError(err)
+ t.notOk(code, "npm outdated exited with code 0")
t.ok(stdout, stdout.length)
t.ok(!hasControlCodes(stdout))
s.close()
@@ -39,6 +47,6 @@ test("does not use ansi styling", function (t) {
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/outdated-depth.js b/deps/npm/test/tap/outdated-depth.js
index 7ccc0c6..112f363 100644
--- a/deps/npm/test/tap/outdated-depth.js
+++ b/deps/npm/test/tap/outdated-depth.js
@@ -1,37 +1,39 @@
-var common = require('../common-tap')
- , path = require('path')
- , test = require('tap').test
- , rimraf = require('rimraf')
- , npm = require('../../')
- , mr = require('npm-registry-mock')
- , pkg = path.resolve(__dirname, 'outdated-depth')
+var common = require("../common-tap")
+ , path = require("path")
+ , test = require("tap").test
+ , rimraf = require("rimraf")
+ , npm = require("../../")
+ , mr = require("npm-registry-mock")
+ , pkg = path.resolve(__dirname, "outdated-depth")
+ , cache = path.resolve(pkg, "cache")
+ , nodeModules = path.resolve(pkg, "node_modules")
function cleanup () {
- rimraf.sync(pkg + '/node_modules')
- rimraf.sync(pkg + '/cache')
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
}
-test('outdated depth zero', function (t) {
+test("outdated depth zero", function (t) {
var expected = [
pkg,
- 'underscore',
- '1.3.1',
- '1.3.1',
- '1.5.1',
- '1.3.1'
+ "underscore",
+ "1.3.1",
+ "1.3.1",
+ "1.5.1",
+ "1.3.1"
]
process.chdir(pkg)
mr(common.port, function (s) {
npm.load({
- cache: pkg + '/cache'
- , loglevel: 'silent'
+ cache: cache
+ , loglevel: "silent"
, registry: common.registry
, depth: 0
}
, function () {
- npm.install('.', function (er) {
+ npm.install(".", function (er) {
if (er) throw new Error(er)
npm.outdated(function (err, d) {
if (err) throw new Error(err)
diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js
index 11c2040..cc89ff1 100644
--- a/deps/npm/test/tap/outdated-git.js
+++ b/deps/npm/test/tap/outdated-git.js
@@ -3,28 +3,29 @@ var test = require("tap").test
var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
+var path = require("path")
// config
-var pkg = __dirname + "/outdated-git"
-mkdirp.sync(pkg + "/cache")
+var pkg = path.resolve(__dirname, "outdated-git")
+var cache = path.resolve(pkg, "cache")
+mkdirp.sync(cache)
test("dicovers new versions in outdated", function (t) {
process.chdir(pkg)
t.plan(5)
- npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
+ npm.load({cache: cache, registry: common.registry}, function () {
npm.commands.outdated([], function (er, d) {
- t.equal('git', d[0][3])
- t.equal('git', d[0][4])
- t.equal('git://github.com/robertkowalski/foo-private.git', d[0][5])
- t.equal('git://user:pass@github.com/robertkowalski/foo-private.git', d[1][5])
- t.equal('git+https://github.com/robertkowalski/foo', d[2][5])
+ t.equal("git", d[0][3])
+ t.equal("git", d[0][4])
+ t.equal("git://github.com/robertkowalski/foo-private.git", d[0][5])
+ t.equal("git://user:pass@github.com/robertkowalski/foo-private.git", d[1][5])
+ t.equal("git+https://github.com/robertkowalski/foo", d[2][5])
})
})
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/outdated-include-devdependencies.js b/deps/npm/test/tap/outdated-include-devdependencies.js
index b78948a..bdb656f 100644
--- a/deps/npm/test/tap/outdated-include-devdependencies.js
+++ b/deps/npm/test/tap/outdated-include-devdependencies.js
@@ -4,15 +4,17 @@ var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
var mr = require("npm-registry-mock")
+var path = require("path")
// config
-var pkg = __dirname + '/outdated-include-devdependencies'
-mkdirp.sync(pkg + "/cache")
+var pkg = path.resolve(__dirname, "outdated-include-devdependencies")
+var cache = path.resolve(pkg, "cache")
+mkdirp.sync(cache)
test("includes devDependencies in outdated", function (t) {
process.chdir(pkg)
mr(common.port, function (s) {
- npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
+ npm.load({cache: cache, registry: common.registry}, function () {
npm.outdated(function (er, d) {
t.equal("1.5.1", d[0][3])
s.close()
@@ -23,6 +25,6 @@ test("includes devDependencies in outdated", function (t) {
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js
index 7c19561..b874f28 100644
--- a/deps/npm/test/tap/outdated-json.js
+++ b/deps/npm/test/tap/outdated-json.js
@@ -5,29 +5,29 @@ var common = require("../common-tap.js")
, mr = require("npm-registry-mock")
, path = require("path")
, osenv = require("osenv")
- , spawn = require('child_process').spawn
+ , spawn = require("child_process").spawn
, node = process.execPath
- , npmc = require.resolve('../../')
- , pkg = path.resolve(__dirname, 'outdated-new-versions')
+ , npmc = require.resolve("../../")
+ , pkg = path.resolve(__dirname, "outdated-new-versions")
, args = [ npmc
- , 'outdated'
- , '--json'
- , '--silent'
- , '--registry=' + common.registry
- , '--cache=' + pkg + '/cache'
+ , "outdated"
+ , "--json"
+ , "--silent"
+ , "--registry=" + common.registry
+ , "--cache=" + pkg + "/cache"
]
var expected = { underscore:
- { current: '1.3.3'
- , wanted: '1.3.3'
- , latest: '1.5.1'
- , location: 'node_modules' + path.sep + 'underscore'
+ { current: "1.3.3"
+ , wanted: "1.3.3"
+ , latest: "1.5.1"
+ , location: "node_modules" + path.sep + "underscore"
}
, request:
- { current: '0.9.5'
- , wanted: '0.9.5'
- , latest: '2.27.0'
- , location: 'node_modules' + path.sep + 'request'
+ { current: "0.9.5"
+ , wanted: "0.9.5"
+ , latest: "2.27.0"
+ , location: "node_modules" + path.sep + "request"
}
}
@@ -38,18 +38,19 @@ test("it should log json data", function (t) {
mr(common.port, function (s) {
npm.load({
cache: pkg + "/cache",
- loglevel: 'silent',
+ loglevel: "silent",
registry: common.registry }
, function () {
npm.install(".", function (err) {
+ t.ifError(err, "error should not exist")
var child = spawn(node, args)
- , out = ''
+ , out = ""
child.stdout
- .on('data', function (buf) {
+ .on("data", function (buf) {
out += buf.toString()
})
.pipe(process.stdout)
- child.on('exit', function () {
+ child.on("exit", function () {
out = JSON.parse(out)
t.deepEqual(out, expected)
s.close()
diff --git a/deps/npm/test/tap/outdated-new-versions.js b/deps/npm/test/tap/outdated-new-versions.js
index 1779736..cb7eaa4 100644
--- a/deps/npm/test/tap/outdated-new-versions.js
+++ b/deps/npm/test/tap/outdated-new-versions.js
@@ -3,11 +3,13 @@ var test = require("tap").test
var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
+var path = require("path")
var mr = require("npm-registry-mock")
-var pkg = __dirname + "/outdated-new-versions"
-mkdirp.sync(pkg + "/cache")
+var pkg = path.resolve(__dirname, "outdated-new-versions")
+var cache = path.resolve(pkg, "cache")
+mkdirp.sync(cache)
test("dicovers new versions in outdated", function (t) {
@@ -15,7 +17,7 @@ test("dicovers new versions in outdated", function (t) {
t.plan(2)
mr(common.port, function (s) {
- npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
+ npm.load({cache: cache, registry: common.registry}, function () {
npm.outdated(function (er, d) {
for (var i = 0; i < d.length; i++) {
if (d[i][1] === "underscore")
@@ -31,6 +33,6 @@ test("dicovers new versions in outdated", function (t) {
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/outdated-notarget.js b/deps/npm/test/tap/outdated-notarget.js
index 782f6f7..f1032ea 100644
--- a/deps/npm/test/tap/outdated-notarget.js
+++ b/deps/npm/test/tap/outdated-notarget.js
@@ -11,12 +11,12 @@ var pkg = path.resolve(__dirname, "outdated-notarget")
var cache = path.resolve(pkg, "cache")
var mr = require("npm-registry-mock")
-test("outdated-target: if no viable version is found, show error", function(t) {
+test("outdated-target: if no viable version is found, show error", function (t) {
t.plan(1)
setup()
- mr({port: common.port}, function(s) {
- npm.load({ cache: cache, registry: common.registry}, function() {
- npm.commands.update(function(er) {
+ mr({port: common.port}, function (s) {
+ npm.load({ cache: cache, registry: common.registry}, function () {
+ npm.commands.update(function (er) {
t.equal(er.code, "ETARGET")
s.close()
t.end()
@@ -25,7 +25,7 @@ test("outdated-target: if no viable version is found, show error", function(t) {
})
})
-test("cleanup", function(t) {
+test("cleanup", function (t) {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
t.end()
diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js
index dddec77..9f4b14d 100644
--- a/deps/npm/test/tap/outdated.js
+++ b/deps/npm/test/tap/outdated.js
@@ -1,14 +1,14 @@
var common = require("../common-tap.js")
-var fs = require("fs")
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")
+var path = require("path")
var mr = require("npm-registry-mock")
// config
-var pkg = __dirname + '/outdated'
-
-var path = require("path")
+var pkg = path.resolve(__dirname, "outdated")
+var cache = path.resolve(pkg, "cache")
+var nodeModules = path.resolve(pkg, "node_modules")
test("it should not throw", function (t) {
cleanup()
@@ -33,13 +33,15 @@ test("it should not throw", function (t) {
}
mr(common.port, function (s) {
npm.load({
- cache: pkg + "/cache",
- loglevel: 'silent',
+ cache: "cache",
+ loglevel: "silent",
parseable: true,
registry: common.registry }
, function () {
npm.install(".", function (err) {
+ t.ifError(err, "install success")
npm.outdated(function (er, d) {
+ t.ifError(er, "outdated success")
console.log = originalLog
t.same(output, expOut)
t.same(d, expData)
@@ -57,6 +59,6 @@ test("cleanup", function (t) {
})
function cleanup () {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
}
diff --git a/deps/npm/test/tap/pack-scoped.js b/deps/npm/test/tap/pack-scoped.js
index 05a77a0..5c35133 100644
--- a/deps/npm/test/tap/pack-scoped.js
+++ b/deps/npm/test/tap/pack-scoped.js
@@ -1,10 +1,10 @@
// verify that prepublish runs on pack and publish
var test = require("tap").test
+var common = require("../common-tap")
var fs = require("graceful-fs")
var join = require("path").join
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
-var path = require("path")
var pkg = join(__dirname, "scoped_package")
var manifest = join(pkg, "package.json")
@@ -19,6 +19,8 @@ var data = {
test("setup", function (t) {
var n = 0
+ rimraf.sync(pkg)
+
mkdirp(pkg, then())
mkdirp(cache, then())
mkdirp(tmp, then())
@@ -26,7 +28,7 @@ test("setup", function (t) {
function then () {
n++
return function (er) {
- if (er) throw er
+ t.ifError(er)
if (--n === 0) next()
}
}
@@ -36,7 +38,7 @@ test("setup", function (t) {
}
function done (er) {
- if (er) throw er
+ t.ifError(er)
t.pass("setup done")
t.end()
@@ -44,9 +46,6 @@ test("setup", function (t) {
})
test("test", function (t) {
- var spawn = require("child_process").spawn
- var node = process.execPath
- var npm = path.resolve(__dirname, "../../cli.js")
var env = {
"npm_config_cache" : cache,
"npm_config_tmp" : tmp,
@@ -58,34 +57,25 @@ test("test", function (t) {
if (!/^npm_config_/.test(i)) env[i] = process.env[i]
}
- var child = spawn(node, [npm, "pack"], {cwd : pkg, env : env})
-
- child.stdout.setEncoding("utf8")
- child.stderr.on("data", onerr)
- child.stdout.on("data", ondata)
- child.on("close", onend)
-
- var c = "", e = ""
- function ondata (chunk) { c += chunk }
- function onerr (chunk) { e += chunk }
-
- function onend () {
- if (e) {
- throw new Error("got stderr data: " + JSON.stringify("" + e))
- }
- c = c.trim()
+ common.npm([
+ "pack",
+ "--loglevel", "warn"
+ ], {
+ cwd: pkg,
+ env: env
+ }, function(err, code, stdout, stderr) {
+ t.ifErr(err, "npm pack finished without error")
+ t.equal(code, 0, "npm pack exited ok")
+ t.notOk(stderr, "got stderr data: " + JSON.stringify("" + stderr))
+ stdout = stdout.trim()
var regex = new RegExp("scope-generic-package-90000.100001.5.tgz", "ig")
-
- t.ok(c.match(regex), "found package")
+ t.ok(stdout.match(regex), "found package")
t.end()
- }
+ })
})
test("cleanup", function (t) {
- rimraf(pkg, function (er) {
- if (er) throw er
-
- t.pass("cleaned up")
- t.end()
- })
+ rimraf.sync(pkg)
+ t.pass("cleaned up")
+ t.end()
})
diff --git a/deps/npm/test/tap/peer-deps-invalid.js b/deps/npm/test/tap/peer-deps-invalid.js
index c287365..098f3cc 100644
--- a/deps/npm/test/tap/peer-deps-invalid.js
+++ b/deps/npm/test/tap/peer-deps-invalid.js
@@ -1,18 +1,20 @@
-var common = require('../common-tap.js')
+var common = require("../common-tap")
var fs = require("fs")
var path = require("path")
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")
var mr = require("npm-registry-mock")
-var pkg = __dirname + "/peer-deps-invalid"
+var pkg = path.resolve(__dirname, "peer-deps-invalid")
+var cache = path.resolve(pkg, "cache")
+var nodeModules = path.resolve(pkg, "node_modules")
var okFile = fs.readFileSync(path.join(pkg, "file-ok.js"), "utf8")
var failFile = fs.readFileSync(path.join(pkg, "file-fail.js"), "utf8")
test("installing dependencies that have conflicting peerDependencies", function (t) {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
process.chdir(pkg)
var customMocks = {
@@ -23,7 +25,7 @@ test("installing dependencies that have conflicting peerDependencies", function
}
mr({port: common.port, mocks: customMocks}, function (s) { // create mock registry.
npm.load({
- cache: pkg + "/cache",
+ cache: cache,
registry: common.registry
}, function () {
npm.commands.install([], function (err) {
@@ -40,7 +42,7 @@ test("installing dependencies that have conflicting peerDependencies", function
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/peer-deps-toplevel.js b/deps/npm/test/tap/peer-deps-toplevel.js
new file mode 100644
index 0000000..30ab657
--- /dev/null
+++ b/deps/npm/test/tap/peer-deps-toplevel.js
@@ -0,0 +1,55 @@
+var npm = npm = require("../../")
+var test = require("tap").test
+var path = require("path")
+var fs = require("fs")
+var osenv = require("osenv")
+var rimraf = require("rimraf")
+var mr = require("npm-registry-mock")
+var common = require("../common-tap.js")
+
+var pkg = path.resolve(__dirname, "peer-deps-toplevel")
+var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
+
+test("installs the peer dependency directory structure", function (t) {
+ mr(common.port, function (s) {
+ setup(function (err) {
+ t.ifError(err, "setup ran successfully")
+
+ npm.install(".", function (err) {
+ t.ifError(err, "packages were installed")
+
+ npm.commands.ls([], true, function (err, _, results) {
+ t.ifError(err, "listed tree without problems")
+
+ fs.readFile(desiredResultsPath, function (err, desired) {
+ t.ifError(err, "read desired results")
+
+ t.deepEqual(results, JSON.parse(desired), "got expected output from ls")
+ s.close()
+ t.end()
+ })
+ })
+ })
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
+})
+
+
+function setup (cb) {
+ cleanup()
+ process.chdir(pkg)
+
+ var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
+ npm.load(opts, cb)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(path.resolve(pkg, "node_modules"))
+ rimraf.sync(path.resolve(pkg, "cache"))
+}
diff --git a/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json b/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json
new file mode 100644
index 0000000..28eff4c
--- /dev/null
+++ b/deps/npm/test/tap/peer-deps-toplevel/desired-ls-results.json
@@ -0,0 +1,20 @@
+{
+ "name": "npm-test-peer-deps-toplevel",
+ "version": "0.0.0",
+ "dependencies": {
+ "npm-test-peer-deps": {
+ "version": "0.0.0",
+ "dependencies": {
+ "underscore": {
+ "version": "1.3.1"
+ }
+ }
+ },
+ "mkdirp": {
+ "version": "0.3.5"
+ },
+ "request": {
+ "version": "0.9.5"
+ }
+ }
+}
diff --git a/deps/npm/test/tap/peer-deps-toplevel/package.json b/deps/npm/test/tap/peer-deps-toplevel/package.json
new file mode 100644
index 0000000..ab77dae
--- /dev/null
+++ b/deps/npm/test/tap/peer-deps-toplevel/package.json
@@ -0,0 +1,11 @@
+{
+ "author": "Domenic Denicola",
+ "name": "npm-test-peer-deps-toplevel",
+ "version": "0.0.0",
+ "dependencies": {
+ "npm-test-peer-deps": "*"
+ },
+ "peerDependencies": {
+ "mkdirp": "*"
+ }
+}
diff --git a/deps/npm/test/tap/peer-deps-without-package-json.js b/deps/npm/test/tap/peer-deps-without-package-json.js
index ce01be4..eb00078 100644
--- a/deps/npm/test/tap/peer-deps-without-package-json.js
+++ b/deps/npm/test/tap/peer-deps-without-package-json.js
@@ -1,37 +1,39 @@
-var common = require('../common-tap.js')
+var common = require("../common-tap")
var fs = require("fs")
var path = require("path")
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")
var mr = require("npm-registry-mock")
-var pkg = __dirname + "/peer-deps-without-package-json"
+var pkg = path.resolve(__dirname, "peer-deps-without-package-json")
+var cache = path.resolve(pkg, "cache")
+var nodeModules = path.resolve(pkg, "node_modules")
var js = fs.readFileSync(path.join(pkg, "file-js.js"), "utf8")
test("installing a peerDependencies-using package without a package.json present (GH-3049)", function (t) {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
- fs.mkdirSync(pkg + "/node_modules")
+ fs.mkdirSync(nodeModules)
process.chdir(pkg)
var customMocks = {
"get": {
- "/ok.js": [200, js],
+ "/ok.js": [200, js]
}
}
mr({port: common.port, mocks: customMocks}, function (s) { // create mock registry.
npm.load({
registry: common.registry,
- cache: pkg + "/cache"
+ cache: cache
}, function () {
npm.install(common.registry + "/ok.js", function (err) {
if (err) {
t.fail(err)
} else {
- t.ok(fs.existsSync(pkg + "/node_modules/npm-test-peer-deps-file"))
- t.ok(fs.existsSync(pkg + "/node_modules/underscore"))
+ t.ok(fs.existsSync(path.join(nodeModules, "/npm-test-peer-deps-file")))
+ t.ok(fs.existsSync(path.join(nodeModules, "/underscore")))
}
t.end()
s.close() // shutdown mock registry.
@@ -41,7 +43,7 @@ test("installing a peerDependencies-using package without a package.json present
})
test("cleanup", function (t) {
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
t.end()
})
diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js
index 097a921..6e60fc1 100644
--- a/deps/npm/test/tap/peer-deps.js
+++ b/deps/npm/test/tap/peer-deps.js
@@ -11,8 +11,6 @@ var pkg = path.resolve(__dirname, "peer-deps")
var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
test("installs the peer dependency directory structure", function (t) {
- t.plan(1)
-
mr(common.port, function (s) {
setup(function (err) {
if (err) return t.fail(err)
@@ -46,7 +44,7 @@ function setup (cb) {
cleanup()
process.chdir(pkg)
- var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry};
+ var opts = { cache: path.resolve(pkg, "cache"), registry: common.registry}
npm.load(opts, cb)
}
diff --git a/deps/npm/test/tap/prepublish.js b/deps/npm/test/tap/prepublish.js
index ad71eab..36391be 100644
--- a/deps/npm/test/tap/prepublish.js
+++ b/deps/npm/test/tap/prepublish.js
@@ -1,10 +1,10 @@
// verify that prepublish runs on pack and publish
+var common = require("../common-tap")
var test = require("tap").test
var fs = require("graceful-fs")
var join = require("path").join
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
-var path = require("path")
var pkg = join(__dirname, "prepublish_package")
var tmp = join(pkg, "tmp")
@@ -12,6 +12,7 @@ var cache = join(pkg, "cache")
test("setup", function (t) {
var n = 0
+ cleanup()
mkdirp(pkg, then())
mkdirp(cache, then())
mkdirp(tmp, then())
@@ -38,9 +39,6 @@ test("setup", function (t) {
})
test("test", function (t) {
- var spawn = require("child_process").spawn
- var node = process.execPath
- var npm = path.resolve(__dirname, "../../cli.js")
var env = {
"npm_config_cache" : cache,
"npm_config_tmp" : tmp,
@@ -51,27 +49,16 @@ test("test", function (t) {
if (!/^npm_config_/.test(i))
env[i] = process.env[i]
}
- var child = spawn(node, [npm, "pack"], {
- cwd: pkg,
- env: env
- })
- child.stdout.setEncoding("utf8")
- child.stderr.on("data", onerr)
- child.stdout.on("data", ondata)
- child.on("close", onend)
- var c = ""
- , e = ""
- function ondata (chunk) {
- c += chunk
- }
- function onerr (chunk) {
- e += chunk
- }
- function onend () {
- if (e) {
- throw new Error("got stderr data: " + JSON.stringify("" + e))
- }
- c = c.trim()
+
+ common.npm([
+ "pack",
+ "--loglevel", "warn"
+ ], { cwd: pkg, env: env }, function(err, code, stdout, stderr) {
+ t.equal(code, 0, "pack finished successfully")
+ t.ifErr(err, "pack finished successfully")
+
+ t.notOk(stderr, "got stderr data:" + JSON.stringify("" + stderr))
+ var c = stdout.trim()
var regex = new RegExp("" +
"> npm-test-prepublish@1.2.5 prepublish [^\\r\\n]+\\r?\\n" +
"> echo ok\\r?\\n" +
@@ -81,14 +68,15 @@ test("test", function (t) {
t.ok(c.match(regex))
t.end()
- }
+ })
})
test("cleanup", function (t) {
- rimraf(pkg, function (er) {
- if (er) throw er
-
- t.pass("cleaned up")
- t.end()
- })
+ cleanup()
+ t.pass("cleaned up")
+ t.end()
})
+
+function cleanup() {
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js
index a303d84..24edf5e 100644
--- a/deps/npm/test/tap/prune.js
+++ b/deps/npm/test/tap/prune.js
@@ -1,16 +1,17 @@
var test = require("tap").test
+var common = require("../common-tap")
var fs = require("fs")
-var node = process.execPath
-var npm = require.resolve("../../bin/npm-cli.js")
var rimraf = require("rimraf")
var mr = require("npm-registry-mock")
-var common = require("../common-tap.js")
-var spawn = require("child_process").spawn
var env = process.env
-process.env.npm_config_depth = "Infinity"
+var path = require("path")
-var pkg = __dirname + "/prune"
-var cache = pkg + "/cache"
+var pkg = path.resolve(__dirname, "prune")
+var cache = path.resolve(pkg, "cache")
+var nodeModules = path.resolve(pkg, "node_modules")
+
+var EXEC_OPTS = { cwd: pkg, env: env }
+EXEC_OPTS.env.npm_config_depth = "Infinity"
var server
@@ -22,38 +23,43 @@ test("reg mock", function (t) {
})
})
+function cleanup () {
+ rimraf.sync(cache)
+ rimraf.sync(nodeModules)
+}
+
+test("setup", function (t) {
+ cleanup()
+ t.pass("setup")
+ t.end()
+})
test("npm install", function (t) {
- rimraf.sync(pkg + "/node_modules")
- var c = spawn(node, [
- npm, "install",
- "--cache=" + cache,
- "--registry=" + common.registry,
- "--loglevel=silent",
- "--production=false"
- ], { cwd: pkg, env: env })
- c.stderr.on("data", function(d) {
- t.fail("Should not get data on stderr: " + d)
- })
- c.on("close", function(code) {
+ common.npm([
+ "install",
+ "--cache", cache,
+ "--registry", common.registry,
+ "--loglevel", "silent",
+ "--production", "false"
+ ], EXEC_OPTS, function (err, code, stdout, stderr) {
+ t.ifErr(err, "install finished successfully")
t.notOk(code, "exit ok")
+ t.notOk(stderr, "Should not get data on stderr: " + stderr)
t.end()
})
})
test("npm install test-package", function (t) {
- var c = spawn(node, [
- npm, "install", "test-package",
- "--cache=" + cache,
- "--registry=" + common.registry,
- "--loglevel=silent",
- "--production=false"
- ], { cwd: pkg, env: env })
- c.stderr.on("data", function(d) {
- t.fail("Should not get data on stderr: " + d)
- })
- c.on("close", function(code) {
+ common.npm([
+ "install", "test-package",
+ "--cache", cache,
+ "--registry", common.registry,
+ "--loglevel", "silent",
+ "--production", "false"
+ ], EXEC_OPTS, function (err, code, stdout, stderr) {
+ t.ifErr(err, "install finished successfully")
t.notOk(code, "exit ok")
+ t.notOk(stderr, "Should not get data on stderr: " + stderr)
t.end()
})
})
@@ -65,16 +71,14 @@ test("verify installs", function (t) {
})
test("npm prune", function (t) {
- var c = spawn(node, [
- npm, "prune",
- "--loglevel=silent",
- "--production=false"
- ], { cwd: pkg, env: env })
- c.stderr.on("data", function(d) {
- t.fail("Should not get data on stderr: " + d)
- })
- c.on("close", function(code) {
+ common.npm([
+ "prune",
+ "--loglevel", "silent",
+ "--production", "false"
+ ], EXEC_OPTS, function (err, code, stdout, stderr) {
+ t.ifErr(err, "prune finished successfully")
t.notOk(code, "exit ok")
+ t.notOk(stderr, "Should not get data on stderr: " + stderr)
t.end()
})
})
@@ -86,16 +90,14 @@ test("verify installs", function (t) {
})
test("npm prune", function (t) {
- var c = spawn(node, [
- npm, "prune",
- "--loglevel=silent",
+ common.npm([
+ "prune",
+ "--loglevel", "silent",
"--production"
- ], { cwd: pkg, env: env })
- c.stderr.on("data", function(d) {
- t.fail("Should not get data on stderr: " + d)
- })
- c.on("close", function(code) {
+ ], EXEC_OPTS, function (err, code, stderr) {
+ t.ifErr(err, "prune finished successfully")
t.notOk(code, "exit ok")
+ t.equal(stderr, "unbuild mkdirp@0.3.5\n")
t.end()
})
})
@@ -108,8 +110,7 @@ test("verify installs", function (t) {
test("cleanup", function (t) {
server.close()
- rimraf.sync(pkg + "/node_modules")
- rimraf.sync(pkg + "/cache")
+ cleanup()
t.pass("cleaned up")
t.end()
})
diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js
index 39d6e83..9e537a9 100644
--- a/deps/npm/test/tap/publish-config.js
+++ b/deps/npm/test/tap/publish-config.js
@@ -1,11 +1,11 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var fs = require('fs')
-var osenv = require('osenv')
-var pkg = process.env.npm_config_tmp || '/tmp'
-pkg += '/npm-test-publish-config'
+var common = require("../common-tap.js")
+var test = require("tap").test
+var fs = require("fs")
+var osenv = require("osenv")
+var pkg = process.env.npm_config_tmp || "/tmp"
+pkg += "/npm-test-publish-config"
-require('mkdirp').sync(pkg)
+require("mkdirp").sync(pkg)
fs.writeFileSync(pkg + "/package.json", JSON.stringify({
name: "npm-test-publish-config",
@@ -19,21 +19,19 @@ fs.writeFileSync(pkg + "/fixture_npmrc",
"//localhost:1337/:_password = " + new Buffer("feast").toString("base64") + "\n" +
"registry = http://localhost:1337/")
-var spawn = require('child_process').spawn
-var npm = require.resolve('../../bin/npm-cli.js')
-var node = process.execPath
-
test(function (t) {
var child
- require('http').createServer(function (req, res) {
- t.pass('got request on the fakey fake registry')
+ require("http").createServer(function (req, res) {
+ t.pass("got request on the fakey fake registry")
t.end()
this.close()
res.statusCode = 500
- res.end('{"error":"sshhh. naptime nao. \\^O^/ <(YAWWWWN!)"}')
+ res.end(JSON.stringify({
+ error: "sshhh. naptime nao. \\^O^/ <(YAWWWWN!)"
+ }))
child.kill()
}).listen(common.port, function () {
- t.pass('server is listening')
+ t.pass("server is listening")
// don't much care about listening to the child's results
// just wanna make sure it hits the server we just set up.
@@ -42,17 +40,20 @@ test(function (t) {
// itself functions normally.
//
// Make sure that we don't sit around waiting for lock files
- child = spawn(node, [npm, "publish", "--userconfig=" + pkg + "/fixture_npmrc"], {
+ child = common.npm(["publish", "--userconfig=" + pkg + "/fixture_npmrc"], {
cwd: pkg,
stdio: "inherit",
env: {
- npm_config_cache_lock_stale: 1000,
- npm_config_cache_lock_wait: 1000,
+ "npm_config_cache_lock_stale": 1000,
+ "npm_config_cache_lock_wait": 1000,
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH,
USERPROFILE: osenv.home()
}
+ }, function (err, code) {
+ t.ifError(err, "publish command finished successfully")
+ t.notOk(code, "npm install exited with code 0")
})
})
})
diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js
index 7547c91..2658c8d 100644
--- a/deps/npm/test/tap/publish-scoped.js
+++ b/deps/npm/test/tap/publish-scoped.js
@@ -11,6 +11,14 @@ var common = require("../common-tap.js")
var pkg = path.join(__dirname, "prepublish_package")
+// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry
+if (!global.setImmediate) {
+ global.setImmediate = function () {
+ var args = [arguments[0], 0].concat([].slice.call(arguments, 1))
+ setTimeout.apply(this, args)
+ }
+}
+
test("setup", function (t) {
mkdirp(path.join(pkg, "cache"), next)
@@ -34,7 +42,9 @@ test("setup", function (t) {
})
test("npm publish should honor scoping", function (t) {
- var put = nock(common.registry).put("/@bigco%2fpublish-organized").reply(201, {ok: true})
+ var put = nock(common.registry)
+ .put("/@bigco%2fpublish-organized")
+ .reply(201, verify)
var configuration = {
cache : path.join(pkg, "cache"),
@@ -59,9 +69,29 @@ test("npm publish should honor scoping", function (t) {
t.end()
})
}
+
+ function verify (_, body) {
+ t.doesNotThrow(function () {
+ var parsed = JSON.parse(body)
+ var current = parsed.versions["1.2.5"]
+ t.equal(
+ current._npmVersion,
+ require(path.resolve(__dirname, "../../package.json")).version,
+ "npm version is correct"
+ )
+
+ t.equal(
+ current._nodeVersion,
+ process.versions.node,
+ "node version is correct"
+ )
+ }, "converted body back into object")
+
+ return {ok: true}
+ }
})
-test("cleanup", function(t) {
+test("cleanup", function (t) {
process.chdir(__dirname)
rimraf(pkg, function (er) {
t.ifError(er)
diff --git a/deps/npm/test/tap/pwd-prefix.js b/deps/npm/test/tap/pwd-prefix.js
index e041552..237096e 100644
--- a/deps/npm/test/tap/pwd-prefix.js
+++ b/deps/npm/test/tap/pwd-prefix.js
@@ -14,9 +14,9 @@ commands.forEach(function (cmd) {
var stdout, stderr
test(cmd + " in root", function (t) {
- common.npm([cmd], {cwd: root}, function(er, code, so, se) {
+ common.npm([cmd], {cwd: root}, function (er, code, so, se) {
if (er) throw er
- t.equal(code, 0)
+ t.notOk(code, "npm " + cmd + " exited with code 0")
stdout = so
stderr = se
t.end()
@@ -24,9 +24,9 @@ commands.forEach(function (cmd) {
})
test(cmd + " in lib", function (t) {
- common.npm([cmd], {cwd: lib}, function(er, code, so, se) {
+ common.npm([cmd], {cwd: lib}, function (er, code, so, se) {
if (er) throw er
- t.equal(code, 0)
+ t.notOk(code, "npm " + cmd + " exited with code 0")
t.equal(so, stdout)
t.equal(se, stderr)
t.end()
diff --git a/deps/npm/test/tap/referer.js b/deps/npm/test/tap/referer.js
index 1b55ab0..c1b173d 100644
--- a/deps/npm/test/tap/referer.js
+++ b/deps/npm/test/tap/referer.js
@@ -1,18 +1,17 @@
var common = require("../common-tap.js")
var test = require("tap").test
var http = require("http")
-var server
test("should send referer http header", function (t) {
- var server = http.createServer(function (q, s) {
+ http.createServer(function (q, s) {
t.equal(q.headers.referer, "install foo")
s.statusCode = 404
s.end(JSON.stringify({error: "whatever"}))
this.close()
}).listen(common.port, function () {
- var reg = "--registry=http://localhost:" + common.port
- var args = [ "install", "foo", reg ]
- common.npm(args, {}, function (er, code, so, se) {
+ var reg = "http://localhost:" + common.port
+ var args = [ "install", "foo", "--registry", reg ]
+ common.npm(args, {}, function (er, code) {
if (er) {
throw er
}
diff --git a/deps/npm/test/tap/registry.js b/deps/npm/test/tap/registry.js
index adcb8f4..20e7bbe 100644
--- a/deps/npm/test/tap/registry.js
+++ b/deps/npm/test/tap/registry.js
@@ -1,63 +1,75 @@
// Run all the tests in the `npm-registry-couchapp` suite
// This verifies that the server-side stuff still works.
+var common = require("../common-tap")
var test = require("tap").test
-var spawn = require("child_process").spawn
var npmExec = require.resolve("../../bin/npm-cli.js")
var path = require("path")
var ca = path.resolve(__dirname, "../../node_modules/npm-registry-couchapp")
var which = require("which")
-which("couchdb", function(er, couch) {
- if (er) {
- return test("need couchdb", function (t) {
- t.fail("need couch to run test: " + er.message)
- t.end()
- })
- } else {
- runTests()
- }
-})
+var v = process.versions.node.split(".").map(function (n) { return parseInt(n, 10) })
+if (v[0] === 0 && v[1] < 10) {
+ console.error(
+ "WARNING: need a recent Node for npm-registry-couchapp tests to run, have",
+ process.versions.node
+ )
+}
+else {
+ which("couchdb", function (er) {
+ if (er) {
+ console.error("WARNING: need couch to run test: " + er.message)
+ }
+ else {
+ runTests()
+ }
+ })
+}
+
function runTests () {
var env = {}
for (var i in process.env) env[i] = process.env[i]
env.npm = npmExec
- spawn(process.execPath, [
- npmExec, "install"
- ], {
+ var opts = {
cwd: ca,
stdio: "inherit"
- }).on("close", function (code, sig) {
- if (code || sig) {
+ }
+ common.npm(["install"], opts, function (err, code) {
+ if (err) { throw err }
+ if (code) {
return test("need install to work", function (t) {
- t.fail("install failed with: " + (code || sig))
+ t.fail("install failed with: " + code)
t.end()
})
} else {
-
- spawn(process.execPath, [
- npmExec, "test"
- ], {
+ opts = {
cwd: ca,
env: env,
stdio: "inherit"
- }).on("close", function (code, sig) {
- spawn(process.execPath, [
- npmExec, "prune", "--production"
- ], {
+ }
+ common.npm(["test"], opts, function (err, code) {
+ if (err) { throw err }
+ if (code) {
+ return test("need test to work", function (t) {
+ t.fail("test failed with: " + code)
+ t.end()
+ })
+ }
+ opts = {
cwd: ca,
env: env,
stdio: "inherit"
- }).on("close", function (code2, sig2) {
- process.exit(code || code2 || 0)
+ }
+ common.npm(["prune", "--production"], opts, function (err, code) {
+ if (err) { throw err }
+ process.exit(code || 0)
})
})
}
-
})
}
diff --git a/deps/npm/test/tap/repo.js b/deps/npm/test/tap/repo.js
index bf7b574..caae7d3 100644
--- a/deps/npm/test/tap/repo.js
+++ b/deps/npm/test/tap/repo.js
@@ -33,7 +33,7 @@ test("npm repo underscore", function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 0, 'exit ok')
var res = fs.readFileSync(outFile, 'ascii')
s.close()
@@ -52,7 +52,7 @@ test('npm repo optimist - github (https://)', function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 0, 'exit ok')
var res = fs.readFileSync(outFile, 'ascii')
s.close()
@@ -70,7 +70,7 @@ test("npm repo npm-test-peer-deps - no repo", function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 1, 'exit not ok')
s.close()
t.end()
@@ -85,7 +85,7 @@ test("npm repo test-repo-url-http - non-github (http://)", function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 0, 'exit ok')
var res = fs.readFileSync(outFile, 'ascii')
s.close()
@@ -103,7 +103,7 @@ test("npm repo test-repo-url-https - non-github (https://)", function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 0, 'exit ok')
var res = fs.readFileSync(outFile, 'ascii')
s.close()
@@ -121,7 +121,7 @@ test("npm repo test-repo-url-ssh - non-github (ssh://)", function (t) {
'--registry=' + common.registry,
'--loglevel=silent',
'--browser=' + __dirname + '/_script.sh'
- ], opts, function(err, code, stdout, stderr) {
+ ], opts, function (err, code, stdout, stderr) {
t.equal(code, 0, 'exit ok')
var res = fs.readFileSync(outFile, 'ascii')
s.close()
diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js
index a308b5f..6ce3619 100644
--- a/deps/npm/test/tap/run-script.js
+++ b/deps/npm/test/tap/run-script.js
@@ -1,62 +1,84 @@
-var common = require('../common-tap')
- , test = require('tap').test
- , path = require('path')
- , spawn = require('child_process').spawn
- , rimraf = require('rimraf')
- , mkdirp = require('mkdirp')
- , pkg = __dirname + '/run-script'
- , cache = pkg + '/cache'
- , tmp = pkg + '/tmp'
- , node = process.execPath
- , npm = path.resolve(__dirname, '../../cli.js')
+var common = require("../common-tap")
+ , test = require("tap").test
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , mkdirp = require("mkdirp")
+ , pkg = path.resolve(__dirname, "run-script")
+ , cache = path.resolve(pkg, "cache")
+ , tmp = path.resolve(pkg, "tmp")
, opts = { cwd: pkg }
function testOutput (t, command, er, code, stdout, stderr) {
+ var lines
+
if (er)
throw er
if (stderr)
- throw new Error('npm ' + command + ' stderr: ' + stderr.toString())
+ throw new Error("npm " + command + " stderr: " + stderr.toString())
+
+ lines = stdout.trim().split("\n")
+ stdout = lines.filter(function(line) {
+ return line.trim() !== "" && line[0] !== '>'
+ }).join(';')
- stdout = stdout.trim().split('\n')
- stdout = stdout[stdout.length - 1]
t.equal(stdout, command)
t.end()
}
function cleanup () {
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
+ rimraf.sync(cache)
+ rimraf.sync(tmp)
}
-test('setup', function (t) {
+test("setup", function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
t.end()
})
-test('npm run-script', function (t) {
- common.npm(['run-script', 'start'], opts, testOutput.bind(null, t, "start"))
+test("npm run-script", function (t) {
+ common.npm(["run-script", "start"], opts, testOutput.bind(null, t, "start"))
})
-test('npm run-script with args', function (t) {
+test("npm run-script with args", function (t) {
common.npm(["run-script", "start", "--", "stop"], opts, testOutput.bind(null, t, "stop"))
})
-test('npm run-script with args that contain spaces', function(t) {
+test("npm run-script with args that contain spaces", function (t) {
common.npm(["run-script", "start", "--", "hello world"], opts, testOutput.bind(null, t, "hello world"))
})
-test('npm run-script with args that contain single quotes', function(t) {
+test("npm run-script with args that contain single quotes", function (t) {
common.npm(["run-script", "start", "--", "they're awesome"], opts, testOutput.bind(null, t, "they're awesome"))
})
-test('npm run-script with args that contain double quotes', function(t) {
+test("npm run-script with args that contain double quotes", function (t) {
common.npm(["run-script", "start", "--", "what's \"up\"?"], opts, testOutput.bind(null, t, "what's \"up\"?"))
})
-test('cleanup', function (t) {
+test("npm run-script with pre script", function (t) {
+ common.npm(["run-script", "with-post"], opts, testOutput.bind(null, t, "main;post"))
+})
+
+test("npm run-script with post script", function (t) {
+ common.npm(["run-script", "with-pre"], opts, testOutput.bind(null, t, "pre;main"))
+})
+
+test("npm run-script with both pre and post script", function (t) {
+ common.npm(["run-script", "with-both"], opts, testOutput.bind(null, t, "pre;main;post"))
+})
+
+test("npm run-script with both pre and post script and with args", function (t) {
+ common.npm(["run-script", "with-both", "--", "an arg"], opts, testOutput.bind(null, t, "pre;an arg;post"))
+})
+
+test("npm run-script explicitly call pre script with arg", function (t) {
+ common.npm(["run-script", "prewith-pre", "--", "an arg"], opts, testOutput.bind(null, t, "an arg"))
+})
+
+test("cleanup", function (t) {
cleanup()
t.end()
})
diff --git a/deps/npm/test/tap/run-script/package.json b/deps/npm/test/tap/run-script/package.json
index 49b8636..afa0e3f 100644
--- a/deps/npm/test/tap/run-script/package.json
+++ b/deps/npm/test/tap/run-script/package.json
@@ -1,6 +1,13 @@
{"name":"runscript"
,"version":"1.2.3"
,"scripts":{
- "start":"node -e 'console.log(process.argv[1] || \"start\")'"
+ "start":"node -e 'console.log(process.argv[1] || \"start\")'",
+ "prewith-pre":"node -e 'console.log(process.argv[1] || \"pre\")'",
+ "with-pre":"node -e 'console.log(process.argv[1] || \"main\")'",
+ "with-post":"node -e 'console.log(process.argv[1] || \"main\")'",
+ "postwith-post":"node -e 'console.log(process.argv[1] || \"post\")'",
+ "prewith-both":"node -e 'console.log(process.argv[1] || \"pre\")'",
+ "with-both":"node -e 'console.log(process.argv[1] || \"main\")'",
+ "postwith-both":"node -e 'console.log(process.argv[1] || \"post\")'"
}
}
diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js
index 97bed98..44170af 100644
--- a/deps/npm/test/tap/scripts-whitespace-windows.js
+++ b/deps/npm/test/tap/scripts-whitespace-windows.js
@@ -1,71 +1,54 @@
-var test = require('tap').test
-var path = require('path')
-var npm = path.resolve(__dirname, '../../cli.js')
-var pkg = __dirname + '/scripts-whitespace-windows'
-var tmp = pkg + '/tmp'
-var cache = pkg + '/cache'
-var modules = pkg + '/node_modules'
-var dep = pkg + '/dep'
-
-var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
-var node = process.execPath
-var spawn = require('child_process').spawn
-
-test('setup', function (t) {
+var test = require("tap").test
+var common = require("../common-tap")
+var path = require("path")
+var pkg = path.resolve(__dirname, "scripts-whitespace-windows")
+var tmp = path.resolve(pkg, "tmp")
+var cache = path.resolve(pkg, "cache")
+var modules = path.resolve(pkg, "node_modules")
+var dep = path.resolve(pkg, "dep")
+
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+
+test("setup", function (t) {
+ cleanup()
mkdirp.sync(cache)
mkdirp.sync(tmp)
- rimraf.sync(modules)
- var env = {
- npm_config_cache: cache,
- npm_config_tmp: tmp,
- npm_config_prefix: pkg,
- npm_config_global: 'false'
- }
-
- var child = spawn(node, [npm, 'i', dep], {
+ common.npm(["i", dep], {
cwd: pkg,
- env: env
- })
-
- child.stdout.setEncoding('utf8')
- child.stderr.on('data', function(chunk) {
- throw new Error('got stderr data: ' + JSON.stringify('' + chunk))
- })
- child.on('close', function () {
+ env: {
+ "npm_config_cache": cache,
+ "npm_config_tmp": tmp,
+ "npm_config_prefix": pkg,
+ "npm_config_global": "false"
+ }
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, "npm i " + dep + " finished without error")
+ t.equal(code, 0, "npm i " + dep + " exited ok")
+ t.notOk(stderr, "no output stderr")
t.end()
})
})
-test('test', function (t) {
-
- var child = spawn(node, [npm, 'run', 'foo'], {
- cwd: pkg,
- env: process.env
- })
-
- child.stdout.setEncoding('utf8')
- child.stderr.on('data', function(chunk) {
- throw new Error('got stderr data: ' + JSON.stringify('' + chunk))
+test("test", function (t) {
+ common.npm(["run", "foo"], { cwd: pkg }, function (err, code, stdout, stderr) {
+ t.ifErr(err, "npm run finished without error")
+ t.equal(code, 0, "npm run exited ok")
+ t.notOk(stderr, "no output stderr: ", stderr)
+ stdout = stdout.trim()
+ t.ok(/npm-test-fine/.test(stdout))
+ t.end()
})
- child.stdout.on('data', ondata)
- child.on('close', onend)
- var c = ''
- function ondata (chunk) {
- c += chunk
- }
- function onend () {
- c = c.trim()
+})
- t.ok(/npm-test-fine/.test(c))
- t.end()
- }
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
})
-test('cleanup', function (t) {
+function cleanup() {
rimraf.sync(cache)
rimraf.sync(tmp)
rimraf.sync(modules)
- t.end()
-})
+}
diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js
new file mode 100644
index 0000000..d4c5669
--- /dev/null
+++ b/deps/npm/test/tap/search.js
@@ -0,0 +1,265 @@
+var common = require("../common-tap.js")
+var test = require("tap").test
+var rimraf = require("rimraf")
+var mr = require("npm-registry-mock")
+var fs = require("fs")
+var path = require("path")
+var pkg = path.resolve(__dirname, "search")
+var cache = path.resolve(pkg, "cache")
+var registryCache = path.resolve(cache, "localhost_1337", "-", "all")
+var cacheJsonFile = path.resolve(registryCache, ".cache.json")
+var mkdirp = require("mkdirp")
+
+var timeMock = {
+ epoch: 1411727900,
+ future: 1411727900+100,
+ all: 1411727900+25,
+ since: 0 // filled by since server callback
+}
+
+var EXEC_OPTS = {}
+
+function cleanupCache() {
+ rimraf.sync(cache)
+}
+function cleanup () { cleanupCache() }
+
+function setupCache() {
+ mkdirp.sync(cache)
+ mkdirp.sync(registryCache)
+ var res = fs.writeFileSync(cacheJsonFile, stringifyUpdated(timeMock.epoch))
+ if (res) throw new Error("Creating cache file failed")
+}
+
+var mocks = {
+ /* Since request, always response with an _update time > the time requested */
+ sinceFuture: function(server) {
+ server.filteringPathRegEx(/startkey=[^&]*/g, function(s) {
+ var _allMock = JSON.parse(JSON.stringify(allMock))
+ timeMock.since = _allMock._updated = s.replace("startkey=", "")
+ server.get("/-/all/since?stale=update_after&" + s)
+ .reply(200, _allMock)
+ return s
+ })
+ },
+ allFutureUpdatedOnly: function(server) {
+ server.get("/-/all")
+ .reply(200, stringifyUpdated(timeMock.future))
+ },
+ all: function(server) {
+ server.get("/-/all")
+ .reply(200, allMock)
+ }
+}
+
+
+test("No previous cache, init cache triggered by first search", function(t) {
+ cleanupCache()
+
+ mr({ port: common.port, mocks: mocks.allFutureUpdatedOnly }, function (s) {
+ common.npm([
+ "search", "do not do extra search work on my behalf",
+ "--registry", common.registry,
+ "--cache", cache,
+ "--loglevel", "silent",
+ "--color", "always"
+ ],
+ EXEC_OPTS,
+ function(err, code) {
+ s.close()
+ t.equal(code, 0, "search finished successfully")
+ t.ifErr(err, "search finished successfully")
+
+ t.ok(fs.existsSync(cacheJsonFile),
+ cacheJsonFile + " expected to have been created")
+ var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, "utf8"))
+ t.equal(cacheData._updated, String(timeMock.future))
+ t.end()
+ })
+ })
+})
+
+test("previous cache, _updated set, should trigger since request", function(t) {
+ cleanupCache()
+ setupCache()
+
+ function m(server) {
+ [ mocks.all, mocks.sinceFuture ].forEach(function(m) {
+ m(server)
+ })
+ }
+ mr({ port: common.port, mocks: m }, function (s) {
+ common.npm([
+ "search", "do not do extra search work on my behalf",
+ "--registry", common.registry,
+ "--cache", cache,
+ "--loglevel", "silly",
+ "--color", "always"
+ ],
+ EXEC_OPTS,
+ function(err, code) {
+ s.close()
+ t.equal(code, 0, "search finished successfully")
+ t.ifErr(err, "search finished successfully")
+
+ var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, "utf8"))
+ t.equal(cacheData._updated,
+ timeMock.since,
+ "cache update time gotten from since response")
+ cleanupCache()
+ t.end()
+ })
+ })
+})
+
+
+var searches = [
+ {
+ term: "f36b6a6123da50959741e2ce4d634f96ec668c56",
+ description: "non-regex",
+ location: 241
+ },
+ {
+ term: "/f36b6a6123da50959741e2ce4d634f96ec668c56/",
+ description: "regex",
+ location: 241
+ }
+]
+
+searches.forEach(function(search) {
+ test(search.description + " search in color", function(t) {
+ cleanupCache()
+ mr({ port: common.port, mocks: mocks.all }, function (s) {
+ common.npm([
+ "search", search.term,
+ "--registry", common.registry,
+ "--cache", cache,
+ "--loglevel", "silent",
+ "--color", "always"
+ ],
+ EXEC_OPTS,
+ function(err, code, stdout) {
+ s.close()
+ t.equal(code, 0, "search finished successfully")
+ t.ifErr(err, "search finished successfully")
+ // \033 == \u001B
+ var markStart = "\u001B\\[[0-9][0-9]m"
+ var markEnd = "\u001B\\[0m"
+
+ var re = new RegExp(markStart + ".*?" + markEnd)
+
+ var cnt = stdout.search(re)
+ t.equal(cnt, search.location,
+ search.description + " search for " + search.term)
+ t.end()
+ })
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
+})
+
+function stringifyUpdated(time) {
+ return JSON.stringify({ _updated : String(time) })
+}
+
+var allMock = {
+ "_updated": timeMock.all,
+ "generator-frontcow": {
+ "name": "generator-frontcow",
+ "description": "f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache",
+ "dist-tags": {
+ "latest": "0.1.19"
+ },
+ "maintainers": [
+ {
+ "name": "bcabanes",
+ "email": "contact@benjamincabanes.com"
+ }
+ ],
+ "homepage": "https://github.com/bcabanes/generator-frontcow",
+ "keywords": [
+ "sass",
+ "frontend",
+ "yeoman-generator",
+ "atomic",
+ "design",
+ "sass",
+ "foundation",
+ "foundation5",
+ "atomic design",
+ "bourbon",
+ "polyfill",
+ "font awesome"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/bcabanes/generator-frontcow"
+ },
+ "author": {
+ "name": "ben",
+ "email": "contact@benjamincabanes.com",
+ "url": "https://github.com/bcabanes"
+ },
+ "bugs": {
+ "url": "https://github.com/bcabanes/generator-frontcow/issues"
+ },
+ "license": "MIT",
+ "readmeFilename": "README.md",
+ "time": {
+ "modified": "2014-10-03T02:26:18.406Z"
+ },
+ "versions": {
+ "0.1.19": "latest"
+ }
+ },
+ "marko": {
+ "name": "marko",
+ "description": "Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.",
+ "dist-tags": {
+ "latest": "1.2.16"
+ },
+ "maintainers": [
+ {
+ "name": "pnidem",
+ "email": "pnidem@gmail.com"
+ },
+ {
+ "name": "philidem",
+ "email": "phillip.idem@gmail.com"
+ }
+ ],
+ "homepage": "https://github.com/raptorjs/marko",
+ "keywords": [
+ "templating",
+ "template",
+ "async",
+ "streaming"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/raptorjs/marko.git"
+ },
+ "author": {
+ "name": "Patrick Steele-Idem",
+ "email": "pnidem@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/raptorjs/marko/issues"
+ },
+ "license": "Apache License v2.0",
+ "readmeFilename": "README.md",
+ "users": {
+ "pnidem": true
+ },
+ "time": {
+ "modified": "2014-10-03T02:27:31.775Z"
+ },
+ "versions": {
+ "1.2.16": "latest"
+ }
+ }
+}
diff --git a/deps/npm/test/tap/semver-doc.js b/deps/npm/test/tap/semver-doc.js
index 5133f46..963cace 100644
--- a/deps/npm/test/tap/semver-doc.js
+++ b/deps/npm/test/tap/semver-doc.js
@@ -1,11 +1,11 @@
var test = require("tap").test
-test("semver doc is up to date", function(t) {
+test("semver doc is up to date", function (t) {
var path = require("path")
var moddoc = path.join(__dirname, "../../node_modules/semver/README.md")
var mydoc = path.join(__dirname, "../../doc/misc/semver.md")
var fs = require("fs")
- var mod = fs.readFileSync(moddoc, "utf8").replace(/semver\(1\)/, 'semver(7)')
+ var mod = fs.readFileSync(moddoc, "utf8").replace(/semver\(1\)/, "semver(7)")
var my = fs.readFileSync(mydoc, "utf8")
t.equal(my, mod)
t.end()
diff --git a/deps/npm/test/tap/semver-tag.js b/deps/npm/test/tap/semver-tag.js
index 7633e55..03dcdf8 100644
--- a/deps/npm/test/tap/semver-tag.js
+++ b/deps/npm/test/tap/semver-tag.js
@@ -5,7 +5,7 @@ var test = require("tap").test
test("try to tag with semver range as tag name", function (t) {
var cmd = ["tag", "zzzz@1.2.3", "v2.x", "--registry=http://localhost"]
common.npm(cmd, {
- stdio: "pipe",
+ stdio: "pipe"
}, function (er, code, so, se) {
if (er) throw er
t.similar(se, /Tag name must not be a valid SemVer range: v2.x\n/)
diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps.js b/deps/npm/test/tap/shrinkwrap-empty-deps.js
index 9ec8e71..6be67af 100644
--- a/deps/npm/test/tap/shrinkwrap-empty-deps.js
+++ b/deps/npm/test/tap/shrinkwrap-empty-deps.js
@@ -6,7 +6,8 @@ var test = require("tap").test
, fs = require("fs")
, osenv = require("osenv")
, rimraf = require("rimraf")
- , pkg = __dirname + "/shrinkwrap-empty-deps"
+ , pkg = path.resolve(__dirname, "shrinkwrap-empty-deps")
+ , cache = path.resolve(pkg, "cache")
test("returns a list of removed items", function (t) {
var desiredResultsPath = path.resolve(pkg, "npm-shrinkwrap.json")
@@ -36,7 +37,7 @@ test("returns a list of removed items", function (t) {
function setup (cb) {
cleanup()
process.chdir(pkg)
- npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
+ npm.load({cache: cache, registry: common.registry}, function () {
cb()
})
}
diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js
index 41c9085..1dec1d2 100644
--- a/deps/npm/test/tap/sorted-package-json.js
+++ b/deps/npm/test/tap/sorted-package-json.js
@@ -30,11 +30,11 @@ test("sorting dependencies", function (t) {
var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3"], {
cwd: pkg,
env: {
- npm_config_registry: common.registry,
- npm_config_cache: cache,
- npm_config_tmp: tmp,
- npm_config_prefix: pkg,
- npm_config_global: "false",
+ "npm_config_registry": common.registry,
+ "npm_config_cache": cache,
+ "npm_config_tmp": tmp,
+ "npm_config_prefix": pkg,
+ "npm_config_global": "false",
HOME: process.env.HOME,
Path: process.env.PATH,
PATH: process.env.PATH
@@ -42,6 +42,7 @@ test("sorting dependencies", function (t) {
})
child.on("close", function (code) {
+ t.equal(code, 0, "npm install exited with code")
var result = fs.readFileSync(packageJson).toString()
, resultAsJson = JSON.parse(result)
@@ -83,7 +84,7 @@ function setup() {
"underscore": "^1.3.3",
"request": "^0.9.0"
}
- }, null, 2), 'utf8')
+ }, null, 2), "utf8")
}
function cleanup() {
diff --git a/deps/npm/test/tap/spawn-enoent.js b/deps/npm/test/tap/spawn-enoent.js
index 7ea9dab..20fed21 100644
--- a/deps/npm/test/tap/spawn-enoent.js
+++ b/deps/npm/test/tap/spawn-enoent.js
@@ -26,7 +26,7 @@ test("enoent script", function (t) {
env: {
PATH: process.env.PATH,
Path: process.env.Path,
- npm_config_loglevel: "warn"
+ "npm_config_loglevel": "warn"
}
}, function (er, code, sout, serr) {
t.similar(serr, /npm ERR! Failed at the x@1\.2\.3 start script\./)
diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js
index f056aa7..334551e 100644
--- a/deps/npm/test/tap/startstop.js
+++ b/deps/npm/test/tap/startstop.js
@@ -1,22 +1,18 @@
-var common = require('../common-tap')
- , test = require('tap').test
- , path = require('path')
- , spawn = require('child_process').spawn
- , rimraf = require('rimraf')
- , mkdirp = require('mkdirp')
- , pkg = __dirname + '/startstop'
- , cache = pkg + '/cache'
- , tmp = pkg + '/tmp'
- , node = process.execPath
- , npm = path.resolve(__dirname, '../../cli.js')
+var common = require("../common-tap")
+ , test = require("tap").test
+ , path = require("path")
+ , rimraf = require("rimraf")
+ , mkdirp = require("mkdirp")
+ , pkg = path.resolve(__dirname, "startstop")
+ , cache = path.resolve(pkg, "cache")
+ , tmp = path.resolve(pkg, "tmp")
, opts = { cwd: pkg }
function testOutput (t, command, er, code, stdout, stderr) {
- if (er)
- throw er
+ t.notOk(code, "npm " + command + " exited with code 0")
if (stderr)
- throw new Error('npm ' + command + ' stderr: ' + stderr.toString())
+ throw new Error("npm " + command + " stderr: " + stderr.toString())
stdout = stdout.trim().split(/\n|\r/)
stdout = stdout[stdout.length - 1]
@@ -25,40 +21,40 @@ function testOutput (t, command, er, code, stdout, stderr) {
}
function cleanup () {
- rimraf.sync(pkg + '/cache')
- rimraf.sync(pkg + '/tmp')
+ rimraf.sync(cache)
+ rimraf.sync(tmp)
}
-test('setup', function (t) {
+test("setup", function (t) {
cleanup()
- mkdirp.sync(pkg + '/cache')
- mkdirp.sync(pkg + '/tmp')
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
t.end()
})
-test('npm start', function (t) {
- common.npm(['start'], opts, testOutput.bind(null, t, "start"))
+test("npm start", function (t) {
+ common.npm(["start"], opts, testOutput.bind(null, t, "start"))
})
-test('npm stop', function (t) {
- common.npm(['stop'], opts, testOutput.bind(null, t, "stop"))
+test("npm stop", function (t) {
+ common.npm(["stop"], opts, testOutput.bind(null, t, "stop"))
})
-test('npm restart', function (t) {
- common.npm(['restart'], opts, function (er, c, stdout, stderr) {
+test("npm restart", function (t) {
+ common.npm(["restart"], opts, function (er, c, stdout) {
if (er)
throw er
- var output = stdout.split('\n').filter(function (val) {
+ var output = stdout.split("\n").filter(function (val) {
return val.match(/^s/)
})
- t.same(output.sort(), ['start', 'stop'].sort())
+ t.same(output.sort(), ["start", "stop"].sort())
t.end()
})
})
-test('cleanup', function (t) {
+test("cleanup", function (t) {
cleanup()
t.end()
})
diff --git a/deps/npm/test/tap/test-run-ls.js b/deps/npm/test/tap/test-run-ls.js
index 4c869e5..252c6e8 100644
--- a/deps/npm/test/tap/test-run-ls.js
+++ b/deps/npm/test/tap/test-run-ls.js
@@ -6,7 +6,7 @@ var testscript = require("../../package.json").scripts.test
var tsregexp = testscript.replace(/([\[\.\*\]])/g, "\\$1")
test("default", function (t) {
- common.npm(["run"], { cwd: cwd }, function (er, code, so, se) {
+ common.npm(["run"], { cwd: cwd }, function (er, code, so) {
if (er) throw er
t.notOk(code)
t.similar(so, new RegExp("\\n test\\n " + tsregexp + "\\n"))
@@ -15,7 +15,7 @@ test("default", function (t) {
})
test("parseable", function (t) {
- common.npm(["run", "-p"], { cwd: cwd }, function (er, code, so, se) {
+ common.npm(["run", "-p"], { cwd: cwd }, function (er, code, so) {
if (er) throw er
t.notOk(code)
t.similar(so, new RegExp("\\ntest:" + tsregexp + "\\n"))
@@ -24,7 +24,7 @@ test("parseable", function (t) {
})
test("parseable", function (t) {
- common.npm(["run", "--json"], { cwd: cwd }, function (er, code, so, se) {
+ common.npm(["run", "--json"], { cwd: cwd }, function (er, code, so) {
if (er) throw er
t.notOk(code)
t.equal(JSON.parse(so).test, testscript)
diff --git a/deps/npm/test/tap/uninstall-package.js b/deps/npm/test/tap/uninstall-package.js
index 0682701..a0ba4c6 100644
--- a/deps/npm/test/tap/uninstall-package.js
+++ b/deps/npm/test/tap/uninstall-package.js
@@ -3,7 +3,8 @@ var test = require("tap").test
, rimraf = require("rimraf")
, mr = require("npm-registry-mock")
, common = require("../common-tap.js")
- , pkg = __dirname + "/uninstall-package"
+ , path = require("path")
+ , pkg = path.join(__dirname, "uninstall-package")
test("returns a list of removed items", function (t) {
t.plan(1)
diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js
index a03f9b1..d2e2e73 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball.js
+++ b/deps/npm/test/tap/unpack-foreign-tarball.js
@@ -12,8 +12,8 @@ var tmp = path.resolve(dir, "tmp")
var pkg = path.resolve(nm, "npm-test-gitignore")
var env = {
- npm_config_cache: cache,
- npm_config_tmp: tmp
+ "npm_config_cache": cache,
+ "npm_config_tmp": tmp
}
var conf = {
@@ -22,36 +22,39 @@ var conf = {
stdio: [ "pipe", "pipe", 2 ]
}
+function verify (t, files, err, code) {
+ if (code) {
+ t.fail("exited with failure: " + code)
+ return t.end()
+ }
+ var actual = fs.readdirSync(pkg).sort()
+ var expect = files.concat([".npmignore", "package.json"]).sort()
+ t.same(actual, expect)
+ t.end()
+}
+
test("npmignore only", function (t) {
setup()
var file = path.resolve(dir, "npmignore.tgz")
- common.npm(["install", file], conf, function (code, stdout, stderr) {
- verify(t, code, ["foo"])
- })
+ common.npm(["install", file], conf, verify.bind(null, t, ["foo"]))
})
test("gitignore only", function (t) {
setup()
var file = path.resolve(dir, "gitignore.tgz")
- common.npm(["install", file], conf, function (code, stdout, stderr) {
- verify(t, code, ["foo"])
- })
+ common.npm(["install", file], conf, verify.bind(null, t, ["foo"]))
})
test("gitignore and npmignore", function (t) {
setup()
var file = path.resolve(dir, "gitignore-and-npmignore.tgz")
- common.npm(["install", file], conf, function (code, stdout, stderr) {
- verify(t, code, ["foo", "bar"])
- })
+ common.npm(["install", file], conf, verify.bind(null, t, ["foo", "bar"]))
})
test("gitignore and npmignore, not gzipped", function (t) {
setup()
var file = path.resolve(dir, "gitignore-and-npmignore.tar")
- common.npm(["install", file], conf, function (code, stdout, stderr) {
- verify(t, code, ["foo", "bar"])
- })
+ common.npm(["install", file], conf, verify.bind(null, t, ["foo", "bar"]))
})
test("clean", function (t) {
@@ -59,17 +62,6 @@ test("clean", function (t) {
t.end()
})
-function verify (t, code, files) {
- if (code) {
- t.fail("exited with failure: " + code)
- return t.end()
- }
- var actual = fs.readdirSync(pkg).sort()
- var expect = files.concat([".npmignore", "package.json"]).sort()
- t.same(actual, expect)
- t.end()
-}
-
function setup () {
clean()
mkdirp.sync(nm)
diff --git a/deps/npm/test/tap/update-save.js b/deps/npm/test/tap/update-save.js
index 6323ef8..5f871b2 100644
--- a/deps/npm/test/tap/update-save.js
+++ b/deps/npm/test/tap/update-save.js
@@ -3,8 +3,8 @@ var test = require("tap").test
var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
-var fs = require('fs')
-var path = require('path')
+var fs = require("fs")
+var path = require("path")
var mr = require("npm-registry-mock")
var PKG_DIR = path.resolve(__dirname, "update-save")
@@ -14,10 +14,10 @@ var MODULES_DIR = path.resolve(PKG_DIR, "node_modules")
var EXEC_OPTS = {
cwd: PKG_DIR,
- stdio: 'ignore',
+ stdio: "ignore",
env: {
- npm_config_registry: common.registry,
- npm_config_loglevel: 'verbose'
+ "npm_config_registry": common.registry,
+ "npm_config_loglevel": "verbose"
}
}
@@ -32,9 +32,9 @@ var DEFAULT_PKG = {
}
}
-var s = undefined // mock server reference
+var s // mock server reference
-test('setup', function (t) {
+test("setup", function (t) {
resetPackage()
mr(common.port, function (server) {
@@ -49,14 +49,14 @@ test('setup', function (t) {
test("update regular dependencies only", function (t) {
resetPackage()
- common.npm(['update', '--save'], EXEC_OPTS, function (err, code) {
+ common.npm(["update", "--save"], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.equal(code, 0)
+ t.notOk(code, "npm update exited with code 0")
- var pkgdata = JSON.parse(fs.readFileSync(PKG, 'utf8'))
- t.deepEqual(pkgdata.dependencies, {mkdirp: '^0.3.5'}, 'only dependencies updated')
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, 'dev dependencies should be untouched')
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, 'optional dependencies should be untouched')
+ var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
+ t.deepEqual(pkgdata.dependencies, {mkdirp: "^0.3.5"}, "only dependencies updated")
+ t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
+ t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
@@ -64,14 +64,14 @@ test("update regular dependencies only", function (t) {
test("update devDependencies only", function (t) {
resetPackage()
- common.npm(['update', '--save-dev'], EXEC_OPTS, function (err, code, stdout, stderr) {
+ common.npm(["update", "--save-dev"], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.equal(code, 0)
+ t.notOk(code, "npm update exited with code 0")
- var pkgdata = JSON.parse(fs.readFileSync(PKG, 'utf8'))
- t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, 'dependencies should be untouched')
- t.deepEqual(pkgdata.devDependencies, {underscore: '^1.3.3'}, 'dev dependencies should be updated')
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, 'optional dependencies should be untouched')
+ var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
+ t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, "dependencies should be untouched")
+ t.deepEqual(pkgdata.devDependencies, {underscore: "^1.3.3"}, "dev dependencies should be updated")
+ t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
@@ -83,14 +83,14 @@ test("update optionalDependencies only", function (t) {
}
})
- common.npm(['update', '--save-optional'], EXEC_OPTS, function (err, code) {
+ common.npm(["update", "--save-optional"], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.equal(code, 0)
+ t.notOk(code, "npm update exited with code 0")
- var pkgdata = JSON.parse(fs.readFileSync(PKG, 'utf8'))
- t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, 'dependencies should be untouched')
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, 'dev dependencies should be untouched')
- t.deepEqual(pkgdata.optionalDependencies, {underscore: '^1.3.3'}, 'optional dependencies should be updated')
+ var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
+ t.deepEqual(pkgdata.dependencies, DEFAULT_PKG.dependencies, "dependencies should be untouched")
+ t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
+ t.deepEqual(pkgdata.optionalDependencies, {underscore: "^1.3.3"}, "optional dependencies should be updated")
t.end()
})
})
@@ -102,14 +102,14 @@ test("optionalDependencies are merged into dependencies during --save", function
}
})
- common.npm(['update', '--save'], EXEC_OPTS, function (err, code) {
+ common.npm(["update", "--save"], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.equal(code, 0)
+ t.notOk(code, "npm update exited with code 0")
- var pkgdata = JSON.parse(fs.readFileSync(PKG, 'utf8'))
- t.deepEqual(pkgdata.dependencies, {mkdirp: '^0.3.5'}, 'dependencies should not include optional dependencies')
- t.deepEqual(pkgdata.devDependencies, pkg.devDependencies, 'dev dependencies should be untouched')
- t.deepEqual(pkgdata.optionalDependencies, pkg.optionalDependencies, 'optional dependencies should be untouched')
+ var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
+ t.deepEqual(pkgdata.dependencies, {mkdirp: "^0.3.5"}, "dependencies should not include optional dependencies")
+ t.deepEqual(pkgdata.devDependencies, pkg.devDependencies, "dev dependencies should be untouched")
+ t.deepEqual(pkgdata.optionalDependencies, pkg.optionalDependencies, "optional dependencies should be untouched")
t.end()
})
})
@@ -117,16 +117,16 @@ test("optionalDependencies are merged into dependencies during --save", function
test("semver prefix is replaced with configured save-prefix", function (t) {
resetPackage()
- common.npm(['update', '--save', '--save-prefix', '~'], EXEC_OPTS, function (err, code) {
+ common.npm(["update", "--save", "--save-prefix", "~"], EXEC_OPTS, function (err, code) {
t.ifError(err)
- t.equal(code, 0)
+ t.notOk(code, "npm update exited with code 0")
- var pkgdata = JSON.parse(fs.readFileSync(PKG, 'utf8'))
+ var pkgdata = JSON.parse(fs.readFileSync(PKG, "utf8"))
t.deepEqual(pkgdata.dependencies, {
- mkdirp: '~0.3.5'
- }, 'dependencies should be updated')
- t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, 'dev dependencies should be untouched')
- t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, 'optional dependencies should be updated')
+ mkdirp: "~0.3.5"
+ }, "dependencies should be updated")
+ t.deepEqual(pkgdata.devDependencies, DEFAULT_PKG.devDependencies, "dev dependencies should be untouched")
+ t.deepEqual(pkgdata.optionalDependencies, DEFAULT_PKG.optionalDependencies, "optional dependencies should be updated")
t.end()
})
})
@@ -137,8 +137,8 @@ function resetPackage(extendWith) {
mkdirp.sync(CACHE_DIR)
var pkg = clone(DEFAULT_PKG)
extend(pkg, extendWith)
- for (key in extend) { pkg[key] = extend[key]}
- fs.writeFileSync(PKG, JSON.stringify(pkg, null, 2), 'ascii')
+ for (var key in extend) { pkg[key] = extend[key]}
+ fs.writeFileSync(PKG, JSON.stringify(pkg, null, 2), "ascii")
return pkg
}
@@ -155,6 +155,6 @@ function clone(a) {
}
function extend(a, b) {
- for (key in b) { a[key] = b[key]}
+ for (var key in b) { a[key] = b[key]}
return a
}
diff --git a/deps/npm/test/tap/url-dependencies.js b/deps/npm/test/tap/url-dependencies.js
index 34a77f4..a77b3d3 100644
--- a/deps/npm/test/tap/url-dependencies.js
+++ b/deps/npm/test/tap/url-dependencies.js
@@ -3,9 +3,6 @@ var rimraf = require("rimraf")
var path = require("path")
var osenv = require("osenv")
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 = path.resolve(__dirname, "url-dependencies")
var common = require("../common-tap")
@@ -15,10 +12,10 @@ var mockRoutes = {
}
}
-test("url-dependencies: download first time", function(t) {
+test("url-dependencies: download first time", function (t) {
cleanup()
- performInstall(function(output){
+ performInstall(t, function (output){
if (!tarballWasFetched(output)){
t.fail("Tarball was not fetched")
} else {
@@ -28,11 +25,11 @@ test("url-dependencies: download first time", function(t) {
})
})
-test("url-dependencies: do not download subsequent times", function(t) {
+test("url-dependencies: do not download subsequent times", function (t) {
cleanup()
- performInstall(function(){
- performInstall(function(output){
+ performInstall(t, function () {
+ performInstall(t, function (output) {
if (tarballWasFetched(output)){
t.fail("Tarball was fetched second time around")
} else {
@@ -47,28 +44,25 @@ function tarballWasFetched(output){
return output.indexOf("http fetch GET " + common.registry + "/underscore/-/underscore-1.3.1.tgz") > -1
}
-function performInstall (cb) {
- mr({port: common.port, mocks: mockRoutes}, function(s){
- var output = ""
- , child = spawn(node, [npm, "install"], {
- cwd: pkg,
- env: {
- "npm_config_registry": common.registry,
- "npm_config_cache_lock_stale": 1000,
- "npm_config_cache_lock_wait": 1000,
- "npm_config_loglevel": "http",
- 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 () {
+function performInstall (t, cb) {
+ mr({port: common.port, mocks: mockRoutes}, function (s) {
+ var opts = {
+ cwd : pkg,
+ env: {
+ "npm_config_registry": common.registry,
+ "npm_config_cache_lock_stale": 1000,
+ "npm_config_cache_lock_wait": 1000,
+ "npm_config_loglevel": "http",
+ HOME: process.env.HOME,
+ Path: process.env.PATH,
+ PATH: process.env.PATH
+ }
+ }
+ common.npm(["install"], opts, function (err, code, stdout, stderr) {
+ t.ifError(err, "install success")
+ t.notOk(code, "npm install exited with code 0")
s.close()
- cb(output)
+ cb(stderr)
})
})
}
diff --git a/deps/npm/test/tap/version-no-git.js b/deps/npm/test/tap/version-no-git.js
new file mode 100644
index 0000000..e5a5d23
--- /dev/null
+++ b/deps/npm/test/tap/version-no-git.js
@@ -0,0 +1,54 @@
+var common = require("../common-tap.js")
+var test = require("tap").test
+var npm = require("../../")
+var osenv = require("osenv")
+var path = require("path")
+var fs = require("fs")
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+var requireInject = require("require-inject")
+
+var pkg = path.resolve(__dirname, "version-no-git")
+var cache = path.resolve(pkg, "cache")
+var gitDir = path.resolve(pkg, ".git")
+
+test("npm version in a git repo without the git binary", function(t) {
+ setup()
+ npm.load({cache: cache, registry: common.registry}, function() {
+ var version = requireInject("../../lib/version", {
+ which: function(cmd, cb) {
+ process.nextTick(function() {
+ cb(new Error('ENOGIT!'))
+ })
+ }
+ })
+
+ version(["patch"], function(err) {
+ if (err) return t.fail("Error performing version patch")
+ var p = path.resolve(pkg, "package")
+ var testPkg = require(p)
+ t.equal("0.0.1", testPkg.version, "\"" + testPkg.version+"\" === \"0.0.1\"")
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function(t) {
+ process.chdir(osenv.tmpdir())
+
+ rimraf.sync(pkg)
+ t.end()
+})
+
+function setup() {
+ mkdirp.sync(pkg)
+ mkdirp.sync(cache)
+ mkdirp.sync(gitDir)
+ fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({
+ author: "Terin Stock",
+ name: "version-no-git-test",
+ version: "0.0.0",
+ description: "Test for npm version if git binary doesn't exist"
+ }), "utf8")
+ process.chdir(pkg)
+}
diff --git a/deps/npm/test/tap/version-no-tags.js b/deps/npm/test/tap/version-no-tags.js
index e731c31..cb6f195 100644
--- a/deps/npm/test/tap/version-no-tags.js
+++ b/deps/npm/test/tap/version-no-tags.js
@@ -1,49 +1,47 @@
-var common = require('../common-tap.js')
-var test = require('tap').test
-var npm = require('../../')
-var npmc = require.resolve('../../')
-var osenv = require('osenv')
-var path = require('path')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var which = require('which')
-var util = require('util')
-var spawn = require('child_process').spawn
-var args = [ npmc
- , 'version'
- , 'patch'
- , '--no-git-tag-version'
- ]
-var pkg = __dirname + '/version-no-tags'
+var common = require("../common-tap.js")
+var test = require("tap").test
+var npm = require("../../")
+var osenv = require("osenv")
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var which = require("which")
+var spawn = require("child_process").spawn
+
+var pkg = path.resolve(__dirname, "version-no-tags")
+var cache = path.resolve(pkg, "cache")
test("npm version without git tag", function (t) {
setup()
- npm.load({ cache: pkg + '/cache', registry: common.registry}, function () {
- which('git', function(err, git) {
+ npm.load({ cache: cache, registry: common.registry}, function () {
+ which("git", function (err, git) {
+ t.ifError(err, "git found on system")
function tagExists(tag, _cb) {
- var child = spawn(git, ['tag', '-l', tag])
- var out = ''
- child.stdout.on('data', function(d) {
- out += data.toString()
+ var child1 = spawn(git, ["tag", "-l", tag])
+ var out = ""
+ child1.stdout.on("data", function (d) {
+ out += d.toString()
})
- child.on('exit', function() {
+ child1.on("exit", function () {
return _cb(null, Boolean(~out.indexOf(tag)))
})
}
- var child = spawn(git, ['init'])
- child.stdout.pipe(process.stdout)
- child.on('exit', function() {
- npm.config.set('git-tag-version', false)
- npm.commands.version(['patch'], function(err) {
- if (err) return t.fail('Error perform version patch')
- var testPkg = require(pkg+'/package')
- if (testPkg.version !== '0.0.1') t.fail(testPkg.version+' !== \'0.0.1\'')
- t.ok('0.0.1' === testPkg.version)
- tagExists('v0.0.1', function(err, exists) {
- t.equal(exists, false, 'git tag DOES exist')
- t.pass('git tag does not exist')
+ var child2 = spawn(git, ["init"])
+ child2.stdout.pipe(process.stdout)
+ child2.on("exit", function () {
+ npm.config.set("git-tag-version", false)
+ npm.commands.version(["patch"], function (err) {
+ if (err) return t.fail("Error perform version patch")
+ var p = path.resolve(pkg, "package")
+ var testPkg = require(p)
+ if (testPkg.version !== "0.0.1") t.fail(testPkg.version+" !== \"0.0.1\"")
+ t.equal("0.0.1", testPkg.version)
+ tagExists("v0.0.1", function (err, exists) {
+ t.ifError(err, "tag found to exist")
+ t.equal(exists, false, "git tag DOES exist")
+ t.pass("git tag does not exist")
t.end()
})
})
@@ -52,7 +50,7 @@ test("npm version without git tag", function (t) {
})
})
-test('cleanup', function(t) {
+test("cleanup", function (t) {
// windows fix for locked files
process.chdir(osenv.tmpdir())
@@ -62,12 +60,12 @@ test('cleanup', function(t) {
function setup() {
mkdirp.sync(pkg)
- mkdirp.sync(pkg + '/cache')
- fs.writeFileSync(pkg + '/package.json', JSON.stringify({
+ mkdirp.sync(cache)
+ fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({
author: "Evan Lucas",
name: "version-no-tags-test",
version: "0.0.0",
description: "Test for git-tag-version flag"
- }), 'utf8')
+ }), "utf8")
process.chdir(pkg)
}
diff --git a/deps/npm/test/tap/view.js b/deps/npm/test/tap/view.js
new file mode 100644
index 0000000..c36abfe
--- /dev/null
+++ b/deps/npm/test/tap/view.js
@@ -0,0 +1,253 @@
+var common = require("../common-tap.js")
+var test = require("tap").test
+var osenv = require("osenv")
+var path = require("path")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var tmp = osenv.tmpdir()
+var t1dir = path.resolve(tmp, "view-local-no-pkg")
+var t2dir = path.resolve(tmp, "view-local-notmine")
+var t3dir = path.resolve(tmp, "view-local-mine")
+var mr = require("npm-registry-mock")
+
+test("setup", function (t) {
+ mkdirp.sync(t1dir)
+ mkdirp.sync(t2dir)
+ mkdirp.sync(t3dir)
+
+ fs.writeFileSync(t2dir + "/package.json", JSON.stringify({
+ author: "Evan Lucas"
+ , name: "test-repo-url-https"
+ , version: "0.0.1"
+ }), "utf8")
+
+ fs.writeFileSync(t3dir + "/package.json", JSON.stringify({
+ author: "Evan Lucas"
+ , name: "biscuits"
+ , version: "0.0.1"
+ }), "utf8")
+
+ t.pass("created fixtures")
+ t.end()
+})
+
+test("npm view . in global mode", function (t) {
+ process.chdir(t1dir)
+ common.npm([
+ "view"
+ , "."
+ , "--registry=" + common.registry
+ , "--global"
+ ], { cwd: t1dir }, function (err, code, stdout, stderr) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 1, "exit not ok")
+ t.similar(stderr, /Cannot use view command in global mode./m)
+ t.end()
+ })
+})
+
+test("npm view --global", function(t) {
+ process.chdir(t1dir)
+ common.npm([
+ "view"
+ , "--registry=" + common.registry
+ , "--global"
+ ], { cwd: t1dir }, function(err, code, stdout, stderr) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 1, "exit not ok")
+ t.similar(stderr, /Cannot use view command in global mode./m)
+ t.end()
+ })
+})
+
+test("npm view . with no package.json", function(t) {
+ process.chdir(t1dir)
+ common.npm([
+ "view"
+ , "."
+ , "--registry=" + common.registry
+ ], { cwd: t1dir }, function (err, code, stdout, stderr) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 1, "exit not ok")
+ t.similar(stderr, /Invalid package.json/m)
+ t.end()
+ })
+})
+
+test("npm view . with no published package", function (t) {
+ process.chdir(t3dir)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "."
+ , "--registry=" + common.registry
+ ], { cwd: t3dir }, function (err, code, stdout, stderr) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 1, "exit not ok")
+ t.similar(stderr, /version not found/m)
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view .", function (t) {
+ process.chdir(t2dir)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "."
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ var re = new RegExp("name: 'test-repo-url-https'")
+ t.similar(stdout, re)
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view . select fields", function (t) {
+ process.chdir(t2dir)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "."
+ , "main"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ t.equal(stdout.trim(), "index.js", "should print `index.js`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view .@", function (t) {
+ process.chdir(t2dir)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , ".@0.0.0"
+ , "version"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ t.equal(stdout.trim(), "0.0.0", "should print `0.0.0`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view .@ --json", function (t) {
+ process.chdir(t2dir)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , ".@0.0.0"
+ , "version"
+ , "--json"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ t.equal(stdout.trim(), "\"0.0.0\"", "should print `\"0.0.0\"`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view ", function (t) {
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "underscore"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ var re = new RegExp("name: 'underscore'")
+ t.similar(stdout, re, "should have name `underscore`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view --global", function(t) {
+ mr(common.port, function(s) {
+ common.npm([
+ "view"
+ , "underscore"
+ , "--global"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function(err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ var re = new RegExp("name: 'underscore'")
+ t.similar(stdout, re, "should have name `underscore`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("npm view --json", function(t) {
+ t.plan(3)
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "underscore"
+ , "--json"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ s.close()
+ try {
+ var out = JSON.parse(stdout.trim())
+ t.similar(out, {
+ maintainers: "jashkenas "
+ }, "should have the same maintainer")
+ }
+ catch (er) {
+ t.fail("Unable to parse JSON")
+ }
+ })
+ })
+})
+
+test("npm view ", function (t) {
+ mr(common.port, function (s) {
+ common.npm([
+ "view"
+ , "underscore"
+ , "homepage"
+ , "--registry=" + common.registry
+ ], { cwd: t2dir }, function (err, code, stdout) {
+ t.ifError(err, "view command finished successfully")
+ t.equal(code, 0, "exit ok")
+ t.equal(stdout.trim(), "http://underscorejs.org",
+ "homepage should equal `http://underscorejs.org`")
+ s.close()
+ t.end()
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(t1dir)
+ rimraf.sync(t2dir)
+ rimraf.sync(t3dir)
+ t.pass("cleaned up")
+ t.end()
+})
diff --git a/deps/npm/test/tap/zz-cleanup.js b/deps/npm/test/tap/zz-cleanup.js
new file mode 100644
index 0000000..7167537
--- /dev/null
+++ b/deps/npm/test/tap/zz-cleanup.js
@@ -0,0 +1,15 @@
+var common = require("../common-tap")
+var test = require("tap").test
+var fs = require("fs")
+
+test("cleanup", function (t) {
+ var res = common.deleteNpmCacheRecursivelySync()
+ t.equal(res, 0, "Deleted test npm cache successfully")
+
+ // ensure cache is clean
+ fs.readdir(common.npm_config_cache, function (err) {
+ t.ok(err, "error expected")
+ t.equal(err.code, "ENOENT", "npm cache directory no longer exists")
+ t.end()
+ })
+})