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

Remove Serverless: prefix from inquirer #82

Merged
merged 1 commit into from
May 12, 2021

Conversation

pgrzesik
Copy link
Contributor

BREAKING CHANGE: Inquirer prompt will have no prefix instead of Serverless:
If you wish, to still use Serverless: prefix, override it on the client side.

Related to: serverless/serverless#9367

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #82 (b21baff) into master (724fed0) will not change coverage.
The diff coverage is 0.00%.

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

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   91.59%   91.59%           
=======================================
  Files           9        9           
  Lines         226      226           
=======================================
  Hits          207      207           
  Misses         19       19           
Impacted Files Coverage Δ
inquirer/index.js 73.33% <0.00%> (ø)

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 724fed0...59b2662. Read the comment docs.

@pgrzesik pgrzesik self-assigned this May 12, 2021
const BasePrompt = require('inquirer/lib/prompts/base');
const originalGetQuestion = BasePrompt.prototype.getQuestion;
BasePrompt.prototype.getQuestion = function () {
this.opt.prefix = 'Serverless:';
this.opt.prefix = '';
Copy link
Contributor Author

@pgrzesik pgrzesik May 12, 2021

Choose a reason for hiding this comment

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

Overriding to empty string because by default it's equal to chalk.green('?')

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@pgrzesik pgrzesik requested a review from medikoo May 12, 2021 10:23
const BasePrompt = require('inquirer/lib/prompts/base');
const originalGetQuestion = BasePrompt.prototype.getQuestion;
BasePrompt.prototype.getQuestion = function () {
this.opt.prefix = 'Serverless:';
this.opt.prefix = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe let's add comment, that we're overriding ?, otherwise it looks obsolete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call 👍

BREAKING CHANGE: Inquirer prompt will have no prefix instead of `Serverless:`
If you wish, to still use `Serverless:` prefix, override it on the client side.
@pgrzesik pgrzesik force-pushed the remove-inquirer-prompt-prefix branch from d58c637 to 59b2662 Compare May 12, 2021 10:26
@pgrzesik pgrzesik requested a review from medikoo May 12, 2021 10:26
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.

👍

@pgrzesik pgrzesik merged commit edb8593 into master May 12, 2021
@pgrzesik pgrzesik deleted the remove-inquirer-prompt-prefix branch May 12, 2021 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants