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

Apply forceEnv option to Babel transformation #379

merged 2 commits into from Feb 15, 2017


Copy link

@chrisvasz chrisvasz commented Feb 14, 2017

As per the discussion in #368, this PR applies the forceEnv option to the Babel transformation.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix

What is the current behavior? (You can also link to an open issue here)
As discussed here, the forceEnv option applies to the cacheIdentifier, but does not actually apply to the Babel transformation.

What is the new behavior?
The forceEnv option now applies to the Babel transformation as well.

Does this PR introduce a breaking change?

  • No

Copy link

codecov-io commented Feb 14, 2017

Codecov Report

Merging #379 into master will increase coverage by 1.56%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #379      +/-   ##
+ Coverage   81.87%   83.43%   +1.56%     
  Files           6        6              
  Lines         160      163       +3     
  Branches       35       35              
+ Hits          131      136       +5     
+ Misses         13       12       -1     
+ Partials       16       15       -1
Impacted Files Coverage Δ
src/index.js 86.3% <100%> (+3.44%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08ef070...028fe55. Read the comment docs.

@danez danez merged commit fdf0184 into babel:master Feb 15, 2017
Copy link

tleunen commented Feb 15, 2017

What about with the cacheDirectory flag?

Copy link
Contributor Author

What about it? I tried to think of how cacheDirectory would factor into this change, but I couldn't think of a way immediately. cacheIdentifier definitely makes sense.

Copy link

tleunen commented Feb 15, 2017

process.env.BABEL_ENV is still not set when cacheDirectory is true.
The transpilation is done inside the cache. See transform: transpile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants