Eric Eastwood
be2f3a3bf8
doc: update assert.rejects() docs with a validation function example
...
Spawned from my own struggle to use in https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1702#note_268452483
PR-URL: https://github.com/nodejs/node/pull/31271
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-02-24 03:49:12 -08:00
Shelley Vohr
0c3c0e7184
2020-02-18, Version 13.9.0 (Current)
...
Notable changes:
* async_hooks
* add executionAsyncResource (Matteo Collina) #30959
* crypto
* add crypto.diffieHellman (Tobias Nießen) #31178
* add DH support to generateKeyPair (Tobias Nießen) #31178
* simplify DH groups (Tobias Nießen) #31178
* add key type 'dh' (Tobias Nießen) #31178
* test
* skip keygen tests on arm systems (Tobias Nießen) #31178
* perf_hooks
* add property flags to GCPerformanceEntry (Kirill Fomichev) #29547
* process
* report ArrayBuffer memory in `memoryUsage()` (Anna Henningsen) #31550
* readline
* make tab size configurable (Ruben Bridgewater) #31318
* report
* add support for Workers (Anna Henningsen) #31386
* worker
* add ability to take heap snapshot from parent thread (Anna Henningsen) #31569
* added new collaborators
* add ronag to collaborators (Robert Nagy) #31498
PR-URL: https://github.com/nodejs/node/pull/31837
2020-02-18 12:40:21 -08:00
Rich Trott
8d8f7c6e17
doc: revise deepEqual() legacy assertion mode text
...
* Remove "potentially". It's arguably misplaced and certainly
unnecessary.
* Use italics for words-as-words usage of _Deep equality_ rather than
using quotation marks.
PR-URL: https://github.com/nodejs/node/pull/31704
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-11 00:33:26 -10:00
Rich Trott
7e386295c5
doc: improve strict assertion mode color text
...
Minor improvements to the text about colors in strict assertion mode:
* Consolidate the two paragraphs into one
* Pluralize "variables"
* Remove unnecessary article "the"
* Change "doc" to "documentation"
PR-URL: https://github.com/nodejs/node/pull/31703
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-10 20:57:33 -10:00
Rich Trott
93c4c1a273
doc: consolidate introductory text
...
PR-URL: https://github.com/nodejs/node/pull/31667
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-02-08 15:13:02 -10:00
Rich Trott
a9e26268f5
doc,assert: rename "mode" to "assertion mode"
...
Rename "strict mode" in the assert module to "strict assertion mode".
This is to avoid confusion with the more typical meaning of "strict
mode" in ECMAScript.
This necessitates a corresponding change of "legacy mode" to "legacy
assertion mode".
PR-URL: https://github.com/nodejs/node/pull/31635
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 10:00:37 -10:00
Ruben Bridgewater
e908323b7e
2020-01-07, Version v13.6.0 (Current)
...
Notable changes:
* assert:
* Implement `assert.match()` and `assert.doesNotMatch()` (Ruben
Bridgewater) https://github.com/nodejs/node/pull/30929
* events:
* Add `EventEmitter.on` to async iterate over events (Matteo Collina)
https://github.com/nodejs/node/pull/27994
* Allow monitoring error events (Gerhard Stoebich)
https://github.com/nodejs/node/pull/30932
* fs:
* Allow overriding `fs` for streams (Robert Nagy)
https://github.com/nodejs/node/pull/29083
* perf_hooks:
* Move `perf_hooks` out of experimental (legendecas)
https://github.com/nodejs/node/pull/31101
* repl:
* Implement ZSH-like reverse-i-search (Ruben Bridgewater)
https://github.com/nodejs/node/pull/31006
* tls:
* Add PSK (pre-shared key) support (Denys Otrishko)
https://github.com/nodejs/node/pull/23188
PR-URL: https://github.com/nodejs/node/pull/31238
2020-01-08 00:10:43 +01:00
Ruben Bridgewater
e33f773d4f
assert: implement assert.match() and assert.doesNotMatch()
...
This adds a new functionality to the assertion module: a dedicated
check for regular expressions. So far it's possible to use
`assert.ok(regexp.test(string))`. This is not ideal though when it
comes to the error message, since it's not possible to know how
either of the input values look like. It's just known that the
assertion failed.
This allows to pass through the regular expression and the input
string. The string is then matched against the regular expression
and reports a expressive error message in case of a failure.
PR-URL: https://github.com/nodejs/node/pull/30929
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2020-01-01 18:44:31 +01:00
Rich Trott
b5834a49b3
doc,assert: use code markup/markdown in headers
...
PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-12-26 21:37:24 -08:00
Ruben Bridgewater
5360dd151d
assert: handle (deep) equal(NaN, NaN) as being identical
...
This aligns the `equal` and `deepEqual()` implementations with the
strict versions by accepting `NaN` as being identical in case both
sides are NaN.
Refs: https://github.com/nodejs/node/issues/30350#issuecomment-552191641
PR-URL: https://github.com/nodejs/node/pull/30766
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-12-07 00:43:51 +01:00
Shobhit Chittora
dbdad4d1b5
doc: adds assert doc for strict mode with pointer to strict equality
...
Refs: https://github.com/nodejs/node/issues/30485
PR-URL: https://github.com/nodejs/node/pull/30486
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-12-03 23:49:14 +01:00
Rich Trott
359766b2c3
benchmark,doc,lib,test: prepare for padding lint rule
...
Upcoming lint rule will require a blank line between consecutive
functions. Add it in the places where we don't have it already.
PR-URL: https://github.com/nodejs/node/pull/30696
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-11-30 06:28:29 -08:00
Rich Trott
b703218f78
doc: simplify "is recommended" language in assert documentation
...
Replace "X is not recommended" with "Avoid X".
Replace "It is recommended not to use X" with "Avoid X".
PR-URL: https://github.com/nodejs/node/pull/30558
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-22 11:38:50 -08:00
Shobhit Chittora and Vse Mozhet Byt
5bb4d85b25
doc: adds NO_COLOR to assert doc page
...
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/30483
Refs: https://github.com/nodejs/node/issues/30484
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2019-11-18 15:46:53 +01:00
Nick Schonning
81bc7b3ba5
doc: escape brackets not used as markdown reference links
...
These can turn into links if reference links are added to the document
PR-URL: https://github.com/nodejs/node/pull/29809
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-10-10 22:15:58 -07:00
Nick Schonning
24011de907
doc: add explicit bracket for markdown reference links
...
Use explicit trailing `[]` for reference markdown links to prevent
implicit links when references are added to documents.
PR-URL: https://github.com/nodejs/node/pull/29808
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-03 22:57:33 -07:00
Vse Mozhet Byt
d5882a9544
doc: unify place of stability notes
...
In most cases, stability note is the first info in a doc section
after YAML. This PR makes it consistent across all docs,
as this info seems the most relevant for a reader.
PR-URL: https://github.com/nodejs/node/pull/29799
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-03 13:59:40 -07:00
Nick Schonning
4b505f082c
doc: add missing reference link values
...
Reference links were used in the document, but not define at the end.
PR-URL: https://github.com/nodejs/node/pull/29558
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-10-02 12:17:38 -07:00
Ruben Bridgewater
eef1b5aa0f
doc: make AssertionError a link
...
This makes sure that `AssertionError` links to the correct place in
the assert documentation.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:56:02 +02:00
Ruben Bridgewater
8fd7184959
doc: update assert.throws() examples
...
This updates two outdated examples to the current implementation.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:56:01 +02:00
Ruben Bridgewater
d47b6786c9
assert: wrap validation function errors
...
This makes sure that validation function used by `assert.throws` and
`assert.rejects` always throw validatin errors instead of rethrowing
the received error.
That should improve the debugging experience for developers since
they have a better context where the error is coming from and they
also get to know what triggered it.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:55:11 +02:00
Nick Schonning
c929b15d1d
doc: space around lists
...
Address markdownlint rule MD032.
Flagged a few mixed list styles.
PR-URL: https://github.com/nodejs/node/pull/29467
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-09-09 16:45:24 -07:00
Kamat, Trivikram
5c9209bc4d
doc,errors: add extends to derived classes
...
PR-URL: https://github.com/nodejs/node/pull/29303
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-08-26 18:49:41 -07:00
Rich Trott
36864a60fa
doc: remove legacy mode deprecation in assert
...
The deprecation was revoked in
https://github.com/nodejs/node/pull/28892 .
PR-URL: https://github.com/nodejs/node/pull/28909
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-02 11:59:58 -07:00
himself65
3ad87994ec
doc: add examples at assert.strictEqual
...
PR-URL: https://github.com/nodejs/node/pull/28092
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-07-17 21:13:48 -07:00
Rich Trott
a013aa0f5e
doc: remove superfluous MDN link in assert.md
...
PR-URL: https://github.com/nodejs/node/pull/28246
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-07-13 10:06:05 -07:00
Rich Trott
7696663691
doc: remove "note that" from assert.md
...
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16
PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-06-23 07:10:06 -07:00
Rich Trott
ad2036fc1a
doc: revise assert legacy mode text
...
Revise the text for the `assert` module's legacy mode to make it simpler
and more scannable.
PR-URL: https://github.com/nodejs/node/pull/28315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-22 07:05:15 -06:00
Rich Trott
3af27f86b6
doc: revise strict mode text in assert
...
Revise the text describing `strict` mode.
PR-URL: https://github.com/nodejs/node/pull/28285
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-21 03:30:07 -06:00
Rich Trott
17a5eba6c2
doc: tidy AssertionError text
...
Several minor improvements to text. Remove some repetition.
PR-URL: https://github.com/nodejs/node/pull/28255
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-18 16:18:25 -07:00
Rich Trott
db459e9f72
doc: revise intro sentence for assert
...
Simplify language, remove redundancy ("tests that can be used to
test") and remove wordy passive voice ("that can be used to" replaced
with "for").
PR-URL: https://github.com/nodejs/node/pull/28226
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-06-17 06:59:17 -07:00
Rich Trott
215fd083ea
doc: improve assert strict-mode text
...
Simplify and clarify introductory material on `strict` mode.
Merge two single-sentence paragraphs into a single paragraph.
Replace "`strict mode`" with "`strict` mode".
PR-URL: https://github.com/nodejs/node/pull/28239
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-06-16 21:20:06 -07:00
Ruben Bridgewater
0f900405e5
doc: update assert's validation functions
...
Using `assert.throws()` or `assert.rejects()` in combination with
validation function can be very powerful. Using them by returning
any value besides `true` makes debugging very difficult though
because there's no context or reason why the error validation failed.
Thus, it is recommended to throw an error in such cases instead of
returning anything besides `true`.
PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-12 20:02:53 -07:00
Kyle Zhang
6b57a51b54
doc: fix the wrong name of AssertionError
...
err.name of AssertionError should be 'AssertionError'
PR-URL: https://github.com/nodejs/node/pull/27982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 10:11:24 +02:00
Ruben Bridgewater
31b3dd2842
tools: prohibit assert.doesNotReject() in Node.js core
...
This makes sure we do not use `assert.doesNotReject()` anywhere in
our code base. This is just a simple wrapper that catches the
rejection and then rejects it again in case of an error. Thus, it is
not useful to do that.
The error message for `assert.doesNotThrow()` is also improved.
PR-URL: https://github.com/nodejs/node/pull/27402
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-27 18:22:27 +02:00
Beth Griggs
d896f03578
2019-04-23, Version 12.0.0 (Current)
...
Notable changes:
* assert:
* validate required arguments (Ruben Bridgewater)
[#26641 ](https://github.com/nodejs/node/pull/26641 )
* adjust loose assertions (Ruben Bridgewater)
[#25008 ](https://github.com/nodejs/node/pull/25008 )
* async_hooks:
* remove deprecated `emitBefore` and `emitAfter` (Matteo Collina)
[#26530 ](https://github.com/nodejs/node/pull/26530 )
* remove promise object from resource (Andreas Madsen)
[#23443 ](https://github.com/nodejs/node/pull/23443 )
* bootstrap: make Buffer and process non-enumerable (Ruben Bridgewater)
[#24874 ](https://github.com/nodejs/node/pull/24874 )
* buffer:
* use stricter range checks (Ruben Bridgewater)
[#27045 ](https://github.com/nodejs/node/pull/27045 )
* harden `SlowBuffer` creation (ZYSzys)
[#26272 ](https://github.com/nodejs/node/pull/26272 )
* harden validation of buffer allocation size (ZYSzys)
[#26162 ](https://github.com/nodejs/node/pull/26162 )
* do proper error propagation in addon methods (Anna Henningsen)
[#23939 ](https://github.com/nodejs/node/pull/23939 )
* child_process:
* remove `options.customFds` (cjihrig)
[#25279 ](https://github.com/nodejs/node/pull/25279 )
* harden fork arguments validation (ZYSzys)
[#27039 ](https://github.com/nodejs/node/pull/27039 )
* use non-infinite `maxBuffer` defaults (kohta ito)
[#23027 ](https://github.com/nodejs/node/pull/23027 )
* console:
* don't use ANSI escape codes when `TERM=dumb` (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* crypto:
* remove legacy native handles (Tobias Nießen)
[#27011 ](https://github.com/nodejs/node/pull/27011 )
* decode missing passphrase errors (Tobias Nießen)
[#25208 ](https://github.com/nodejs/node/pull/25208 )
* remove `Cipher.setAuthTag()` and `Decipher.getAuthTag()`
(Tobias Nießen)
[#26249 ](https://github.com/nodejs/node/pull/26249 )
* remove deprecated `crypto._toBuf()` (Tobias Nießen)
[#25338 ](https://github.com/nodejs/node/pull/25338 )
* set `DEFAULT\_ENCODING` property to non-enumerable
(Antoine du Hamel)
[#23222 ](https://github.com/nodejs/node/pull/23222 )
* deps:
* update V8 to 7.4.288.13
(Michaël Zasso, cjihrig, Refael Ackermann)
(Anna Henningsen, Ujjwal Sharma)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* bump minimum icu version to 63 (Ujjwal Sharma)
[#25852 ](https://github.com/nodejs/node/pull/25852 )
* update OpenSSL to 1.1.1b (Sam Roberts, Shigeki Ohtsu)
[#26327 ](https://github.com/nodejs/node/pull/26327 )
* errors:
* update error name (Ruben Bridgewater)
[#26738 ](https://github.com/nodejs/node/pull/26738 )
* fs:
* use proper .destroy() implementation for SyncWriteStream
(Matteo Collina)
[#26690 ](https://github.com/nodejs/node/pull/26690 )
* improve mode validation (Ruben Bridgewater)
[#26575 ](https://github.com/nodejs/node/pull/26575 )
* harden validation of start option in `createWriteStream()`
(ZYSzys)
[#25579 ](https://github.com/nodejs/node/pull/25579 )
* make writeFile consistent with readFile wrt fd
(Sakthipriyan Vairamani (thefourtheye))
[#23709 ](https://github.com/nodejs/node/pull/23709 )
* http:
* validate timeout in `ClientRequest()` (cjihrig)
[#26214 ](https://github.com/nodejs/node/pull/26214 )
* return HTTP 431 on `HPE_HEADER_OVERFLOW` error (Albert Still)
[#25605 ](https://github.com/nodejs/node/pull/25605 )
* switch default parser to llhttp (Anna Henningsen)
[#24870 ](https://github.com/nodejs/node/pull/24870 )
* Runtime-deprecate `outgoingMessage._headers` and
`outgoingMessage._headerNames` (Morgan Roderick)
[#24167 ](https://github.com/nodejs/node/pull/24167 )
* lib:
* remove `Atomics.wake()` (Gus Caplan)
[#27033 ](https://github.com/nodejs/node/pull/27033 )
* move DTRACE\_\* probes out of global scope (James M Snell)
[#26541 ](https://github.com/nodejs/node/pull/26541 )
* deprecate `_stream_wrap` (Sam Roberts)
[#26245 ](https://github.com/nodejs/node/pull/26245 )
* use ES6 class inheritance style (Ruben Bridgewater)
[#24755 ](https://github.com/nodejs/node/pull/24755 )
* module:
* remove unintended access to deps/ (Anna Henningsen)
[#25138 ](https://github.com/nodejs/node/pull/25138 )
* improve error message for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh)
[#25690 ](https://github.com/nodejs/node/pull/25690 )
* requireStack property for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh)
[#25690 ](https://github.com/nodejs/node/pull/25690 )
* remove dead code (Ruben Bridgewater)
[#26983 ](https://github.com/nodejs/node/pull/26983 )
* make `require('.')` never resolve outside the current directory
(Ruben Bridgewater)
[#26973 ](https://github.com/nodejs/node/pull/26973 )
* throw an error for invalid package.json main entries
(Ruben Bridgewater)
[#26823 ](https://github.com/nodejs/node/pull/26823 )
* don't search in `require.resolve.paths` (cjihrig)
[#23683 ](https://github.com/nodejs/node/pull/23683 )
* net:
* remove `Server.listenFD()` (cjihrig)
[#27127 ](https://github.com/nodejs/node/pull/27127 )
* do not add `.host` and `.port` properties to DNS error
(Ruben Bridgewater)
[#26751 ](https://github.com/nodejs/node/pull/26751 )
* emit "write after end" errors in the next tick (Ouyang Yadong)
[#24457 ](https://github.com/nodejs/node/pull/24457 )
* deprecate `_setSimultaneousAccepts()` undocumented function
(James M Snell)
[#23760 ](https://github.com/nodejs/node/pull/23760 )
* os:
* implement `os.type()` using `uv_os_uname()` (cjihrig)
[#25659 ](https://github.com/nodejs/node/pull/25659 )
* remove `os.getNetworkInterfaces()` (cjihrig)
[#25280 ](https://github.com/nodejs/node/pull/25280 )
* process:
* make global.process, global.Buffer getters (Guy Bedford)
[#26882 ](https://github.com/nodejs/node/pull/26882 )
* move DEP0062 (node --debug) to end-of-life (Joyee Cheung)
[#25828 ](https://github.com/nodejs/node/pull/25828 )
* exit on --debug and --debug-brk after option parsing
(Joyee Cheung)
[#25828 ](https://github.com/nodejs/node/pull/25828 )
* improve `--redirect-warnings` handling (Ruben Bridgewater)
[#24965 ](https://github.com/nodejs/node/pull/24965 )
* readline:
* support TERM=dumb (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* repl:
* add welcome message (gengjiawen)
[#25947 ](https://github.com/nodejs/node/pull/25947 )
* fix terminal default setting (Ruben Bridgewater)
[#26518 ](https://github.com/nodejs/node/pull/26518 )
* check colors with `.getColorDepth()` (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* deprecate REPLServer.rli (Ruben Bridgewater)
[#26260 ](https://github.com/nodejs/node/pull/26260 )
* src:
* remove unused `INT_MAX` constant (Sam Roberts)
[#27078 ](https://github.com/nodejs/node/pull/27078 )
* update `NODE_MODULE_VERSION` to 72 (Ujjwal Sharma)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* remove `AddPromiseHook()` (Anna Henningsen)
[#26574 ](https://github.com/nodejs/node/pull/26574 )
* clean up `MultiIsolatePlatform` interface (Anna Henningsen)
[#26384 ](https://github.com/nodejs/node/pull/26384 )
* properly configure default heap limits (Ali Ijaz Sheikh)
[#25576 ](https://github.com/nodejs/node/pull/25576 )
* remove `icuDataDir` from node config (GauthamBanasandra)
[#24780 ](https://github.com/nodejs/node/pull/24780 )
* tls:
* support TLSv1.3 (Sam Roberts)
[#26209 ](https://github.com/nodejs/node/pull/26209 )
* return correct version from `getCipher()` (Sam Roberts)
[#26625 ](https://github.com/nodejs/node/pull/26625 )
* check arg types of renegotiate() (Sam Roberts)
[#25876 ](https://github.com/nodejs/node/pull/25876 )
* add code for `ERR_TLS_INVALID_PROTOCOL_METHOD` (Sam Roberts)
[#24729 ](https://github.com/nodejs/node/pull/24729 )
* emit a warning when servername is an IP address (Rodger Combs)
[#23329 ](https://github.com/nodejs/node/pull/23329 )
* disable TLS v1.0 and v1.1 by default (Ben Noordhuis)
[#23814 ](https://github.com/nodejs/node/pull/23814 )
* remove unused arg to createSecureContext() (Sam Roberts)
[#24241 ](https://github.com/nodejs/node/pull/24241 )
* deprecate `Server.prototype.setOptions()` (cjihrig)
[#23820 ](https://github.com/nodejs/node/pull/23820 )
* load `NODE_EXTRA_CA_CERTS` at startup (Ouyang Yadong)
[#23354 ](https://github.com/nodejs/node/pull/23354 )
* util:
* remove `util.print()`, `util.puts()`, `util.debug()`
and `util.error()` (cjihrig)
[#25377 ](https://github.com/nodejs/node/pull/25377 )
* change inspect compact and breakLength default
(Ruben Bridgewater)
[#27109 ](https://github.com/nodejs/node/pull/27109 )
* improve inspect edge cases (Ruben Bridgewater)
[#27109 ](https://github.com/nodejs/node/pull/27109 )
* only the first line of the error message (Simon Zünd)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* don't set the prototype of callbackified functions
(Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* rename callbackified function (Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* increase function length when using `callbackify()`
(Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* prevent tampering with internals in `inspect()`
(Ruben Bridgewater)
[#26577 ](https://github.com/nodejs/node/pull/26577 )
* prevent Proxy traps being triggered by `.inspect()`
(Ruben Bridgewater)
[#26241 ](https://github.com/nodejs/node/pull/26241 )
* prevent leaking internal properties (Ruben Bridgewater)
[#24971 ](https://github.com/nodejs/node/pull/24971 )
* protect against monkeypatched Object prototype for inspect()
(Rich Trott)
[#25953 ](https://github.com/nodejs/node/pull/25953 )
* treat format arguments equally (Roman Reiss)
[#23162 ](https://github.com/nodejs/node/pull/23162 )
* win, fs:
* detect if symlink target is a directory (Bartosz Sosnowski)
[#23724 ](https://github.com/nodejs/node/pull/23724 )
* zlib:
* throw TypeError if callback is missing (Anna Henningsen)
[#24929 ](https://github.com/nodejs/node/pull/24929 )
* make “bare” constants un-enumerable (Anna Henningsen)
[#24824 ](https://github.com/nodejs/node/pull/24824 )
PR-URL: https://github.com/nodejs/node/pull/26930
2019-04-23 16:46:54 +01:00
Ruben Bridgewater
7493db21b6
assert: adjust loose assertions
...
This changes the loose deep equal comparison by using the same logic
as done in the strict deep equal comparison besides comparing
primitives loosely, not comparing symbol properties and not comparing
the prototype.
`assert.deepEqual` is still commenly used and this is likely the
biggest pitfall.
Most changes are only minor and won't have a big impact besides
likely fixing user expectations.
PR-URL: https://github.com/nodejs/node/pull/25008
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-01-27 03:34:25 +01:00
Sam Roberts
64cea5a1ac
doc: sort bottom-of-file markdown links
...
Reapply https://github.com/nodejs/node/pull/12726
It would be nice to have the sort check applied as part of doc testing,
but this change doesn't implement that.
PR-URL: https://github.com/nodejs/node/pull/24679
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-11-28 13:09:31 -08:00
Denys Otrishko
f90cf19fdd
doc: remove notice of dashes in V8 options
...
Previously only V8 options supported both dashes in them (making them
equivalent), but now Node.js also supports both styles so the note can
be removed.
PR-URL: https://github.com/nodejs/node/pull/23903
Refs: https://github.com/nodejs/node/pull/18592
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-10-29 21:24:08 +00:00
Ruben Bridgewater
c1483bac94
doc: improve assert documentation
...
This fixes the officially accepted message types for `assert.throws()`,
`assert.rejects()`, `assert.doesNotThrow()` and
`assert.doesNotReject()`. It also renames the `block` argument in
those functions to `fn` and `promiseFn` for further clarity.
PR-URL: https://github.com/nodejs/node/pull/22692
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-09-07 22:42:08 +01:00
Vse Mozhet Byt
1a25f9639a
doc: remove redundant 'Example:' and similar notes
...
Some nits were also fixed in passing.
PR-URL: https://github.com/nodejs/node/pull/22537
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-29 16:53:03 +03:00
Ruben Bridgewater
0518b9edf3
assert: multiple improvements
...
1) Switched + / - and red / green in diffs. It seems like that style
is more natural to most people.
2) Short primitives do not use the diff anymore. Especially short
numbers can be read well like 1 !== 2. Cases that can not be
displayed like that (e.g., -0 and +0) use the regular diff output.
3) Improved error descriptions. It was not always clear what the
messages stood for. That should now be resolved.
4) Added a position indicator for single lines in case a tty is used
and the line is shorter than the visual columns.
5) Color detection is now done by checking stderr instead of stdout.
PR-URL: https://github.com/nodejs/node/pull/21628
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-08-04 10:04:32 +02:00
Eugene Y. Q. Shen
ce98e2e989
doc: rename stackStartFunction in assert.md
...
[assert.js](https://github.com/nodejs/node/blob/master/lib/assert.js )
uses `stackStartFn` everywhere instead of `stackStartFunction`.
This also increases consistency with `stackStartFn`
in the `AssertionError` options.
PR-URL: https://github.com/nodejs/node/pull/22077
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-02 17:36:27 +03:00
Rich Trott
85fe134026
doc: remove spaces around slashes
...
Remove spaces around slash characters in documentation. This change
sometimes rewords the content where the slash construction may not be
what is called for.
PR-URL: https://github.com/nodejs/node/pull/21140
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-06 21:23:00 -07:00
Anna Henningsen
82f18118ff
2018-05-23, Version 10.2.0 (Current)
...
* addons:
- Fixed a memory leak for users of `AsyncResource` and N-API.
(Michael Dawson)
https://github.com/nodejs/node/pull/20668
* assert:
- The `error` parameter of `assert.throws()` can be an object containing
regular expressions now. (Ruben Bridgewater)
https://github.com/nodejs/node/pull/20485
* crypto:
- The `authTagLength` option has been made more flexible (Tobias Nießen)
https://github.com/nodejs/node/pull/20235 )
https://github.com/nodejs/node/pull/20039
* esm:
- Builtin modules (e.g. `fs`) now provide named exports in ES6 modules.
(Gus Caplan)
https://github.com/nodejs/node/pull/20403
* http:
- Handling of `close` and `aborted` events has been made more consistent.
(Robert Nagy)
https://github.com/nodejs/node/pull/20075
https://github.com/nodejs/node/pull/20611
* module:
- add --preserve-symlinks-main (David Goldstein)
https://github.com/nodejs/node/pull/19911
* timers:
- `timeout.refresh()` has been added to the public API.
(Jeremiah Senkpiel)
https://github.com/nodejs/node/pull/20298
* Embedder support:
- Functions for creating V8 `Isolate` and `Context` objects with
Node.js-specific behaviour have been added to the API.
(Allen Yonghuang Wang)
https://github.com/nodejs/node/pull/20639
- Node.js `Environment`s clean up resources before exiting now.
(Anna Henningsen)
https://github.com/nodejs/node/pull/19377
- Support for multi-threaded embedding has been improved.
(Anna Henningsen)
https://github.com/nodejs/node/pull/20542
https://github.com/nodejs/node/pull/20539
https://github.com/nodejs/node/pull/20541
PR-URL: https://github.com/nodejs/node/pull/20724
2018-05-23 19:08:39 -04:00
Anna Henningsen
50b334befd
doc: add missing changes: entry for assert.throws
...
Refs: https://github.com/nodejs/node/pull/20485
PR-URL: https://github.com/nodejs/node/pull/20723
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-05-14 19:52:35 +02:00
Ruben Bridgewater
4c6df73ae4
doc: update assert documentation
...
This adds concrete expected types to the assert documentation.
It also fixes a `changes` entry and improves some minor comments.
PR-URL: https://github.com/nodejs/node/pull/20486
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-10 13:39:17 +02:00
Ruben Bridgewater
cf7be86cd9
assert: accept regular expressions to validate
...
This makes sure regular expressions on validation objects validate
against strings when used with `assert.throws` and `assert.rejects`.
PR-URL: https://github.com/nodejs/node/pull/20485
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-05-10 13:17:22 +02:00
Vse Mozhet Byt
7588ceaf35
doc: add more missing backticks
...
Also, fix some other nits in passing
(formatting, punctuation, typos, redundancy, obsoleteness).
PR-URL: https://github.com/nodejs/node/pull/20438
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-03 02:12:07 +03:00
Ruben Bridgewater
655430179f
doc: improve assert docs
...
This improves the error example output by reflecting the current
state. It also makes sure the examples are up to date in general.
`assert.throws` clarified the `ERR_AMBIGUOUS_ARGUMENT` error.
PR-URL: https://github.com/nodejs/node/pull/20313
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-29 17:08:49 +02:00