Skip to content

Add function name to spec-transformed arrow functions - #5620

Merged
Jessidhia merged 4 commits into
7.0from
spec-arrow/add-function-name
May 3, 2017
Merged

Jessidhia merged 4 commits into
7.0from
spec-arrow/add-function-name

Conversation

@Jessidhia

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

While it may appear that this should be done by es2015-function-name,
another way to think about it is that es2015-function-name implements
the naming that javascript engines are supposed to do; and javascript
engines cannot name function expressions that are the object of a
member expression.

While it may appear that this should be done by es2015-function-name,
another way to think about it is that es2015-function-name implements
the naming that javascript engines are supposed to do; and javascript
engines cannot name function expressions that are the object of a
member expression.
@mention-bot

Copy link
Copy Markdown

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

@babel-bot

Copy link
Copy Markdown
Collaborator

Hey @Kovensky! It looks like one or more of your builds have failed. I've copied the relevant info below to save you some time.

@codecov

codecov Bot commented Apr 10, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #5620 into 7.0 will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##              7.0   #5620      +/-   ##
=========================================
+ Coverage   84.59%   84.6%   +0.01%     
=========================================
  Files         283     283              
  Lines        9738    9740       +2     
  Branches     2734    2735       +1     
=========================================
+ Hits         8238    8241       +3     
+ Misses        987     986       -1     
  Partials      513     513
Impacted Files Coverage Δ
...ugin-transform-es2015-arrow-functions/src/index.js 93.33% <100%> (+1.02%) ⬆️
packages/babel-traverse/src/visitors.js 86.66% <0%> (+0.95%) ⬆️

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 c307bbb...1039660. Read the comment docs.

export default function ({ types: t }) {
// @flow

import nameFunction from "babel-helper-function-name";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like we need this in package.json?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hm, probably.

Would be nice if lerna could take care of it 😄

@loganfsmyth

Copy link
Copy Markdown
Member

LGTM otherwise.

@xtuc

xtuc commented Apr 13, 2017

Copy link
Copy Markdown
Member

@hzoo

hzoo commented May 1, 2017

Copy link
Copy Markdown
Member

We don't have an example for spec mode, did you mean we should add one @xtuc? Do you want to add it and squash merge?

@hzoo
hzoo requested a review from xtuc May 1, 2017 21:56
@hzoo hzoo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label May 1, 2017
@xtuc

xtuc commented May 2, 2017

Copy link
Copy Markdown
Member

I would like to add an example for spec mode but I will probably do a separate PR.

@Jessidhia
Jessidhia merged commit 86a5377 into 7.0 May 3, 2017
@Jessidhia
Jessidhia deleted the spec-arrow/add-function-name branch May 3, 2017 02:50
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants