mirror of https://github.com/nodejs/node.git
npm: Upgrade to 1.1.55
This commit is contained in:
parent
badbd1af27
commit
2bcb9ab7bc
|
@ -1,4 +0,0 @@
|
|||
language: node_js
|
||||
before_install: "make &>out || cat out; rm out"
|
||||
node_js:
|
||||
- 0.8
|
|
@ -75,3 +75,5 @@ Don Park <donpark@docuverse.com>
|
|||
Kei Son <heyacct@gmail.com>
|
||||
Nicolas Morel <marsup@gmail.com>
|
||||
Mark Dube <markisdee@gmail.com>
|
||||
Maxim Bogushevich <boga1@mail.ru>
|
||||
Justin Beckwith <justbe@microsoft.com>
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
npm-dedupe(1) -- Reduce duplication
|
||||
===================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
npm dedupe [package names...]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Searches the local package tree and attempts to simplify the overall
|
||||
structure by moving dependencies further up the tree, where they can
|
||||
be more effectively shared by multiple dependent packages.
|
||||
|
||||
For example, consider this dependency graph:
|
||||
|
||||
a
|
||||
+-- b <-- depends on c@1.0.x
|
||||
| `-- c@1.0.3
|
||||
`-- d <-- depends on c@~1.0.9
|
||||
`-- c@1.0.10
|
||||
|
||||
In this case, `npm-dedupe(1)` will transform the tree to:
|
||||
|
||||
a
|
||||
+-- b
|
||||
+-- d
|
||||
`-- c@1.0.10
|
||||
|
||||
Because of the hierarchical nature of node's module lookup, b and d
|
||||
will both get their dependency met by the single c package at the root
|
||||
level of the tree.
|
||||
|
||||
If a suitable version exists at the target location in the tree
|
||||
already, then it will be left untouched, but the other duplicates will
|
||||
be deleted.
|
||||
|
||||
If no suitable version can be found, then a warning is printed, and
|
||||
nothing is done.
|
||||
|
||||
If any arguments are supplied, then they are filters, and only the
|
||||
named packages will be touched.
|
||||
|
||||
Note that this operation transforms the dependency tree, and may
|
||||
result in packages getting updated versions, perhaps from the npm
|
||||
registry.
|
||||
|
||||
This feature is experimental, and may change in future versions.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
* npm-ls(1)
|
||||
* npm-update(1)
|
||||
* npm-install(1)
|
|
@ -46,6 +46,10 @@ npm-index(1) -- Index of all npm documentation
|
|||
|
||||
Manage the npm configuration file
|
||||
|
||||
## npm-dedupe(1)
|
||||
|
||||
Reduce duplication
|
||||
|
||||
## npm-deprecate(1)
|
||||
|
||||
Deprecate a version of a package
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<p>This function should not be used programmatically. Instead, just refer
|
||||
to the <code>npm.bin</code> member.</p>
|
||||
</div>
|
||||
<p id="footer">bin — npm@1.1.49</p>
|
||||
<p id="footer">bin — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ optional version number.</p>
|
|||
<p>This command will launch a browser, so this command may not be the most
|
||||
friendly for programmatic use.</p>
|
||||
</div>
|
||||
<p id="footer">bugs — npm@1.1.49</p>
|
||||
<p id="footer">bugs — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -28,7 +28,7 @@ usage, or <code>man 3 npm-<command></code> for programmatic usage.</p>
|
|||
|
||||
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">commands — npm@1.1.49</p>
|
||||
<p id="footer">commands — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -33,7 +33,7 @@ functions instead.</p>
|
|||
|
||||
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">config — npm@1.1.49</p>
|
||||
<p id="footer">config — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -30,7 +30,7 @@ install the package.</p></li></ul>
|
|||
|
||||
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">deprecate — npm@1.1.49</p>
|
||||
<p id="footer">deprecate — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ optional version number.</p>
|
|||
<p>This command will launch a browser, so this command may not be the most
|
||||
friendly for programmatic use.</p>
|
||||
</div>
|
||||
<p id="footer">docs — npm@1.1.49</p>
|
||||
<p id="footer">docs — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p>
|
|||
<p>Since this command opens an editor in a new process, be careful about where
|
||||
and how this is used.</p>
|
||||
</div>
|
||||
<p id="footer">edit — npm@1.1.49</p>
|
||||
<p id="footer">edit — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -24,7 +24,7 @@ sure to use <code>npm rebuild <pkg></code> if you make any changes.</p>
|
|||
|
||||
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
|
||||
</div>
|
||||
<p id="footer">explore — npm@1.1.49</p>
|
||||
<p id="footer">explore — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -32,7 +32,7 @@ Name of the file that matched</li></ul>
|
|||
|
||||
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
|
||||
</div>
|
||||
<p id="footer">help-search — npm@1.1.49</p>
|
||||
<p id="footer">help-search — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p>
|
|||
|
||||
<p><a href="../doc/json.html">json(1)</a></p>
|
||||
</div>
|
||||
<p id="footer">init — npm@1.1.49</p>
|
||||
<p id="footer">init — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ the name of a package to be installed.</p>
|
|||
<p>Finally, 'callback' is a function that will be called when all packages have been
|
||||
installed or when an error has been encountered.</p>
|
||||
</div>
|
||||
<p id="footer">install — npm@1.1.49</p>
|
||||
<p id="footer">install — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -39,7 +39,7 @@ npm.commands.link('redis', cb) # link-install the package</code></pre>
|
|||
<p>Now, any changes to the redis package will be reflected in
|
||||
the package in the current working directory</p>
|
||||
</div>
|
||||
<p id="footer">link — npm@1.1.49</p>
|
||||
<p id="footer">link — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -32,7 +32,7 @@ config object.</p>
|
|||
|
||||
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
|
||||
</div>
|
||||
<p id="footer">load — npm@1.1.49</p>
|
||||
<p id="footer">load — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -59,7 +59,7 @@ project.</p>
|
|||
This means that if a submodule a same dependency as a parent module, then the
|
||||
dependency will only be output once.</p>
|
||||
</div>
|
||||
<p id="footer">ls — npm@1.1.49</p>
|
||||
<p id="footer">ls — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
|
|||
|
||||
<h2 id="VERSION">VERSION</h2>
|
||||
|
||||
<p>1.1.49</p>
|
||||
<p>1.1.55</p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
@ -91,7 +91,7 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p>
|
|||
|
||||
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
|
||||
</div>
|
||||
<p id="footer">npm — npm@1.1.49</p>
|
||||
<p id="footer">npm — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -19,7 +19,7 @@ currently outdated.</p>
|
|||
|
||||
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
|
||||
</div>
|
||||
<p id="footer">outdated — npm@1.1.49</p>
|
||||
<p id="footer">outdated — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -34,7 +34,7 @@ that is not implemented at this time.</p>
|
|||
|
||||
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">owner — npm@1.1.49</p>
|
||||
<p id="footer">owner — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ overwritten the second time.</p>
|
|||
|
||||
<p>If no arguments are supplied, then npm packs the current package folder.</p>
|
||||
</div>
|
||||
<p id="footer">pack — npm@1.1.49</p>
|
||||
<p id="footer">pack — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<p>This function is not useful programmatically</p>
|
||||
</div>
|
||||
<p id="footer">prefix — npm@1.1.49</p>
|
||||
<p id="footer">prefix — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<p>Extraneous packages are packages that are not listed on the parent
|
||||
package's dependencies list.</p>
|
||||
</div>
|
||||
<p id="footer">prune — npm@1.1.49</p>
|
||||
<p id="footer">prune — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -32,7 +32,7 @@ the registry. Overwrites when the "force" environment variable is set
|
|||
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">publish — npm@1.1.49</p>
|
||||
<p id="footer">publish — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -22,7 +22,7 @@ the new binary. If no 'packages' parameter is specify, every package wil
|
|||
|
||||
<p>See <code>npm help build</code></p>
|
||||
</div>
|
||||
<p id="footer">rebuild — npm@1.1.49</p>
|
||||
<p id="footer">rebuild — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p>
|
|||
|
||||
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">restart — npm@1.1.49</p>
|
||||
<p id="footer">restart — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<p>This function is not useful programmatically.</p>
|
||||
</div>
|
||||
<p id="footer">root — npm@1.1.49</p>
|
||||
<p id="footer">root — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p>
|
|||
|
||||
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">run-script — npm@1.1.49</p>
|
||||
<p id="footer">run-script — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -32,7 +32,7 @@ excluded term (the "searchexclude" config). The search is case insensi
|
|||
and doesn't try to read your mind (it doesn't do any verb tense matching or the
|
||||
like).</p>
|
||||
</div>
|
||||
<p id="footer">search — npm@1.1.49</p>
|
||||
<p id="footer">search — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p>
|
|||
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
|
||||
been saved.</p>
|
||||
</div>
|
||||
<p id="footer">shrinkwrap — npm@1.1.49</p>
|
||||
<p id="footer">shrinkwrap — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<p>npm can run tests on multiple packages. Just specify multiple packages
|
||||
in the <code>packages</code> parameter.</p>
|
||||
</div>
|
||||
<p id="footer">start — npm@1.1.49</p>
|
||||
<p id="footer">start — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<p>npm can run stop on multiple packages. Just specify multiple packages
|
||||
in the <code>packages</code> parameter.</p>
|
||||
</div>
|
||||
<p id="footer">stop — npm@1.1.49</p>
|
||||
<p id="footer">stop — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
|
|||
|
||||
<ul><li>npm help json</li><li>git help submodule</li></ul>
|
||||
</div>
|
||||
<p id="footer">submodule — npm@1.1.49</p>
|
||||
<p id="footer">submodule — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be
|
|||
used. For more information about how to set this config, check
|
||||
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
|
||||
</div>
|
||||
<p id="footer">tag — npm@1.1.49</p>
|
||||
<p id="footer">tag — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -22,7 +22,7 @@ true.</p>
|
|||
<p>npm can run tests on multiple packages. Just specify multiple packages
|
||||
in the <code>packages</code> parameter.</p>
|
||||
</div>
|
||||
<p id="footer">test — npm@1.1.49</p>
|
||||
<p id="footer">test — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p>
|
|||
<p>Finally, 'callback' is a function that will be called when all packages have been
|
||||
uninstalled or when an error has been encountered.</p>
|
||||
</div>
|
||||
<p id="footer">uninstall — npm@1.1.49</p>
|
||||
<p id="footer">uninstall — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -26,7 +26,7 @@ is what is meant.</p>
|
|||
<p>If no version is specified, or if all versions are removed then
|
||||
the root package entry is removed from the registry entirely.</p>
|
||||
</div>
|
||||
<p id="footer">unpublish — npm@1.1.49</p>
|
||||
<p id="footer">unpublish — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
|
||||
</div>
|
||||
<p id="footer">update — npm@1.1.49</p>
|
||||
<p id="footer">update — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -24,7 +24,7 @@ fail if the repo is not clean.</p>
|
|||
parameter. The difference, however, is this function will fail if it does
|
||||
not have exactly one element. The only element should be a version number.</p>
|
||||
</div>
|
||||
<p id="footer">version — npm@1.1.49</p>
|
||||
<p id="footer">version — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -99,7 +99,7 @@ the field name.</p>
|
|||
|
||||
<p>corresponding to the list of fields selected.</p>
|
||||
</div>
|
||||
<p id="footer">view — npm@1.1.49</p>
|
||||
<p id="footer">view — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<p>This function is not useful programmatically</p>
|
||||
</div>
|
||||
<p id="footer">whoami — npm@1.1.49</p>
|
||||
<p id="footer">whoami — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -240,7 +240,7 @@ will no doubt tell you to put the output in a gist or email.</p>
|
|||
|
||||
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.49</p>
|
||||
<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -39,7 +39,7 @@ authorize on a new machine.</p>
|
|||
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">adduser — npm@1.1.49</p>
|
||||
<p id="footer">adduser — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">bin — npm@1.1.49</p>
|
||||
<p id="footer">bin — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -36,7 +36,7 @@ config param.</p>
|
|||
|
||||
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">bugs — npm@1.1.49</p>
|
||||
<p id="footer">bugs — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul>
|
|||
|
||||
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">build — npm@1.1.49</p>
|
||||
<p id="footer">build — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@ install packages into the local space.</p>
|
|||
|
||||
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">bundle — npm@1.1.49</p>
|
||||
<p id="footer">bundle — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p>
|
|||
|
||||
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">cache — npm@1.1.49</p>
|
||||
<p id="footer">cache — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">changelog — npm@1.1.49</p>
|
||||
<p id="footer">changelog — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -180,7 +180,7 @@ set to anything."</p>
|
|||
|
||||
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">coding-style — npm@1.1.49</p>
|
||||
<p id="footer">coding-style — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -33,7 +33,7 @@ completions based on the arguments.</p>
|
|||
|
||||
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">completion — npm@1.1.49</p>
|
||||
<p id="footer">completion — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -748,7 +748,7 @@ then answer "no" to any prompt.</p>
|
|||
|
||||
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">config — npm@1.1.49</p>
|
||||
<p id="footer">config — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<title>dedupe</title>
|
||||
<meta http-equiv="content-type" value="text/html;utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="../static/style.css">
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<h1><a href="../doc/dedupe.html">dedupe</a></h1> <p>Reduce duplication</p>
|
||||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<pre><code>npm dedupe [package names...]</code></pre>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
<p>Searches the local package tree and attempts to simplify the overall
|
||||
structure by moving dependencies further up the tree, where they can
|
||||
be more effectively shared by multiple dependent packages.</p>
|
||||
|
||||
<p>For example, consider this dependency graph:</p>
|
||||
|
||||
<pre><code>a
|
||||
+-- b <-- depends on c@1.0.x
|
||||
| `-- c@1.0.3
|
||||
`-- d <-- depends on c@~1.0.9
|
||||
`-- c@1.0.10</code></pre>
|
||||
|
||||
<p>In this case, <code><a href="../doc/dedupe.html">dedupe(1)</a></code> will transform the tree to:</p>
|
||||
|
||||
<pre><code>a
|
||||
+-- b
|
||||
+-- d
|
||||
`-- c@1.0.10</code></pre>
|
||||
|
||||
<p>Because of the hierarchical nature of node's module lookup, b and d
|
||||
will both get their dependency met by the single c package at the root
|
||||
level of the tree.</p>
|
||||
|
||||
<p>If a suitable version exists at the target location in the tree
|
||||
already, then it will be left untouched, but the other duplicates will
|
||||
be deleted.</p>
|
||||
|
||||
<p>If no suitable version can be found, then a warning is printed, and
|
||||
nothing is done.</p>
|
||||
|
||||
<p>If any arguments are supplied, then they are filters, and only the
|
||||
named packages will be touched.</p>
|
||||
|
||||
<p>Note that this operation transforms the dependency tree, and may
|
||||
result in packages getting updated versions, perhaps from the npm
|
||||
registry.</p>
|
||||
|
||||
<p>This feature is experimental, and may change in future versions.</p>
|
||||
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
||||
|
||||
<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">dedupe — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
|
||||
.filter(function (el) {
|
||||
return el.parentNode === wrapper
|
||||
&& el.tagName.match(/H[1-6]/)
|
||||
&& el.id
|
||||
})
|
||||
var l = 2
|
||||
, toc = document.createElement("ul")
|
||||
toc.innerHTML = els.map(function (el) {
|
||||
var i = el.tagName.charAt(1)
|
||||
, out = ""
|
||||
while (i > l) {
|
||||
out += "<ul>"
|
||||
l ++
|
||||
}
|
||||
while (i < l) {
|
||||
out += "</ul>"
|
||||
l --
|
||||
}
|
||||
out += "<li><a href='#" + el.id + "'>" +
|
||||
( el.innerText || el.text || el.innerHTML)
|
||||
+ "</a>"
|
||||
return out
|
||||
}).join("\n")
|
||||
toc.id = "toc"
|
||||
document.body.appendChild(toc)
|
||||
})()
|
||||
</script>
|
||||
</body></html>
|
|
@ -29,7 +29,7 @@ something like this:</p>
|
|||
|
||||
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">deprecate — npm@1.1.49</p>
|
||||
<p id="footer">deprecate — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -160,7 +160,7 @@ from a fresh checkout.</p>
|
|||
|
||||
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">developers — npm@1.1.49</p>
|
||||
<p id="footer">developers — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol>
|
|||
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">disputes — npm@1.1.49</p>
|
||||
<p id="footer">disputes — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -37,7 +37,7 @@ config param.</p>
|
|||
|
||||
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">docs — npm@1.1.49</p>
|
||||
<p id="footer">docs — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul>
|
|||
|
||||
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">edit — npm@1.1.49</p>
|
||||
<p id="footer">edit — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul>
|
|||
|
||||
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">explore — npm@1.1.49</p>
|
||||
<p id="footer">explore — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -241,7 +241,7 @@ We'll have someone kick it or something.</p>
|
|||
|
||||
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">faq — npm@1.1.49</p>
|
||||
<p id="footer">faq — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></co
|
|||
|
||||
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">folders — npm@1.1.49</p>
|
||||
<p id="footer">folders — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -38,7 +38,7 @@ where the terms were found in the documentation.</p>
|
|||
|
||||
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">help-search — npm@1.1.49</p>
|
||||
<p id="footer">help-search — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p>
|
|||
|
||||
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">help — npm@1.1.49</p>
|
||||
<p id="footer">help — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
|
||||
<p> Manage the npm configuration file</p>
|
||||
|
||||
<h2 id="npm-dedupe-1"><a href="../doc/dedupe.html">dedupe(1)</a></h2>
|
||||
|
||||
<p> Reduce duplication</p>
|
||||
|
||||
<h2 id="npm-deprecate-1"><a href="../doc/deprecate.html">deprecate(1)</a></h2>
|
||||
|
||||
<p> Deprecate a version of a package</p>
|
||||
|
@ -384,7 +388,7 @@
|
|||
|
||||
<p> Display npm username</p>
|
||||
</div>
|
||||
<p id="footer">index — npm@1.1.49</p>
|
||||
<p id="footer">index — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -29,7 +29,7 @@ without a really good reason to do so.</p>
|
|||
|
||||
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">init — npm@1.1.49</p>
|
||||
<p id="footer">init — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -133,7 +133,7 @@ affects a real use-case, it will be investigated.</p>
|
|||
|
||||
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">install — npm@1.1.49</p>
|
||||
<p id="footer">install — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -525,7 +525,7 @@ overridden.</p>
|
|||
|
||||
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">json — npm@1.1.49</p>
|
||||
<p id="footer">json — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -58,7 +58,7 @@ installation target into your project's <code>node_modules</code> folder.</p
|
|||
|
||||
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">link — npm@1.1.49</p>
|
||||
<p id="footer">link — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ 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@1.1.49 /path/to/npm
|
||||
<pre><code>npm@1.1.55 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5</code></pre>
|
||||
|
||||
|
@ -64,7 +64,7 @@ project.</p>
|
|||
|
||||
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">list — npm@1.1.49</p>
|
||||
<p id="footer">list — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<h2 id="VERSION">VERSION</h2>
|
||||
|
||||
<p>1.1.49</p>
|
||||
<p>1.1.55</p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p>
|
|||
|
||||
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">npm — npm@1.1.49</p>
|
||||
<p id="footer">npm — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -21,7 +21,7 @@ packages are currently outdated.</p>
|
|||
|
||||
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">outdated — npm@1.1.49</p>
|
||||
<p id="footer">outdated — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -34,7 +34,7 @@ that is not implemented at this time.</p>
|
|||
|
||||
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">owner — npm@1.1.49</p>
|
||||
<p id="footer">owner — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -29,7 +29,7 @@ overwritten the second time.</p>
|
|||
|
||||
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">pack — npm@1.1.49</p>
|
||||
<p id="footer">pack — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">prefix — npm@1.1.49</p>
|
||||
<p id="footer">prefix — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ package's dependencies list.</p>
|
|||
|
||||
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">prune — npm@1.1.49</p>
|
||||
<p id="footer">prune — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -29,7 +29,7 @@ the registry. Overwrites when the "--force" flag is set.</p>
|
|||
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">publish — npm@1.1.49</p>
|
||||
<p id="footer">publish — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -25,7 +25,7 @@ the new binary.</p>
|
|||
|
||||
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">rebuild — npm@1.1.49</p>
|
||||
<p id="footer">rebuild — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com
|
|||
|
||||
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">registry — npm@1.1.49</p>
|
||||
<p id="footer">registry — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p>
|
|||
|
||||
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">removing-npm — npm@1.1.49</p>
|
||||
<p id="footer">removing-npm — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -24,7 +24,7 @@ the "start" script.</p>
|
|||
|
||||
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">restart — npm@1.1.49</p>
|
||||
<p id="footer">restart — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">root — npm@1.1.49</p>
|
||||
<p id="footer">root — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -23,7 +23,7 @@ called directly, as well.</p>
|
|||
|
||||
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">run-script — npm@1.1.49</p>
|
||||
<p id="footer">run-script — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -177,7 +177,7 @@ will sudo the npm command in question.</li></ul>
|
|||
|
||||
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">scripts — npm@1.1.49</p>
|
||||
<p id="footer">scripts — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</p>
|
|||
|
||||
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">search — npm@1.1.49</p>
|
||||
<p id="footer">search — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul>
|
|||
|
||||
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">semver — npm@1.1.49</p>
|
||||
<p id="footer">semver — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -169,7 +169,7 @@ versions.</p>
|
|||
|
||||
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">shrinkwrap — npm@1.1.49</p>
|
||||
<p id="footer">shrinkwrap — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p>
|
|||
|
||||
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">star — npm@1.1.49</p>
|
||||
<p id="footer">star — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">start — npm@1.1.49</p>
|
||||
<p id="footer">start — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">stop — npm@1.1.49</p>
|
||||
<p id="footer">stop — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
|
|||
|
||||
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
|
||||
</div>
|
||||
<p id="footer">submodule — npm@1.1.49</p>
|
||||
<p id="footer">submodule — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">tag — npm@1.1.49</p>
|
||||
<p id="footer">tag — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -23,7 +23,7 @@ true.</p>
|
|||
|
||||
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">test — npm@1.1.49</p>
|
||||
<p id="footer">test — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -22,7 +22,7 @@ on its behalf.</p>
|
|||
|
||||
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">uninstall — npm@1.1.49</p>
|
||||
<p id="footer">uninstall — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p>
|
|||
|
||||
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">unpublish — npm@1.1.49</p>
|
||||
<p id="footer">unpublish — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">update — npm@1.1.49</p>
|
||||
<p id="footer">update — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -40,7 +40,7 @@ in your git config for this to work properly.</p>
|
|||
|
||||
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">version — npm@1.1.49</p>
|
||||
<p id="footer">version — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -88,7 +88,7 @@ the field name.</p>
|
|||
|
||||
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">view — npm@1.1.49</p>
|
||||
<p id="footer">view — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
|
||||
</div>
|
||||
<p id="footer">whoami — npm@1.1.49</p>
|
||||
<p id="footer">whoami — npm@1.1.55</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
|
|
|
@ -0,0 +1,334 @@
|
|||
// traverse the node_modules/package.json tree
|
||||
// looking for duplicates. If any duplicates are found,
|
||||
// then move them up to the highest level necessary
|
||||
// in order to make them no longer duplicated.
|
||||
//
|
||||
// This is kind of ugly, and really highlights the need for
|
||||
// much better "put pkg X at folder Y" abstraction. Oh well,
|
||||
// whatever. Perfect enemy of the good, and all that.
|
||||
|
||||
var fs = require("fs")
|
||||
var asyncMap = require("slide").asyncMap
|
||||
var path = require("path")
|
||||
var readJson = require("read-package-json")
|
||||
var archy = require("archy")
|
||||
var util = require("util")
|
||||
var RegClient = require("npm-registry-client")
|
||||
var npmconf = require("npmconf")
|
||||
var npm = require("npm")
|
||||
var semver = require("semver")
|
||||
var npm = require("npm")
|
||||
var rimraf = require("rimraf")
|
||||
var log = require("npmlog")
|
||||
var npm = require("./npm.js")
|
||||
|
||||
module.exports = dedupe
|
||||
|
||||
dedupe.usage = "npm dedupe [pkg pkg...]"
|
||||
|
||||
function dedupe (args, silent, cb) {
|
||||
if (typeof silent === "function") cb = silent, silent = false
|
||||
var dryrun = false
|
||||
if (npm.command.match(/^find/)) dryrun = true
|
||||
return dedupe_(npm.prefix, args, {}, dryrun, silent, cb)
|
||||
}
|
||||
|
||||
function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) {
|
||||
readInstalled(path.resolve(dir), {}, null, function (er, data, counter) {
|
||||
// find out which things are dupes
|
||||
var dupes = Object.keys(counter).filter(function (k) {
|
||||
if (filter.length && -1 === filter.indexOf(k)) return false
|
||||
return counter[k] > 1 && !unavoidable[k]
|
||||
}).reduce(function (s, k) {
|
||||
s[k] = []
|
||||
return s
|
||||
}, {})
|
||||
|
||||
// any that are unavoidable need to remain as they are. don't even
|
||||
// try to touch them or figure it out. Maybe some day, we can do
|
||||
// something a bit more clever here, but for now, just skip over it,
|
||||
// and all its children.
|
||||
;(function U (obj) {
|
||||
if (unavoidable[obj.name]) {
|
||||
obj.unavoidable = true
|
||||
}
|
||||
if (obj.parent && obj.parent.unavoidable) {
|
||||
obj.unavoidable = true
|
||||
}
|
||||
Object.keys(obj.children).forEach(function (k) {
|
||||
U(obj.children[k])
|
||||
})
|
||||
})
|
||||
|
||||
// then collect them up and figure out who needs them
|
||||
;(function C (obj) {
|
||||
if (dupes[obj.name] && !obj.unavoidable) {
|
||||
dupes[obj.name].push(obj)
|
||||
obj.duplicate = true
|
||||
}
|
||||
obj.dependents = whoDepends(obj)
|
||||
Object.keys(obj.children).forEach(function (k) {
|
||||
C(obj.children[k])
|
||||
})
|
||||
})(data)
|
||||
|
||||
if (dryrun) {
|
||||
var k = Object.keys(dupes)
|
||||
if (!k.length) return cb()
|
||||
return npm.commands.ls(k, silent, cb)
|
||||
}
|
||||
|
||||
var summary = Object.keys(dupes).map(function (n) {
|
||||
return [n, dupes[n].filter(function (d) {
|
||||
return d && d.parent && !d.parent.duplicate && !d.unavoidable
|
||||
}).map(function M (d) {
|
||||
return [d.path, d.version, d.dependents.map(function (k) {
|
||||
return [k.path, k.version, k.dependencies[d.name] || ""]
|
||||
})]
|
||||
})]
|
||||
}).map(function (item) {
|
||||
var name = item[0]
|
||||
var set = item[1]
|
||||
|
||||
var ranges = set.map(function (i) {
|
||||
return i[2].map(function (d) {
|
||||
return d[2]
|
||||
})
|
||||
}).reduce(function (l, r) {
|
||||
return l.concat(r)
|
||||
}, []).map(function (v, i, set) {
|
||||
if (set.indexOf(v) !== i) return false
|
||||
return v
|
||||
}).filter(function (v) {
|
||||
return v !== false
|
||||
})
|
||||
|
||||
var locs = set.map(function (i) {
|
||||
return i[0]
|
||||
})
|
||||
|
||||
var versions = set.map(function (i) {
|
||||
return i[1]
|
||||
}).filter(function (v, i, set) {
|
||||
return set.indexOf(v) === i
|
||||
})
|
||||
|
||||
var has = set.map(function (i) {
|
||||
return [i[0], i[1]]
|
||||
}).reduce(function (set, kv) {
|
||||
set[kv[0]] = kv[1]
|
||||
return set
|
||||
}, {})
|
||||
|
||||
var loc = locs.length ? locs.reduce(function (a, b) {
|
||||
// a=/path/to/node_modules/foo/node_modules/bar
|
||||
// b=/path/to/node_modules/elk/node_modules/bar
|
||||
// ==/path/to/node_modules/bar
|
||||
a = a.split(/\/node_modules\//)
|
||||
b = b.split(/\/node_modules\//)
|
||||
var name = a.pop()
|
||||
b.pop()
|
||||
// find the longest chain that both A and B share.
|
||||
// then push the name back on it, and join by /node_modules/
|
||||
var res = []
|
||||
for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++);
|
||||
return a.slice(0, i).concat(name).join("/node_modules/")
|
||||
}) : undefined
|
||||
|
||||
return [item[0], { item: item
|
||||
, ranges: ranges
|
||||
, locs: locs
|
||||
, loc: loc
|
||||
, has: has
|
||||
, versions: versions
|
||||
}]
|
||||
}).filter(function (i) {
|
||||
return i[1].loc
|
||||
})
|
||||
|
||||
findVersions(npm, summary, function (er, set) {
|
||||
if (er) return cb(er)
|
||||
if (!set.length) return cb()
|
||||
installAndRetest(set, filter, dir, unavoidable, silent, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function installAndRetest (set, filter, dir, unavoidable, silent, cb) {
|
||||
//return cb(null, set)
|
||||
var remove = []
|
||||
|
||||
asyncMap(set, function (item, cb) {
|
||||
// [name, has, loc, locMatch, regMatch, others]
|
||||
var name = item[0]
|
||||
var has = item[1]
|
||||
var where = item[2]
|
||||
var locMatch = item[3]
|
||||
var regMatch = item[4]
|
||||
var others = item[5]
|
||||
|
||||
// nothing to be done here. oh well. just a conflict.
|
||||
if (!locMatch && !regMatch) {
|
||||
log.warn("unavoidable conflict", item[0], item[1])
|
||||
log.warn("unavoidable conflict", "Not de-duplicating")
|
||||
unavoidable[item[0]] = true
|
||||
return cb()
|
||||
}
|
||||
|
||||
// nothing to do except to clean up the extraneous deps
|
||||
if (locMatch && has[where] === locMatch) {
|
||||
remove.push.apply(remove, others)
|
||||
return cb()
|
||||
}
|
||||
|
||||
if (regMatch) {
|
||||
var what = name + "@" + regMatch
|
||||
// where is /path/to/node_modules/foo/node_modules/bar
|
||||
// for package "bar", but we need it to be just
|
||||
// /path/to/node_modules/foo
|
||||
where = where.split(/\/node_modules\//)
|
||||
where.pop()
|
||||
where = where.join("/node_modules/")
|
||||
remove.push.apply(remove, others)
|
||||
|
||||
return npm.commands.install(where, what, cb)
|
||||
}
|
||||
|
||||
// hrm?
|
||||
return cb(new Error("danger zone\n" + name + " " +
|
||||
+ regMatch + " " + locMatch))
|
||||
|
||||
}, function (er, installed) {
|
||||
if (er) return cb(er)
|
||||
asyncMap(remove, rimraf, function (er) {
|
||||
if (er) return cb(er)
|
||||
remove.forEach(function (r) {
|
||||
log.info("rm", r)
|
||||
})
|
||||
dedupe_(dir, filter, unavoidable, false, silent, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function findVersions (npm, summary, cb) {
|
||||
// now, for each item in the summary, try to find the maximum version
|
||||
// that will satisfy all the ranges. next step is to install it at
|
||||
// the specified location.
|
||||
asyncMap(summary, function (item, cb) {
|
||||
var name = item[0]
|
||||
var data = item[1]
|
||||
var loc = data.loc
|
||||
var locs = data.locs.filter(function (l) {
|
||||
return l !== loc
|
||||
})
|
||||
|
||||
// not actually a dupe, or perhaps all the other copies were
|
||||
// children of a dupe, so this'll maybe be picked up later.
|
||||
if (locs.length === 0) {
|
||||
return cb()
|
||||
}
|
||||
|
||||
// { <folder>: <version> }
|
||||
var has = data.has
|
||||
|
||||
// the versions that we already have.
|
||||
// if one of these is ok, then prefer to use that.
|
||||
// otherwise, try fetching from the registry.
|
||||
var versions = data.versions
|
||||
|
||||
var ranges = data.ranges
|
||||
npm.registry.get(name, function (er, data) {
|
||||
var regVersions = er ? [] : Object.keys(data.versions)
|
||||
var locMatch = bestMatch(versions, ranges)
|
||||
var regMatch = bestMatch(regVersions, ranges)
|
||||
|
||||
cb(null, [[name, has, loc, locMatch, regMatch, locs]])
|
||||
})
|
||||
}, cb)
|
||||
}
|
||||
|
||||
function bestMatch (versions, ranges) {
|
||||
return versions.filter(function (v) {
|
||||
return !ranges.some(function (r) {
|
||||
return !semver.satisfies(v, r)
|
||||
})
|
||||
}).sort(semver.compare).pop()
|
||||
}
|
||||
|
||||
|
||||
function readInstalled (dir, counter, parent, cb) {
|
||||
var pkg, children, realpath
|
||||
|
||||
fs.realpath(dir, function (er, rp) {
|
||||
realpath = rp
|
||||
next()
|
||||
})
|
||||
|
||||
readJson(path.resolve(dir, "package.json"), function (er, data) {
|
||||
if (er) return cb() // not a package, probably.
|
||||
counter[data.name] = counter[data.name] || 0
|
||||
counter[data.name]++
|
||||
pkg =
|
||||
{ _id: data._id
|
||||
, name: data.name
|
||||
, version: data.version
|
||||
, dependencies: data.dependencies || {}
|
||||
, optionalDependencies: data.optionalDependencies || {}
|
||||
, devDependencies: data.devDependencies || {}
|
||||
, bundledDependencies: data.bundledDependencies || []
|
||||
, path: dir
|
||||
, realPath: dir
|
||||
, children: {}
|
||||
, parent: parent
|
||||
, family: Object.create(parent ? parent.family : null)
|
||||
, unavoidable: false
|
||||
, duplicate: false
|
||||
}
|
||||
if (parent) {
|
||||
parent.children[data.name] = pkg
|
||||
parent.family[data.name] = pkg
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
||||
fs.readdir(path.resolve(dir, "node_modules"), function (er, c) {
|
||||
children = c || [] // error is ok, just means no children.
|
||||
next()
|
||||
})
|
||||
|
||||
function next () {
|
||||
if (!children || !pkg || !realpath) return
|
||||
|
||||
// ignore devDependencies. Just leave them where they are.
|
||||
children = children.filter(function (c) {
|
||||
return !pkg.devDependencies.hasOwnProperty(c)
|
||||
})
|
||||
|
||||
pkg.realPath = realpath
|
||||
if (pkg.realPath !== pkg.path) children = []
|
||||
var d = path.resolve(dir, "node_modules")
|
||||
asyncMap(children, function (child, cb) {
|
||||
readInstalled(path.resolve(d, child), counter, pkg, cb)
|
||||
}, function (er) {
|
||||
cb(er, pkg, counter)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function whoDepends (pkg) {
|
||||
var start = pkg.parent || pkg
|
||||
return whoDepends_(pkg, [], start)
|
||||
}
|
||||
|
||||
function whoDepends_ (pkg, who, test) {
|
||||
if (test !== pkg &&
|
||||
test.dependencies[pkg.name] &&
|
||||
test.family[pkg.name] === pkg) {
|
||||
who.push(test)
|
||||
}
|
||||
Object.keys(test.children).forEach(function (n) {
|
||||
whoDepends_(pkg, who, test.children[n])
|
||||
})
|
||||
return who
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue