| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,4 +165,4 @@ arb.loadActual((tree) => { | |||
| 165 | 165 | ## See Also | |
| 166 | 166 | ||
| 167 | 167 | * [npm query](/commands/npm-query) | |
| 168 | - * [@npmcli/arborist](https://npm.im/@npmcli/arborist] | ||
| 168 | + * [@npmcli/arborist](https://npm.im/@npmcli/arborist) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,7 +166,7 @@ <h3 id="description">Description</h3> | |||
| 166 | 166 | the results to only the paths to the packages named. Note that nested | |
| 167 | 167 | packages will <em>also</em> show the paths to the specified packages. For | |
| 168 | 168 | example, running <code>npm ls promzard</code> in npm's source tree will show:</p> | |
| 169 | - <pre lang="bash"><code>npm@8.16.0 /path/to/npm | ||
| 169 | + <pre lang="bash"><code>npm@8.17.0 /path/to/npm | ||
| 170 | 170 | └─┬ init-package-json@0.0.4 | |
| 171 | 171 | └── promzard@0.1.5 | |
| 172 | 172 | </code></pre> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2> | |||
| 149 | 149 | <!-- raw HTML omitted --> | |
| 150 | 150 | <!-- raw HTML omitted --> | |
| 151 | 151 | <h3 id="version">Version</h3> | |
| 152 | - <p>8.16.0</p> | ||
| 152 | + <p>8.17.0</p> | ||
| 153 | 153 | <h3 id="description">Description</h3> | |
| 154 | 154 | <p>npm is the package manager for the Node JavaScript platform. It puts | |
| 155 | 155 | modules in place so that node can find them, and manages dependency | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -282,7 +282,7 @@ <h3 id="programmatic-usage">Programmatic Usage</h3> | |||
| 282 | 282 | <h2 id="see-also">See Also</h2> | |
| 283 | 283 | <ul> | |
| 284 | 284 | <li><a href="../commands/npm-query.html">npm query</a></li> | |
| 285 | - <li>[@npmcli/arborist](<a href="https://npm.im/@npmcli/arborist%5D">https://npm.im/@npmcli/arborist]</a></li> | ||
| 285 | + <li><a href="https://npm.im/@npmcli/arborist">@npmcli/arborist</a></li> | ||
| 286 | 286 | </ul> | |
| 287 | 287 | </div> | |
| 288 | 288 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,6 +34,7 @@ class Exec extends BaseCommand { | |||
| 34 | 34 | ||
| 35 | 35 | const args = [..._args] | |
| 36 | 36 | const call = this.npm.config.get('call') | |
| 37 | + let globalPath | ||
| 37 | 38 | const { | |
| 38 | 39 | flatOptions, | |
| 39 | 40 | localBin, | |
@@ -44,6 +45,12 @@ class Exec extends BaseCommand { | |||
| 44 | 45 | const scriptShell = this.npm.config.get('script-shell') || undefined | |
| 45 | 46 | const packages = this.npm.config.get('package') | |
| 46 | 47 | const yes = this.npm.config.get('yes') | |
| 48 | + // --prefix sets both of these to the same thing, meaning the global prefix | ||
| 49 | + // is invalid (i.e. no lib/node_modules). This is not a trivial thing to | ||
| 50 | + // untangle and fix so we work around it here. | ||
| 51 | + if (this.npm.localPrefix !== this.npm.globalPrefix) { | ||
| 52 | + globalPath = path.resolve(globalDir, '..') | ||
| 53 | + } | ||
| 47 | 54 | ||
| 48 | 55 | if (call && _args.length) { | |
| 49 | 56 | throw this.usageError() | |
@@ -59,7 +66,7 @@ class Exec extends BaseCommand { | |||
| 59 | 66 | localBin, | |
| 60 | 67 | locationMsg, | |
| 61 | 68 | globalBin, | |
| 62 | - globalPath: path.resolve(globalDir, '..'), | ||
| 69 | + globalPath, | ||
| 63 | 70 | output, | |
| 64 | 71 | packages, | |
| 65 | 72 | path: localPrefix, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,6 +58,7 @@ class Query extends BaseCommand { | |||
| 58 | 58 | const opts = { | |
| 59 | 59 | ...this.npm.flatOptions, | |
| 60 | 60 | path: where, | |
| 61 | + forceActual: true, | ||
| 61 | 62 | } | |
| 62 | 63 | const arb = new Arborist(opts) | |
| 63 | 64 | const tree = await arb.loadActual(opts) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show: | |||
| 26 | 26 | .P | |
| 27 | 27 | .RS 2 | |
| 28 | 28 | .nf | |
| 29 | - npm@8\.16\.0 /path/to/npm | ||
| 29 | + npm@8\.17\.0 /path/to/npm | ||
| 30 | 30 | └─┬ init\-package\-json@0\.0\.4 | |
| 31 | 31 | └── promzard@0\.1\.5 | |
| 32 | 32 | .fi | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | .SS Synopsis | |
| 5 | 5 | .SS Version | |
| 6 | 6 | .P | |
| 7 | - 8\.16\.0 | ||
| 7 | + 8\.17\.0 | ||
| 8 | 8 | .SS Description | |
| 9 | 9 | .P | |
| 10 | 10 | npm is the package manager for the Node JavaScript platform\. It puts | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -240,6 +240,6 @@ arb\.loadActual((tree) => { | |||
| 240 | 240 | .IP \(bu 2 | |
| 241 | 241 | npm help query | |
| 242 | 242 | .IP \(bu 2 | |
| 243 | - [@npmcli/arborist](https://npm\.im/@npmcli/arborist] | ||
| 243 | + @npmcli/arborist \fIhttps://npm\.im/@npmcli/arborist\fR | ||
| 244 | 244 | ||
| 245 | 245 | .RE | |
| Back | FazBrowse Home | New Git URL |
0 commit comments