Skip to content

fix: support BROWSERSLIST{,_CONFIG} env - #16907

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
JLHwung:fix-16906
Oct 17, 2024
Merged

nicolo-ribaudo merged 1 commit into
babel:mainfrom
JLHwung:fix-16906

Conversation

@JLHwung

@JLHwung JLHwung commented Oct 15, 2024

Copy link
Copy Markdown
Contributor
Q 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 A
Fixed Issues? Fixes #16906
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Fixes a regression introduced in #16858. Thanks @isemanjski for reporting this bug.

@JLHwung JLHwung added PR: Bug Fix 馃悰 A type of pull request used for our changelog categories i: regression labels Oct 15, 2024
@babel-bot

Copy link
Copy Markdown
Collaborator

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

@nicolo-ribaudo

Copy link
Copy Markdown
Member

Should we read those env vars through api.env(), so that they will be accounted for when considering preset caching?

@JLHwung

JLHwung commented Oct 16, 2024

Copy link
Copy Markdown
Contributor Author

Should we read those env vars through api.env(), so that they will be accounted for when considering preset caching?

Good question! I don't know api.env() can read process.env until today, for this case we will have to pass through the Preset/Plugin API to the compilation helper, or pass through an env reader. I am a bit hesitant passing through the API interface as the helper will be strongly coupled with plugin/preset, making it more difficult to be used by the babel core.

This PR is to restore the previous behaviour before #16858 when we call the browserslist.loadConfig(). Reading through api.env() can definitely an idea for a new PR.

@nicolo-ribaudo
nicolo-ribaudo merged commit d658738 into babel:main Oct 17, 2024
@nicolo-ribaudo
nicolo-ribaudo deleted the fix-16906 branch October 17, 2024 09:21
@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 Jan 17, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 馃悰 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[regression] Usage of the BROWSERSLIST env var

4 participants