James M Snell
4cf56ad6f2
inspector: migrate to internal/errors
...
PR-URL: https://github.com/nodejs/node/pull/15619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-10-16 09:31:18 -07:00
James M Snell
3ddc88b5c2
crypto: migrate Certificate to internal/errors
...
Move argument type checking to js, use internal/errors
PR-URL: https://github.com/nodejs/node/pull/15756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-10-15 15:34:06 -07:00
James M Snell
e5ad5456a2
events: migrate to internal/errors
...
PR-URL: https://github.com/nodejs/node/pull/15623
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-10-13 14:16:13 -07:00
James M Snell
1261b94a3f
doc: fix unassigned deprecation code
...
Forgot to assign the deprecation code when landing
1f8d527e94
PR-URL: https://github.com/nodejs/node/pull/15741
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-10-02 19:09:05 -07:00
James M Snell
7092a6ca93
http2: making sending to the socket more efficient
...
PR-URL: https://github.com/nodejs/node/pull/15693
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2017-10-02 15:57:33 -07:00
James M Snell
8691d8bc85
http2: eliminate dead code
...
PR-URL: https://github.com/nodejs/node/pull/15693
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2017-10-02 15:57:28 -07:00
James M Snell
8f4db313f0
http2: refactor method arguments to avoid bools
...
PR-URL: https://github.com/nodejs/node/pull/15693
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2017-10-02 15:57:22 -07:00
James M Snell
8fa024795a
http2: simplify TypeName
...
PR-URL: https://github.com/nodejs/node/pull/15693
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2017-10-02 15:56:47 -07:00
James M Snell
74891412f1
zlib: migrate to internal/errors
...
PR-URL: https://github.com/nodejs/node/pull/15618
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-10-02 12:36:52 -07:00
James M Snell
1f8d527e94
path: deprecate internal _makeLong, replace
...
Replace the internal `path._makeLong()` with a public
`path.toLongUNCPath()` method. Add documentation.
PR-URL: https://github.com/nodejs/node/pull/14956
Ref: https://github.com/standard-things/esm/issues/66
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-10-02 11:30:19 -07:00
James M Snell
f55ee6e24a
http2: make --expose-http2 flag a non-op
...
Make the `http2` module always available.
The `--expose-http2` cli flag is made a non-op
PR-URL: https://github.com/nodejs/node/pull/15535
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-28 02:01:06 -03:00
James M Snell
05e4c1d6bc
2017-09-26, Node.js Version 8.6.0 (Current)
...
* **crypto**
* Support for multiple ECDH curves. [#15206 ](https://github.com/nodejs/node/pull/15206 )
* **dgram**
* Added `setMulticastInterface()` API. [#7855 ](https://github.com/nodejs/node/pull/7855 )
* Custom lookup functions are now supported. [#14560 ](https://github.com/nodejs/node/pull/14560 )
* **n-api**
* The command-line flag is no longer required to use N-API. [#14902 ](https://github.com/nodejs/node/pull/14902 )
* **tls**
* Docs-only deprecation of `parseCertString()`. [#14245 ](https://github.com/nodejs/node/pull/14245 )
* **New Contributors**
* Welcome Sebastiaan Deckers (@sebdeckers) as a new Collaborator! [#15354 ](https://github.com/nodejs/node/pull/15354 )
2017-09-26 14:55:39 -07:00
James M Snell
193926ecab
tls,doc: fix unallocated deprecation code
...
Deprecation was landed using `DEP00XX` instead of a properly
allocated deprecation code.
PR-URL: https://github.com/nodejs/node/pull/15534
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-09-24 11:28:17 -03:00
James M Snell
c75f87cc4c
crypto: refactor the crypto module
...
* Split single monolithic file into multiple
* Make Certificate methods static
* Allow randomFill(Sync) to use any ArrayBufferView
* Use internal/errors throughout
* Improve arg validation in Hash/Hmac
* Doc updates
PR-URL: https://github.com/nodejs/node/pull/15231
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2017-09-18 08:10:59 -07:00
James M Snell
d8a0364ad5
async_hooks,doc: some async_hooks improvements
...
Update docs and type checking for AsyncResource type
PR-URL: https://github.com/nodejs/node/pull/15103
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-15 09:06:13 -07:00
James M Snell
bf1ca8fb2e
meta: improve contributors guide
...
PR-URL: https://github.com/nodejs/node/pull/15123
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-09-13 10:45:50 -07:00
James M Snell
9d9552f7ee
http2: custom promisify for http2.connect
...
... and some other cleanups
PR-URL: https://github.com/nodejs/node/pull/15207
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 10:36:36 -07:00
James M Snell
ad3d899ae0
http2: improve http2 coverage
...
Improve http2 coverage through refactoring and tests
PR-URL: https://github.com/nodejs/node/pull/15210
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 09:47:09 -07:00
James M Snell
dcc41fd662
src: remove unused perf_hooks uv handles
...
A couple of unused uv handles were accidentally left
in env.
PR-URL: https://github.com/nodejs/node/pull/15368
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-09-13 09:21:14 -07:00
James M Snell
25105008a1
meta: allow vague objections to be dismissed
...
Explicitly allow vague objections to change requests to
be dismissed if requests for clarification go unanswered
PR-URL: https://github.com/nodejs/node/pull/15233
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Ryan Graham <r.m.graham@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-09-12 04:09:36 -07:00
James M Snell
8c2eba0f06
test: improve process warning coverage
...
PR-URL: https://github.com/nodejs/node/pull/15212
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-09-12 04:06:39 -07:00
James M Snell
6ff521b59b
errors: eliminate circular dependency on assert
...
PR-URL: https://github.com/nodejs/node/pull/15002
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-12 03:53:59 -07:00
James M Snell
fd9d288b0b
test: http2 test coverage for NghttpError
...
small test verifying that the NghttpError is as expected
PR-URL: https://github.com/nodejs/node/pull/15105
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-09-05 12:25:38 -07:00
James M Snell
2f9d9e5fe3
test: http2 test coverage for assertValidPseudoHeader
...
PR-URL: https://github.com/nodejs/node/pull/15105
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-09-05 12:25:33 -07:00
James M Snell
425ce52036
test: http2 test coverage for updateOptionsBuffer
...
PR-URL: https://github.com/nodejs/node/pull/15105
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-09-05 12:25:25 -07:00
James M Snell
09480a8bf0
http2: guard against destroyed session, timeouts
...
Guard against destroyed session in timeouts and goaway event.
Improve timeout handling a bit.
PR-URL: https://github.com/nodejs/node/pull/15106
Fixes: https://github.com/nodejs/node/issues/14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-05 12:23:10 -07:00
James M Snell
f3eb193a30
meta: merge TSC and CTC back into a single body
...
PR-URL: https://github.com/nodejs/node/pull/14973
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2017-08-29 08:39:25 -07:00
James M Snell
397dbabcfa
meta: considerations for new core modules
...
PR-URL: https://github.com/nodejs/node/pull/15022
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-08-28 21:14:42 -07:00
James M Snell
6db825ae82
perf_hooks: mark as experimental
...
PR-URL: https://github.com/nodejs/node/pull/14997
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2017-08-25 16:04:21 -07:00
James M Snell
52fe762606
meta: improve definition of a collaborator
...
Expand definition of Collaborator to include individuals
with commit access to any Node.js GitHub repository.
Clarify the kinds of things that should be considered when
considering inviting new collaborators
PR-URL: https://github.com/nodejs/node/pull/14981
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-24 13:25:37 -07:00
James M Snell
67269fd7f3
perf_hooks: implementation of the perf timing API
...
An initial implementation of the Performance Timing API for Node.js.
This is the same Performance Timing API implemented by modern browsers
with a number of Node.js specific properties. The User Timing mark()
and measure() APIs are implemented, garbage collection timing, and
node startup milestone timing.
```js
const { performance } = require('perf_hooks');
performance.mark('A');
setTimeout(() => {
performance.mark('B');
performance.measure('A to B', 'A', 'B');
const entry = performance.getEntriesByName('A to B', 'measure')[0];
console.log(entry.duration);
}, 10000);
```
The implementation is at the native layer and makes use of uv_hrtime().
This should enable *eventual* integration with things like Tracing
and Inspection.
The implementation is extensible and should allow us to add new
performance entry types as we go (e.g. for measuring i/o perf,
etc).
Documentation and a test are provided.
PR-URL: https://github.com/nodejs/node/pull/14680
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-23 16:00:09 -07:00
James M Snell
58831b2f24
uv: improvements to process.binding('uv')
...
* ensure that UV_... props are constants
* improve error message ... the error message when passing
in `err >= 0` to `util._errnoException()` was less than
useful.
* refine uses of process.binding('uv')
PR-URL: https://github.com/nodejs/node/pull/14933
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-23 10:51:15 -07:00
James M Snell
5e7c69716e
src: reduce code duplication
...
Adds `AsyncWrap::AddWrapMethods()` to add common methods
to a `Local<FunctionTemplate>`. Follows same pattern as
stream base.
PR-URL: https://github.com/nodejs/node/pull/14937
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-23 10:35:34 -07:00
James M Snell
771a03dfe3
src: fixup strings, reduce duplication
...
PR-URL: https://github.com/nodejs/node/pull/14937
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-23 10:35:19 -07:00
James M Snell
1524458c54
doc: remove you and fixup note in stream.md
...
PR-URL: https://github.com/nodejs/node/pull/14938
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-21 11:17:50 -07:00
James M Snell
fd8cf79056
src: miscellaneous cleanups for node_config
...
Includes a fix for setting the `icuDataDir` as a UTF8 string
rather than one byte. Previously, if the dir contained any
non-ascii characters they would be mangled. This won't cover
cases that involve paths with other character encodings
(thank you Linux).. but it will cover the most likely.
Other miscellaneous cleanups are included
PR-URL: https://github.com/nodejs/node/pull/14868
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-18 15:04:26 -07:00
James M Snell
35f6e59dfc
src: minor cleanup for node_revert
...
Make the revert related functions inline to eliminate the need
for node_revert.cc, prefix the constants and the def, other misc
cleanup
PR-URL: https://github.com/nodejs/node/pull/14864
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-18 15:02:12 -07:00
James M Snell
949aec5c32
http2: handful of http/2 src cleanups
...
* inline more stuff. remove a node_http2_core.cc
* clean up debug messages
* simplify options code, and cleanup
PR-URL: https://github.com/nodejs/node/pull/14825
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-16 07:27:32 -07:00
James M Snell
eac0147085
tools: checkout for unassigned DEP00XX codes
...
Check for `DEP00XX` codes on release build like we do with `REPLACEME`
PR-URL: https://github.com/nodejs/node/pull/14702
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-16 00:04:03 -07:00
James M Snell
4da8b99a74
console: coerce label to string in console.time()
...
Per the console spec, the label in console.time() is a string.
Per the console spec, the default value of label is `'default'`.
PR-URL: https://github.com/nodejs/node/pull/14643
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-07 22:22:59 -07:00
James M Snell
7535a94c8a
test: begin normalizing fixtures use
...
Adds a new `../common/fixtures' module to begin normalizing
`test/fixtures` use. Our test code is a bit inconsistent with
regards to use of the fixtures directory. Some code uses
`path.join()`, some code uses string concats, some other
code uses template strings, etc. In mnay cases, significant
duplication of code is seen when accessing fixture files, etc.
This updates many (but by no means all) of the tests in the
test suite to use the new consistent API. There are still
many more to update, which would make an excelent Code-n-Learn
exercise.
PR-URL: https://github.com/nodejs/node/pull/14332
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-08-07 18:00:57 -07:00
James M Snell
7192e913f7
test: improve multiple timers tests
...
PR-URL: https://github.com/nodejs/node/pull/14616
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-07 17:33:59 -07:00
James M Snell
34d1b1144e
http2: fix flakiness in timeout
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:53 -07:00
James M Snell
064ac2c666
http2: fix linting after rebase
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:48 -07:00
James M Snell
7152790c85
http2: fix compilation error after V8 update
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:44 -07:00
James M Snell
45b7fc2039
http2: add some doc detail for invalid header chars
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:39 -07:00
James M Snell
383a1696c0
http2: fix documentation errors
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:32 -07:00
James M Snell
e11858f78c
http2: minor cleanup
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:28 -07:00
James M Snell
545797b9e4
http2: use static allocated arrays
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:24 -07:00
James M Snell
c1d81a71b2
http2: get trailers working with the compat api
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:19 -07:00
James M Snell
b484ea1fab
http2: refactor trailers API
...
Rather than using the `'fetchTrailers'` event to collect trailers,
a new `getTrailers` callback option is supported. If not set, the
internals will skip calling out for trailers at all. Expands the
test to make sure trailers work from the client side also.
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:13 -07:00
James M Snell
59e509808a
http2: address initial pr feedback
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:57:09 -07:00
James M Snell
d6a774b1bd
http2: add range support for respondWith{File|FD}
...
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
range requests
* Fix linting nits following most recent update
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:45 -07:00
James M Snell
953458f645
http2: fix socketOnTimeout and a segfault
...
Fixes: https://github.com/nodejs/http2/issues/179
Was fixing issue #179 and encountered a segault that was
happening somewhat randomly on session destruction. Both
should be fixed
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:39 -07:00
James M Snell
6911fe337c
http2: refinement and test for socketError
...
Fixes: https://github.com/nodejs/http2/issues/184
Refines the `'socketError'` event a bit and adds a test for the
emission of the `'socketError'` event on the server. Client side
is tested separately
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:34 -07:00
James M Snell
01a46f3981
http2: fix abort when client.destroy inside end event
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:29 -07:00
James M Snell
033c3b0a4d
test: fix flaky test-http2-client-unescaped-path on osx
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:24 -07:00
James M Snell
09b0b1bd48
test: fix flakiness in test-http2-client-upload
...
Race condition in the closing of the stream causing failure on
some platforms.
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:18 -07:00
James M Snell
df0334669e
doc: include http2.md in all.md
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:14 -07:00
James M Snell
f070d784d6
http2: fix documentation nits
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:10 -07:00
James M Snell
6dea193aca
http2: remove redundant return in test
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:56:05 -07:00
James M Snell
b1e055696f
http2: add tests and benchmarks
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:55:58 -07:00
James M Snell
e71e71b513
http2: introducing HTTP/2
...
At long last: The initial *experimental* implementation of HTTP/2.
This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.
This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.
Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.
The JS API is defined within `internal/http2/*.js`.
There are two APIs provided: Core and Compat.
The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.
The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.
Tests, documentation and initial benchmarks are included.
The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.
When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.
To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.
Additional configuration options to enable verbose debugging are provided:
```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```
The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.
The following illustrates as simple HTTP/2 server and client interaction:
(The HTTP/2 client and server support both plain text and TLS connections)
```jt client = http2.connect('http://localhost:80 ');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
client.destroy();
});
// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
stream.respond({ ':status': 200 });
stream.write('hello ');
stream.end('world');
});
server.listen(80);
```
```js
const http2 = require('http2');
const client = http2.connect('http://localhost ');
```
Author: Anna Henningsen <anna@addaleax.net >
Author: Colin Ihrig <cjihrig@gmail.com >
Author: Daniel Bevenius <daniel.bevenius@gmail.com >
Author: James M Snell <jasnell@gmail.com >
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com >
Author: Robert Kowalski <rok@kowalski.gd >
Author: Santiago Gimeno <santiago.gimeno@gmail.com >
Author: Sebastiaan Deckers <sebdeckers83@gmail.com >
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:55:44 -07:00
James M Snell
71a1876f6c
deps: add nghttp2 dependency
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:55:39 -07:00
James M Snell
b1909d3a70
tls: add tlsSocket.disableRenegotiation()
...
Allows TLS renegotiation to be disabled per `TLSSocket` instance.
Per HTTP/2, TLS renegotiation is forbidden after the initial
connection prefix is exchanged.
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:55:30 -07:00
James M Snell
9ea363ee99
http: move utcDate to internal/http.js
...
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-04 12:55:22 -07:00
James M Snell
4e8bc7181c
test: improve multiple zlib tests
...
PR-URL: https://github.com/nodejs/node/pull/14455
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-03 17:07:14 -07:00
James M Snell
4b23b42981
test: improve multiple vm tests
...
PR-URL: https://github.com/nodejs/node/pull/14458
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2017-08-03 11:00:23 -07:00
James M Snell
cc43c8fb54
console: add console.count() and console.clear()
...
Both are simple utility functions defined by the WHATWG
console spec (https://console.spec.whatwg.org/ ).
PR-URL: https://github.com/nodejs/node/pull/12678
Ref: https://github.com/nodejs/node/issues/12675
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-02 08:23:07 -07:00
James M Snell
b0a8a7c6ba
test: improvements to various http tests
...
* Add common/countdown utility
* Numerous improvements to http tests
PR-URL: https://github.com/nodejs/node/pull/14315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-07-24 14:16:49 -07:00
James M Snell
ed21cb1774
util: implement WHATWG Encoding Standard API
...
Provide an (initially experimental) implementation of the WHATWG Encoding
Standard API (`TextDecoder` and `TextEncoder`). The is the same API
implemented on the browser side.
By default, with small-icu, only the UTF-8, UTF-16le and UTF-16be decoders
are supported. With full-icu enabled, every encoding other than iso-8859-16
is supported.
This provides a basic test, but does not include the full web platform
tests. Note: many of the web platform tests for this would fail by default
because we ship with small-icu by default.
A process warning will be emitted on first use to indicate that the
API is still experimental. No runtime flag is required to use the
feature.
Refs: https://encoding.spec.whatwg.org/
PR-URL: https://github.com/nodejs/node/pull/13644
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-07-24 14:04:13 -07:00
James M Snell
5c2d1af310
doc: update experimental status to reflect use
...
* Update the experimental status to reflect actual common use.
* Also make a few formatting fixes.
Fixes: https://github.com/nodejs/node/issues/12701
PR-URL: https://github.com/nodejs/node/pull/12723
Fixes: https://github.com/nodejs/node/issues/12701
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2017-07-24 09:55:13 -07:00
James M Snell
355523fcfb
buffer: refactor module.exports, imports
...
* Move to more efficient module.exports pattern
* Refactor requires
* Eliminate circular dependency on internal/buffer
* Add names to some functions
* Fix circular dependency error in assert.js
PR-URL: https://github.com/nodejs/node/pull/13807
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-24 07:24:53 -07:00
James M Snell
b1355ba6fa
util: refactor util module
...
* refactor util exports
* early capture of prototype methods
* use template strings and args consistently
PR-URL: https://github.com/nodejs/node/pull/13803
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-23 20:40:53 -07:00
James M Snell
1fcb76e8f2
cluster: remove deprecated property
...
PR-URL: https://github.com/nodejs/node/pull/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 >
2017-06-20 11:48:47 -07:00
James M Snell
eaaec57332
test: use worker.exitedAfterDisconnect consistently
...
PR-URL: https://github.com/nodejs/node/pull/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 >
2017-06-20 11:48:42 -07:00
James M Snell
3fab9f2cd7
doc: EOL deprecated API and update notes
...
PR-URL: https://github.com/nodejs/node/pull/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 >
2017-06-20 11:48:36 -07:00
James M Snell
22cf25cf2d
buffer: support boxed strings and toPrimitive
...
Add support for `Buffer.from(new String('...'))` and
`Buffer.from({[Symbol.toPrimitive]() { return '...'; }})`
PR-URL: https://github.com/nodejs/node/pull/13725
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-19 15:27:01 -07:00
James M Snell
873e2f270f
errors: add missing ERR_ prefix on util.callbackify error
...
The `FALSY_VALUE_REJECTION` error code added by
https://github.com/nodejs/node/pull/12712 did not have the `ERR_` prefix,
nor was it added to the errors.md documentation. Add the prefix in for
consistency.
PR-URL: https://github.com/nodejs/node/pull/13604
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-06-13 12:33:52 -07:00
James M Snell
d7f6919228
2017-05-07, Version 8.1.0 (Current)
...
* **Async Hooks**
* When one `Promise` leads to the creation of a new `Promise`, the parent
`Promise` will be identified as the trigger
[[`135f4e6643`](https://github.com/nodejs/node/commit/135f4e6643 )]
[#13367 ](https://github.com/nodejs/node/pull/13367 ).
* **Dependencies**
* libuv has been updated to 1.12.0
[[`968596ec77`](https://github.com/nodejs/node/commit/968596ec77 )]
[#13306 ](https://github.com/nodejs/node/pull/13306 ).
* npm has been updated to 5.0.3
[[`ffa7debd7a`](https://github.com/nodejs/node/commit/ffa7debd7a )]
[#13487 ](https://github.com/nodejs/node/pull/13487 ).
* **File system**
* The `fs.exists()` function now works correctly with `util.promisify()`
[[`6e0eccd7a1`](https://github.com/nodejs/node/commit/6e0eccd7a1 )]
[#13316 ](https://github.com/nodejs/node/pull/13316 ).
* fs.Stats times are now also available as numbers
[[`c756efb25a`](https://github.com/nodejs/node/commit/c756efb25a )]
[#13173 ](https://github.com/nodejs/node/pull/13173 ).
* **Inspector**
* It is now possible to bind to a random port using `--inspect=0`
[[`cc6ec2fb27`](https://github.com/nodejs/node/commit/cc6ec2fb27 )]
[#5025 ](https://github.com/nodejs/node/pull/5025 ).
* **Zlib**
* A regression in the Zlib module that made it impossible to properly
subclasses `zlib.Deflate` and other Zlib classes has been fixed.
[[`6aeb555cc4`](https://github.com/nodejs/node/commit/6aeb555cc4 )]
[#13374 ](https://github.com/nodejs/node/pull/13374 ).
2017-06-08 20:54:01 +10:00
James M Snell
7024c5a302
zlib: revert back to Functions
...
Using ES6 Classes broke userland code. Revert back to functions.
PR-URL: https://github.com/nodejs/node/pull/13374
Fixes: https://github.com/nodejs/node/issues/13358
Ref: https://github.com/nodejs/node/pull/13370
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-05 10:56:52 -07:00
James M Snell
43e4efdf21
2017-05-30, Version 8.0.0 (Current)
...
* **Async Hooks**
* The `async_hooks` module has landed in core
[[`4a7233c178`](https://github.com/nodejs/node/commit/4a7233c178 )]
[#12892 ](https://github.com/nodejs/node/pull/12892 ).
* **Buffer**
* Using the `--pending-deprecation` flag will cause Node.js to emit a
deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
[[`d2d32ea5a2`](https://github.com/nodejs/node/commit/d2d32ea5a2 )]
[#11968 ](https://github.com/nodejs/node/pull/11968 ).
* `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
[[`7eb1b4658e`](https://github.com/nodejs/node/commit/7eb1b4658e )]
[#12141 ](https://github.com/nodejs/node/pull/12141 ).
* Many `Buffer` methods now accept `Uint8Array` as input
[[`beca3244e2`](https://github.com/nodejs/node/commit/beca3244e2 )]
[#10236 ](https://github.com/nodejs/node/pull/10236 ).
* **Child Process**
* Argument and kill signal validations have been improved
[[`97a77288ce`](https://github.com/nodejs/node/commit/97a77288ce )]
[#12348 ](https://github.com/nodejs/node/pull/12348 ),
[[`d75fdd96aa`](https://github.com/nodejs/node/commit/d75fdd96aa )]
[#10423 ](https://github.com/nodejs/node/pull/10423 ).
* Child Process methods accept `Uint8Array` as input
[[`627ecee9ed`](https://github.com/nodejs/node/commit/627ecee9ed )]
[#10653 ](https://github.com/nodejs/node/pull/10653 ).
* **Console**
* Error events emitted when using `console` methods are now supressed.
[[`f18e08d820`](https://github.com/nodejs/node/commit/f18e08d820 )]
[#9744 ](https://github.com/nodejs/node/pull/9744 ).
* **Dependencies**
* The npm client has been updated to 5.0.0
[[`3c3b36af0f`](https://github.com/nodejs/node/commit/3c3b36af0f )]
[#12936 ](https://github.com/nodejs/node/pull/12936 ).
* V8 has been updated to 5.8 with forward ABI stability to 6.0
[[`60d1aac8d2`](https://github.com/nodejs/node/commit/60d1aac8d2 )]
[#12784 ](https://github.com/nodejs/node/pull/12784 ).
* **Domains**
* Native `Promise` instances are now `Domain` aware
[[`84dabe8373`](https://github.com/nodejs/node/commit/84dabe8373 )]
[#12489 ](https://github.com/nodejs/node/pull/12489 ).
* **Errors**
* We have started assigning static error codes to errors generated by Node.js.
This has been done through multiple commits and is still a work in
progress.
* **File System**
* The utility class `fs.SyncWriteStream` has been deprecated
[[`7a55e34ef4`](https://github.com/nodejs/node/commit/7a55e34ef4 )]
[#10467 ](https://github.com/nodejs/node/pull/10467 ).
* The deprecated `fs.read()` string interface has been removed
[[`3c2a9361ff`](https://github.com/nodejs/node/commit/3c2a9361ff )]
[#9683 ](https://github.com/nodejs/node/pull/9683 ).
* **HTTP**
* Improved support for userland implemented Agents
[[`90403dd1d0`](https://github.com/nodejs/node/commit/90403dd1d0 )]
[#11567 ](https://github.com/nodejs/node/pull/11567 ).
* Outgoing Cookie headers are concatenated into a single string
[[`d3480776c7`](https://github.com/nodejs/node/commit/d3480776c7 )]
[#11259 ](https://github.com/nodejs/node/pull/11259 ).
* The `httpResponse.writeHeader()` method has been deprecated
[[`fb71ba4921`](https://github.com/nodejs/node/commit/fb71ba4921 )]
[#11355 ](https://github.com/nodejs/node/pull/11355 ).
* New methods for accessing HTTP headers have been added to `OutgoingMessage`
[[`3e6f1032a4`](https://github.com/nodejs/node/commit/3e6f1032a4 )]
[#10805 ](https://github.com/nodejs/node/pull/10805 ).
* **Lib**
* All deprecation messages have been assigned static identifiers
[[`5de3cf099c`](https://github.com/nodejs/node/commit/5de3cf099c )]
[#10116 ](https://github.com/nodejs/node/pull/10116 ).
* The legacy `linkedlist` module has been removed
[[`84a23391f6`](https://github.com/nodejs/node/commit/84a23391f6 )]
[#12113 ](https://github.com/nodejs/node/pull/12113 ).
* **N-API**
* Experimental support for the new N-API API has been added
[[`56e881d0b0`](https://github.com/nodejs/node/commit/56e881d0b0 )]
[#11975 ](https://github.com/nodejs/node/pull/11975 ).
* **Process**
* Process warning output can be redirected to a file using the
`--redirect-warnings` command-line argument
[[`03e89b3ff2`](https://github.com/nodejs/node/commit/03e89b3ff2 )]
[#10116 ](https://github.com/nodejs/node/pull/10116 ).
* Process warnings may now include additional detail
[[`dd20e68b0f`](https://github.com/nodejs/node/commit/dd20e68b0f )]
[#12725 ](https://github.com/nodejs/node/pull/12725 ).
* **REPL**
* REPL magic mode has been deprecated
[[`3f27f02da0`](https://github.com/nodejs/node/commit/3f27f02da0 )]
[#11599 ](https://github.com/nodejs/node/pull/11599 ).
* **Src**
* `NODE_MODULE_VERSION` has been updated to 57
(https://github.com/nodejs/node/commit/ec7cbaf266 )]
[#12995 ](https://github.com/nodejs/node/pull/12995 ).
* Add `--pending-deprecation` command-line argument and
`NODE_PENDING_DEPRECATION` environment variable
[[`a16b570f8c`](https://github.com/nodejs/node/commit/a16b570f8c )]
[#11968 ](https://github.com/nodejs/node/pull/11968 ).
* The `--debug` command-line argument has been deprecated. Note that
using `--debug` will enable the *new* Inspector-based debug protocol
as the legacy Debugger protocol previously used by Node.js has been
removed. [[`010f864426`](https://github.com/nodejs/node/commit/010f864426 )]
[#12949 ](https://github.com/nodejs/node/pull/12949 ).
* Throw when the `-c` and `-e` command-line arguments are used at the same
time [[`a5f91ab230`](https://github.com/nodejs/node/commit/a5f91ab230 )]
[#11689 ](https://github.com/nodejs/node/pull/11689 ).
* Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
arguments are used at the same time.
[[`8a7db9d4b5`](https://github.com/nodejs/node/commit/8a7db9d4b5 )]
[#12087 ](https://github.com/nodejs/node/pull/12087 ).
* **Stream**
* `Stream` now supports `destroy()` and `_destroy()` APIs
[[`b6e1d22fa6`](https://github.com/nodejs/node/commit/b6e1d22fa6 )]
[#12925 ](https://github.com/nodejs/node/pull/12925 ).
* `Stream` now supports the `_final()` API
[[`07c7f198db`](https://github.com/nodejs/node/commit/07c7f198db )]
[#12828 ](https://github.com/nodejs/node/pull/12828 ).
* **TLS**
* The `rejectUnauthorized` option now defaults to `true`
[[`348cc80a3c`](https://github.com/nodejs/node/commit/348cc80a3c )]
[#5923 ](https://github.com/nodejs/node/pull/5923 ).
* The `tls.createSecurePair()` API now emits a runtime deprecation
[[`a2ae08999b`](https://github.com/nodejs/node/commit/a2ae08999b )]
[#11349 ](https://github.com/nodejs/node/pull/11349 ).
* A runtime deprecation will now be emitted when `dhparam` is less than
2048 bits [[`d523eb9c40`](https://github.com/nodejs/node/commit/d523eb9c40 )]
[#11447 ](https://github.com/nodejs/node/pull/11447 ).
* **URL**
* The WHATWG URL implementation is now a fully-supported Node.js API
[[`d080ead0f9`](https://github.com/nodejs/node/commit/d080ead0f9 )]
[#12710 ](https://github.com/nodejs/node/pull/12710 ).
* **Util**
* `Symbol` keys are now displayed by default when using `util.inspect()`
[[`5bfd13b81e`](https://github.com/nodejs/node/commit/5bfd13b81e )]
[#9726 ](https://github.com/nodejs/node/pull/9726 ).
* `toJSON` errors will be thrown when formatting `%j`
[[`455e6f1dd8`](https://github.com/nodejs/node/commit/455e6f1dd8 )]
[#11708 ](https://github.com/nodejs/node/pull/11708 ).
* Convert `inspect.styles` and `inspect.colors` to prototype-less objects
[[`aab0d202f8`](https://github.com/nodejs/node/commit/aab0d202f8 )]
[#11624 ](https://github.com/nodejs/node/pull/11624 ).
* The new `util.promisify()` API has been added
[[`99da8e8e02`](https://github.com/nodejs/node/commit/99da8e8e02 )]
[#12442 ](https://github.com/nodejs/node/pull/12442 ).
* **Zlib**
* Support `Uint8Array` in Zlib convenience methods
[[`91383e47fd`](https://github.com/nodejs/node/commit/91383e47fd )]
[#12001 ](https://github.com/nodejs/node/pull/12001 ).
* Zlib errors now use `RangeError` and `TypeError` consistently
[[`b514bd231e`](https://github.com/nodejs/node/commit/b514bd231e )]
[#11391 ](https://github.com/nodejs/node/pull/11391 ).
2017-05-30 10:58:31 -07:00
James M Snell
dbbe1faf30
doc: restructure url.md
...
PR-URL: https://github.com/nodejs/node/pull/12710
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-05-29 07:39:37 -07:00
James M Snell
10754b60d0
doc: graduate WHATWG URL from Experimental
...
PR-URL: https://github.com/nodejs/node/pull/12710
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-05-29 07:39:30 -07:00
James M Snell
ef16319eff
util: fixup internal util exports
...
util.promisify landed without using the module.exports = {}
pattern. This fixes it up for consistency
PR-URL: https://github.com/nodejs/node/pull/12998
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-15 08:26:57 -07:00
James M Snell
d37f27a008
test: expand test coverage of readline
...
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:31 +02:00
James M Snell
4c070d4897
readline: move escape codes into internal/readline
...
Moves escape codes into internal/readline for easier management.
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:26 +02:00
James M Snell
4ac7a68ccd
readline: multiple code cleanups
...
Variety of code maintenance updates, cleanups
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:22 +02:00
James M Snell
392a8987c6
readline: use module.exports = {} on internal/readline
...
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:18 +02:00
James M Snell
9318f82937
readline: use module.exports = {}
...
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:53:58 +02:00
James M Snell
e48d58b8b2
assert: fix AssertionError, assign error code
...
Using `assert.AssertionError()` without the `new` keyword results
in a non-intuitive error:
```js
> assert.AssertionError({})
TypeError: Cannot assign to read only property 'name' of function 'function ok(value, message) {
if (!value) fail(value, true, message, '==', assert.ok);
}'
at Function.AssertionError (assert.js:45:13)
at repl:1:8
at realRunInThisContextScript (vm.js:22:35)
at sigintHandlersWrap (vm.js:98:12)
at ContextifyScript.Script.runInThisContext (vm.js:24:12)
at REPLServer.defaultEval (repl.js:346:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:545:10)
at emitOne (events.js:101:20)
>
```
The `assert.AssertionError()` can only be used correctly with `new`,
so this converts it into a proper ES6 class that will give an
appropriate error message.
This also associates the appropriate internal/errors code with all
`assert.AssertionError` instances and updates the appropriate test
cases.
PR-URL: https://github.com/nodejs/node/pull/12651
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-04 07:18:17 -07:00
James M Snell
dd20e68b0f
process: add optional detail to process emitWarning
...
Adds a new method signature variant for process.emitWarning()
that accepts an options object. The options object may include
a new `detail` option that allows additional detail text to be
associated with the warning. By default, this additional text
will be printed to stderr along with the warning, and included
on the Warning Error object using the `.detail` property.
e.g.
```js
process.emitWarning('A message', {
code: 'WARNING123',
detail: 'This is additional detail'
});
// Emits:
// (node {pid}) [WARNING123] Warning: A message
// This is additional detail
```
PR-URL: https://github.com/nodejs/node/pull/12725
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-01 11:53:47 -07:00
James M Snell
23fc082409
test: remove extra console output from test-os.js
...
PR-URL: https://github.com/nodejs/node/pull/12654
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-05-01 11:45:02 -07:00
James M Snell
473572ea25
os: refactor os structure, add Symbol.toPrimitive
...
Refactor the structure of the os module to use more efficient
module.exports = {} pattern.
Add Symbol.toPrimitive support to os methods that return simple
primitives. This is a minor tweak that makes using these slightly
more friendly when doing things like:
```js
var m = `${os.tmpdir}/foo`
```
PR-URL: https://github.com/nodejs/node/pull/12654
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-05-01 11:44:56 -07:00
James M Snell
ea9eed5643
freelist: simplify export
...
PR-URL: https://github.com/nodejs/node/pull/12644
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-05-01 11:18:51 -07:00
James M Snell
08809f28ad
fs: simplify constant decls
...
PR-URL: https://github.com/nodejs/node/pull/12644
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-05-01 11:18:46 -07:00
James M Snell
e2199e0fc2
streams: refactor BufferList into ES6 class
...
PR-URL: https://github.com/nodejs/node/pull/12644
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-05-01 11:18:42 -07:00
James M Snell
ed0716f0e9
module: refactor internal/module export style
...
PR-URL: https://github.com/nodejs/node/pull/12644
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-05-01 11:18:38 -07:00
James M Snell
579ff2a487
process: refactor internal/process.js export style
...
PR-URL: https://github.com/nodejs/node/pull/12644
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-05-01 11:18:31 -07:00
James M Snell
97ec72b76d
url: refactor binding imports in internal/url
...
PR-URL: https://github.com/nodejs/node/pull/12717
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com
2017-04-29 10:24:24 -07:00