-
-
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
fix: improve 404 logics #20
Conversation
lib/can-npm-publish.js
Outdated
// FIXME: However,This logics will break json chunk(chunk may be invalid json) | ||
// https://github.com/azu/can-npm-publish/issues/19 | ||
// https://github.com/npm/cli/issues/2740 | ||
JSON.parse(stdErrorStr); // parse check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm 7 outputs
"npm"
"Err!"
""
"JSON strings..."
""
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic will break following pattern
"npm"
"Err!"
""
"JSON part1"
"JSON part2"
""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--json
output include non JSON string.--json
output JSON string into stderr--json
output JSON string into stdoutFor the reason, We need to parse stdout and stderr.
fix #19