Skip to content

Commit 40546bf

Browse files
dsanders11arcanis
authored andcommitted
fix(add, upgrade): fix audit flag (#7326)
* fix(add, upgrade): fix audit flag * Update CHANGELOG.md
1 parent c88c64f commit 40546bf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa
44

55
## Master
66

7-
- Adds support for --offline flag to global add command
7+
- Fixes audits when used with `yarn add` & `yarn upgrade`
8+
9+
[#7326](https://github.com/yarnpkg/yarn/pull/7326) - [**David Sanders**](https://github.com/dsanders11)
10+
11+
- Adds support for the `--offline` flag to `yarn global add`
812

913
[#7330](https://github.com/yarnpkg/yarn/pull/7330) - [**Francis Crick**](https://guthub.com/fcrick)
1014

src/cli/commands/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export function setFlags(commander: Object) {
300300
commander.option('-O, --optional', 'save package to your `optionalDependencies`');
301301
commander.option('-E, --exact', 'install exact version');
302302
commander.option('-T, --tilde', 'install most recent release with the same minor version');
303-
commander.option('-A', '--audit', 'Run vulnerability audit on installed packages');
303+
commander.option('-A, --audit', 'Run vulnerability audit on installed packages');
304304
}
305305

306306
export async function run(config: Config, reporter: Reporter, flags: Object, args: Array<string>): Promise<void> {

src/cli/commands/upgrade.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function setFlags(commander: Object) {
158158
'-C, --caret',
159159
'install most recent release with the same major version. Only used when --latest is specified.',
160160
);
161-
commander.option('-A', '--audit', 'Run vulnerability audit on installed packages');
161+
commander.option('-A, --audit', 'Run vulnerability audit on installed packages');
162162
}
163163

164164
export function hasWrapper(commander: Object, args: Array<string>): boolean {

0 commit comments

Comments
 (0)