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

Add support for object type spread #5525

Merged
merged 2 commits into from Apr 20, 2017
Merged

Add support for object type spread #5525

merged 2 commits into from Apr 20, 2017

Conversation

@conartist6
Copy link
Contributor

conartist6 commented Mar 22, 2017

Q A
Patch: Bug Fix? N
Major: Breaking Change? N
Minor: New Feature? Y
Deprecations? N
Spec Compliancy? Y (No official spec; matches flow behavior)
Tests Added/Pass? Y
Fixed Tickets
License MIT
Doc PR N
Dependency Changes babel/babylon#418
Conrad Buck
@mention-bot

This comment has been minimized.

Copy link

mention-bot commented Mar 22, 2017

@conartist6, thanks for your PR! By analyzing the history of the files in this pull request, we identified @loganfsmyth, @existentialism and @samwgoldman to be potential reviewers.

@samwgoldman

This comment has been minimized.

Copy link
Contributor

samwgoldman commented Mar 23, 2017

Thanks! Will you also add a test to babel-plugin-transform-flow-strip-types? I don't think any code changes are necessary, but it'd be nice to have the test.

@@ -331,6 +331,12 @@ export function ObjectTypeProperty(node: Object) {
this.print(node.value, node);
}

export function ObjectTypeSpreadProperty(node: Object) {
this._variance(node);

This comment has been minimized.

Copy link
@samwgoldman

samwgoldman Mar 23, 2017

Contributor

Since this node type can't have a variance annotation, this line can be removed.

This comment has been minimized.

Copy link
@conartist6

conartist6 Mar 24, 2017

Author Contributor

Yep

@samwgoldman

This comment has been minimized.

Copy link
Contributor

samwgoldman commented Mar 24, 2017

Looks good to me! WDYT @danez @hzoo?

@danez
danez approved these changes Apr 3, 2017
Copy link
Member

danez left a comment

lgtm, we can merge this when we do a new babylon pre-release

Copy link
Member

existentialism left a comment

👍

(Babylon bump: #5585)

@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 20, 2017

Codecov Report

Merging #5525 into 7.0 will decrease coverage by 1.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              7.0    #5525      +/-   ##
==========================================
- Coverage   85.45%   84.38%   -1.07%     
==========================================
  Files         200      284      +84     
  Lines        9506     9760     +254     
  Branches     2701     2735      +34     
==========================================
+ Hits         8123     8236     +113     
- Misses        886     1010     +124     
- Partials      497      514      +17
Impacted Files Coverage Δ
packages/babel-types/src/definitions/flow.js 100% <100%> (ø) ⬆️
packages/babel-generator/src/generators/flow.js 97.41% <100%> (+0.03%) ⬆️
packages/babel-preset-es2016/src/index.js 0% <0%> (-100%) ⬇️
packages/babel-preset-es2017/src/index.js 0% <0%> (-100%) ⬇️
packages/babel-core/src/config/index.js 50% <0%> (-50%) ⬇️
packages/babel-core/src/config/plugin.js 37.5% <0%> (-37.5%) ⬇️
...ckages/babel-core/src/config/build-config-chain.js 74.07% <0%> (-11.2%) ⬇️
packages/babel-generator/src/generators/jsx.js 96.61% <0%> (-3.39%) ⬇️
packages/babel-generator/src/generators/types.js 98.63% <0%> (-1.37%) ⬇️
...ckages/babel-helper-builder-react-jsx/src/index.js 94.93% <0%> (-1.17%) ⬇️
... and 116 more

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 f438a4e...09cf1ac. Read the comment docs.

@hzoo hzoo merged commit 8434f89 into babel:7.0 Apr 20, 2017
3 checks passed
3 checks passed
codecov/patch 100% of diff hit (target 85.45%)
Details
codecov/project Absolute coverage decreased by -1.06% but relative coverage increased by +14.54% compared to ac41a51
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hulkish added a commit to hulkish/babel that referenced this pull request May 2, 2017
* 'master' of github.com:hulkish/babel: (190 commits)
  Fix incorrect property ordering with obj rest spread on nested (babel#5685)
  Fix PathHoister hoisting before a same-scope variable declaration.
  Updated transform-react-display-name for createReactClass addon (babel#5554)
  Fix PathHoister error attaching after export declarations.
  add .mjs to list of well known extensions
  Remove babel-helper-builder-conditional-assignment-operator-visitor, unused in babel [skip ci] (babel#5676)
  use find-cache-dir for babel-register cache (babel#5669)
  Fix operator processing in object super.
  -> parsedAst
  string -> sourceCode, ast -> generatedCode
  back to babylon
  Switch to pirates for babel-register. (babel#3670)
  [skip ci] babylon -> babel, ast -> parsedAst
  [readme] change code -> string
  Add support for object type spread (babel#5525)
  Fix object destructuring in param arrays (babel#5650)
  Remove merge helper and add more type declarations. (babel#5649)
  Typecheck much more of the config loading process (babel#5642)
  update to alpha.9 (babel#5639)
  v7.0.0-alpha.9
  ...
hulkish added a commit to hulkish/babel that referenced this pull request May 2, 2017
* '7.0' of https://github.com/babel/babel: (190 commits)
  Fix incorrect property ordering with obj rest spread on nested (babel#5685)
  Fix PathHoister hoisting before a same-scope variable declaration.
  Updated transform-react-display-name for createReactClass addon (babel#5554)
  Fix PathHoister error attaching after export declarations.
  add .mjs to list of well known extensions
  Remove babel-helper-builder-conditional-assignment-operator-visitor, unused in babel [skip ci] (babel#5676)
  use find-cache-dir for babel-register cache (babel#5669)
  Fix operator processing in object super.
  -> parsedAst
  string -> sourceCode, ast -> generatedCode
  back to babylon
  Switch to pirates for babel-register. (babel#3670)
  [skip ci] babylon -> babel, ast -> parsedAst
  [readme] change code -> string
  Add support for object type spread (babel#5525)
  Fix object destructuring in param arrays (babel#5650)
  Remove merge helper and add more type declarations. (babel#5649)
  Typecheck much more of the config loading process (babel#5642)
  update to alpha.9 (babel#5639)
  v7.0.0-alpha.9
  ...
@voideanvalue

This comment has been minimized.

Copy link
Contributor

voideanvalue commented May 17, 2017

Any chance this could this be backported to 6.x, similar to babel/babylon#418?

@existentialism

This comment has been minimized.

Copy link
Member

existentialism commented May 17, 2017

@voideanvalue this was done in #5653, we'll release it soon!

@voideanvalue

This comment has been minimized.

Copy link
Contributor

voideanvalue commented May 17, 2017

@existentialism Sweet. Any ETA on a new release?

@lock lock bot added the outdated label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants
You can’t perform that action at this time.