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

[preset-env] Add browserslistEnv option #11434

Merged
merged 6 commits into from May 24, 2020

Conversation

AndrewLeedham
Copy link
Contributor

@AndrewLeedham AndrewLeedham commented Apr 16, 2020

Adds a new option to preset-env, which allows the user to specify an environment which is passed forward to browserslist. Continuation of the work from #9161 based on this comment: #9161 (comment)

Q                       A
Fixed Issues? Fixes #8834, Closes #9161
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? 👍
Tests Added + Pass? Yes
Documentation PR Link babel/website#2227
Any Dependency Changes?
License MIT

@nicolo-ribaudo nicolo-ribaudo added pkg: preset-env PR: New Feature 🚀 A type of pull request used for our changelog categories labels Apr 16, 2020
@nicolo-ribaudo
Copy link
Member

The failing tests should be fixed on master.

value = defaultValue;
}

if (typeof value !== "string" && typeof value !== "undefined") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (typeof value !== "string" && typeof value !== "undefined") {
else if (typeof value !== "string") {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

LGTM with some nits.

@nicolo-ribaudo nicolo-ribaudo added this to the v7.10.0 milestone Apr 17, 2020
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

@AndrewLeedham nice work!

@JLHwung JLHwung added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Apr 17, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a71b140:

Sandbox Source
wispy-http-ufsf4 Configuration
loving-almeida-qzhog Configuration

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/22657/

@nicolo-ribaudo nicolo-ribaudo changed the title [Preset-Env] Add browserslistEnv option [preset-env] Add browserslistEnv option May 24, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit c5ba345 into babel:master May 24, 2020
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: preset-env PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to specify env for browserslist
5 participants