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

Fixed reset of BABEL_ENV when options.forceEnv is used #420

Merged
merged 1 commit into from
Mar 15, 2017

Conversation

nikopavlica
Copy link
Contributor

Please check if the PR fulfills these requirements

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

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior? (You can also link to an open issue here)
After using 'forceEnv' option, BABEL_ENV is set to "undefined" (string), causing
unintended behaviour of babel running in different env.

What is the new behavior?
BABEL_ENV is correctly reset to previous value OR deleted if it wasn't set before

Does this PR introduce a breaking change?

  • Yes
  • No

Other
Some new serial tests added to test the environment variable clearing. Serial is needed
because otherwise, parallel execution interfere with setting/clearing of the variable.
Maybe these tests could be done with less config - feel free to change/update them :)

@codecov
Copy link

codecov bot commented Mar 14, 2017

Codecov Report

Merging #420 into master will increase coverage by 0.94%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #420      +/-   ##
==========================================
+ Coverage   83.23%   84.18%   +0.94%     
==========================================
  Files           6        6              
  Lines         173      177       +4     
  Branches       40       41       +1     
==========================================
+ Hits          144      149       +5     
  Misses         12       12              
+ Partials       17       16       -1
Impacted Files Coverage Δ
src/index.js 87.35% <100%> (+1.81%)

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 36db87b...c3961f2. Read the comment docs.

@danez
Copy link
Member

danez commented Mar 15, 2017

Good catch. thanks for fixing.

@danez danez merged commit f3241f8 into babel:master Mar 15, 2017
@nikopavlica
Copy link
Contributor Author

Took a while to figure out why such "random" behaviour of my app :-)

No probs and thanks for merge.

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.

2 participants