Skip to content

Commit

Permalink
fix(core): ensure pattern overrides are read
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Apr 29, 2018
1 parent 2e87578 commit 7513ba5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/bin-fix-mismatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { setVersionsToNewestMismatch } from './manifests';
let packages: string[] = [];

program
.command(`${FIX_MISMATCHES.command} ${FIX_MISMATCHES.args}`)
.action((...args) => {
packages = args.filter((arg) => arg && typeof arg === 'string');
})
Expand Down
1 change: 0 additions & 1 deletion src/bin-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { format } from './manifests';
let packages: string[] = [];

program
.command(`${FORMAT.command} ${FORMAT.args}`)
.action((...args) => {
packages = args.filter((arg) => arg && typeof arg === 'string');
})
Expand Down
1 change: 0 additions & 1 deletion src/bin-list-mismatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getMismatchedVersions } from './manifests';
let packages: string[] = [];

program
.command(`${LIST_MISMATCHES.command} ${LIST_MISMATCHES.args}`)
.action((...args) => {
packages = args.filter((arg) => arg && typeof arg === 'string');
})
Expand Down
1 change: 0 additions & 1 deletion src/bin-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getVersions } from './manifests';
let packages: string[] = [];

program
.command(`${LIST.command} ${LIST.args}`)
.action((...args) => {
packages = args.filter((arg) => arg && typeof arg === 'string');
})
Expand Down
1 change: 0 additions & 1 deletion src/bin-set-semver-ranges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { setVersionRange } from './manifests';
let packages: string[] = [];

program
.command(`${SET_SEMVER_RANGES.command} ${SET_SEMVER_RANGES.args}`)
.option(OPTION_SEMVER_RANGE.spec, OPTION_SEMVER_RANGE.description)
.action((...args) => {
packages = args.filter((arg) => arg && typeof arg === 'string');
Expand Down
17 changes: 6 additions & 11 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,31 @@ const PACKAGES_PATTERNS = [PACKAGES_PATTERN];
const ALL_PATTERNS = [MONOREPO_PATTERN, PACKAGES_PATTERN];

export const FIX_MISMATCHES = {
args: '[packages...]',
command: 'fix-mismatches',
command: 'fix-mismatches [packages...]',
defaultPatterns: PACKAGES_PATTERNS,
description: 'set dependencies used with different versions to the same version'
};

export const FORMAT = {
args: '[packages...]',
command: 'format',
command: 'format [packages...]',
defaultPatterns: ALL_PATTERNS,
description: 'sort and shorten properties according to a convention'
};

export const LIST = {
args: '[packages...]',
command: 'list',
defaultPatterns: PACKAGES_PATTERNS,
command: 'list [packages...]',
defaultPatterns: ALL_PATTERNS,
description: 'list every dependency used in your packages'
};

export const LIST_MISMATCHES = {
args: '[packages...]',
command: 'list-mismatches',
command: 'list-mismatches [packages...]',
defaultPatterns: PACKAGES_PATTERNS,
description: 'list every dependency used with different versions in your packages'
};

export const SET_SEMVER_RANGES = {
args: '[packages...]',
command: 'set-semver-ranges',
command: 'set-semver-ranges [packages...]',
defaultPatterns: ALL_PATTERNS,
description: 'set semver ranges to the given format'
};
Expand Down

0 comments on commit 7513ba5

Please sign in to comment.