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

v5 config-angular forces the type to uppercase #145

Closed
2 of 4 tasks
mattlewis92 opened this issue Nov 20, 2017 · 6 comments
Closed
2 of 4 tasks

v5 config-angular forces the type to uppercase #145

mattlewis92 opened this issue Nov 20, 2017 · 6 comments
Labels

Comments

@mattlewis92
Copy link
Contributor

Expected Behavior

The type to be lowercase, the schema enforces this

Current Behavior

When using the prompt, the type is forced to uppercase:
screen shot 2017-11-20 at 09 25 51

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I guess the bug is somewhere in the prompt source code, unfortunately I don't have the time right now to debug further and send a PR 😢

Steps to Reproduce (for bugs)

  1. use:
"@commitlint/cli": "^5.0.1",
"@commitlint/config-angular": "^5.0.1",
"@commitlint/prompt": "^5.0.1",
  1. Run the commit prompt
  2. Try and type a type and it'll be forced to uppercase

Context

Seems to just be a v5 bug, v4 works perfectly.

Your Environment

Executable Version
commitlint --version 5.0.1
git --version 2.15.0
node --version v8.9.0
@marionebl marionebl added the bug label Nov 20, 2017
@marionebl
Copy link
Contributor

My wild guess is this is related to changing the value for subject-type to lower-case from lowerCase.

@marionebl
Copy link
Contributor

I reset the latest tag for the angular config to @4, does this solve the issue for now?

@mattlewis92
Copy link
Contributor Author

Thanks for the quick response 😄 I tried upgrading just the cli + core to v5 and its now throwing:

> commitlint -e

/Users/mattlewis/Code/open-source/angular-calendar/node_modules/@commitlint/cli/lib/cli.js:67
                throw err;
                ^

TypeError: ensure-case: Unknown target case "lowerCase"
    at ensureCase (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/ensure-case.js:39:10)
    at exports.default (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/rules/type-case.js:27:40)
    at /Users/mattlewis/Code/open-source/angular-calendar/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/lint.js:72:18
    at Array.map (<anonymous>)
    at Object.<anonymous> (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/lint.js:53:8)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

@marionebl
Copy link
Contributor

...argh.

@marionebl
Copy link
Contributor

marionebl commented Nov 20, 2017

I published a hotfix 5.0.2 for @commitlint/core that should do away with the new problem you encountered.

@mattlewis92
Copy link
Contributor Author

That worked, thank you 👍 mattlewis92/angular-calendar@63a0bfa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants