Marcin Cieslak <saper@saper.info>
João Reis <reis@janeasystems.com>
Matthew Hasbach <hasbach.git@gmail.com>
+Anna Henningsen <sqrt@entless.org>
+Jon Hall <jon_hall@outlook.com>
+### v2.14.4 (2015-09-10):
+
+#### THE GREAT NODEv4 SAGA
+
+So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's
+going to involve a number of things over in npm land. Most importantly, it's the
+last major release that will include the `2.x` branch of npm. That also means
+that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3`
+becomes our official `latest` release. You can most likely expect Node 5 to
+include `npm@3` by default, whenever that happens. We'll go into more detail
+about LTS at that point, as well, so keep your eyes peeled for announcements!
+
+#### NODE IS DEAD. LONG LIVE NODE!
+
+Node 4 being released means that a few things that used to be floating patches
+are finally making it right into npm proper. This week, we've got two such
+updates, both to dependencies:
+
+* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407)
+ `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and
+ io.js without extra patching
+ ([@rvagg](https://github.com/rvagg))
+
+[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a
+*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which
+mainly makes it so we're no longer monkey-patching `fs`. The following are all
+updates related to this:
+
+* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b)
+ `write-file-atomic@1.1.3`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09)
+ `tar@2.2.1`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b)
+ `read-package-json@2.0.1`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612)
+ `read-installed@4.0.3`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a)
+ `fstream@1.0.8`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a)
+ `fs-write-stream-atomic@1.0.4`
+ ([@thefourtheye](https://github.com/thefourtheye))
+* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47)
+ `fs-vacuum@1.2.7`
+ ([@thefourtheye](https://github.com/thefourtheye))
+
+#### OTHER PATCHES
+
+* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e)
+ [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on
+ Windows when using node pre-release/RC releases.
+ ([@jon-hall](https://github.com/jon-hall))
+* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59)
+ [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being
+ deprecated, so our only direct usage has been removed.
+ ([@ChALkeR](https://github.com/ChALkeR))
+
+#### MORE DEPENDENCIES!
+
+* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216)
+ `tap@1.4.1`
+ ([@isaacs](https://github.com/isaacs))
+* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3)
+ `which@1.1.2`: Added tests for Windows-related dead code that was previously
+ helping a silent failure happen. Travis stuff, too.
+ ([@isaacs](https://github.com/isaacs))
+
+#### DOC UPDATES
+
+* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510)
+ [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and
+ `.gitignore` are found and used by npm.
+ ([@addaleax](https://github.com/addaleax))
+* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a)
+ `nopt@3.0.4`: Minor clarifications to docs about how array and errors work.
+ ([@zkat](https://github.com/zkat))
+
### v2.14.3 (2015-09-03):
#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID.
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".
+You can also provide a ".npmignore" file in the root of your package or
+in subdirectories, 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`.
Certain files are always included, regardless of settings:
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.
+create an empty `.npmignore` file to override it. Like `git`, `npm` looks
+for `.npmignore` and `.gitignore` files in all subdirectories of your
+package, not only the root directory.
`.npmignore` files follow the [same pattern rules](http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files)
as `.gitignore` files:
<p>If you have a complaint about a package in the public npm registry,
and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
owner</a>, please email
-<a href="mailto:support@npmjs.com">support@npmjs.com</a> and explain the situation.</p>
+<a href="mailto:support@npmjs.com">support@npmjs.com</a> and explain the situation.</p>
<p>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.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@2.14.3</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-bin — npm@2.14.3</p>
+<p id="footer">npm-bin — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-bugs — npm@2.14.3</p>
+<p id="footer">npm-bugs — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-cache — npm@2.14.3</p>
+<p id="footer">npm-cache — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-commands — npm@2.14.3</p>
+<p id="footer">npm-commands — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-config — npm@2.14.3</p>
+<p id="footer">npm-config — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-deprecate — npm@2.14.3</p>
+<p id="footer">npm-deprecate — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-docs — npm@2.14.3</p>
+<p id="footer">npm-docs — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-edit — npm@2.14.3</p>
+<p id="footer">npm-edit — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-explore — npm@2.14.3</p>
+<p id="footer">npm-explore — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-help-search — npm@2.14.3</p>
+<p id="footer">npm-help-search — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-init — npm@2.14.3</p>
+<p id="footer">npm-init — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-install — npm@2.14.3</p>
+<p id="footer">npm-install — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-link — npm@2.14.3</p>
+<p id="footer">npm-link — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-load — npm@2.14.3</p>
+<p id="footer">npm-load — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-ls — npm@2.14.3</p>
+<p id="footer">npm-ls — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-outdated — npm@2.14.3</p>
+<p id="footer">npm-outdated — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-owner — npm@2.14.3</p>
+<p id="footer">npm-owner — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-pack — npm@2.14.3</p>
+<p id="footer">npm-pack — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-ping — npm@2.14.3</p>
+<p id="footer">npm-ping — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-prefix — npm@2.14.3</p>
+<p id="footer">npm-prefix — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-prune — npm@2.14.3</p>
+<p id="footer">npm-prune — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-publish — npm@2.14.3</p>
+<p id="footer">npm-publish — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-rebuild — npm@2.14.3</p>
+<p id="footer">npm-rebuild — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-repo — npm@2.14.3</p>
+<p id="footer">npm-repo — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-restart — npm@2.14.3</p>
+<p id="footer">npm-restart — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-root — npm@2.14.3</p>
+<p id="footer">npm-root — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-run-script — npm@2.14.3</p>
+<p id="footer">npm-run-script — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-search — npm@2.14.3</p>
+<p id="footer">npm-search — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-shrinkwrap — npm@2.14.3</p>
+<p id="footer">npm-shrinkwrap — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-start — npm@2.14.3</p>
+<p id="footer">npm-start — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-stop — npm@2.14.3</p>
+<p id="footer">npm-stop — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-tag — npm@2.14.3</p>
+<p id="footer">npm-tag — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-test — npm@2.14.3</p>
+<p id="footer">npm-test — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-uninstall — npm@2.14.3</p>
+<p id="footer">npm-uninstall — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-unpublish — npm@2.14.3</p>
+<p id="footer">npm-unpublish — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-update — npm@2.14.3</p>
+<p id="footer">npm-update — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-version — npm@2.14.3</p>
+<p id="footer">npm-version — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-view — npm@2.14.3</p>
+<p id="footer">npm-view — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-whoami — npm@2.14.3</p>
+<p id="footer">npm-whoami — npm@2.14.4</p>
npm.commands.install(["package"], cb)
})
</code></pre><h2 id="version">VERSION</h2>
-<p>2.14.3</p>
+<p>2.14.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>This is the API documentation for npm.
To find documentation of the command line
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm — npm@2.14.3</p>
+<p id="footer">npm — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-access — npm@2.14.3</p>
+<p id="footer">npm-access — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-adduser — npm@2.14.3</p>
+<p id="footer">npm-adduser — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-bin — npm@2.14.3</p>
+<p id="footer">npm-bin — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-bugs — npm@2.14.3</p>
+<p id="footer">npm-bugs — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-build — npm@2.14.3</p>
+<p id="footer">npm-build — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-bundle — npm@2.14.3</p>
+<p id="footer">npm-bundle — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-cache — npm@2.14.3</p>
+<p id="footer">npm-cache — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-completion — npm@2.14.3</p>
+<p id="footer">npm-completion — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-config — npm@2.14.3</p>
+<p id="footer">npm-config — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-dedupe — npm@2.14.3</p>
+<p id="footer">npm-dedupe — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-deprecate — npm@2.14.3</p>
+<p id="footer">npm-deprecate — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-dist-tag — npm@2.14.3</p>
+<p id="footer">npm-dist-tag — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-docs — npm@2.14.3</p>
+<p id="footer">npm-docs — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-edit — npm@2.14.3</p>
+<p id="footer">npm-edit — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-explore — npm@2.14.3</p>
+<p id="footer">npm-explore — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-help-search — npm@2.14.3</p>
+<p id="footer">npm-help-search — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-help — npm@2.14.3</p>
+<p id="footer">npm-help — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-init — npm@2.14.3</p>
+<p id="footer">npm-init — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-install — npm@2.14.3</p>
+<p id="footer">npm-install — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-link — npm@2.14.3</p>
+<p id="footer">npm-link — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-logout — npm@2.14.3</p>
+<p id="footer">npm-logout — npm@2.14.4</p>
limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre><code>npm@2.14.3 /path/to/npm
+<pre><code>npm@2.14.4 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-ls — npm@2.14.3</p>
+<p id="footer">npm-ls — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-outdated — npm@2.14.3</p>
+<p id="footer">npm-outdated — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-owner — npm@2.14.3</p>
+<p id="footer">npm-owner — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-pack — npm@2.14.3</p>
+<p id="footer">npm-pack — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-ping — npm@2.14.3</p>
+<p id="footer">npm-ping — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-prefix — npm@2.14.3</p>
+<p id="footer">npm-prefix — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-prune — npm@2.14.3</p>
+<p id="footer">npm-prune — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-publish — npm@2.14.3</p>
+<p id="footer">npm-publish — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-rebuild — npm@2.14.3</p>
+<p id="footer">npm-rebuild — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-repo — npm@2.14.3</p>
+<p id="footer">npm-repo — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-restart — npm@2.14.3</p>
+<p id="footer">npm-restart — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-rm — npm@2.14.3</p>
+<p id="footer">npm-rm — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-root — npm@2.14.3</p>
+<p id="footer">npm-root — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-run-script — npm@2.14.3</p>
+<p id="footer">npm-run-script — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-search — npm@2.14.3</p>
+<p id="footer">npm-search — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-shrinkwrap — npm@2.14.3</p>
+<p id="footer">npm-shrinkwrap — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-star — npm@2.14.3</p>
+<p id="footer">npm-star — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-stars — npm@2.14.3</p>
+<p id="footer">npm-stars — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-start — npm@2.14.3</p>
+<p id="footer">npm-start — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-stop — npm@2.14.3</p>
+<p id="footer">npm-stop — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-tag — npm@2.14.3</p>
+<p id="footer">npm-tag — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-team — npm@2.14.3</p>
+<p id="footer">npm-team — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-test — npm@2.14.3</p>
+<p id="footer">npm-test — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-uninstall — npm@2.14.3</p>
+<p id="footer">npm-uninstall — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-unpublish — npm@2.14.3</p>
+<p id="footer">npm-unpublish — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-update — npm@2.14.3</p>
+<p id="footer">npm-update — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-version — npm@2.14.3</p>
+<p id="footer">npm-version — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-view — npm@2.14.3</p>
+<p id="footer">npm-view — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-whoami — npm@2.14.3</p>
+<p id="footer">npm-whoami — npm@2.14.4</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm <command> [args]
</code></pre><h2 id="version">VERSION</h2>
-<p>2.14.3</p>
+<p>2.14.4</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
the issues list or ask on the mailing list.</p>
<ul>
<li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
-<li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
+<li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
</ul>
<h2 id="bugs">BUGS</h2>
<p>When you find issues, please report them:</p>
<li>web:
<a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
<li>email:
-<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
+<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
</ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn't work
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
-<a href="mailto:i@izs.me">i@izs.me</a></p>
+<a href="mailto:i@izs.me">i@izs.me</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm — npm@2.14.3</p>
+<p id="footer">npm — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-folders — npm@2.14.3</p>
+<p id="footer">npm-folders — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-folders — npm@2.14.3</p>
+<p id="footer">npm-folders — npm@2.14.4</p>
<p>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.)</p>
-<p>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".</p>
+<p>You can also provide a ".npmignore" file in the root of your package or
+in subdirectories, which will keep files from being included, even
+if they would be picked up by the files array. The <code>.npmignore</code> file
+works just like a <code>.gitignore</code>.</p>
<p>Certain files are always included, regardless of settings:</p>
<ul>
<li><code>package.json</code></li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">package.json — npm@2.14.3</p>
+<p id="footer">package.json — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npmrc — npm@2.14.3</p>
+<p id="footer">npmrc — npm@2.14.4</p>
<p>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.)</p>
-<p>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".</p>
+<p>You can also provide a ".npmignore" file in the root of your package or
+in subdirectories, which will keep files from being included, even
+if they would be picked up by the files array. The <code>.npmignore</code> file
+works just like a <code>.gitignore</code>.</p>
<p>Certain files are always included, regardless of settings:</p>
<ul>
<li><code>package.json</code></li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">package.json — npm@2.14.3</p>
+<p id="footer">package.json — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-index — npm@2.14.3</p>
+<p id="footer">npm-index — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-coding-style — npm@2.14.3</p>
+<p id="footer">npm-coding-style — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-config — npm@2.14.3</p>
+<p id="footer">npm-config — npm@2.14.4</p>
no <code>.npmignore</code> file, but there <em>is</em> a <code>.gitignore</code> file, then npm will
ignore the stuff matched by the <code>.gitignore</code> file. If you <em>want</em> to
include something that is excluded by your <code>.gitignore</code> file, you can
-create an empty <code>.npmignore</code> file to override it.</p>
+create an empty <code>.npmignore</code> file to override it. Like <code>git</code>, <code>npm</code> looks
+for <code>.npmignore</code> and <code>.gitignore</code> files in all subdirectories of your
+package, not only the root directory.</p>
<p><code>.npmignore</code> files follow the <a href="http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files">same pattern rules</a>
as <code>.gitignore</code> files:</p>
<ul>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-developers — npm@2.14.3</p>
+<p id="footer">npm-developers — npm@2.14.4</p>
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls <pkgname></code></li>
-<li>Email the author, CC <a href="mailto:support@npmjs.com">support@npmjs.com</a></li>
+<li>Email the author, CC <a href="mailto:support@npmjs.com">support@npmjs.com</a></li>
<li>After a few weeks, if there's no resolution, we'll sort it out.</li>
</ol>
<p>Don't squat on package names. Publish code or move out of the way.</p>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
-adds the npm support staff <a href="mailto:support@npmjs.com">support@npmjs.com</a> to the CC list of
+adds the npm support staff <a href="mailto:support@npmjs.com">support@npmjs.com</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>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
-<a href="mailto:support@npmjs.com">support@npmjs.com</a> and we'll sort it out. ("Reasonable" is
+<a href="mailto:support@npmjs.com">support@npmjs.com</a> and we'll sort it out. ("Reasonable" is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-disputes — npm@2.14.3</p>
+<p id="footer">npm-disputes — npm@2.14.4</p>
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
-<p>If the registry IS down, let us know by emailing <a href="mailto:support@npmjs.com">support@npmjs.com</a>
+<p>If the registry IS down, let us know by emailing <a href="mailto:support@npmjs.com">support@npmjs.com</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it's
down for the world (and not just on your local network) then we're
probably already being pinged about it.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-faq — npm@2.14.3</p>
+<p id="footer">npm-faq — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-index — npm@2.14.3</p>
+<p id="footer">npm-index — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-registry — npm@2.14.3</p>
+<p id="footer">npm-registry — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-scope — npm@2.14.3</p>
+<p id="footer">npm-scope — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">npm-scripts — npm@2.14.3</p>
+<p id="footer">npm-scripts — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">removing-npm — npm@2.14.3</p>
+<p id="footer">removing-npm — npm@2.14.4</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
-<p id="footer">semver — npm@2.14.3</p>
+<p id="footer">semver — npm@2.14.4</p>
, crypto
try {
- crypto = process.binding("crypto") && require("crypto")
+ crypto = require("crypto")
} catch (ex) {}
adduser.usage = "npm adduser\nThen enter stuff at the prompts"
}
function link (args, cb) {
- if (process.platform === "win32") {
- var semver = require("semver")
- if (!semver.satisfies(process.version, ">=0.7.9")) {
- var msg = "npm link not supported on windows prior to node 0.7.9"
- , e = new Error(msg)
- e.code = "ENOTSUP"
- e.errno = require("constants").ENOTSUP
+ if (process.platform === 'win32') {
+ var semver = require('semver')
+ if (!semver.gte(process.version, '0.7.9')) {
+ var msg = 'npm link not supported on windows prior to node 0.7.9'
+ var e = new Error(msg)
+ e.code = 'ENOTSUP'
+ e.errno = require('constants').ENOTSUP
return cb(e)
}
}
.P
.RS 2
.nf
-npm@2.14.3 /path/to/npm
+npm@2.14.4 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
.RE
.SH VERSION
.P
-2.14.3
+2.14.4
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
.RE
.SH VERSION
.P
-2.14.3
+2.14.4
.SH DESCRIPTION
.P
This is the API documentation for npm\.
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\.)
.P
-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"\.
+You can also provide a "\.npmignore" file in the root of your package or
+in subdirectories, which will keep files from being included, even
+if they would be picked up by the files array\. The \fB\|\.npmignore\fP file
+works just like a \fB\|\.gitignore\fP\|\.
.P
Certain files are always included, regardless of settings:
.RS 0
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\.)
.P
-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"\.
+You can also provide a "\.npmignore" file in the root of your package or
+in subdirectories, which will keep files from being included, even
+if they would be picked up by the files array\. The \fB\|\.npmignore\fP file
+works just like a \fB\|\.gitignore\fP\|\.
.P
Certain files are always included, regardless of settings:
.RS 0
no \fB\|\.npmignore\fP file, but there \fIis\fR a \fB\|\.gitignore\fP file, then npm will
ignore the stuff matched by the \fB\|\.gitignore\fP file\. If you \fIwant\fR to
include something that is excluded by your \fB\|\.gitignore\fP file, you can
-create an empty \fB\|\.npmignore\fP file to override it\.
+create an empty \fB\|\.npmignore\fP file to override it\. Like \fBgit\fP, \fBnpm\fP looks
+for \fB\|\.npmignore\fP and \fB\|\.gitignore\fP files in all subdirectories of your
+package, not only the root directory\.
.P
\fB\|\.npmignore\fP files follow the same pattern rules \fIhttp://git\-scm\.com/book/en/v2/Git\-Basics\-Recording\-Changes\-to\-the\-Repository#Ignoring\-Files\fR
as \fB\|\.gitignore\fP files:
+++ /dev/null
-../node-gyp/bin/node-gyp.js
\ No newline at end of file
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "_args": [
- [
- "graceful-fs@^3.0.2",
- "/Users/isaacs/dev/npm/npm/node_modules/fs-vacuum"
- ]
- ],
- "_from": "graceful-fs@>=3.0.2 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/fs-vacuum/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@^3.0.2",
- "rawSpec": "^3.0.2",
- "scope": null,
- "spec": ">=3.0.2 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/fs-vacuum"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@^3.0.2",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/fs-vacuum",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
{
"name": "fs-vacuum",
- "version": "1.2.6",
+ "version": "1.2.7",
"description": "recursively remove empty directories -- to a point",
"main": "vacuum.js",
"scripts": {
"tmp": "0.0.24"
},
"dependencies": {
- "graceful-fs": "^3.0.2",
+ "graceful-fs": "^4.1.2",
"path-is-inside": "^1.0.1",
"rimraf": "^2.2.8"
},
- "gitHead": "04b5093ac6fbcc4135835fb1c4ed990dfed5a04c",
- "_id": "fs-vacuum@1.2.6",
- "_shasum": "860c5e4b3e3aa2a6a3cbb327c57534f3a3bff642",
- "_from": "fs-vacuum@>=1.2.5 <1.3.0",
- "_npmVersion": "2.10.1",
- "_nodeVersion": "2.0.2",
- "_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- "dist": {
- "shasum": "860c5e4b3e3aa2a6a3cbb327c57534f3a3bff642",
- "tarball": "http://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.6.tgz"
- },
- "maintainers": [
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.6.tgz"
+ "readme": "# fs-vacuum\n\nRemove the empty branches of a directory tree, optionally up to (but not\nincluding) a specified base directory. Optionally nukes the leaf directory.\n\n## Usage\n\n```javascript\nvar logger = require(\"npmlog\");\nvar vacuum = require(\"fs-vacuum\");\n\nvar options = {\n base : \"/path/to/my/tree/root\",\n purge : true,\n log : logger.silly.bind(logger, \"myCleanup\")\n};\n\n/* Assuming there are no other files or directories in \"out\", \"to\", or \"my\",\n * the final path will just be \"/path/to/my/tree/root\".\n */\nvacuum(\"/path/to/my/tree/root/out/to/my/files\", function (error) {\n if (error) console.error(\"Unable to cleanly vacuum:\", error.message);\n});\n```\n# vacuum(directory, options, callback)\n\n* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.**\n* `options` {Object}\n * `base` {String} No directories at or above this level of the filesystem will be removed.\n * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents.\n * `log` {Function} A logging function that takes `npmlog`-compatible argument lists.\n* `callback` {Function} Function to call once vacuuming is complete.\n * `error` {Error} What went wrong along the way, if anything.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "498a44d987ee11bc355fe1ec479d55a689fc37ef",
+ "_id": "fs-vacuum@1.2.7",
+ "_shasum": "75e501f9d2889ba2fe9fe12f936ba5dad50ca35a",
+ "_from": "fs-vacuum@1.2.7"
}
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "_args": [
- [
- "graceful-fs@^3.0.2",
- "/Users/isaacs/dev/npm/npm/node_modules/fs-write-stream-atomic"
- ]
- ],
- "_from": "graceful-fs@>=3.0.2 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/fs-write-stream-atomic/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@^3.0.2",
- "rawSpec": "^3.0.2",
- "scope": null,
- "spec": ">=3.0.2 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/fs-write-stream-atomic"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@^3.0.2",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/fs-write-stream-atomic",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
{
"name": "fs-write-stream-atomic",
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "Like `fs.createWriteStream(...)`, but atomic.",
"main": "index.js",
"directories": {
"test": "test"
},
"dependencies": {
- "graceful-fs": "^3.0.2"
+ "graceful-fs": "^4.1.2"
},
"devDependencies": {
- "tap": "^0.4.12"
+ "tap": "^1.2.0"
},
"scripts": {
"test": "tap test/*.js"
},
"repository": {
"type": "git",
- "url": "https://github.com/npm/fs-write-stream-atomic"
+ "url": "git+https://github.com/npm/fs-write-stream-atomic.git"
},
"author": {
"name": "Isaac Z. Schlueter",
"url": "https://github.com/npm/fs-write-stream-atomic/issues"
},
"homepage": "https://github.com/npm/fs-write-stream-atomic",
- "gitHead": "78573c09271f3ec672740862dad80be3d75e1963",
- "_id": "fs-write-stream-atomic@1.0.3",
- "_shasum": "c8fe17f66d7d3f50e9aee59195c358e7710372cc",
- "_from": "fs-write-stream-atomic@1.0.3",
- "_npmVersion": "2.7.6",
- "_nodeVersion": "1.6.2",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
- },
- "dist": {
- "shasum": "c8fe17f66d7d3f50e9aee59195c358e7710372cc",
- "tarball": "http://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.3.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "iarna",
- "email": "me@re-becca.org"
- }
- ],
- "_resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.3.tgz"
+ "readme": "# fs-write-stream-atomic\n\nLike `fs.createWriteStream(...)`, but atomic.\n\nWrites to a tmp file and does an atomic `fs.rename` to move it into\nplace when it's done.\n\nFirst rule of debugging: **It's always a race condition.**\n\n## USAGE\n\n```javascript\nvar fsWriteStreamAtomic = require('fs-write-stream-atomic')\n// options are optional.\nvar write = fsWriteStreamAtomic('output.txt', options)\nvar read = fs.createReadStream('input.txt')\nread.pipe(write)\n\n// When the write stream emits a 'finish' or 'close' event,\n// you can be sure that it is moved into place, and contains\n// all the bytes that were written to it, even if something else\n// was writing to `output.txt` at the same time.\n```\n\n### `fsWriteStreamAtomic(filename, [options])`\n\n* `filename` {String} The file we want to write to\n* `options` {Object}\n * `chown` {Object} User and group to set ownership after write\n * `uid` {Number}\n * `gid` {Number}\n * `encoding` {String} default = 'utf8'\n * `mode` {Number} default = `0666`\n * `flags` {String} default = `'w'`\n\n",
+ "readmeFilename": "README.md",
+ "gitHead": "6ca2651b913149543c5390c6c4f7d370bdca42b5",
+ "_id": "fs-write-stream-atomic@1.0.4",
+ "_shasum": "c1ea55889f036ceebdead7d1055edbad998fe5e9",
+ "_from": "fs-write-stream-atomic@1.0.4"
}
test('name too long', function (t) {
var stream = writeStream(target)
+ var hadError = false
stream.on('error', function (er) {
- t.is(er.code, 'ENAMETOOLONG', target.length + " character name results in ENAMETOOLONG")
+ if (!hadError) {
+ t.is(er.code, 'ENAMETOOLONG', target.length + " character name results in ENAMETOOLONG")
+ hadError = true
+ }
})
stream.on('close', function () {
t.end()
})
stream.end()
-})
\ No newline at end of file
+})
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "_args": [
- [
- "graceful-fs@3",
- "/Users/isaacs/dev/npm/npm/node_modules/fstream"
- ]
- ],
- "_from": "graceful-fs@>=3.0.0 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/fstream/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@3",
- "rawSpec": "3",
- "scope": null,
- "spec": ">=3.0.0 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/fstream"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@3",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/fstream",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
},
"name": "fstream",
"description": "Advanced file system stream things",
- "version": "1.0.7",
+ "version": "1.0.8",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
"node": ">=0.6"
},
"dependencies": {
- "graceful-fs": "3",
+ "graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
"license": "ISC",
"readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n",
"readmeFilename": "README.md",
- "gitHead": "586e8efc1cf77883f6c22fc32a7cb38f0eb88911",
+ "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2",
"bugs": {
"url": "https://github.com/isaacs/fstream/issues"
},
"homepage": "https://github.com/isaacs/fstream#readme",
- "_id": "fstream@1.0.7",
- "_shasum": "455a1aa1d46077668d95b6d27838e1b1daa78c78",
- "_from": "fstream@>=1.0.7 <1.1.0"
+ "_id": "fstream@1.0.8",
+ "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038",
+ "_from": "fstream@1.0.8"
}
-v3.0.3 2015-09-14
-
-* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729)
-
-v3.0.2 2015-09-12
-
-* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723)
-* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722)
-
v3.0.1 2015-09-08
* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716)
[windows-python]: http://www.python.org/getit/windows
[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download
-[msvc2013]: http://www.microsoft.com/en-gb/download/details.aspx?id=44914
+[msvc2013]: http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs
[win7sdk]: http://www.microsoft.com/en-us/download/details.aspx?id=8279
[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422
// file names. Inputs come from command-line switches (--target, --dist-url),
// `process.version` and `process.release` where it exists.
function processRelease (argv, gyp, defaultVersion, defaultRelease) {
- var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
+ var version = argv[0] || gyp.opts.target || defaultVersion
, versionSemver = semver.parse(version)
, overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
, isDefaultVersion
, baseUrl
, libUrl32
, libUrl64
- , tarballUrl
if (!versionSemver) {
// not a valid semver string, nothing we can do
} else {
// old node or alternative --target=
// semver.satisfies() doesn't like prerelease tags so test major directly
- isIojs = versionSemver.major >= 1 && versionSemver.major < 4
+ isIojs = versionSemver.major >= 1 & versionSemver.major < 4
name = isIojs ? 'iojs' : 'node'
}
"tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
}
+++ /dev/null
-{
- "laxbreak": true
-}
"tarball": "http://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz"
}
"tarball": "http://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz"
}
"tarball": "http://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz"
}
"bindings",
"gyp"
],
- "version": "3.0.3",
+ "version": "3.0.1",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
"scripts": {
"test": "tape test/test-*"
},
- "gitHead": "d6b03851d366c7fa78e7d2f57c61bb074ea45ea3",
+ "gitHead": "112afb4466eafe8bf9d7c72cfac94222d952c370",
"bugs": {
"url": "https://github.com/nodejs/node-gyp/issues"
},
"homepage": "https://github.com/nodejs/node-gyp",
- "_id": "node-gyp@3.0.3",
- "_shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
- "_from": "node-gyp@>=3.0.3 <3.1.0",
+ "_id": "node-gyp@3.0.1",
+ "_shasum": "597a2069786a443add5eecffc160f5d6c7045cd7",
+ "_from": "node-gyp@3.0.1",
"_npmVersion": "2.14.2",
- "_nodeVersion": "4.0.0",
+ "_nodeVersion": "4.0.0-rc.4",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
}
],
"dist": {
- "shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694",
- "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz"
+ "shasum": "597a2069786a443add5eecffc160f5d6c7045cd7",
+ "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.0.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz"
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.0.1.tgz"
}
})
})
-
-test('test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]', function (t) {
- t.plan(2)
-
- // additional arguments can be passed in on the commandline that should be ignored if they
- // are not specifying a valid version @ position 0
- var release = processRelease([ 'this is no version!' ], { opts: {} }, 'v4.0.0-rc.4', {
- name: 'node',
- headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.0.0-rc.4')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.0.0-rc.4',
- name: 'node',
- baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
- tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
- versionDir: '4.0.0-rc.4',
- libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib',
- libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib',
- libPath32: 'win-x86/node.lib',
- libPath64: 'win-x64/node.lib'
- })
-})
, "bloo" : [ "big", "medium", "small" ]
, "flag" : Boolean
, "pick" : Boolean
- , "many" : [String, Array]
+ , "many1" : [String, Array]
+ , "many2" : [path]
}
, shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
, "b7" : ["--bar", "7"]
# values, and will always be an array. The other types provided
# specify what types are allowed in the list.
-$ node my-program.js --many 1 --many null --many foo
-{ many: ["1", "null", "foo"] }
+$ node my-program.js --many1 5 --many1 null --many1 foo
+{ many1: ["5", "null", "foo"] }
-$ node my-program.js --many foo
-{ many: ["foo"] }
+$ node my-program.js --many2 foo --many2 bar
+{ many2: ["/path/to/foo", "path/to/bar"] }
```
Read the tests at the bottom of `lib/nopt.js` for more examples of
## Error Handling
-By default, nopt outputs a warning to standard error when invalid
-options are found. You can change this behavior by assigning a method
+By default, nopt outputs a warning to standard error when invalid values for
+known options are found. You can change this behavior by assigning a method
to `nopt.invalidHandler`. This method will be called with
the offending `nopt.invalidHandler(key, val, types)`.
{
"name": "nopt",
- "version": "3.0.3",
+ "version": "3.0.4",
"description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
"author": {
"name": "Isaac Z. Schlueter",
"devDependencies": {
"tap": "^1.2.0"
},
- "gitHead": "f64a64cd48d9f2660dd4e59191ff46a26397d6b1",
+ "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you hit the limit of your frustration just trying to\nmanage them all, and defer it with duct-tape solutions until you see\nexactly to the core of the problem, and finally snap and write an\nawesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many1\" : [String, Array]\n , \"many2\" : [path]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk -fp # unknown opts are ok.\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many1 5 --many1 null --many1 foo\n{ many1: [\"5\", \"null\", \"foo\"] }\n\n$ node my-program.js --many2 foo --many2 bar\n{ many2: [\"/path/to/foo\", \"path/to/bar\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid values for\nknown options are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "f52626631ea1afef5a6dd9acf23ddd1466831a08",
"bugs": {
"url": "https://github.com/isaacs/nopt/issues"
},
"homepage": "https://github.com/isaacs/nopt#readme",
- "_id": "nopt@3.0.3",
- "_shasum": "0e9978f33016bae0b75e3748c03bbbb71da5c530",
- "_from": "nopt@>=3.0.3 <3.1.0",
- "_npmVersion": "2.12.0",
- "_nodeVersion": "2.2.1",
- "_npmUser": {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- },
- "dist": {
- "shasum": "0e9978f33016bae0b75e3748c03bbbb71da5c530",
- "tarball": "http://registry.npmjs.org/nopt/-/nopt-3.0.3.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.3.tgz"
+ "_id": "nopt@3.0.4",
+ "_shasum": "dd63bc9c72a6e4e85b85cdc0ca314598facede5e",
+ "_from": "nopt@3.0.4"
}
"main": "debuglog.js",
"repository": {
"type": "git",
- "url": "git+https://github.com/sam-github/node-debuglog.git"
+ "url": "https://github.com/sam-github/node-debuglog.git"
},
"author": {
"name": "Sam Roberts",
],
"directories": {},
"_shasum": "aa24ffb9ac3df9a2351837cfb2d279360cd78492",
- "_resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz"
}
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "name": "graceful-fs",
- "description": "A drop-in replacement for fs, making various improvements.",
- "version": "3.0.8",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "main": "graceful-fs.js",
- "engines": {
- "node": ">=0.4.0"
- },
- "directories": {
- "test": "test"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "keywords": [
- "fs",
- "module",
- "reading",
- "retry",
- "retries",
- "queue",
- "error",
- "errors",
- "handling",
- "EMFILE",
- "EAGAIN",
- "EINVAL",
- "EPERM",
- "EACCESS"
- ],
- "license": "ISC",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "_id": "graceful-fs@3.0.8",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_from": "graceful-fs@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0",
- "_npmVersion": "2.10.1",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "readme": "ERROR: No README data found!"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
--- /dev/null
+language: node_js
+before_script: npm install -g npm@latest
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
{
"name": "readdir-scoped-modules",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Like `fs.readdir` but handling `@org/module` dirs as if they were a single entry.",
"main": "readdir.js",
"directories": {
"dependencies": {
"debuglog": "^1.0.1",
"dezalgo": "^1.0.0",
- "graceful-fs": "^3.0.4",
+ "graceful-fs": "^4.1.2",
"once": "^1.3.0"
},
"devDependencies": {
- "tap": "0.4"
+ "tap": "^1.2.0"
},
"scripts": {
"test": "tap test/*.js"
"url": "https://github.com/npm/readdir-scoped-modules/issues"
},
"homepage": "https://github.com/npm/readdir-scoped-modules",
- "gitHead": "451d38946c5b6b6c0db33a890f33536a11ed79f7",
- "_id": "readdir-scoped-modules@1.0.1",
- "_shasum": "5c2a77f3e08250a8fddf53fa58cdc17900b808b9",
- "_from": "readdir-scoped-modules@>=1.0.0 <2.0.0",
- "_npmVersion": "2.1.9",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "dist": {
- "shasum": "5c2a77f3e08250a8fddf53fa58cdc17900b808b9",
- "tarball": "http://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.1.tgz"
- },
- "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "readme": "# readdir-scoped-modules\n\nLike `fs.readdir` but handling `@org/module` dirs as if they were\na single entry.\n\nUsed by npm.\n\n## USAGE\n\n```javascript\nvar readdir = require('readdir-scoped-modules')\n\nreaddir('node_modules', function (er, entries) {\n // entries will be something like\n // ['a', '@org/foo', '@org/bar']\n})\n```\n",
+ "readmeFilename": "README.md",
+ "gitHead": "d41d5de877cb4e9e3f14b92913132680af73d1b4",
+ "_id": "readdir-scoped-modules@1.0.2",
+ "_shasum": "9fafa37d286be5d92cbaebdee030dc9b5f406747",
+ "_from": "readdir-scoped-modules@>=1.0.0 <2.0.0"
}
{
"name": "read-installed",
"description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
- "version": "4.0.2",
+ "version": "4.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read-installed.git"
"semver": "2 || 3 || 4 || 5",
"slide": "~1.1.3",
"util-extend": "^1.0.1",
- "graceful-fs": "2 || 3"
+ "graceful-fs": "^4.1.2"
},
"optionalDependencies": {
- "graceful-fs": "2 || 3"
+ "graceful-fs": "^4.1.2"
},
"author": {
"name": "Isaac Z. Schlueter",
},
"readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## 2.0.0\n\nBreaking changes in `2.0.0`:\n\nThe second argument is now an `Object` that contains the following keys:\n\n * `depth` optional, defaults to Infinity\n * `log` optional log Function\n * `dev` optional, default false, set to true to include devDependencies\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// optional options\nvar options = { dev: false, log: fn, depth: 2 }\nreadInstalled(folder, options, function (er, data) {\n ...\n})\n```\n",
"readmeFilename": "README.md",
- "gitHead": "e683eb7f2bb8e9b7b40c1e26192b385b92a3192f",
+ "gitHead": "da02df6acdb5f5ee31d8c637ef31fb50efb455c1",
"bugs": {
"url": "https://github.com/isaacs/read-installed/issues"
},
"homepage": "https://github.com/isaacs/read-installed#readme",
- "_id": "read-installed@4.0.2",
- "_shasum": "4e8b18be974ccb75654b28ddcc9aac686404690e",
- "_from": "read-installed@>=4.0.2 <4.1.0"
+ "_id": "read-installed@4.0.3",
+ "_shasum": "ff9b8b67f187d1e4c29b9feb31f6b223acd19067",
+ "_from": "read-installed@4.0.3"
}
--- /dev/null
+language: node_js
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
+sudo: false
+before_install:
+ - npm install -g npm@latest
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "_args": [
- [
- "graceful-fs@2 || 3",
- "/Users/isaacs/dev/npm/npm/node_modules/read-package-json"
- ]
- ],
- "_from": "graceful-fs@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/read-package-json/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@2 || 3",
- "rawSpec": "2 || 3",
- "scope": null,
- "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/read-package-json"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@2 || 3",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/read-package-json",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
},
"repository": {
"type": "git",
- "url": "git://github.com/rlidwka/jju"
+ "url": "git://github.com/rlidwka/jju.git"
},
"bugs": {
"url": "https://github.com/rlidwka/jju/issues"
},
"repository": {
"type": "git",
- "url": "https://github.com/smikes/json-parse-helpfulerror.git"
+ "url": "git+https://github.com/smikes/json-parse-helpfulerror.git"
},
"keywords": [
"json",
{
"name": "read-package-json",
- "version": "2.0.0",
+ "version": "2.0.1",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"glob": "^5.0.3",
"json-parse-helpfulerror": "^1.0.2",
"normalize-package-data": "^2.0.0",
- "graceful-fs": "2 || 3"
+ "graceful-fs": "^4.1.2"
},
"devDependencies": {
"standard": "^3.3.1",
- "tap": "^0.7.1"
+ "tap": "^1.2.0"
},
"optionalDependencies": {
- "graceful-fs": "2 || 3"
+ "graceful-fs": "^4.1.2"
},
"license": "ISC",
- "gitHead": "1a0476fef4ed8a70b48bfdc90070d897b8ad5469",
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n});\n```\n\n## readJson(file, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
"readmeFilename": "README.md",
+ "gitHead": "d4f9f52c823750e7f2a7b9069bc56b9fd3a0ee96",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
- "homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@2.0.0",
- "_shasum": "ca7543298275028d27064b9118e6e501c9b3ae41",
- "_from": "read-package-json@>=2.0.0 <2.1.0"
+ "homepage": "https://github.com/isaacs/read-package-json#readme",
+ "_id": "read-package-json@2.0.1",
+ "_shasum": "b822abfc2c4f0abfe7f52de6448be4560b6e7053",
+ "_from": "read-package-json@2.0.1"
}
},
"version": "0.0.1",
"readme": "hello world",
- "bin": "./bin/typo"
+ "bin": "./bin/typo",
+ "license": "ISC"
}
},
"version": "0.0.1",
"readme": "hello world",
- "bin": "./bin/echo"
+ "bin": "./bin/echo",
+ "license": "ISC"
}
},
"version": "0.0.1",
"readme": "hello world",
- "bin": {}
+ "bin": {},
+ "license": "ISC"
}
--- /dev/null
+{
+ "env": {
+ "node": true
+ },
+ "rules": {
+ // 2-space indentation
+ "indent": [2, 2],
+ // 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,
+ // Allow multi spaces around operators since they are
+ // used for alignment. This is not consistent in the
+ // code.
+ "no-multi-spaces": 0,
+ // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses:
+ //
+ // {
+ // beforeColon : true,
+ // afterColon : true
+ // }
+ //
+ // eslint can't handle this, so the check is disabled.
+ "key-spacing": 0,
+ // Allow shadowing vars in outer scope (needs discussion)
+ "no-shadow": 0,
+ // Use if () { }
+ // ^ space
+ "space-after-keywords": [2, "always"],
+ // Use if () { }
+ // ^ space
+ "space-before-blocks": [2, "always"]
+ }
+}
--- /dev/null
+{
+ "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
--- /dev/null
+{
+ "env": {
+ "browser": false,
+ "node": true,
+ "amd": false,
+ "mocha": false,
+ "jasmine": false
+ },
+
+ "rules": {
+ "accessor-pairs": [2, { getWithoutSet: false, setWithoutGet: true }],
+ "array-bracket-spacing": [2, "never", {
+ "singleValue": false,
+ "objectsInArrays": false,
+ "arraysInArrays": false
+ }],
+ "block-scoped-var": [0],
+ "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+ "camelcase": [2],
+ "comma-dangle": [2, "never"],
+ "comma-spacing": [2],
+ "comma-style": [2, "last"],
+ "complexity": [2, 15],
+ "computed-property-spacing": [2, "never"],
+ "consistent-return": [2],
+ "consistent-this": [0, "that"],
+ "constructor-super": [2],
+ "curly": [2, "all"],
+ "default-case": [2],
+ "dot-notation": [2, { "allowKeywords": true }],
+ "eol-last": [2],
+ "eqeqeq": [2],
+ "func-names": [0],
+ "func-style": [2, "expression"],
+ "generator-star-spacing": [2, { "before": false, "after": true }],
+ "global-strict": [0, "never"],
+ "guard-for-in": [0],
+ "handle-callback-err": [0],
+ "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
+ "linebreak-style": [2, "unix"],
+ "lines-around-comment": [2, {
+ "beforeBlockComment": false,
+ "afterBlockComment": false,
+ "beforeLineComment": false,
+ "beforeLineComment": false,
+ "allowBlockStart": true,
+ "allowBlockEnd": true
+ }],
+ "quotes": [2, "single", "avoid-escape"],
+ "max-depth": [1, 4],
+ "max-len": [0, 80, 4],
+ "max-nested-callbacks": [2, 2],
+ "max-params": [2, 2],
+ "max-statements": [2, 21],
+ "new-parens": [2],
+ "new-cap": [2],
+ "newline-after-var": [0],
+ "no-alert": [2],
+ "no-array-constructor": [2],
+ "no-bitwise": [0],
+ "no-caller": [2],
+ "no-catch-shadow": [2],
+ "no-cond-assign": [2],
+ "no-console": [2],
+ "no-constant-condition": [2],
+ "no-continue": [2],
+ "no-control-regex": [2],
+ "no-debugger": [2],
+ "no-delete-var": [2],
+ "no-div-regex": [0],
+ "no-dupe-args": [2],
+ "no-dupe-keys": [2],
+ "no-duplicate-case": [2],
+ "no-else-return": [0],
+ "no-empty": [2],
+ "no-empty-character-class": [2],
+ "no-empty-label": [2],
+ "no-eq-null": [0],
+ "no-eval": [2],
+ "no-ex-assign": [2],
+ "no-extend-native": [2],
+ "no-extra-bind": [2],
+ "no-extra-boolean-cast": [2],
+ "no-extra-parens": [0],
+ "no-extra-semi": [2],
+ "no-fallthrough": [2],
+ "no-floating-decimal": [2],
+ "no-func-assign": [2],
+ "no-implied-eval": [2],
+ "no-inline-comments": [0],
+ "no-inner-declarations": [2, "functions"],
+ "no-invalid-regexp": [2],
+ "no-irregular-whitespace": [2],
+ "no-iterator": [2],
+ "no-label-var": [2],
+ "no-labels": [2],
+ "no-lone-blocks": [2],
+ "no-lonely-if": [2],
+ "no-loop-func": [2],
+ "no-mixed-requires": [0, false],
+ "no-mixed-spaces-and-tabs": [2, false],
+ "no-multi-spaces": [2],
+ "no-multi-str": [2],
+ "no-multiple-empty-lines": [2, {"max": 1}],
+ "no-native-reassign": [2],
+ "no-negated-in-lhs": [2],
+ "no-nested-ternary": [0],
+ "no-new": [2],
+ "no-new-func": [2],
+ "no-new-object": [2],
+ "no-new-require": [0],
+ "no-new-wrappers": [2],
+ "no-obj-calls": [2],
+ "no-octal": [2],
+ "no-octal-escape": [2],
+ "no-param-reassign": [2],
+ "no-path-concat": [0],
+ "no-plusplus": [0],
+ "no-process-env": [0],
+ "no-process-exit": [2],
+ "no-proto": [2],
+ "no-redeclare": [2],
+ "no-regex-spaces": [2],
+ "no-reserved-keys": [2],
+ "no-restricted-modules": [0],
+ "no-return-assign": [2, "always"],
+ "no-script-url": [2],
+ "no-self-compare": [0],
+ "no-sequences": [2],
+ "no-shadow": [2],
+ "no-shadow-restricted-names": [2],
+ "no-space-before-semi": [2],
+ "no-spaced-func": [2],
+ "no-sparse-arrays": [2],
+ "no-sync": [0],
+ "no-ternary": [0],
+ "no-this-before-super": [2],
+ "no-throw-literal": [2],
+ "no-trailing-spaces": [2, { "skipBlankLines": false }],
+ "no-undef": [2],
+ "no-undef-init": [2],
+ "no-undefined": [0],
+ "no-underscore-dangle": [2],
+ "no-unexpected-multiline": [2],
+ "no-unneeded-ternary": [2],
+ "no-unreachable": [2],
+ "no-unused-expressions": [2],
+ "no-unused-vars": [2, { "vars": "all", "args": "after-used" }],
+ "no-use-before-define": [2],
+ "no-void": [0],
+ "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
+ "no-with": [2],
+ "no-wrap-func": [2],
+ "object-curly-spacing": [2, "always"],
+ "object-shorthand": [2, "never"],
+ "one-var": [0],
+ "operator-assignment": [0, "always"],
+ "operator-linebreak": [2, "none"],
+ "padded-blocks": [0],
+ "prefer-const": [0],
+ "quote-props": [0],
+ "radix": [0],
+ "semi": [2],
+ "semi-spacing": [2, { "before": false, "after": true }],
+ "sort-vars": [0],
+ "space-after-keywords": [2, "always"],
+ "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
+ "space-before-blocks": [0, "always"],
+ "space-in-brackets": [0, "never", {
+ "singleValue": true,
+ "arraysInArrays": false,
+ "arraysInObjects": false,
+ "objectsInArrays": true,
+ "objectsInObjects": true,
+ "propertyName": false
+ }],
+ "space-in-parens": [2, "never"],
+ "space-infix-ops": [2],
+ "space-return-throw-case": [2],
+ "space-unary-ops": [2, { "words": true, "nonwords": false }],
+ "spaced-comment": [2, "always"],
+ "spaced-line-comment": [0, "always"],
+ "strict": [2, "global"],
+ "use-isnan": [2],
+ "valid-jsdoc": [0],
+ "valid-typeof": [2],
+ "vars-on-top": [0],
+ "wrap-iife": [2],
+ "wrap-regex": [2],
+ "yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }]
+ }
+}
--- /dev/null
+{
+ "maxdepth": 4,
+ "maxstatements": 200,
+ "maxcomplexity": 12,
+ "maxlen": 80,
+ "maxparams": 5,
+
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": false,
+ "noarg": true,
+ "noempty": true,
+ "nonew": true,
+ "undef": true,
+ "unused": "vars",
+ "trailing": true,
+
+ "quotmark": true,
+ "expr": true,
+ "asi": true,
+
+ "browser": false,
+ "esnext": true,
+ "devel": false,
+ "node": false,
+ "nonstandard": false,
+
+ "predef": ["require", "module", "__dirname", "__filename"]
+}
--- /dev/null
+{
+ "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
{
+ "node": true,
"asi": true,
"laxcomma": true
}
},
"name": "tar",
"description": "tar for node",
- "version": "2.2.0",
+ "version": "2.2.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
"inherits": "2"
},
"devDependencies": {
- "graceful-fs": "^3.0.2",
+ "graceful-fs": "^4.1.2",
"rimraf": "1.x",
"tap": "0.x",
"mkdirp": "^0.5.0"
},
"license": "ISC",
- "gitHead": "3cab63959c51451a84cc8d1f8ef02d45b8b4f836",
+ "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'. If the `fromBase` property is set to true,\nthe tar will contain files relative to the path passed, and not with\nthe path included.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "52237e39d2eb68d22a32d9a98f1d762189fe6a3d",
"bugs": {
"url": "https://github.com/isaacs/node-tar/issues"
},
"homepage": "https://github.com/isaacs/node-tar#readme",
- "_id": "tar@2.2.0",
- "_shasum": "527c595940b9673f386c7237759982ab2f274d08",
- "_from": "tar@>=2.2.0 <2.3.0",
- "_npmVersion": "2.13.4",
- "_nodeVersion": "0.12.4",
- "_npmUser": {
- "name": "soldair",
- "email": "soldair@gmail.com"
- },
- "dist": {
- "shasum": "527c595940b9673f386c7237759982ab2f274d08",
- "tarball": "http://registry.npmjs.org/tar/-/tar-2.2.0.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- },
- {
- "name": "soldair",
- "email": "soldair@gmail.com"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.0.tgz"
+ "_id": "tar@2.2.1",
+ "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1",
+ "_from": "tar@2.2.1"
}
--- /dev/null
+language: node_js
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
+before_install:
+ - npm install -g npm@latest
},
"name": "which",
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "version": "1.1.1",
+ "version": "1.1.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-which.git"
"scripts": {
"test": "tap test/*.js"
},
- "gitHead": "c80a08e9f8cf7a5c0f39c2e2f87f18f153b118a8",
+ "gitHead": "e576e42f0c377571884f844eec58b3ca4a331681",
"bugs": {
"url": "https://github.com/isaacs/node-which/issues"
},
"homepage": "https://github.com/isaacs/node-which#readme",
- "_id": "which@1.1.1",
- "_shasum": "9ce512459946166e12c083f08ec073380fc8cbbb",
- "_from": "which@>=1.1.1 <1.2.0",
- "_npmVersion": "2.9.1",
- "_nodeVersion": "2.0.1",
+ "_id": "which@1.1.2",
+ "_shasum": "486c48af6dfecc7a7dcf9c655acf108d2dcbdf3d",
+ "_from": "which@1.1.2",
+ "_npmVersion": "3.3.1",
+ "_nodeVersion": "2.5.0",
"_npmUser": {
"name": "isaacs",
"email": "isaacs@npmjs.com"
},
"dist": {
- "shasum": "9ce512459946166e12c083f08ec073380fc8cbbb",
- "tarball": "http://registry.npmjs.org/which/-/which-1.1.1.tgz"
+ "shasum": "486c48af6dfecc7a7dcf9c655acf108d2dcbdf3d",
+ "tarball": "http://registry.npmjs.org/which/-/which-1.1.2.tgz"
},
"maintainers": [
{
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/which/-/which-1.1.1.tgz"
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.1.2.tgz",
+ "readme": "ERROR: No README data found!"
}
})
t.test('find when executable', function (t) {
- t.plan(2)
+ t.plan(4)
var opt = { pathExt: '.sh' }
var expect = path.resolve(fixture, 'foo.sh').toLowerCase()
+ var PATH = process.env.PATH
t.test('absolute', function (t) {
- t.plan(2)
- runTest(t)
+ runTest(fixture + '/foo.sh', t)
+ })
+
+ t.test('with process.env.PATH', function (t) {
+ process.env.PATH = fixture
+ runTest('foo.sh', t)
+ })
+
+ t.test('with process.env.Path', {
+ skip: isWindows ? false : 'Only for Windows'
+ }, function (t) {
+ process.env.PATH = ""
+ process.env.Path = fixture
+ runTest('foo.sh', t)
+ })
+
+ t.test('with path opt', function (t) {
+ opt.path = fixture
+ runTest('foo.sh', t)
})
- function runTest(t) {
- which(fixture + '/foo.sh', opt, function (er, found) {
+ function runTest(exec, t) {
+ t.plan(2)
+ which(exec, opt, function (er, found) {
if (er)
throw er
t.equal(found.toLowerCase(), expect)
+ process.env.PATH = PATH
})
- var found = which.sync(fixture + '/foo.sh', opt).toLowerCase()
+ var found = which.sync(exec, opt).toLowerCase()
t.equal(found, expect)
}
- t.test('with path', function (t) {
- t.plan(2)
- opt.path = fixture
- runTest(t)
- })
})
t.test('clean', function (t) {
var fs = require('fs')
var isAbsolute = require('is-absolute')
+var G = parseInt('0010', 8)
+var U = parseInt('0100', 8)
+var UG = parseInt('0110', 8)
+
if (isWindows) {
// On windows, there is no good way to check that a file is executable
isExe = function isExe () { return true }
} else {
isExe = function isExe (mod, uid, gid) {
- var ret = (mod & 0001)
- || (mod & 0010) && process.getgid && gid === process.getgid()
- || (mod & 0100) && process.getuid && uid === process.getuid()
- || (mod & 0110) && process.getuid && 0 === process.getuid()
+ var ret = (mod & 1)
+ || (mod & U) && process.getgid && gid === process.getgid()
+ || (mod & G) && process.getuid && uid === process.getuid()
+ || (mod & UG) && process.getuid && 0 === process.getuid()
- if (process.getgroups && (mod & 0010)) {
+ if (!ret && process.getgroups && (mod & G)) {
var groups = process.getgroups()
for (var g = 0; g < groups.length; g++) {
if (groups[g] === gid)
}
}
-function which (cmd, opt, cb) {
- if (typeof opt === 'function') {
- cb = opt
- opt = {}
- }
-
+function getPathInfo(cmd, opt) {
var colon = opt.colon || COLON
var pathEnv = opt.path || process.env.PATH || ''
var pathExt = ['']
- // On windows, env.Path is common.
- if (isWindows && !pathEnv) {
- var k = Object.keys(process.env)
- for (var p = 0; p < k.length; p++) {
- if (p.toLowerCase() === 'path') {
- pathEnv = process.env[p]
- break
- }
- }
- }
-
pathEnv = pathEnv.split(colon)
if (isWindows) {
if (isAbsolute(cmd))
pathEnv = ['']
+ return {env: pathEnv, ext: pathExt}
+}
+
+function which (cmd, opt, cb) {
+ if (typeof opt === 'function') {
+ cb = opt
+ opt = {}
+ }
+
+ var info = getPathInfo(cmd, opt)
+ var pathEnv = info.env
+ var pathExt = info.ext
+
;(function F (i, l) {
if (i === l) return cb(new Error('not found: '+cmd))
var p = path.resolve(pathEnv[i], cmd)
}
function whichSync (cmd, opt) {
- if (!opt)
- opt = {}
+ opt = opt || {}
- var colon = opt.colon || COLON
-
- var pathEnv = opt.path || process.env.PATH || ''
- var pathExt = ['']
-
- // On windows, env.Path is common.
- if (isWindows && !pathEnv) {
- var k = Object.keys(process.env)
- for (var p = 0; p < k.length; p++) {
- if (p.toLowerCase() === 'path') {
- pathEnv = process.env[p]
- break
- }
- }
- }
-
- pathEnv = pathEnv.split(colon)
-
- if (isWindows) {
- pathEnv.unshift(process.cwd())
- pathExt = (opt.pathExt || process.env.PATHEXT || '.EXE').split(colon)
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
- pathExt.unshift('')
- }
-
- // If it's absolute, then we don't bother searching the pathenv.
- // just check the file itself, and that's it.
- if (isAbsolute(cmd))
- pathEnv = ['']
+ var info = getPathInfo(cmd, opt)
+ var pathEnv = info.env
+ var pathExt = info.ext
for (var i = 0, l = pathEnv.length; i < l; i ++) {
var p = path.join(pathEnv[i], cmd)
+++ /dev/null
-node_modules/
+++ /dev/null
-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.
+++ /dev/null
-# graceful-fs
-
-graceful-fs functions as a drop-in replacement for the fs module,
-making various improvements.
-
-The improvements are meant to normalize behavior across different
-platforms and environments, and to make filesystem access more
-resilient to errors.
-
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
-
-graceful-fs:
-
-* Queues up `open` and `readdir` calls, and retries them once
- something closes if there is an EMFILE error from too many file
- descriptors.
-* fixes `lchmod` for Node versions prior to 0.6.2.
-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
- `lchown` if the user isn't root.
-* makes `lchmod` and `lchown` become noops, if not available.
-* retries reading a file if `read` results in EAGAIN error.
-
-On Windows, it retries renaming a file for up to one second if `EACCESS`
-or `EPERM` error occurs, likely because antivirus software has locked
-the directory.
-
-## USAGE
-
-```javascript
-// use just like fs
-var fs = require('graceful-fs')
-
-// now go and do stuff with it...
-fs.readFileSync('some-file-or-whatever')
-```
+++ /dev/null
-// eeeeeevvvvviiiiiiillllll
-// more evil than monkey-patching the native builtin?
-// Not sure.
-
-var mod = require("module")
-var pre = '(function (exports, require, module, __filename, __dirname) { '
-var post = '});'
-var src = pre + process.binding('natives').fs + post
-var vm = require('vm')
-var fn = vm.runInThisContext(src)
-fn(exports, require, module, __filename, __dirname)
+++ /dev/null
-// Monkey-patching the fs module.
-// It's ugly, but there is simply no other way to do this.
-var fs = module.exports = require('./fs.js')
-
-var assert = require('assert')
-
-// fix up some busted stuff, mostly on windows and old nodes
-require('./polyfills.js')
-
-var util = require('util')
-
-function noop () {}
-
-var debug = noop
-if (util.debuglog)
- debug = util.debuglog('gfs')
-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
- debug = function() {
- var m = util.format.apply(util, arguments)
- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
- console.error(m)
- }
-
-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
- process.on('exit', function() {
- debug('fds', fds)
- debug(queue)
- assert.equal(queue.length, 0)
- })
-}
-
-
-var originalOpen = fs.open
-fs.open = open
-
-function open(path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
- new OpenReq(path, flags, mode, cb)
-}
-
-function OpenReq(path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(OpenReq, Req)
-
-OpenReq.prototype.process = function() {
- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
-}
-
-var fds = {}
-OpenReq.prototype.done = function(er, fd) {
- debug('open done', er, fd)
- if (fd)
- fds['fd' + fd] = this.path
- Req.prototype.done.call(this, er, fd)
-}
-
-
-var originalReaddir = fs.readdir
-fs.readdir = readdir
-
-function readdir(path, cb) {
- if (typeof cb !== "function") cb = noop
- new ReaddirReq(path, cb)
-}
-
-function ReaddirReq(path, cb) {
- this.path = path
- this.cb = cb
- Req.call(this)
-}
-
-util.inherits(ReaddirReq, Req)
-
-ReaddirReq.prototype.process = function() {
- originalReaddir.call(fs, this.path, this.done)
-}
-
-ReaddirReq.prototype.done = function(er, files) {
- if (files && files.sort)
- files = files.sort()
- Req.prototype.done.call(this, er, files)
- onclose()
-}
-
-
-var originalClose = fs.close
-fs.close = close
-
-function close (fd, cb) {
- debug('close', fd)
- if (typeof cb !== "function") cb = noop
- delete fds['fd' + fd]
- originalClose.call(fs, fd, function(er) {
- onclose()
- cb(er)
- })
-}
-
-
-var originalCloseSync = fs.closeSync
-fs.closeSync = closeSync
-
-function closeSync (fd) {
- try {
- return originalCloseSync(fd)
- } finally {
- onclose()
- }
-}
-
-
-// Req class
-function Req () {
- // start processing
- this.done = this.done.bind(this)
- this.failures = 0
- this.process()
-}
-
-Req.prototype.done = function (er, result) {
- var tryAgain = false
- if (er) {
- var code = er.code
- var tryAgain = code === "EMFILE" || code === "ENFILE"
- if (process.platform === "win32")
- tryAgain = tryAgain || code === "OK"
- }
-
- if (tryAgain) {
- this.failures ++
- enqueue(this)
- } else {
- var cb = this.cb
- cb(er, result)
- }
-}
-
-var queue = []
-
-function enqueue(req) {
- queue.push(req)
- debug('enqueue %d %s', queue.length, req.constructor.name, req)
-}
-
-function onclose() {
- var req = queue.shift()
- if (req) {
- debug('process', req.constructor.name, req)
- req.process()
- }
-}
+++ /dev/null
-{
- "_args": [
- [
- "graceful-fs@^3.0.2",
- "/Users/isaacs/dev/npm/npm/node_modules/write-file-atomic"
- ]
- ],
- "_from": "graceful-fs@>=3.0.2 <4.0.0",
- "_id": "graceful-fs@3.0.8",
- "_inCache": true,
- "_location": "/write-file-atomic/graceful-fs",
- "_nodeVersion": "2.0.1",
- "_npmUser": {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- "_npmVersion": "2.10.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "graceful-fs",
- "raw": "graceful-fs@^3.0.2",
- "rawSpec": "^3.0.2",
- "scope": null,
- "spec": ">=3.0.2 <4.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/write-file-atomic"
- ],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz",
- "_shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "_shrinkwrap": null,
- "_spec": "graceful-fs@^3.0.2",
- "_where": "/Users/isaacs/dev/npm/npm/node_modules/write-file-atomic",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-graceful-fs/issues"
- },
- "dependencies": {},
- "description": "A drop-in replacement for fs, making various improvements.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.2.8",
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "ce813e725fa82f7e6147d51c9a5ca68270551c22",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "45c57aa5e323c35a985a525de6f0c9a6ef59e1f8",
- "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
- "fs",
- "handling",
- "module",
- "queue",
- "reading",
- "retries",
- "retry"
- ],
- "license": "ISC",
- "main": "graceful-fs.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "graceful-fs",
- "optionalDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.8"
-}
+++ /dev/null
-var fs = require('./fs.js')
-var constants = require('constants')
-
-var origCwd = process.cwd
-var cwd = null
-process.cwd = function() {
- if (!cwd)
- cwd = origCwd.call(process)
- return cwd
-}
-var chdir = process.chdir
-process.chdir = function(d) {
- cwd = null
- chdir.call(process, d)
-}
-
-// (re-)implement some things that are known busted or missing.
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-// It should not fail on enosys ever, as this just indicates
-// that a fs doesn't support the intended operation.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chmod = chownFix(fs.chmod)
-fs.fchmod = chownFix(fs.fchmod)
-fs.lchmod = chownFix(fs.lchmod)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-fs.chmodSync = chownFix(fs.chmodSync)
-fs.fchmodSync = chownFix(fs.fchmodSync)
-fs.lchmodSync = chownFix(fs.lchmodSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-// ENOSYS means that the fs doesn't support the op. Just ignore
-// that, because it doesn't matter.
-//
-// if there's no getuid, or if getuid() is something other
-// than 0, and the error is EINVAL or EPERM, then just ignore
-// it.
-//
-// This specific case is a silent failure in cp, install, tar,
-// and most other unix tools that manage permissions.
-//
-// When running as root, or if other types of errors are
-// encountered, then it's strict.
-function chownErOk (er) {
- if (!er)
- return true
-
- if (er.code === "ENOSYS")
- return true
-
- var nonroot = !process.getuid || process.getuid() !== 0
- if (nonroot) {
- if (er.code === "EINVAL" || er.code === "EPERM")
- return true
- }
-
- return false
-}
-
-
-// if lchmod/lchown do not exist, then make them no-ops
-if (!fs.lchmod) {
- fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
- }
- fs.lchmodSync = function () {}
-}
-if (!fs.lchown) {
- fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
- }
- fs.lchownSync = function () {}
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- if(cb) cb(er)
- })
- }
-}
-
-
-// if read() returns EAGAIN, then just try it again.
-var read = fs.read
-fs.read = function (fd, buffer, offset, length, position, callback_) {
- var callback
- if (callback_ && typeof callback_ === 'function') {
- var eagCounter = 0
- callback = function (er, _, __) {
- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- return read.call(fs, fd, buffer, offset, length, position, callback)
- }
- callback_.apply(this, arguments)
- }
- }
- return read.call(fs, fd, buffer, offset, length, position, callback)
-}
-
-var readSync = fs.readSync
-fs.readSync = function (fd, buffer, offset, length, position) {
- var eagCounter = 0
- while (true) {
- try {
- return readSync.call(fs, fd, buffer, offset, length, position)
- } catch (er) {
- if (er.code === 'EAGAIN' && eagCounter < 10) {
- eagCounter ++
- continue
- }
- throw er
- }
- }
-}
+++ /dev/null
-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 >= 2)
- 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
- })
- })
- }
-})
+++ /dev/null
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('graceful fs is monkeypatched fs', function (t) {
- t.equal(fs, require('../fs.js'))
- t.end()
-})
-
-test('open an existing file works', function (t) {
- var fd = fs.openSync(__filename, 'r')
- fs.closeSync(fd)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- fs.close(fd, function (er) {
- if (er) throw er
- t.pass('works')
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.end()
- })
-})
+++ /dev/null
-var test = require("tap").test
-var fs = require("../fs.js")
-
-var readdir = fs.readdir
-fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(null, ["b", "z", "a"])
- })
-}
-
-var g = require("../")
-
-test("readdir reorder", function (t) {
- g.readdir("whatevers", function (er, files) {
- if (er)
- throw er
- t.same(files, [ "a", "b", "z" ])
- t.end()
- })
-})
+++ /dev/null
-var fs = require('../');
-var rimraf = require('rimraf');
-var mkdirp = require('mkdirp');
-var test = require('tap').test;
-var p = require('path').resolve(__dirname, 'files');
-
-process.chdir(__dirname)
-
-// 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();
-});
{
"name": "write-file-atomic",
- "version": "1.1.2",
+ "version": "1.1.3",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "index.js",
"scripts": {
},
"repository": {
"type": "git",
- "url": "git@github.com:iarna/write-file-atomic.git"
+ "url": "git+ssh://git@github.com/iarna/write-file-atomic.git"
},
"keywords": [
"writeFile",
},
"homepage": "https://github.com/iarna/write-file-atomic",
"dependencies": {
- "graceful-fs": "^3.0.2",
+ "graceful-fs": "^4.1.2",
"slide": "^1.1.5"
},
"devDependencies": {
"require-inject": "^1.1.0",
"tap": "^0.4.12"
},
- "gitHead": "b721f8a71223bcf162f1ee4ff4677f31de1c061f",
- "_id": "write-file-atomic@1.1.2",
- "_shasum": "ff3d61f1c2f5bb71e8ebe491a7157bf7d60435a4",
- "_from": "write-file-atomic@>=1.1.2 <1.2.0",
- "_npmVersion": "2.7.6",
- "_nodeVersion": "1.6.2",
+ "gitHead": "65a1e2e156c0d0bfb7acac2e039b943d6ec9876d",
+ "_id": "write-file-atomic@1.1.3",
+ "_shasum": "60eaca258a0b559b37aca82b21d64a293b4b90d0",
+ "_from": "write-file-atomic@1.1.3",
+ "_npmVersion": "3.3.0",
+ "_nodeVersion": "3.1.0",
"_npmUser": {
"name": "iarna",
"email": "me@re-becca.org"
},
"dist": {
- "shasum": "ff3d61f1c2f5bb71e8ebe491a7157bf7d60435a4",
- "tarball": "http://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.2.tgz"
+ "shasum": "60eaca258a0b559b37aca82b21d64a293b4b90d0",
+ "tarball": "http://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.3.tgz"
},
"maintainers": [
{
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.2.tgz"
+ "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.1.3.tgz"
}
{
- "version": "2.14.3",
+ "version": "2.14.4",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
"config-chain": "~1.1.9",
"dezalgo": "~1.0.3",
"editor": "~1.0.0",
- "fs-vacuum": "~1.2.6",
- "fs-write-stream-atomic": "~1.0.3",
- "fstream": "~1.0.7",
+ "fs-vacuum": "~1.2.7",
+ "fs-write-stream-atomic": "~1.0.4",
+ "fstream": "~1.0.8",
"fstream-npm": "~1.0.5",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
"lru-cache": "~2.6.5",
"minimatch": "~2.0.10",
"mkdirp": "~0.5.1",
- "node-gyp": "~3.0.3",
- "nopt": "~3.0.3",
+ "node-gyp": "~3.0.1",
+ "nopt": "~3.0.4",
"normalize-git-url": "~3.0.1",
"normalize-package-data": "~2.3.2",
"npm-cache-filename": "~1.0.2",
"osenv": "~0.1.3",
"path-is-inside": "~1.0.0",
"read": "~1.0.7",
- "read-installed": "~4.0.2",
- "read-package-json": "~2.0.0",
+ "read-installed": "~4.0.3",
+ "read-package-json": "~2.0.1",
"readable-stream": "~1.1.13",
"realize-package-specifier": "~3.0.1",
"request": "~2.61.0",
"slide": "~1.1.6",
"sorted-object": "~1.0.0",
"spdx": "~0.4.1",
- "tar": "~2.2.0",
+ "tar": "~2.2.1",
"text-table": "~0.2.0",
"uid-number": "0.0.6",
"umask": "~1.1.0",
"validate-npm-package-license": "~3.0.1",
"validate-npm-package-name": "~2.2.2",
- "which": "~1.1.1",
+ "which": "~1.1.2",
"wrappy": "~1.0.1",
- "write-file-atomic": "~1.1.2"
+ "write-file-atomic": "~1.1.3"
},
"bundleDependencies": [
"abbrev",
"npm-registry-mock": "~1.0.0",
"require-inject": "~1.2.0",
"sprintf-js": "~1.0.2",
- "tap": "~1.4.0"
+ "tap": "~1.4.1"
},
"scripts": {
"dumpconf": "env | grep npm | sort | uniq",