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

v7.x: util: improve inspect for AsyncFunction #11211

Closed
wants to merge 2 commits into
from

Conversation

@targos
Member

targos commented Feb 7, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

util

targos added some commits Feb 7, 2017

tools: enable ES2017 syntax support in ESLint
This allows us to use async functions.
util: improve inspect for AsyncFunction
Use the constructor name in the output, if present.
This is a backport of #11210 without
the semver-major change to GeneratorFunction output.

@targos targos changed the title from util: improve inspect for AsyncFunction to v7.x: util: improve inspect for AsyncFunction Feb 7, 2017

@targos targos referenced this pull request Feb 7, 2017

Closed

util: improve inspect for (Async|Generator)Function #11210

3 of 3 tasks complete
@hiroppy

hiroppy approved these changes Feb 7, 2017

@cjihrig

cjihrig approved these changes Feb 7, 2017

@jasnell

jasnell approved these changes Feb 7, 2017

@hiroppy

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Feb 8, 2017

Member

Sorry if this has been explained elsewhere, but is there a reason why the output for GeneratorFunction is kept as Function?

Member

TimothyGu commented Feb 8, 2017

Sorry if this has been explained elsewhere, but is there a reason why the output for GeneratorFunction is kept as Function?

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Feb 8, 2017

Member

@TimothyGu Just trying to avoid breakage, that’s all.

I’d be okay with considering the full version, as in #11210, as a bugfix, but it might be better to be on the safe side here… we’ve definitely had reports of people checking util.inspect output in their tests. :/

Member

addaleax commented Feb 8, 2017

@TimothyGu Just trying to avoid breakage, that’s all.

I’d be okay with considering the full version, as in #11210, as a bugfix, but it might be better to be on the safe side here… we’ve definitely had reports of people checking util.inspect output in their tests. :/

@TimothyGu

@addaleax thanks for the explanation. LGTM as is.

jasnell added a commit that referenced this pull request Feb 13, 2017

tools: enable ES2017 syntax support in ESLint
This allows us to use async functions.

PR-URL: #11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

jasnell added a commit that referenced this pull request Feb 13, 2017

util: improve inspect for AsyncFunction
Use the constructor name in the output, if present.
This is a backport of #11210 without
the semver-major change to GeneratorFunction output.

PR-URL: #11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@jasnell

This comment has been minimized.

Show comment
Hide comment
Member

jasnell commented Feb 13, 2017

Landed in ae30150...ac72c3e

@jasnell jasnell closed this Feb 13, 2017

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 14, 2017

tools: enable ES2017 syntax support in ESLint
This allows us to use async functions.

PR-URL: nodejs#11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Feb 14, 2017

util: improve inspect for AsyncFunction
Use the constructor name in the output, if present.
This is a backport of nodejs#11210 without
the semver-major change to GeneratorFunction output.

PR-URL: nodejs#11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 7, 2017

Member

Needs a backport PR to land in v6 and v4

Member

jasnell commented Mar 7, 2017

Needs a backport PR to land in v6 and v4

@targos targos deleted the targos:util-async-func-v7 branch Jun 1, 2017

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