We should use `common.hasIntl` in tests for test cases which are
related to ICU.
This way we can easily find the test cases that are Intl dependent.
Plus, it will be able to make the tests a little faster if we check
hasIntl first.
Also, this tweaks the log messages to unify the message.
Refs: https://github.com/nodejs/node/pull/10707
PR-URL: https://github.com/nodejs/node/pull/10841
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit clarifies variables in the Filesystem docs.
Prior, the documentation for fs.write() had an ambiguous
remark on the parameters of offset and length.
Therefore, this commit makes explicit that the length parameter
in fs.write() is used to denote the number of bytes, which is
a clearer reference for its usage.
PR-URL: https://github.com/nodejs/node/pull/9792
Ref: https://github.com/nodejs/node/issues/7868
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Optimize for common cases in vm.runInContext() and
vm.runInThisContext().
PR-URL: https://github.com/nodejs/node/pull/10816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Introduce benchmarks for vm.runInContext() and vm.runInThisContext().
PR-URL: https://github.com/nodejs/node/pull/10816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: https://github.com/nodejs/node/pull/10832
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10844
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
As per https://github.com/nodejs/node/issues/9069
unexpected things can happen when supplying an
unexpected value to agent. Beings as the docs
clearly state the expected values, this throws
an error on an unexpected value.
PR-URL: https://github.com/nodejs/node/pull/10053
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
The third parameter `err` is not used anywhere.
PR-URL: https://github.com/nodejs/node/pull/10862
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Add links to the engine classes for the zlib single-call
convenience methods.
PR-URL: https://github.com/nodejs/node/pull/10829
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Move the LTS releases for Node 6 to the `LTS` column in the
corresponding `CHANGELOG_V6.md`.
PR-URL: https://github.com/nodejs/node/pull/10827
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This contained a duplicate link to the PR for a notable change,
presumably because that PR was composed of 2 separate commits.
PR-URL: https://github.com/nodejs/node/pull/10827
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Currently, the sources list contains sources and headers which are
separated by a comment. I noticed two .cc files after the headers
comment and this commit moves those files the start of the list
where the rest of source files are.
PR-URL: https://github.com/nodejs/node/pull/10850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
I noticed that only one header from src/tracing is included in the
sources list in node.gyp. Not sure if this is intentional or not so I
wanted to bring it up just in case this was overlooked.
PR-URL: https://github.com/nodejs/node/pull/10851
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
`buffer.parent` property is actually an alias of `buffer.buffer`
property. This patch actually doc-deprecates it and points the users to
the `buffer.buffer` property.
PR-URL: https://github.com/nodejs/node/pull/8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Buffer objects expose the underlying `Uint8Array`'s `buffer` property
by default. This patch formally documents it.
PR-URL: https://github.com/nodejs/node/pull/8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
As per ESLint documentation,
http://eslint.org/docs/user-guide/configuring#configuration-file-formats
the file format .eslintrc is deprecated. This patch just renames the
files to .yaml and the structure is already in yaml format.
PR-URL: https://github.com/nodejs/node/pull/7699
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10826
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10826
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The `exports` parameter is unnecessary.
PR-URL: https://github.com/nodejs/node/pull/10834
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <sam@strongloop.com>
* use common.mustCall to validate functions executions
* use common.fail to check test fail
* improve error validations
* remove unnecessary assertions
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10813
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit refactors test-child-process-spawnsync-maxbuf.js,
and adds testing for the case where maxBuffer is Infinity.
PR-URL: https://github.com/nodejs/node/pull/10769
Reviewed-By: James M Snell <jasnell@gmail.com>
An application using node built as a shared library may legitimately
implement its own signal handling routines. Current behaviour is
to squash all signal handlers on node startup. This change will
stop that behaviour when node is built as a shared library.
PR-URL: https://github.com/nodejs/node/pull/10539
Fixes: https://github.com/nodejs/node/issues/10520
Refs: https://github.com/nodejs/node/pull/615
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* use common.mustCall to validate functions executions
* use common.fail to control error
* remove unnecessary variables
* remove unnecessary assertions
* remove console.log and console.error
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10798
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
If you alter the array returned by `tls.getCiphers()`,
`crypto.getCiphers()`, `crypto.getHashes()`, or `crypto.getCurves()`, it
will alter subsequent return values from those functions.
```js
'use strict';
const crypto = require('crypto');
var hashes = crypto.getHashes();
hashes.splice(0, hashes.length);
hashes.push('some-arbitrary-value');
console.log(crypto.getHashes()); // "['some-arbitrary-value']"
```
This is surprising. Change functions to return copy of array instead.
PR-URL: https://github.com/nodejs/node/pull/10795
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit fixes a broken assertion in test-cli-eval.js.
PR-URL: https://github.com/nodejs/node/pull/10840
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
* use const instead of var
* use assert.strictEqual instead of assert.equal
* use common.mustCall instead of process.on( 'exit', fn )
PR-URL: https://github.com/nodejs/node/pull/10725
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
* validate the errors for assert.throws
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10714
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Confirm that `getCiphers()` contains no duplicates.
PR-URL: https://github.com/nodejs/node/pull/10784
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use common.fail to handle errors
* remove console.log
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10830
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* It had some minor errors in td/th html tags.
* Make it clear that v5, v0.10, and v0.12 are EOL and unsupported.
We probably don't want people seeing 'LTS' badge next to those
in the current Node.js repo and think that those are still supported.
Not everyone is aware of the nodejs/LTS repo.
This also includes the dates for v5, v0.10 and v0.12 EOL:
- 2016-07-01 for v5
- 2016-11-01 for v0.10
- 2017-01-01 for v0.12
* Make v5/v0.10/v0.12 not bold in CHANGELOG
Make v5, v0.10, v0.12 not bold in the CHANGELOG.md, as bold is said to
be an indication of the most recent actively supported release futher
on the same page.
PR-URL: https://github.com/nodejs/node/pull/10743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* assert unused vars in test-cli-eval.js
* assert in more idiomatic way test-cli-eval
* rename status to err in test-cli-eval.js
PR-URL: https://github.com/nodejs/node/pull/10759
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* validate the errors for all assert.throws
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10779
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Remove assignments to `SIMD` that are only to pacify ESLint. Instead,
use either `global.SIMD` or provide an comment letting ESLint know in
cases where `SIMD` is guaranteed to be a defined global identifier.
PR-URL: https://github.com/nodejs/node/pull/10785
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/10807
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Change regular expression of error message.
Add test case(`res.writeHead()`).
PR-URL: https://github.com/nodejs/node/pull/10808
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
use common.hasIntl to make sure Intl object is present or not.
PR-URL: https://github.com/nodejs/node/pull/10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/10828
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* validate errors in assert.throws
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10752
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Overlooked when moving code around in commit 42da740 ("inspector: split
HTTP/WS server from the inspector".)
PR-URL: https://github.com/nodejs/node/pull/10407
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>