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

Backport removing let in for loop declaration #9553

Closed
wants to merge 4 commits into from

Commits on Nov 11, 2016

  1. lib: remove let from for loops

    This is a known de-opt. It may not be 100% necessary in all cases but it
    seems like a decent enough idea to avoid it.
    
    Ref: nodejs#9553
    PR-URL: nodejs#8873
    Reviewed-By: Brian White <mscdex@mscdex.net>
    Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
    Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Myles Borins committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    d7b9f36 View commit details
    Browse the repository at this point in the history
  2. streams: fix regression in unpipe()

    Since 2e568d9 there is a bug where unpiping a stream
    from a readable stream that has `_readableState.pipesCount > 1`
    will cause it to remove the first stream in the
    `_.readableState.pipes` array no matter where in the list the
    `dest` stream was.
    
    This patch corrects that problem.
    
    Ref: nodejs#9553
    PR-URL: nodejs#9171
    Fixes: nodejs#9170
    Reviewed-By: Evan Lucas <evanlucas@me.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Myles Borins <myles.borins@gmail.com>
    addaleax authored and Myles Borins committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    c25eb61 View commit details
    Browse the repository at this point in the history
  3. test: add regression test for unpipe()

    Since 2e568d9 there is a bug where unpiping a stream
    from a readable stream that has `_readableState.pipesCount > 1`
    will cause it to remove the first stream in the
    `_.readableState.pipes` array no matter where in the list the
    `dest` stream was.
    
    Ref: nodejs#9553
    PR-URL: nodejs#9171
    Reviewed-By: Evan Lucas <evanlucas@me.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Myles Borins <myles.borins@gmail.com>
    Niels Nielsen authored and Myles Borins committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    a1d7201 View commit details
    Browse the repository at this point in the history
  4. tools: avoid let in for loops

    This adds a new ESLint tool to check for let
    declarations within the for, forIn, forOf expressions.
    
    Fixes: nodejs#9045
    Ref: nodejs#9553
    Ref: nodejs#8873
    PR-URL: nodejs#9049
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Myles Borins <myles.borins@gmail.com>
    Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
    Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    jalafel authored and Myles Borins committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    d1d3379 View commit details
    Browse the repository at this point in the history