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

Bump meow from 5.0.0 to 6.0.0 #4504

Merged
merged 2 commits into from
Jan 9, 2020
Merged

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps meow from 5.0.0 to 6.0.0.

Release notes

Sourced from meow's releases.

v6.0.0

Breaking

  • Require Node.js 8 cd635d4
  • Remove flag's aliases from the flags property (#108) f36715c
  • Only consider enabling autoHelp/autoVersion in case there is only one argument in process.argv (#114) cd29865
  • Switch from loud-rejection to hard-rejection f60c26e

Enhancements

  • Add TypeScript definition (#116) f1036df
  • Add support for number flag type (#103) 5ef9478
  • Add hardRejection option 2bcfee7

sindresorhus/meow@v5.0.0...v6.0.0

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the .dependabot/config.yml file in this repo:

  • Update frequency
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [meow](https://github.com/sindresorhus/meow) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/sindresorhus/meow/releases)
- [Commits](sindresorhus/meow@v5.0.0...v6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added the pr: dependencies relates to dependencies label Jan 1, 2020
@ntwb
Copy link
Member

ntwb commented Jan 2, 2020

I tried restarting the failed Coveralls Job, same result:


2m 19s
Coveralls Parallel
1s
##[error]Node run failed with exit code 1
Run coverallsapp/github-action@master
  with:
    github-token: ***
    parallel: true
    path-to-lcov: ./.coverage/lcov.info
    coveralls-endpoint: https://coveralls.io
  env:
    CI: true
Using lcov file: ./.coverage/lcov.info
##[error]Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
##[error]Node run failed with exit code 1

There is an old issue noting the same at lemurheavy/coveralls-public#1096

I've restarted to CI again, 500 error seems to me a Coveralls issue...

@ntwb
Copy link
Member

ntwb commented Jan 5, 2020

I've added a comment to this issue that appears to be what we're seeing

coverallsapp/github-action#23

@ntwb
Copy link
Member

ntwb commented Jan 7, 2020

Coveralls have resolved the issue

@hudochenkov
Copy link
Member

@stylelint/contributors does anyone have time to review this, please?

@ybiquitous
Copy link
Member

The meow's latest version includes the built-in type definitions, but do we need the @types/meow package yet?

"@types/meow": "^5.0.0",

Also, can we enable the type-check below?

stylelint/lib/cli.js

Lines 324 to 325 in 1c4d6d4

// @ts-ignore TODO TYPES
meow(meowOptions);

@ybiquitous
Copy link
Member

When I try it, the following compile error occurs:

$ npm run lint:types

> stylelint@12.0.1 lint:types /Users/koba/git/stylelint/stylelint
> tsc

lib/cli.js:322:19 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(helpMessage: string, options?: Options<Options<unknown>> | undefined): Result<Options<unknown>>', gave the following error.
    Argument of type '{ autoHelp: boolean; autoVersion: boolean; help: string; flags: { 'allow-empty-input': { alias: string; type: string; }; cache: { type: string; }; 'cache-location': { type: string; }; config: { type: string; }; ... 20 more ...; version: { ...; }; }; pkg: { ...; }; argv: string[]; }' is not assignable to parameter of type 'string'.
  Overload 2 of 2, '(options?: Options<Options<unknown>> | undefined): Result<Options<unknown>>', gave the following error.
    Argument of type '{ autoHelp: boolean; autoVersion: boolean; help: string; flags: { 'allow-empty-input': { alias: string; type: string; }; cache: { type: string; }; 'cache-location': { type: string; }; config: { type: string; }; ... 20 more ...; version: { ...; }; }; pkg: { ...; }; argv: string[]; }' is not assignable to parameter of type 'Options<Options<unknown>>'.
      Types of property 'flags' are incompatible.
        Type '{ 'allow-empty-input': { alias: string; type: string; }; cache: { type: string; }; 'cache-location': { type: string; }; config: { type: string; }; 'config-basedir': { type: string; }; 'print-config': { type: string; }; ... 18 more ...; version: { ...; }; }' is not assignable to type 'Options<unknown>'.
          Property ''allow-empty-input'' is incompatible with index signature.
            Type '{ alias: string; type: string; }' is not assignable to type 'boolean | "string" | "number" | "boolean" | ((arg: string) => boolean) | "array" | BaseOption<"string", string> | BaseOption<"boolean", boolean> | BaseOption<"number", number> | BaseOption<...>'.
              Type '{ alias: string; type: string; }' is not assignable to type 'BaseOption<"array", readonly unknown[]>'.
                Types of property 'type' are incompatible.
                  Type 'string' is not assignable to type '"array" | undefined'.

322  const cli = meow(meowOptions);
                      ~~~~~~~~~~~
diff --git a/lib/cli.js b/lib/cli.js
index 250380a2..b91951a0 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -319,9 +319,7 @@ const meowOptions = {
 module.exports = (argv) => {
 	meowOptions.argv = argv;
 	/** @type {CLIOptions} */
-	const cli =
-		// @ts-ignore TODO TYPES
-		meow(meowOptions);
+	const cli = meow(meowOptions);
 
 	const invalidOptionsMessage = checkInvalidCLIOptions(meowOptions.flags, cli.flags);
 
diff --git a/package.json b/package.json
index 9529bb5c..8442e660 100644
--- a/package.json
+++ b/package.json
@@ -98,7 +98,6 @@
     "@types/global-modules": "^2.0.0",
     "@types/globjoin": "^0.1.0",
     "@types/lodash": "^4.14.149",
-    "@types/meow": "^5.0.0",
     "@types/micromatch": "^3.1.1",
     "benchmark": "^2.1.4",
     "common-tags": "^1.8.0",

@ybiquitous
Copy link
Member

* [`5ef9478`](https://github.com/sindresorhus/meow/commit/5ef947894e40dae3789dc7336967f6d1e3d74d4d) Add support for `number` flag type ([#103](https://github-redirect.dependabot.com/sindresorhus/meow/issues/103))

We can use the number flag type for max-warnings! 😄

stylelint/lib/cli.js

Lines 293 to 295 in 1c4d6d4

'max-warnings': {
alias: 'mw',
},

@ybiquitous
Copy link
Member

ybiquitous commented Jan 9, 2020

What we should do for better type checking of cli.js:

  • Remove @types/meow package.
  • Add missing type to some flags. For example:
'max-warnings': {
  alias: 'mw',
+ type: 'number',
},
  • Camelize long flag names (no behavior change). For example:
-'max-warnings': {
+maxWarnings: {
  alias: 'mw',
+ type: 'number',
},
  • Inline the meowOptions variable. Otherwise, the compile fails but I'm not sure why... 🤷‍♂
-const cli = meow(meowOptions);
+const cli = meow({
  flags: { ... },
});

However, these tasks will produce many diffs, so I don't know we should do them on this PR (it may be better to do it on another PR?).

@hudochenkov
Copy link
Member

Let's merge this one, and then you'll create a new one with your findings.

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Looks good 👍

@hudochenkov hudochenkov merged commit 71e63cf into master Jan 9, 2020
@hudochenkov hudochenkov deleted the dependabot/npm_and_yarn/meow-6.0.0 branch January 9, 2020 08:11
@ybiquitous
Copy link
Member

Is there a duplicate issue? Otherwise, I will create a new issue about #4504 (comment)

@hudochenkov
Copy link
Member

You could just send a PR without opening an issue.

@ybiquitous
Copy link
Member

OK. Good 👍

ybiquitous added a commit that referenced this pull request Jan 9, 2020
meow v6 has own built-in type definitions.
See <#4504 (comment)>
hudochenkov pushed a commit that referenced this pull request Jan 9, 2020
meow v6 has own built-in type definitions.
See <#4504 (comment)>
ybiquitous added a commit that referenced this pull request Jan 9, 2020
This aims to prepare for type-checking `cli.js` and does NOT type-check actually.

- Camelize option names for type-checking.
- Add missing `type` for some options.
- Sort options alphabetically for readability.
- Add a unit test for the definition (A system test is too much for this purpose).

See <#4504 (comment)> for details.
hudochenkov pushed a commit that referenced this pull request Jan 11, 2020
* Refactor CLI options definition

This aims to prepare for type-checking `cli.js` and does NOT type-check actually.

- Camelize option names for type-checking.
- Add missing `type` for some options.
- Sort options alphabetically for readability.
- Add a unit test for the definition (A system test is too much for this purpose).

See <#4504 (comment)> for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: dependencies relates to dependencies
Development

Successfully merging this pull request may close these issues.

3 participants