Skip to content

Add optionality to catch bindings#5956

Merged
existentialism merged 8 commits intobabel:7.0from
MarckK:optional-catch-binding
Jul 25, 2017
Merged

Add optionality to catch bindings#5956
existentialism merged 8 commits intobabel:7.0from
MarckK:optional-catch-binding

Conversation

@MarckK
Copy link
Copy Markdown
Member

@MarckK MarckK commented Jul 16, 2017

Q A
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? yes
Deprecations?
Spec Compliancy?
Tests Added/Pass?
Fixed Tickets
License MIT
Doc PR
Dependency Changes

This implements the optional catch binding proposal (babel/proposals #7).

Copy link
Copy Markdown
Member

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

We'll also need:

  • Change to babel-types to make param optional.
  • Change to babel-generator to output a param-less clause.
  • A transform that generates a unique Identifier if one is not present.
  • Tests for the above

@hzoo hzoo added PR: New Feature 🚀 A type of pull request used for our changelog categories es-proposal labels Jul 18, 2017
@MarckK MarckK force-pushed the optional-catch-binding branch from 25e8cfe to adcd680 Compare July 20, 2017 15:41
@MarckK MarckK force-pushed the optional-catch-binding branch from adcd680 to efba0af Compare July 21, 2017 09:35
@MarckK MarckK force-pushed the optional-catch-binding branch from bb6d1cc to 1e4de40 Compare July 23, 2017 12:19
@hzoo
Copy link
Copy Markdown
Member

hzoo commented Jul 23, 2017

Looks good! I would add a change to babel-generator to output a param-less clause - basically when it becomes part of the language we'll want to print it out as is instead transform it so babel should be able to handle that.

Also I would add an exec test to just test that it runs correctly.

@hzoo
Copy link
Copy Markdown
Member

hzoo commented Jul 24, 2017

looks good so far, basically done?

We also want to do

https://github.com/babel/babel/wiki/Adding-a-new-Proposal-to-Babel

Can use also https://github.com/babel/babel/pull/5813/files as a reference to files/structure/etc

Copy link
Copy Markdown
Member

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

Just have @hzoo's nits.

Copy link
Copy Markdown
Member

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

Oh, sorry, still need babel-generator updates.

Copy link
Copy Markdown
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.

@MarckK nice work!

@MarckK MarckK force-pushed the optional-catch-binding branch from 4f0913b to 80f532d Compare July 25, 2017 14:06
Copy link
Copy Markdown
Member

@hzoo hzoo left a comment

Choose a reason for hiding this comment

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

Nice work!! Great example of a good PR that implements the parser/transform/types/generator/docs change that is required for a proposal to be in Babel. I think the only thing we didn't do is add it to a stage preset since it hasn't even been presented yet 😅

@existentialism existentialism added this to the Babel 7 milestone Jul 25, 2017
@existentialism existentialism merged commit 9fc910d into babel:7.0 Jul 25, 2017
@MarckK MarckK deleted the optional-catch-binding branch July 25, 2017 15:25
@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

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Optional Catch Binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants