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

fix: show exact package name while prompting for installation #2338

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Jan 9, 2021

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
Nope

If relevant, did you update the documentation?
N/A

Summary

Currently, the package name that shows up while prompting for installation is the same as the argument supplied as part of process.argv. However, this would be misleading if the user supplies the alias or the loader/plugin command (generators).

pkg = await promptInstallation(pkg, () => {
logger.error(`For using this command you need to install: '${green(commandName)}' package`);
});

$ webpack loader

Before

before

After

Screenshot 2021-01-10 at 2 29 10 PM

Does this PR introduce a breaking change?
Nope

Other information
N/A

@jamesgeorge007 jamesgeorge007 requested a review from a team as a code owner January 9, 2021 18:02
@jamesgeorge007 jamesgeorge007 force-pushed the hotfix/prompt-installation branch 4 times, most recently from 2635a0d to f1b3130 Compare January 9, 2021 18:36
@codecov
Copy link

codecov bot commented Jan 9, 2021

Codecov Report

Merging #2338 (66691e7) into master (767fe6b) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2338   +/-   ##
=======================================
  Coverage   68.19%   68.19%           
=======================================
  Files          51       51           
  Lines        2053     2053           
  Branches      506      506           
=======================================
  Hits         1400     1400           
  Misses        653      653           
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 89.84% <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 767fe6b...66691e7. Read the comment docs.

@jamesgeorge007 jamesgeorge007 force-pushed the hotfix/prompt-installation branch from f1b3130 to f8554d8 Compare January 10, 2021 05:51
Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

Left a suggestion.

packages/webpack-cli/lib/webpack-cli.js Outdated Show resolved Hide resolved
packages/webpack-cli/lib/webpack-cli.js Outdated Show resolved Hide resolved
packages/webpack-cli/lib/webpack-cli.js Outdated Show resolved Hide resolved
This was referenced Mar 13, 2021
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.

4 participants