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
But when I try to apply this adapter with commitizen I got the error in the title.
When I transformed my exported function to non-async, but using "().then()" it was resolved
The reason is, when exporting such thing, its type is: [object AsyncFunction]
However, commitizen will emit error.
Because: https://github.com/commitizen/cz-cli/blob/master/src/common/util.js
line 41: return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
This should be:
…"Function"s (#927)
current behavior is the utility tries to match only "Function" and therefore "AsyncFunction" will be
considered bad and error will be thrown
fix#926
I created my own adapter for commitizen. At first, I built the adapter using TSC.
The problem is that I export an async function:
But when I try to apply this adapter with commitizen I got the error in the title.
When I transformed my exported function to non-async, but using "().then()" it was resolved
The reason is, when exporting such thing, its type is:
[object AsyncFunction]
However, commitizen will emit error.
Because: https://github.com/commitizen/cz-cli/blob/master/src/common/util.js
line 41:
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
This should be:
return functionToCheck && (getType.toString.call(functionToCheck) === '[object Function]' || getType.toString.call(functionToCheck) === '[object AsyncFunction]');
The text was updated successfully, but these errors were encountered: