Skip to content

Commit

Permalink
feat: readd --engine-ignore / --engine-no-dev
Browse files Browse the repository at this point in the history
To ease transition away from them
  • Loading branch information
voxpelli committed Apr 4, 2024
1 parent 964954b commit ea00dd9
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const cli = meow(`
flags: {
debug: { type: 'boolean' },
engineCheck: { shortFlag: 'e', type: 'boolean' },
engineIgnore: { type: 'string', isMultiple: true },
engineNoDev: { type: 'boolean' },
ignore: { shortFlag: 'i', type: 'string', isMultiple: true },
ignoreDev: { shortFlag: 'd', type: 'boolean' },
includeWorkspaceRoot: { type: 'boolean', 'default': true },
Expand All @@ -63,8 +65,8 @@ if (cli.input.length > 1) {
const {
debug,
engineCheck,
ignore,
ignoreDev,
engineIgnore, // deprecated
engineNoDev, // deprecated
includeWorkspaceRoot,
peerCheck,
strict,
Expand All @@ -74,6 +76,21 @@ const {
workspaces,
} = cli.flags;

let {
ignore,
ignoreDev,
} = cli.flags;

// Handle deprecated flags
if (engineIgnore?.length) {
ignore = [...ignore || [], ...engineIgnore];
console.error(chalk.bgRed.black('DEPRECATED:') + ' --engine-ignore is replace by --ignore');
}
if (engineNoDev) {
ignoreDev = engineNoDev;
console.error(chalk.bgRed.black('DEPRECATED:') + ' --engine-no-dev is replace by --ignore-dev');
}

/** @type {import('installed-check-core').InstalledChecks[]} */
let checks = [
...engineCheck ? /** @type {const} */ (['engine']) : [],
Expand Down

0 comments on commit ea00dd9

Please sign in to comment.