Skip to content

Commit

Permalink
Update meow from v5.0.0 to v7.0.1 (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornstar committed Jul 3, 2020
1 parent 522d264 commit 744090a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions cli-main.js
Expand Up @@ -46,6 +46,7 @@ const cli = meow(`
- Add XO to your project with \`npm init xo\`.
- Put options in package.json instead of using flags so other tools can read it.
`, {
autoVersion: false,
booleanDefault: undefined,
flags: {
fix: {
Expand Down Expand Up @@ -100,15 +101,14 @@ const cli = meow(`
type: 'boolean'
},
stdinFilename: {
type: 'string',
alias: 'filename'
type: 'string'
}
}
});

updateNotifier({pkg: cli.pkg}).notify();

const {input, flags: options} = cli;
const {input, flags: options, showVersion} = cli;

// Make data types for `options.space` match those of the API
// Check for string type because `xo --no-space` sets `options.space` to `false`
Expand Down Expand Up @@ -141,6 +141,10 @@ if (input[0] === '-') {
input.shift();
}

if (options.version) {
showVersion();
}

if (options.nodeVersion) {
if (options.nodeVersion === 'false') {
options.nodeVersion = false;
Expand All @@ -154,6 +158,10 @@ if (options.nodeVersion) {
if (options.stdin) {
const stdin = await getStdin();

if (options.stdinFilename) {
options.filename = options.stdinFilename;
}

if (options.fix) {
const result = xo.lintText(stdin, options).results[0];
// If there is no output, pass the stdin back out
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -81,7 +81,7 @@
"json-stable-stringify-without-jsonify": "^1.0.1",
"json5": "^2.1.3",
"lodash": "^4.17.15",
"meow": "^5.0.0",
"meow": "^7.0.1",
"micromatch": "^4.0.2",
"open-editor": "^2.0.1",
"p-reduce": "^2.1.0",
Expand Down

0 comments on commit 744090a

Please sign in to comment.