Skip to content
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

refactor(CLI): Replace process.stdout use with modern logs #10087

Merged
merged 1 commit into from Oct 14, 2021

Conversation

pgrzesik
Copy link
Contributor

Addresses: #9860

Replace leftover process.stdout usages with modern logs

@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #10087 (c4c23e7) into master (db85602) will increase coverage by 0.00%.
The diff coverage is 80.48%.

❗ Current head c4c23e7 differs from pull request most recent head 7c7aa08. Consider uploading reports for the commit 7c7aa08 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10087   +/-   ##
=======================================
  Coverage   85.38%   85.39%           
=======================================
  Files         333      334    +1     
  Lines       13571    13604   +33     
=======================================
+ Hits        11588    11617   +29     
- Misses       1983     1987    +4     
Impacted Files Coverage Δ
lib/plugins/aws/provider.js 94.27% <ø> (+0.30%) ⬆️
lib/utils/processBackendNotificationRequest.js 44.44% <25.00%> (-5.56%) ⬇️
lib/utils/open.js 14.45% <33.33%> (+0.87%) ⬆️
lib/plugins/aws/info/index.js 97.22% <66.66%> (-2.78%) ⬇️
lib/utils/openBrowser.js 64.70% <71.42%> (+6.37%) ⬆️
lib/cli/handle-error.js 84.84% <100.00%> (ø)
lib/cli/render-help/command.js 100.00% <100.00%> (ø)
lib/cli/render-version.js 64.51% <100.00%> (+1.18%) ⬆️
...gins/aws/package/compile/events/s3/configSchema.js 100.00% <100.00%> (ø)
...ib/plugins/aws/package/lib/generateCoreTemplate.js 95.55% <100.00%> (+0.20%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db85602...7c7aa08. Read the comment docs.

@@ -21,5 +21,6 @@ module.exports = (commandName) => {
}
if (commandSchema) renderOptionsHelp(Object.assign({}, commandSchema.options));

process.stdout.write('\n');
legacy.consoleLog('');
writeText();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this confirmed needed for modern logs? (Technically help output was done, and accepted as is currently)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to keep it the same as it's right now, it needs to be added - process.stdout.write('\n') is now printed unconditionally, if I remove it without adding replacement for modern logs the output will change (unless I'm missing something?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! That's correct then :)

lib/utils/openBrowser.js Outdated Show resolved Hide resolved
@pgrzesik pgrzesik force-pushed the replace-leftover-use-of-process-stdout branch from 7e05bfc to 7c7aa08 Compare October 13, 2021 15:53
@pgrzesik pgrzesik requested a review from medikoo October 13, 2021 16:03
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@pgrzesik pgrzesik merged commit be00a26 into master Oct 14, 2021
@pgrzesik pgrzesik deleted the replace-leftover-use-of-process-stdout branch October 14, 2021 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants