Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update meow from v5.0.0 to v7.0.1 #489

Merged
merged 1 commit into from Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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