Commitlint: extending shareable config by scope fails to find package

Created on 19 Apr 2019  路  10Comments  路  Source: conventional-changelog/commitlint

Expected Behavior



As documented here and implemented here, I should be able to extend my config by scope alone.

Current Behavior


In the case of this shareable config, extending @form8ion fails, but extending @form8ion/commitlint-config works properly.


Error Details

Error: Cannot find module "@form8ion" from "/Users/travi/development/form8ion/cli"
    at resolveId (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:120:14)
    at resolveConfig (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:95:20)
    at reduce (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:49:20)
    at Array.reduce (<anonymous>)
    at loadExtends (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:47:32)
    at resolveExtends (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:30:19)
    at Object.$If_1 (/Users/travi/development/form8ion/cli/node_modules/@commitlint/load/lib/index.js:69:45)
    at Object.<anonymous> (/Users/travi/development/form8ion/cli/node_modules/@commitlint/load/lib/index.js:142:17)

Affected packages

  • [x] cli
  • [ ] core
  • [ ] prompt
  • [ ] config-angular

Possible Solution


Steps to Reproduce (for bugs)


  1. Clone https://github.com/form8ion/remark-lint-preset
  2. Remove /commitlint-config from .commitlintrc.js
  3. Attempt to make a commit
  4. See Error

Context


I'm attempting to use a new config for a new org. Configs I've used for other orgs have not been scoped, but would like to start using scoped configs instead. This is stopping me from using the short form and instead forcing me to use the full package name.

Your Environment

| Executable | Version |
| ---: | :--- |
| commitlint --version | 7.5.2 |
| git --version | 2.21.0 |
| node --version | v10.15.3 |

Most helpful comment

8.0 now is our latest release so this works by default 馃殌

All 10 comments

Hey @travi, as far as I can follow this you are right about that it should work. But lookinh at the latest release from Feb 12 I think the only thing that's missing to make this work is a new release. I'll check with the others if we can release the current state.

@escapedcat Yes! The only thing that blocked the release was the security warnings with our dependencies. Also, the weird behavior of the #missinglibrary delayed the release. I think we are good to go! 馃槃

Release is being delayed by audit-issues of several sub-dependencies. We're working on it.

ah. since it was in the docs, i guess i didnt track things far enough to realize that it hadn't made it out yet. i'll just keep an eye out then. looking forward to it

No, that's totally our fault! I lost track of making the release after the security vulnerability bombardment from last weeks. I think we will release soon, I'll leave a message here pinging you whenever it's ready!

no worries. in a way im actually glad that the docs update made it out first, which i normally wouldnt think. otherwise i would have assumed it wasnt planned and just continued using the old convention. at least enabled me to learn that it was planned and i could watch for it.

either way, im a big fan. keep up the good work

@travi You can use this now with commitlint@8, but be ware, this is still considered a beta release (next tag on npm). We are testing it out right now to sort out possible issues before we fully release. Right now I didn't encounter one yet (_knocking on wood_) but still, its a beta 馃槃

thanks! i tried it out in one of my newer projects and it looks good to me

Perfect, thanks for testing it out 鉂わ笍 I'll close this issue as soon as we fully release version 8.

8.0 now is our latest release so this works by default 馃殌

Was this page helpful?
0 / 5 - 0 ratings