conventional-changelog / releaser-tools

Create a GitHub/GitLab/etc. release using a project's commit messages and metadata.
MIT License
388 stars 34 forks source link

Minimist parsing error #184

Open tylergets opened 4 years ago

tylergets commented 4 years ago

Seeing a random error on our deployments, will continue to dig deeper.


                    throw new TypeError(`Expected "${key}" default value to be of type "${expectedType}", got ${prettyPrint(defaultType)}`);
                    ^

TypeError: Expected "verbose" default value to be of type "boolean", got "string"
    at /usr/local/lib/node_modules/conventional-github-releaser/node_modules/minimist-options/index.js:101:12
    at Array.forEach (<anonymous>)
    at buildOptions (/usr/local/lib/node_modules/conventional-github-releaser/node_modules/minimist-options/index.js:64:23)
    at meow (/usr/local/lib/node_modules/conventional-github-releaser/node_modules/meow/index.js:136:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/conventional-github-releaser/src/cli.js:9:13)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
##[error]Process completed with exit code 1.```
csakbalint commented 4 years ago

We are having the same issue? Any new information about this?

csakbalint commented 4 years ago

The latest patch (4.0.2) of conventional-gitlab-releaser breaks the release process. I fixed the version to the previous one.

jimlindeman commented 4 years ago

The specific error on this is in the usage help verbose definition in the src/cli.js:

    verbose: {
      alias: 'v',
      default: 'false',
      type: 'boolean'
    },

should be

    verbose: {
      alias: 'v',
      default: false,
      type: 'boolean'
    },
jimlindeman commented 4 years ago

Please patch this asap, as those fetching latest of this package are broken and will have to hardlink to 3.1.3.

jimlindeman commented 4 years ago

This is actually a long standing bug, but only exposed as a problem with the update to newer 'meow' package as part of https://www.npmjs.com/package/conventional-gitlab-releaser/v/4.0.2 , which started type-checking the default value passed in.

jimlindeman commented 4 years ago

PR for fix for this: https://github.com/conventional-changelog/releaser-tools/pull/185