-
Notifications
You must be signed in to change notification settings - Fork 914
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
Can not use @commitlint/cz-commitlint as commitizen's adapter #3949
Comments
I also faced the same issue. |
Update - March 13, 2024: The workaround described below is no longer necessary. Upgrade Version For details, see the release notes at conventional-changelog/commitlint v19.1.0. Workaround for ESM version of commitlint: Create an adapter module: exports.prompter = async (inquirerIns, commit) => {
;(await import('@commitlint/cz-commitlint')).prompter(inquirerIns, commit)
} In {
"config": {
"commitizen": {
"path": "./cz-adapter.cjs"
}
}
} |
@frantic1048 Thanks, it works for me. |
This comment was marked as duplicate.
This comment was marked as duplicate.
* feat: add CJS export for cz-commitlint relates to: #3850 (comment) resolves #3949 * chore: add .cts to eslintrc * fix: workaround cts issues of vitest and typescript
As a reminder, upgrading |
Steps to Reproduce
pnpm cz
Current Behavior
got error
Expected Behavior
Run commitizen normally
Affected packages
Possible Solution
#3850
Context
No response
commitlint --version
@commitlint/cli@19.0.3
git --version
git version 2.44.0.windows.1
node --version
v20.11.1
The text was updated successfully, but these errors were encountered: