Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Conversation

@anshumanv
Copy link
Member

What kind of change does this PR introduce?

feat

Did you add tests for your changes?

yet to

If relevant, did you update the documentation?
yet to

Summary
Adds a prompt option to allow users to prevent auto installation

Does this PR introduce a breaking change?
no

Other information
wip on some fixes and tests

@anshumanv anshumanv marked this pull request as ready for review June 11, 2021 20:25
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #189 (9df20c9) into master (8f22c43) will decrease coverage by 4.25%.
The diff coverage is 57.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
- Coverage   88.54%   84.28%   -4.26%     
==========================================
  Files           3        3              
  Lines         192      210      +18     
  Branches       39       43       +4     
==========================================
+ Hits          170      177       +7     
- Misses         20       29       +9     
- Partials        2        4       +2     
Impacted Files Coverage Δ
src/installer.js 84.03% <52.17%> (-8.05%) ⬇️
src/plugin.js 84.09% <100.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 1024ae1...9df20c9. Read the comment docs.

src/installer.js Outdated
peerDependencies: true,
quiet: false,
// flip to true
prompt: false,
Copy link
Member

Choose a reason for hiding this comment

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

Let's do it true by default

Copy link
Member Author

Choose a reason for hiding this comment

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

done

src/installer.js Outdated

const { green, yellow } = require('colorette');

const prompt = require('./utils/prompt');
Copy link
Member

Choose a reason for hiding this comment

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

We can use method 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

can you clarify?

Copy link
Member

Choose a reason for hiding this comment

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

I think he means, using it as this.prompt instead of creating separate util and importing.

Copy link
Member

Choose a reason for hiding this comment

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

Yep 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

we don't have access to plugin class in the installer so I've inlined the util in installer instead

@alexander-akait
Copy link
Member

/cc @snitin315

@alexander-akait alexander-akait merged commit 0051d1f into master Jun 13, 2021
@alexander-akait alexander-akait deleted the prompt branch June 13, 2021 15:43
@alexander-akait
Copy link
Member

@snitin315 @anshumanv next job #94 - we should avoid using console.log/warn/error in favor built-in loader everywhere https://webpack.js.org/api/logging/#examples-of-how-to-get-and-use-webpack-logger-in-loaders-and-plugins

@snitin315
Copy link
Member

On it 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants