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

Support ObjectExpression in static path evaluation #4746

Merged
merged 1 commit into from Oct 17, 2016

Conversation

Projects
None yet
5 participants
@motiz88
Contributor

motiz88 commented Oct 17, 2016

Q A
Bug fix? no
Breaking change? no
New feature? yes
Deprecations? no
Spec compliancy? no
Tests added/pass? yes
License MIT

This gives babel-traverse the ability to statically evaluate simple object literals.

When this is released I will use it to implement istanbuljs/babel-plugin-istanbul#4 (comment), resolving #4740 (comment), allowing us to move forward with #4740 and get more useful code coverage reports.

cc @danez

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Oct 17, 2016

Current coverage is 88.81% (diff: 100%)

Merging #4746 into master will decrease coverage by 0.01%

@@             master      #4746   diff @@
==========================================
  Files           196        196          
  Lines         13838      13868    +30   
  Methods        1430       1430          
  Messages          0          0          
  Branches       3190       3198     +8   
==========================================
+ Hits          12293      12317    +24   
- Misses         1545       1551     +6   
  Partials          0          0          

Powered by Codecov. Last update d9dd328...05b9f3f

codecov-io commented Oct 17, 2016

Current coverage is 88.81% (diff: 100%)

Merging #4746 into master will decrease coverage by 0.01%

@@             master      #4746   diff @@
==========================================
  Files           196        196          
  Lines         13838      13868    +30   
  Methods        1430       1430          
  Messages          0          0          
  Branches       3190       3198     +8   
==========================================
+ Hits          12293      12317    +24   
- Misses         1545       1551     +6   
  Partials          0          0          

Powered by Codecov. Last update d9dd328...05b9f3f

@danez

danez approved these changes Oct 17, 2016 edited

Awesome, looks good to me. Might be also helpful for some stuff in babili @kangax @boopathi Although I see babili is already optimizing object expressions.

@hzoo hzoo merged commit 6bc10b5 into babel:master Oct 17, 2016

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing d9dd328...05b9f3f
Details
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +11.16% compared to d9dd328
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

motiz88 added a commit to motiz88/istanbul-lib-instrument that referenced this pull request Oct 17, 2016

feat: readInitialCoverage - extracts empty coverage data from an inst…
…rumented file

In support of finally fixing istanbuljs/babel-plugin-istanbul#4.
Blocked on a babel-traverse release that includes babel/babel#4746
@kangax

This comment has been minimized.

Show comment
Hide comment
@kangax

kangax Oct 18, 2016

Member

This looks awesome, definitely helpful for Babili. Thanks @motiz88

Member

kangax commented Oct 18, 2016

This looks awesome, definitely helpful for Babili. Thanks @motiz88

chrisprice added a commit to chrisprice/babel that referenced this pull request Oct 18, 2016

mstade added a commit to zambezi/babel that referenced this pull request Oct 28, 2016

Merge branch 'master' into umd-resolve-imports
* master: (38 commits)
  chore(package): update browserify to version 13.1.1 (babel#4762)
  Increase test coverage (babel#4742)
  Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel (babel#4758)
  Add variance node type and generate property variance annotations (babel#4697)
  Add make command to delete node_modules (babel#4748)
  fixes [skip ci]
  Support ObjectExpression in static path evaluation (babel#4746)
  Fix replacing for-of if inside label (babel#4736)
  Replace `path-exists` with `fs.existsSync` (babel#4731)
  Avoid unnecessary +0 in transform-es2015-parameters (babel#4738)
  [import()] Initial support for dynamic-import (babel#4699)
  Fix line endings on checkout
  Automatically generate missing expected.js fixtures (babel#4735)
  Fix few typos in issue/pr templates (babel#4739) [skip ci]
  contributing updates [skip ci]
  increase git depth [skip ci]
  Change usage of "suite"/"test" in unit-tests to "describe"/"it" (babel#4734)
  Run ESLint on test files, and fix lint errors in test files (babel#4732)
  Add .gitattributes forcing LF line endings (babel#4730)
  Update tests for changed error messages in Babylon (babel#4727)
  ...

bcoe added a commit to istanbuljs/nyc that referenced this pull request Oct 29, 2016

panagosg7 added a commit to panagosg7/babel that referenced this pull request Jan 17, 2017

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