Skip to content

Add support for object type spread#5525

Merged
hzoo merged 2 commits intobabel:7.0from
conartist6:7.0
Apr 20, 2017
Merged

Add support for object type spread#5525
hzoo merged 2 commits intobabel:7.0from
conartist6:7.0

Conversation

@conartist6
Copy link
Contributor

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

@mention-bot
Copy link

@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
Copy link
Contributor

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.

}

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@samwgoldman
Copy link
Contributor

Looks good to me! WDYT @danez @hzoo?

@existentialism existentialism added area: flow PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Spec Compliance 👓 A type of pull request used for our changelog categories pkg: generator pkg: types and removed PR: New Feature 🚀 A type of pull request used for our changelog categories labels Mar 27, 2017
Copy link
Member

@danez danez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

(Babylon bump: #5585)

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

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

@existentialism
Copy link
Member

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

@voideanvalue
Copy link
Contributor

@existentialism Sweet. Any ETA on a new release?

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue 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.

Labels

area: flow outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator pkg: types PR: Spec Compliance 👓 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants