Skip to content

Apply forceEnv option to Babel transformation#379

Merged
danez merged 2 commits intobabel:masterfrom
chrisvasz:master
Feb 15, 2017
Merged

Apply forceEnv option to Babel transformation#379
danez merged 2 commits intobabel:masterfrom
chrisvasz:master

Conversation

@chrisvasz
Copy link
Contributor

@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

@codecov-io
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
@tleunen
Copy link

tleunen commented Feb 15, 2017

What about with the cacheDirectory flag?

@chrisvasz
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.

@tleunen
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants