-
Notifications
You must be signed in to change notification settings - Fork 442
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
require('@commitlint/load') does not work properly anymore #124
Comments
So would it be better for us to have a
|
I think, typecheck is enough for our problem. Not sure, commitlint @ load will change return type in near future, so checking if require returns function or object with field |
I might fix this in a commit on #126, as on that branch we can actually properly test config loading. |
Will try in several days |
Ah, actually, looks like commitlint 9.0.0 was broken, and the fix was in 9.0.1:
Can you first try with [email protected]? I don't know a whole heap about commitlint, but it looks like they've moved from javascript to typescript which seems to be where the issue came in. |
I've just tried with [email protected], and @9.0.0, and I'm unable to reproduce this issue; I'm on node.js v12.8.x |
Hm. I am now unable to reproduce this issue too. Probably, the problem could be somehow connected with yarn.lock and new version of commitlint. It appeared, when I decided to upgrade all deps and tried to call Thank you for your participant @ThisIsMissEm ! Will reopen in case, problem occurs again |
The issue still exists for me, when changing this line: cz-conventional-changelog/index.js Line 31 in aae2548
to var commitlintLoad = require('@commitlint/load').default; it starts working... |
The issue still exists today as you can see in issue #129. Tried with version 8.3, 9.1 and version 12.0 of commitlint, the config is not loaded correctly. |
Since @commitlint/load release v9, this line of code is not working anymore and as a result, no config could be downloaded
https://github.com/commitizen/cz-conventional-changelog/blob/master/index.js#L32
The reason is
require('@commitlint/load')
now returns{default: func}
but not function itself.Here is my package.json:
It didnt work even if you specify @commitlint packages versions as 8.3.5, or specify @commitilint/load directly to deps with version 8.3.5. It looks like
cz-conventional-changelog
installs latest version by itselfThe text was updated successfully, but these errors were encountered: