Permalink
Switch branches/tags
Nothing to show
Commits on Jun 21, 2017
  1. test: fix RegExp nits

    * Remove needless RegExp flag
    
      In fixed case, `/g` flag is needless in the boolean context.
    
    * Remove needless RegExp capturing
    
      Use non-capturing grouping or remove capturing completely when:
    
      * capturing is useless per se, e.g. in test() check;
      * captured groups are not used afterward at all;
      * some of the later captured groups are not used afterward.
    
    * Use test, not match/exec in boolean context
    
      match() and exec() return a complicated object,
      unneeded in a boolean context.
    
    * Do not needlessly repeat RegExp creation
    
      This commit takes RegExp creation out of cycles and other repetitions.
    
      As long as the RegExp does not use /g flag and match indices,
      we are safe here.
    
      In tests, this fix hardly gives a significant performance gain,
      but it increases clarity and maintainability,
      reassuring some RegExps to be identical.
    
      RegExp in functions are not taken out of their functions:
      while these functions are called many times
      and their RegExps are recreated with each call,
      the performance gain in test cases
      does not seem to be worth decreasing function self-dependency.
    
    PR-URL: nodejs#13770
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    vsemozhetbyt committed Jun 18, 2017
Commits on Jun 20, 2017
  1. dns: make `dns.setServers` support customized port

    allow `dns.setServers` parameter to contain port
    
    e.g.
    
    ```
    dns.setServers([ '103.238.225.181:666' ]);
    ```
    
    And `dns.getServers` will return IP with port if not the default port.
    
    PR-URL: nodejs#13723
    Refs: nodejs#7903
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    XadillaX committed with refack Jun 16, 2017
  2. cluster: remove deprecated property

    PR-URL: nodejs#13702
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    jasnell committed Jun 15, 2017
  3. test: use worker.exitedAfterDisconnect consistently

    PR-URL: nodejs#13702
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    jasnell committed Jun 15, 2017
  4. doc: EOL deprecated API and update notes

    PR-URL: nodejs#13702
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    jasnell committed Jun 15, 2017
  5. dgram: change parameter name in set(Multicast)TTL

    Changed the parameter name in set(Multicast)TTL from "arg" to "ttl"
    both within code and error messages and added the actual type of the
    argument to the error message.
    
    PR-URL: nodejs#13747
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    tniessen committed Jun 17, 2017
  6. errors,process: fix error message of hrtime()

    process.hrtime() incorrectly passed the function name to
    errors.TypeError instead of the name of the argument.
    Additionally, the type of the actual argument was added to the error
    message and a new error code ERR_INVALID_ARRAY_LENGTH was added.
    
    PR-URL: nodejs#13739
    Reviewed-By: Timothy Gu <timothygu99@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    tniessen committed Jun 17, 2017
  7. errors,stream_wrap: use internal/errors.js

    PR-URL: nodejs#13291
    Refs: nodejs#11273
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    LakshmiSwethaG committed with tniessen Jun 5, 2017
  8. test: accommodate AIX by watching file

    Watching directories has limited support on AIX. This is documented.
    Watch a file in test/async-hooks/test-fseventwrap.js to accommodate AIX.
    
    PR-URL: nodejs#13766
    Ref: nodejs#13577 (comment)
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Trott committed with jasnell Jun 18, 2017
  9. deps: cherry-pick 866ee63 from upstream V8

    Original commit message:
    
        [string] Re-enable result caching for String.p.split
    
        Runtime::kStringSplit's result caching is only enabled when limit equals
        kMaxUInt32.
    
        BUG=v8:6463
    
        Review-Url: https://codereview.chromium.org/2923183002
        Cr-Commit-Position: refs/heads/master@{#45724}
    
    PR-URL: nodejs#13630
    Fixes: nodejs#13445
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    targos committed Jun 12, 2017
  10. deps: update V8 to 5.9.211.37

    PR-URL: nodejs#13631
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    targos committed Jun 12, 2017
Commits on Jun 19, 2017
  1. net: fix abort on bad address input

    PR-URL: nodejs#13726
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    BridgeAR committed with refack Jun 16, 2017
  2. buffer: support boxed strings and toPrimitive

    Add support for `Buffer.from(new String('...'))` and
    `Buffer.from({[Symbol.toPrimitive]() { return '...'; }})`
    
    PR-URL: nodejs#13725
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    jasnell committed Jun 16, 2017
  3. test: remove node-tap lookalike

    This commit removes the small node-tap lookalike from several
    of the streams2 tests. It's only used by six tests, and is
    inconsistent with all other tests.
    
    PR-URL: nodejs#13707
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    cjihrig committed Jun 15, 2017
  4. test: increase util.callbackify() coverage

    This commit adds coverage for util.callbackify() type checking.
    
    PR-URL: nodejs#13705
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    cjihrig committed Jun 15, 2017
  5. test: refactor test-fs-watchfile

    * use `common.mustNotCall()` to confirm callback is not called
    * reorder modules to conform with test-writing guide
    * match full error message in `assert.throws()`
    
    PR-URL: nodejs#13721
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Trott committed Jun 16, 2017
  6. doc: document res.connection and res.socket

    Adds documentation and samples for the `connection` and
    `socket` properties available on the `http.serverResponse`
    and `http.clientRequest` objects.
    
    PR-URL: nodejs#13617
    Fixes: nodejs#12617
    Reviewed-By: Roman Reiss <me@silverwind.io>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    JustinBeckwith committed with silverwind Jun 11, 2017
  7. lib: fix typos

    PR-URL: nodejs#13741
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Roman Reiss <me@silverwind.io>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    BridgeAR committed with silverwind Jun 17, 2017
  8. readline,repl,url,util: remove needless capturing

    Use non-capturing grouping or remove capturing completely when:
    
    * capturing is useless per se, e.g. in test() check;
    * captured groups are not used afterwards at all;
    * some of the later captured groups are not used afterwards.
    
    PR-URL: nodejs#13718
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    vsemozhetbyt committed Jun 16, 2017
  9. benchmark: remove needless RegExp capturing

    Use non-capturing grouping or remove capturing completely when:
    
    * capturing is useless per se, e.g. in test() check;
    * captured groups are not used afterwards at all;
    * some of the later captured groups are not used afterwards.
    
    PR-URL: nodejs#13718
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    vsemozhetbyt committed Jun 16, 2017
  10. test: make test-http(s)-set-timeout-server alike

    Make test-http(s)-set-timeout-server tests more similar and resolve the
    following issues:
    
    * `test-http-set-timeout-server.js` had a `secReceived` check in
      `serverResponseTimeoutWithPipeline()` that was added to prevent
      flakiness, but this did not exist in the https counterpart.
    
    * `test-https-set-timeout-server.js` utilized `common.mustCall()`,
      `common.mustNotCall()`, etc., while the http counterpart utilized the
      old method of checking flags on exit of the process.
    
    Refs: nodejs#13588
    PR-URL: nodejs#13625
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    jklepatch committed with aqrln Jun 12, 2017
  11. doc: fix api docs style

    doc/api/async_hooks.md
      + L198: Missing code-language flag
      + L239: Missing code-language flag
      + L317: Missing code-language flag
      + L347: Missing code-language flag
    
    doc/api/fs.md
      + L2857: Unused definition
    
    PR-URL: nodejs#13700
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    watilde committed Jun 15, 2017
  12. doc: `path.relative` uses `cwd`

    PR-URL: nodejs#13714
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    DuanPengfei committed with refack Jun 16, 2017
Commits on Jun 18, 2017
  1. test: delete outdated fixtures/stdio-filter.js

    PR-URL: nodejs#13712
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Brian White <mscdex@mscdex.net>
    vsemozhetbyt committed Jun 16, 2017
  2. test: use string instead of RegExp in split()

    PR-URL: nodejs#13710
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    vsemozhetbyt committed Jun 16, 2017
  3. v8: fix RegExp nits in v8_prof_polyfill.js

    * Do not repeat RegExp creation in cycle.
    * Use sufficient string instead of RegExp in split().
    
    PR-URL: nodejs#13709
    Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    vsemozhetbyt committed Jun 15, 2017
  4. test: refactor test-fs-watch-stop-sync

    * format test per project guide
    * use listener that emits clear message
    * use common.mustNotCall() to confirm different listener is not invoked
    * add comment describing the test
    
    PR-URL: nodejs#13689
    Reviewed-By: David Cai <davidcai1993@yahoo.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Trott committed Jun 14, 2017
  5. test: check zlib version for createDeflateRaw

    We are currenly builing Node with --shared-zlib which happens to be
    version 1.2.8. The test for zlib.createDeflateRaw is expected to fail
    but does not when using version 1.2.8.
    
    As far as I can tell the fix referred to in the comments was
    introduced in version 1.2.9:
    - Reject a window size of 256 bytes if not using the zlib wrapper
    
    This commit suggests adding a check for the version and skipping this
    assert if the version is less than 1.2.9.
    
    Refs: http://zlib.net/ChangeLog.txt
    PR-URL: nodejs#13697
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    danbev committed Jun 15, 2017
  6. test: add hasIntl to failing test

    Currently when node is configured --without-intl the tests in this
    commit fail. This commit adds checks for internationalization for these
    tests
    
    PR-URL: nodejs#13699
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    danbev committed Jun 15, 2017
  7. doc: add hasIntl to test/common/README.md

    Commit d7e4ae1
    ("test: add common.hasIntl") added common.hasIntl but I was not able to
    find it in the README.md so this commit adds it.
    
    PR-URL: nodejs#13699
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    danbev committed Jun 16, 2017
  8. test: remove needless RegExp flags

    * /m is needless if ^ and $ are not used
    * /g is needless in split()
    * /g is needless in test() with one-time RegExp/String
    
    PR-URL: nodejs#13690
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    vsemozhetbyt committed Jun 15, 2017
Commits on Jun 17, 2017
  1. tools: update ESLint to v4.0.0

    Update ESLint and configuration to version 4.0.0.
    
    PR-URL: nodejs#13645
    Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Trott committed Jun 13, 2017
  2. build: check for linter in bin rather than lib

    Make the "can we lint?" check in Makefile and vcbuild.bat depend on
    bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js
    is not present. The lint rules call bin/eslint.js so check for that
    instead.
    
    PR-URL: nodejs#13645
    Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Trott committed Jun 15, 2017
  3. src,lib,test,doc: correct misspellings

    PR-URL: nodejs#13719
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    silverwind committed Jun 16, 2017
  4. test: add crypto check to test-tls-wrap-econnreset

    Currently, there are a few test-tls-wrap-econnreset test that fail when
    Node is configured --without-ssl:
    Error: Node.js is not compiled with openssl crypto support
    
    This commit adds crypto checks and skips these tests if no crypto
    support unavailable.
    
    PR-URL: nodejs#13691
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    danbev committed Jun 15, 2017