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: 🐛 do not apply own defaults while setting mode #1565

Merged
merged 13 commits into from
May 23, 2020

Conversation

anshumanv
Copy link
Member

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?
NA

Summary

  • Do not apply own defaults when setting mode, defaults are already in core.
  • remove unused configs

Does this PR introduce a breaking change?
No

Other information

@anshumanv anshumanv marked this pull request as ready for review May 20, 2020 19:04
@anshumanv anshumanv requested a review from a team as a code owner May 20, 2020 19:04
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.

Can we add tests?

@anshumanv
Copy link
Member Author

Adding in a while

@anshumanv
Copy link
Member Author

@evilebottnawi added 👍

@@ -40,6 +41,8 @@ describe('GroupHelper', function () {
]);

const result = group.run();
// ensure no other properties are added
expect(result.options).toMatchObject({ mode: 'development' });
Copy link
Member

Choose a reason for hiding this comment

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

Can we look on plugins here?

Copy link
Member Author

@anshumanv anshumanv May 21, 2020

Choose a reason for hiding this comment

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

Old method is only adding config options from the file and no plugins

Copy link
Member

Choose a reason for hiding this comment

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

We should look what we don't have two terser plugins 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.

Can you suggest ways to check it here? We're just passing mode to the compiler, so since core doesn't have two, we won't have two either.

Copy link
Member

@alexander-akait alexander-akait May 21, 2020

Choose a reason for hiding this comment

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

Hm, maybe we can add a test there manually added Terser to minimizer with custom options, for commentsFilename, not the best solution, but will be work

Copy link
Member Author

Choose a reason for hiding this comment

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

Added, something wrong with CI, will take a look tomm

Copy link
Member Author

Choose a reason for hiding this comment

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

@evilebottnawi seems good now, PTAL

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.

/cc @webpack/cli-team

@anshumanv
Copy link
Member Author

Need look at CI, idk what's failing

@anshumanv
Copy link
Member Author

@evilebottnawi fixed now, had to do some changes to the install script since it was running into race condition. Looks all good now.

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 job!

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

6 participants