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
Avoid resolveTargets
call if browsers
is an empty array
#14294
Merged
Merged
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
bdc7fdf
fix: remove `resolveTargets` call if browsers is empty
dev-itsheng bba433a
Merge branch 'babel:main' into patch-1
dev-itsheng c03d061
fix: added validation for `browsers` values `[]` and `undefined`
dev-itsheng 32c3aa7
Merge branch 'patch-1' of https://github.com/dev-itsheng/babel
dev-itsheng 0183f3f
Merge branch 'babel:main' into patch-1
dev-itsheng 8e9453f
fix: added some comment of changed code.
dev-itsheng 426d2c7
Merge branch 'patch-1' of https://github.com/dev-itsheng/babel
dev-itsheng 3eea970
fix: fixed some test preconditions, and added a test to see if a func…
dev-itsheng 6944235
Merge branch 'babel:main' into patch-1
dev-itsheng 6a4dab1
Merge branch 'patch-1' of https://github.com/dev-itsheng/babel
dev-itsheng 57669c6
fix: Fix test error
dev-itsheng a3fe073
fix: Fix code style
dev-itsheng 2d531e5
fix: Fix ESLint error of code style
dev-itsheng 6527dc0
fix: Refactoring test code using Jest's `toThrow` syntax.
dev-itsheng 5a5af58
fix: Re-fix ESLint error of code style
dev-itsheng File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this test has the same behavior in Babel 7 and Babel 8:
also the other one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, In your opinion, the difference of Babel 7 and Babel 8 is only
browsers
variable:So if the result isn't have any effect of this, this test can also run on Babel 8.
I will update this commit later.
Thanks for comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observe the following code:
When
ignoreBrowserslistConfig
is set totrue
, no action is taken, but when this variable is not set andbrowsers
is not set, babel7 and babel8 behave differently.So in my opinion, the first test can not remove the conditional judgment, the second test can.