PR-URL: https://github.com/nodejs/node/pull/9395
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10701
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
The guide for writing tests is missing information on how tests are
named. This adds that information.
There is also some copy-editing done on the first paragraph of the
guide.
PR-URL: https://github.com/nodejs/node/pull/10584
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
* replace var with const/let
* replace assert.equal() with assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10622
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Support `Uint8Array` input to all the synchronous methods.
PR-URL: https://github.com/nodejs/node/pull/10653
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
git apply does not preserve the original commit message. These updated
instructions offer a simpler flow for backporting.
PR-URL: https://github.com/nodejs/node/pull/10665
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
* removed console.log statements
PR-URL: https://github.com/nodejs/node/pull/10684
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10664
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10664
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* refactor internal util.filterDuplicateStrings() to eliminate unused
code paths
* `.indexOf()` -> `.includes()` in test
* more concise arrow functions
PR-URL: https://github.com/nodejs/node/pull/10682
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
The COLLABORATOR_GUIDE was still listing v0.10 and v0.12 as LTS when
they are EOL now.
PR-URL: https://github.com/nodejs/node/pull/10720
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Corrected parameter for running tests on Windows. Without the corrected
parameters, Windows users encounter an error about failing to sign the
build, "Failed to sign exe", which can be discouraging to new Windows
community members.
PR-URL: https://github.com/nodejs/node/pull/10686
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
instead of silently overwriting invalid values with the default
PR-URL: https://github.com/nodejs/node/pull/10692
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This fixes a misplaced parenthesis in each of the tests in
test/parallel/test-http-response-statuscodes.js, causing the tests to
pass as long as any error was thrown, without validating the error
message.
PR-URL: https://github.com/nodejs/node/pull/10692
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10696
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* use const and let instead of var
* use assert.strictEqual or assert.strictDeepEqual instead of assert.equal
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws
PR-URL: https://github.com/nodejs/node/pull/10681
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
And allow anchor links to the various sections, to more easily reference
them when reviewing PRs.
PR-URL: https://github.com/nodejs/node/pull/10716
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
It is a maintenance burden that was removed from the docs in 2010
(c93e0aaf06) and runtime-deprecated in v6.0
(1124de2d76).
PR-URL: https://github.com/nodejs/node/pull/9683
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws
PR-URL: https://github.com/nodejs/node/pull/10667
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Added a note about Visual Studio 2015 feature which should
be installed for building Node.js source code.
PR-URL: https://github.com/nodejs/node/pull/10669
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Standardise on Refs:
PR-URL: https://github.com/nodejs/node/pull/10670
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
* use const and let instead of var
* use arrow function
* removed console.log statements
PR-URL: https://github.com/nodejs/node/pull/10679
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Adding all used properties in the constructor makes the hidden class
stable and heap snapshots more verbose.
Refs: https://github.com/nodejs/node/issues/8912
PR-URL: https://github.com/nodejs/node/pull/9116
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Add test to cover setter for deprecated cluster Worker property.
Previously, the setter was not being exercised in tests.
PR-URL: https://github.com/nodejs/node/pull/10675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
* use assert.strictEqual instead of assert.equal
* add RegExp in second argument of assert.throws
* validate error message and code
PR-URL: https://github.com/nodejs/node/pull/10674
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10605
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* use let and const instead of var
* use assert.strictEqual instead of assert.equal
* remove unused var
PR-URL: https://github.com/nodejs/node/pull/10648
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This adds an ESLint rule to enforce the use of `assert.ifError(err)`
instead of `if (err) throw err;` in tests.
PR-URL: https://github.com/nodejs/node/pull/10671
Ref: https://github.com/nodejs/node/pull/10543
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
* use let and const instead of var
* use assert.strictEqual instead of assert.equal
* swap assertions arguments to match the standard
PR-URL: https://github.com/nodejs/node/pull/10624
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This fixes an incorrect deletion of the `TracingController` instance,
which in some environments could cause an error about an invalid
pointer passed to `free()`. The `TracingController` instance is
actually owned by a `unique_ptr` member of the platform, so calling
`platform::SetTracingController(nullptr)` is the correct way to
delete it. But before that, the `TraceBuffer` must be deleted in
order for the tracing loop to exit; that is accomplished by calling
`TracingController::Initialize(nullptr)`.
PR-URL: https://github.com/nodejs/node/pull/10623
Reviewed-By: Matthew Loring <mattloring@google.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
* use const instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10570
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Add a custom ESLint rule to require that setTimeout() and setInterval()
get called with at least two arguments. This prevents omitting the
duration or interval.
PR-URL: https://github.com/nodejs/node/pull/9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
There are places in the code base where setTimeout() or
setInterval() are called with just a callback and no duration/interval.
The timers module will use a value of `1` in that situation.
An unspecified duration or interval can be confusing. Did the original
author forget to provide a value? Did they intend to use setImmediate()
or process.nextTick() instead of setTimeout()? And so on.
This change provides a duration or interval of `1` to all calls in the
codebase where it is missing. `parallel/test-timers.js` still tests the
situation where `setTimeout()` and `setInterval()` are called with
`undefined` and other non-numeric values for the duration/interval.
PR-URL: https://github.com/nodejs/node/pull/9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The `no-useless-regex-char-class-escape` custom lint rule was introduced
as a less aggressive alternative to some enhancements that were
introduced into ESLint. Those enhancements were blocking us from
updating ESLint. However, they have since been relaxed and the custom
rule is no longer needed. Remove it.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
ESLint `indent` rule now has options that duplicate functionality in our
custom `align-function-arguments` rule. Remove
`align-function-arguments` custom rule.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
We have been stalled on ESLint 3.8.0 for some time. Current ESLint is
3.13.0. We have been unable to upgrade because of more aggressive
reporting on some rules, including indentation.
ESLint configuration options and bugfixes are now such that we can
reasonably upgrade.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Formatting changes for upcoming linter update.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Original commit message:
Fix the uppercasing of U+00E7(ç) and U+00F7(÷)
Due to a typo in runtime-i18n.js, 'ç'(U+00E7) was not uppercased
while '÷'(U+00F7) was incorrectly uppercased to '×'(U+00D7).
Add a comprehensive test for Latin-1 supplemental block
(U+00A0 ~ U+00FF). (they're special-cased for speed-up and
needs to have a test for the range.).
TEST=intl/general/case-mapping
BUG=v8:5681
Review-Url: https://codereview.chromium.org/2533033003
Cr-Commit-Position: refs/heads/master@{#41331}
PR-URL: https://github.com/nodejs/node/pull/9828
Fixes: https://github.com/nodejs/node/issues/9785
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Currently, when test/cctest/test_inspector_socket_server.cc is run there
is output written to stderr by src/inspector_socket_server.cc which is
interleaved with the gtest report:
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URLs in Chrome:
...
The goal of this commit is to remove the above logged information
by introducing an out_ member in the InspectorSocketServer class
which defaults to stderr (keeping the current behavior).
Setting out_ to NULL is supported in which case nothing will be written
and is what the test has been configured with. When working on specific
test case the appropriate output stream can be specified for the
ServerHolder constructor to limit logging to that test case.
PR-URL: https://github.com/nodejs/node/pull/10537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10541
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use let instead of var
* use assert.strictEqual instead of assert.equal
* swap assertions arguments to match the standard
PR-URL: https://github.com/nodejs/node/pull/10600
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Keepalive sockets that are returned to the agent's freesocket pool were
previously capturing a reference to the ClientRequest that initiated the
request.
This commit eliminates that by moving the installation of the socket
listeners to a different function.
PR-URL: https://github.com/nodejs/node/pull/10134
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>