summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-04-01buffer: remove "new" from deprecation messageRich Trott
This change removes "new" as a description for `Buffer` construction methods. They are arguably not "new" anymore and they certainly won't be "new" anymore at some point. PR-URL: https://github.com/nodejs/node/pull/19687 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-01module: skip preserveSymlinks for mainGuy Bedford
PR-URL: https://github.com/nodejs/node/pull/19388 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-01tools: add 'spaced-comment' into eslint rulesWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-31vm: add support for import.meta to Modulepunteek
Fixes: https://github.com/nodejs/node/issues/18570 PR-URL: https://github.com/nodejs/node/pull/19277 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-03-30console: add table methodGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18137 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-30net: track bytesWritten in C++ landAnna Henningsen
Move tracking of `socket.bytesWritten` to C++ land. This makes it easier to provide this functionality for all `StreamBase` instances, and in particular should keep working when they have been 'consumed' in C++ in some way (e.g. for the network sockets that are underlying to TLS or HTTP2 streams). Also, this parallels `socket.bytesRead` a lot more now. PR-URL: https://github.com/nodejs/node/pull/19551 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-30stream: fix backpressure when multiple syncMatteo Collina
PR-URL: https://github.com/nodejs/node/pull/19613 Fixes: https://github.com/nodejs/node/issues/19601 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-29child_process: better spawn error messageBartosz Sosnowski
Throw ERR_INVALID_ARG_VALUE when filename passed to spawn is empty. Fixes: https://github.com/nodejs/node/issues/19235 PR-URL: https://github.com/nodejs/node/pull/19305 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-29lib: move Pipe/TCPConnectWrap to obj destructuringDaniel Bevenius
This commit moves PipeConnectWrap and TCPConnectWrap into the object destructuring assigments that already exist for pipe_wrap and tcp_wrap. PR-URL: https://github.com/nodejs/node/pull/19611 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-28lib: fix a typo in lib/timers "read through"wangzengdi
PR-URL: https://github.com/nodejs/node/pull/19666 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-28zlib,stream: use “official” util.types typechecksAnna Henningsen
The old variants have been deprecated since b20af8088a4d5cccb19. Refs: https://github.com/nodejs/node/pull/18415 PR-URL: https://github.com/nodejs/node/pull/19602 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-28lib: rename js source to lower snake_caseDaniel Bevenius
This commit renames all JavaScript source files in lib to lower snake_case. PR-URL: https://github.com/nodejs/node/pull/19556 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-03-27tls: runtime-deprecate tls.convertNPNProtocols()Ben Noordhuis
Fixes: https://github.com/nodejs/node/issues/14602 PR-URL: https://github.com/nodejs/node/pull/19403 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-27tls: drop NPN (next protocol negotiation) supportBen Noordhuis
NPN has been superseded by ALPN. Chrome and Firefox removed support for NPN in 2016 and 2017 respectively to no ill effect. Fixes: https://github.com/nodejs/node/issues/14602 PR-URL: https://github.com/nodejs/node/pull/19403 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-27lib: merge stream code for http2 streams & net.SocketAshok
Squashed from: - lib: separate writev responsibilities from writeGeneric - lib: fix calling of cb twice - lib: extract streamId out of stream_base to caller - lib: add symbols instead of methods to hide impl details - lib: remove unneeded lines - lib: use Object.assign instead of apply - lib: rename mixin StreamBase to StreamSharedMethods - lib: use stream shared funcs as top level instead of properties of prototypes - lib: mv lib/internal/stream_shared_methods.js lib/internal/stream_base_commons.js - lib: add comment for readability - lib: refactor _writev in Http2Stream - lib: rephrase comment - lib: revert usage of const,let for perf reasons PR-URL: https://github.com/nodejs/node/pull/19527 Refs: https://github.com/nodejs/node/issues/19060 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-27stream: give error message if `write()` cb called twiceAnna Henningsen
Otherwise, this condition would result in an error that just reads `cb is not a function`, and which additionally could have lost stack trace context through a `process.nextTick()` call. PR-URL: https://github.com/nodejs/node/pull/19510 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-27assert: fix diff color outputRuben Bridgewater
The color output was broken at some point and that was not detected because it was not tested for properly so far. This makes sure the colors work again and it adds a regression test as well. PR-URL: https://github.com/nodejs/node/pull/19464 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-25console: don't swallow call stack exceeded errorsDan Kaplun
Fixes test/parallel/test-console-no-swallow-stack-exceeded.js PR-URL: https://github.com/nodejs/node/pull/19423 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-03-25lib: document nextTick queue internalsAnna Henningsen
Make this code (a bit more) comprehensible by adding some internals docs. With diagrams and everything! 🎉 PR-URL: https://github.com/nodejs/node/pull/19469 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host>
2018-03-25http: support server options on createServerWes Todd
PR-URL: https://github.com/nodejs/node/pull/19461 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-25util: show Weak(Set|Map) entries in inspectRuben Bridgewater
This adds support for WeakMap and WeakSet entries in `util.inspect`. The output is limited to a maximum entry length of `maxArrayLength`. PR-URL: https://github.com/nodejs/node/pull/19259 Fixes: https://github.com/nodejs/node/issues/19001: Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-25util: improve iterator inspect outputRuben Bridgewater
1) So far extra keys on an (Set|Map)Iterator were ignored. Those will now be visible. 2) Improve the performance of showing (Set|Map)Iterator by using the cloned iterator instead of copying all entries first. 3) So far the output was strictly limited to up to 100 entries. The limit will now depend on `maxArrayLength` instead (that default is set to 100 as well) and the output indicates that more entries exist than visible. PR-URL: https://github.com/nodejs/node/pull/19259 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-25Revert "process: add more version properties to release"Tobias Nießen
This reverts commit 982e3bdb1f06bf9d9926c808d30864b32a8223f9. It is believed that the original PR should not have landed as it is as the implemented and exposed API has a variety of flaws. PR-URL: https://github.com/nodejs/node/pull/19577 Refs: https://github.com/nodejs/node/pull/19438 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-03-25assert: improve assert.throwsRuben Bridgewater
This switches the assert.throws output to the one used in strict mode if a error object is used for comparison. From now on it will show the complete difference between two objects instead of only showing the first failing property. It also fixes detecting properties with a undefined value and fails in case the thrown error does not contain the value at all. PR-URL: https://github.com/nodejs/node/pull/19463 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-25errors: make input mandatoryRuben Bridgewater
Using ERR_INVALID_ARG_TYPE will now require the received value as well. This makes sure the errors are always expressive. It also drops support for using an array as name argument. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25lib: improve error handlingRuben Bridgewater
This improves the error handling for a couple cases where the received value would not have been handled so far or where the name is wrong etc. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25fs: fix error handlingRuben Bridgewater
Right now there are multiple cases where the validated entry would not be returned or a wrong error is thrown. This fixes both cases. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25process: fix error handlingRuben Bridgewater
This makes sure the proper error is returned. Right now the error is not specific enough. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25crypto: fix error handlingRuben Bridgewater
This fixes multiple cases where the wrong error was returned in case of e.g. a overflow / wrong type. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25lib,test: minor refactoringRuben Bridgewater
This refactors a couple tests to have upper case first characters in comments and to use `input` instead of `i`. It also adds a few TODOs and rewrites a few lines to use default arguments and to prevent function recreation when unnecessary. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-25lib: always show ERR_INVALID_ARG_TYPE received partRuben Bridgewater
This makes a effort to make sure all of these errors will actually also show the received input. On top of that it refactors a few tests for better maintainability. It will also change the returned type to always be a simple typeof instead of special handling null. PR-URL: https://github.com/nodejs/node/pull/19445 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-24fs: use encoding in readFileBenjamin Gruenbaum
Use the encoding parameter passed to fsPromises.readFile if it is passed. Currently the encoding parameter is ignored in fsPromises. PR-URL: https://github.com/nodejs/node/pull/19296 Fixes: https://github.com/nodejs/node/issues/19286 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2018-03-24buffer: improve write(U)Int functionsRuben Bridgewater
This improves the performance of some write functions by around 5-15%. PR-URL: https://github.com/nodejs/node/pull/19289 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-24lib,test: lint fixes for linter upgradeRich Trott
ESLint 4.19.1 fixes some bugs in rules. These changes prepare us for the upgrade. PR-URL: https://github.com/nodejs/node/pull/19528 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-23crypto: add ECDH.convertKey to convert public keysWei-Wei Wu
ECDH.convertKey is used to convert public keys between different formats. PR-URL: https://github.com/nodejs/node/pull/19080 Fixes: https://github.com/nodejs/node/issues/18977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-23path: fix regression in posix.normalizeMichaël Zasso
Fixes a regression introduced in [1]. The posix version of normalize should not treat backslash as a path separator. [1] https://github.com/nodejs/node/commit/4ae320f2 PR-URL: https://github.com/nodejs/node/pull/19520 Fixes: https://github.com/nodejs/node/issues/19519 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-23stream: improve stream creation performanceBrian White
PR-URL: https://github.com/nodejs/node/pull/19401 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-03-23fs,net: emit 'ready' for fs streams and socketsSameer Srivastava
... in addition to the event names they currently use. Currently, various internal streams have different events that indicate that the underlying resource has successfully been established. This commit adds ready event for fs and net sockets to standardize on emitting ready for all of these streams. PR-URL: https://github.com/nodejs/node/pull/19408 Fixes: https://github.com/nodejs/node/issues/19304 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-23http2: destroy() stream, upon errnoExceptionSarat Addepalli
First steps towards #19060 PR-URL: https://github.com/nodejs/node/pull/19389 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-23url: remove redundant functionSergey Golovin
PR-URL: https://github.com/nodejs/node/pull/19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-23url: refactor "escapeParam" function to make it commonSergey Golovin
PR-URL: https://github.com/nodejs/node/pull/19076 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-23repl: fix tab completion of inspector moduleMichaël Zasso
Correctly check for the presence of the inspector module before adding it to the builtin libs list. PR-URL: https://github.com/nodejs/node/pull/19505 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-22process: add more version properties to releaseGus Caplan
PR-URL: https://github.com/nodejs/node/pull/19438 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-03-22http2: do not emit our own close emit in Http2StreamJames M Snell
Streams were recently updated to emit their own close event. The Http2Stream was an exception because it included the close argument with the close event. Refactor that to use the built in close. PR-URL: https://github.com/nodejs/node/pull/19451 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-22http2: remove some unnecessary next ticksJames M Snell
PR-URL: https://github.com/nodejs/node/pull/19451 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-22http: use more destructuringTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19481 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-22vm: migrate isContext to internal/errorsdustinnewman98
PR-URL: https://github.com/nodejs/node/pull/19268 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-22inspector: migrate errors from C++ to JSMichaël Zasso
Assign a code to a user-facing error. Turn other internal-only errors to checks. PR-URL: https://github.com/nodejs/node/pull/19387 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-21cluster: add support for NODE_OPTIONS="--inspect"Sameer Srivastava
When using cluster and --inspect as cli argument it is correctly handled and each worker will use a different port, this was fixed by #13619. But when env var NODE_OPTIONS="--inspect" is set this logic doesn't apply and the workers will fail as they try to attach to the same port. Fixes: https://github.com/nodejs/node/issues/19026 PR-URL: https://github.com/nodejs/node/pull/19165 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-03-21tools,lib: forbid native Error constructorsMichaël Zasso
This adds a rule that forbids the use of native Error constructors in the `lib` directory. This is to encourage use of the `internal/errors` mechanism. The rule is disabled for errors that are not created with the `internal/errors` module but are still assigned an error code. PR-URL: https://github.com/nodejs/node/pull/19373 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>