Closed
Description
When trying to lint a message with config-lerna-scopes, the following error is issued:
$ echo "chore(api): fix something in api's build" | npx commitlint
/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/cli/cli.js:130
throw err;
^
TypeError: Cannot read property 'map' of undefined
at getPackages (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/config-lerna-scopes/index.js:13:3)
at scope-enum (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/config-lerna-scopes/index.js:6:37)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:23:28
at Promise (<anonymous>)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:21:26
at Promise (<anonymous>)
at exports.default (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:14:9)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/load.js:109:44
at Array.map (<anonymous>)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/load.js:108:79
After investigation, it seems the plugin relies on lerna/lib/Repository#packages
which does not exist anymore (at least with lerna 2.4.0)