You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expecting this package to provide the ability use provided custom scopes and guided commit formatting settings via configuration file tools/.cz-config.js as a commitizen plugin.
When following documentation there is no reference to providing any kind of choices parameter
Tried using tools/projectScopes.js to implement custom scopes function for use with other tooling. ex: commitlint
Also tried barebones example config from repo with similar results
Dynamic and static config test setups in tools/.cz-config.js can be found on starting on line 37.
Seems similar to issue #87 which was not resolved in a clear manner other than providing the example file which also fails.
* Executing task: yarn run prepare-commit
yarn run v1.22.19
$ cz -e
cz-cli@4.2.5, cz-customizable@6.9.1
>>> Using cz-customizable config specified in your package.json: /home/vscode/projects/opensource/bugs/cz-choices-bug/tools/.cz-config.js
All lines except first will be wrapped after 100 characters.
You must provide a `choices` parameter <----------------------------------- ERROR APPEARS HERE
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
* The terminal process "/usr/bin/bash '-c', 'yarn run prepare-commit'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
yarn run v1.22.19
$ ./node_modules/cz-customizable/standalone.js
cz-customizable standalone version
>>> Using cz-customizable config specified in your package.json: /home/vscode/projects/opensource/bugs/cz-choices-bug/tools/.cz-config.js
All lines except first will be wrapped after 100 characters.
/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/inquirer/lib/prompts/base.js:80
throw new Error('You must provide a `' + name + '` parameter');
^
Error: You must provide a `choices` parameter <--- ERROR with reference to `choices`in standalone mode
at ListPrompt.throwParamError (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/inquirer/lib/prompts/base.js:80:11)
at new ListPrompt (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/inquirer/lib/prompts/list.js:21:12)
at PromptUI.fetchAnswer (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/inquirer/lib/ui/prompt.js:103:25)
at doInnerSub (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:22:31)
at outerNext (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:17:70)
at OperatorSubscriber._this._next (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
at OperatorSubscriber.Subscriber.next (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
at /home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:28:28
at OperatorSubscriber._this._next (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
at OperatorSubscriber.Subscriber.next (/home/vscode/projects/opensource/bugs/cz-choices-bug/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
* The terminal process "/usr/bin/bash '-c', 'yarn run commit'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Make changes to index.js files located in apps/app1|app2
Run yarn both scripts from root level package.json
a. prepare-commit assumes cz-customizable is a commitizen plugin
b. commit assumes cz-customizable is a standalone plugin
Expect to see menu prompt for building commit messages.
Errors out in both scripts. Note any references to choices parameter in both scripts.
The text was updated successfully, but these errors were encountered:
Be happy to jump in and help debug this if your open to it @leonardoanalista.
Bit of a blocker for me, so I can spend some time.
Also thank you for the assembling this great library. Saving me a ton of trouble in for other things.
ontoneio
changed the title
[bug] - Breaks as Commitizen plugin and standalone using custom config and config example
[bug] - Breaks as Commitizen plugin and standalone using custom/example config with error referencing missing choices parameter
Aug 13, 2022
Bug Repro URL : https://github.com/ontoneio/cz-choices-bug
Dependency info
16.16.0
1.22.19
Brief
tools/.cz-config.js
as acommitizen
plugin.choices
parametertools/projectScopes.js
to implement custom scopes function for use with other tooling. ex:commitlint
tools/.cz-config.js
can be found on starting on line37
.Steps taken
I followed instructions from this config instruction in Configuration (Shared between options 1,2 and 3) which results in below output when run from script
prepare-commit
in thepackage.json
.as well as using the instructions from Option 2 - cz-customizable in standalone mode which results in below output when run from script
commit
in thepackage.json
.Reproduction
git clone https://github.com/ontoneio/cz-choices-bug
index.js
files located inapps/app1|app2
yarn
both scripts from root levelpackage.json
a.
prepare-commit
assumescz-customizable
is acommitizen
pluginb.
commit
assumescz-customizable
is astandalone
pluginchoices
parameter in both scripts.The text was updated successfully, but these errors were encountered: