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: config group to pure function and move away from group design #1811

Merged
merged 9 commits into from
Sep 21, 2020

Conversation

anshumanv
Copy link
Member

@anshumanv anshumanv commented Sep 19, 2020

What kind of change does this PR introduce?

refactor

Did you add tests for your changes?
Already present

If relevant, did you update the documentation?
NA

Summary

  • removed redundant entries from cli flag file
  • Refactored config group to pure function

Does this PR introduce a breaking change?
No

Other information

#1765 (comment)

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

Let's keep entry default option

@anshumanv
Copy link
Member Author

Let's keep entry default option

It's unused

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Also default value for entry is invalid, so 👍

@anshumanv
Copy link
Member Author

We need to run ConfigGroup needless whether config args are present or nay, I think we should make it a pure function, this should be a good start to move away from group design.

Thoughts? @evilebottnawi @evenstensberg

@alexander-akait
Copy link
Member

We need to run ConfigGroup needless whether config args are present or nay, I think we should make it a pure function, this should be a good start to move away from group design.

Agree, we don't need group design and run only necessary code

@anshumanv anshumanv changed the title chore: remove default value from config/entry flag feat: refactor config group to pure function and move away from group design Sep 19, 2020
@anshumanv anshumanv changed the title feat: refactor config group to pure function and move away from group design refactor: config group to pure function and move away from group design Sep 19, 2020
@anshumanv anshumanv marked this pull request as ready for review September 19, 2020 18:58
rishabh3112
rishabh3112 previously approved these changes Sep 20, 2020
evenstensberg
evenstensberg previously approved these changes Sep 20, 2020
Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

Good job 🔥

snitin315
snitin315 previously approved these changes Sep 20, 2020
@webpack-bot
Copy link

@anshumanv Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@snitin315 Please review the new changes.


module.exports = ConfigGroup;
module.exports = handleConfigResolution;
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 we need move this from ConfigGroup.js file, to be honestly we don't need groups files 😄 Do you want to do it in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep lets do it here

Copy link
Member Author

Choose a reason for hiding this comment

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

Or maybe let's migrate all groups first then we can move them all from groups to argResolvers?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we put each function in own file, anyway let's refactor firstly and when we can think about places

Copy link
Member Author

Choose a reason for hiding this comment

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

yep once all groups are migrated, we can organize it neatly

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good start

@anshumanv anshumanv merged commit 242d2ec into webpack:next Sep 21, 2020
@anshumanv anshumanv deleted the rm/default-config branch September 21, 2020 14:19
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.

7 participants