-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Parseable output #22
Comments
We need to change can-npm-publish/lib/can-npm-publish.js Lines 208 to 215 in e7eacbf
Current type CanNpmPublishResult = {
"ok": boolean;
"messages": string[];
"errors": Error[];
};
type canNpmPublish = (path: string) => Promise<CanNpmPublishResult>; If user pass 📝 TODO
|
Interested in a TypeScript conversion while we're at it? |
I'm ok that convert to TypeScript. |
@azu When |
I think that
If you want to support output as |
As a developer, I would like to know the nature of the failure canonically so that I can decide what to do next. Currently, the only option is to parse the error result message from stderr with the
--verbose
flag or the Error that is thrown when callingcanNpmPublish
.I imagine this could be made available via a
--json
flag and as an option provided tocanNpmPublish
, where the error message is returned with a predictable error code instead of being thrown.Happy to open a PR with any implementation suggestions. Thanks!
The text was updated successfully, but these errors were encountered: