-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
1,772 additions
and
1,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -757,3 +757,4 @@ kumavis <[email protected]> | |
Christof Lemke <[email protected]> | ||
Nathan Shively-Sanders <[email protected]> | ||
Bjørn Johansen <[email protected]> | ||
Fraqe <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
## v7.6.2 (2021-03-09) | ||
|
||
### BUG FIXES | ||
|
||
* [`e0a3a5218`](https://github.com/npm/cli/commit/e0a3a5218cac7ca5850930aaaad8a939ddf75d4d) | ||
[#2831](https://github.com/npm/cli/issues/2831) | ||
Fix cb() never called in search with --json option | ||
([@fraqe](https://github.com/fraqe)) | ||
* [`85a8694dd`](https://github.com/npm/cli/commit/85a8694dd9b4a924a474ba75261914511a216868) | ||
[#2795](https://github.com/npm/cli/issues/2795) | ||
fix(npm.output): make output go through npm.output | ||
([@wraithgar](https://github.com/wraithgar)) | ||
* [`9fe0df5b5`](https://github.com/npm/cli/commit/9fe0df5b5d7606e5841288d9931be6c04767c9ca) | ||
[#2821](https://github.com/npm/cli/issues/2821) | ||
fix(usage): clean up usage declarations | ||
([@wraithgar](https://github.com/wraithgar)) | ||
|
||
### DEPENDENCIES | ||
|
||
* [`7f470b5c2`](https://github.com/npm/cli/commit/7f470b5c25d544e36d97b28e28ae20dfa1d4ab31) | ||
`@npmcli/[email protected]` | ||
* fix(install): Do not revert a file: dep to version on bare name re-install | ||
* [`e9b7fc275`](https://github.com/npm/cli/commit/e9b7fc275a0bdf8f00dbcf5dd2283675776fc459) | ||
`[email protected]` | ||
* fix(diff): Gracefully handle packages with prepare script | ||
* [`c7314aa62`](https://github.com/npm/cli/commit/c7314aa62195b7f0d8886776692e8a2c892413ed) | ||
`[email protected]` | ||
* [`864f48d43`](https://github.com/npm/cli/commit/864f48d4327269f521161cf89888ea2b6db5fdab) | ||
`[email protected]` | ||
|
||
## v7.6.1 (2021-03-04) | ||
|
||
### BUG FIXES | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3> | |
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 lang="bash"><code>[email protected].1 /path/to/npm | ||
<pre lang="bash"><code>[email protected].2 /path/to/npm | ||
└─┬ [email protected] | ||
└── [email protected] | ||
</code></pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Base class for npm.commands[cmd] | ||
const usageUtil = require('./utils/usage.js') | ||
|
||
class BaseCommand { | ||
constructor (npm) { | ||
this.npm = npm | ||
} | ||
|
||
get usage () { | ||
let usage = `npm ${this.constructor.name}\n\n` | ||
if (this.constructor.description) | ||
usage = `${usage}${this.constructor.description}\n\n` | ||
|
||
usage = `${usage}Usage:\n` | ||
if (!this.constructor.usage) | ||
usage = `${usage}npm ${this.constructor.name}` | ||
else | ||
usage = `${usage}${this.constructor.usage.map(u => `npm ${this.constructor.name} ${u}`).join('\n')}` | ||
|
||
// Mostly this just appends aliases, this could be more clear | ||
usage = usageUtil(this.constructor.name, usage) | ||
usage = `${usage}\n\nRun "npm ${this.constructor.name} help" for more info` | ||
return usage | ||
} | ||
|
||
usageError (msg) { | ||
if (!msg) { | ||
return Object.assign(new Error(`\nUsage: ${this.usage}`), { | ||
code: 'EUSAGE', | ||
}) | ||
} | ||
|
||
return Object.assign(new Error(`\nUsage: ${msg}\n\n${this.usage}`), { | ||
code: 'EUSAGE', | ||
}) | ||
} | ||
} | ||
module.exports = BaseCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.