Tobias Nießen and Akshay K
19873abfb2
crypto,tls: implement safe x509 GeneralName format
...
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even though they
were not valid for the target hostname.
These changes affect the format of subject alternative names and the
format of authority information access. The checkServerIdentity function
has been modified to safely handle the new format, eliminating the
possibility of injecting subject alternative names into the verification
logic.
Because each subject alternative name is only encoded as a JSON string
literal if necessary for security purposes, this change will only be
visible in rare cases.
This addresses CVE-2021-44532.
Co-authored-by: Akshay K <iit.akshay@gmail.com >
CVE-ID: CVE-2021-44532
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/306
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-01-07 16:30:54 +00:00
Rich Trott
548137f4ec
errors: simplify ERR_REQUIRE_ESM message generation
...
Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.
PR-URL: https://github.com/nodejs/node/pull/35123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-11-16 11:57:54 -05:00
Denys Otrishko
f22672de18
errors: improve ERR_INVALID_OPT_VALUE error
...
* use util.inspect for value presentation
* allow to optionally specify error reason
PR-URL: https://github.com/nodejs/node/pull/34671
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
2020-11-16 11:57:53 -05:00
Guy Bedford
bf7b796491
esm: better package.json parser errors
...
PR-URL: https://github.com/nodejs/node/pull/35117
Backport-PR-URL: https://github.com/nodejs/node/pull/35385
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-01 11:32:54 -07:00
Rich Trott
9159649395
esm: shorten ERR_UNSUPPORTED_ESM_URL_SCHEME message
...
I know it just got modified to include new information, but this
shortens the message a bit without (I hope) losing clarity or meaning.
PR-URL: https://github.com/nodejs/node/pull/34836
Backport-PR-URL: https://github.com/nodejs/node/pull/35385
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-10-01 11:32:52 -07:00
Denys Otrishko
551be2aeb9
esm: improve error message of ERR_UNSUPPORTED_ESM_URL_SCHEME
...
Refs: https://github.com/nodejs/node/issues/34765
PR-URL: https://github.com/nodejs/node/pull/34795
Backport-PR-URL: https://github.com/nodejs/node/pull/35385
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-01 11:32:51 -07:00
Guy Bedford
cecc193abc
module: share CJS/ESM resolver fns, refactoring
...
PR-URL: https://github.com/nodejs/node/pull/34744
Backport-PR-URL: https://github.com/nodejs/node/pull/35385
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-01 11:32:46 -07:00
Guy Bedford
d065334d42
module: package "imports" field
...
PR-URL: https://github.com/nodejs/node/pull/34117
Backport-PR-URL: https://github.com/nodejs/node/pull/35385
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-10-01 11:32:36 -07:00
unknown
33b22d7c4f
zlib: add maxOutputLength option
...
Fixes: https://github.com/nodejs/node/issues/27253
PR-URL: https://github.com/nodejs/node/pull/33516
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-09-22 23:15:05 +02:00
ExE Boss
5c968a0f92
errors: use ErrorPrototypeToString from primordials object
...
PR-URL: https://github.com/nodejs/node/pull/34891
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-09-22 19:56:13 +02:00
Rich Trott
05dae0231b
doc,lib: remove unused error code
...
As best as I can tell, ERR_V8BREAKITERATOR is unused anywhere in our
code base and dependencies. Move to legacy errors.
PR-URL: https://github.com/nodejs/node/pull/34792
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-09-22 19:55:44 +02:00
Anna Henningsen
bf4e778e50
crypto: move typechecking for timingSafeEqual into C++
...
This makes the function more robust against V8 inlining.
Fixes: https://github.com/nodejs/node/issues/34073
PR-URL: https://github.com/nodejs/node/pull/34141
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-09-22 10:21:00 +02:00
ConorDavenport
d73b8346b8
assert: port common.mustCall() to assert
...
Fixes: https://github.com/nodejs/node/issues/31392
PR-URL: https://github.com/nodejs/node/pull/31982
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-09-15 21:39:03 +01:00
Luigi Pinca
248f9af411
tools: enable no-else-return lint rule
...
Refs: https://github.com/nodejs/node/pull/32644
Refs: https://github.com/nodejs/node/pull/32662
PR-URL: https://github.com/nodejs/node/pull/32667
Backport-PR-URL: https://github.com/nodejs/node/pull/34275
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-07-14 12:13:31 -07:00
Ruben Bridgewater
76b06e53c6
errors: fully inspect errors on exit
...
This makes sure errors are fully inspected during exit. That is
important to provide as many debugging information to the user as
possible.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/33523
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-08 14:11:46 -07:00
Joyee Cheung
0941635bb5
inspector: throw error when activating an already active inspector
...
When the user tries to activate the inspector that is already active
on a different port and host, we previously just silently reset
the port and host stored in the Environment without actually doing
anything for that to be effective. After this patch, we throw
an error telling the user to close the active inspector before invoking
`inspector.open()` again.
PR-URL: https://github.com/nodejs/node/pull/33015
Fixes: https://github.com/nodejs/node/issues/33012
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-07-08 13:02:14 -07:00
Thomas
5d80576889
errors: skip fatal error highlighting on windows
...
Some consoles do not convert ANSI escape sequences to colors,
rather display them directly to the stdout. On those consoles,
libuv emulates colors by intercepting stdout stream and calling
corresponding Windows API functions for setting console colors.
However, fatal error are handled differently and we cannot easily
highlight them.
PR-URL: https://github.com/nodejs/node/pull/33132
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-06-08 19:32:27 -07:00
Antoine du HAMEL
4f6e4ae49d
module: add specific error for dir import
...
PR-URL: https://github.com/nodejs/node/pull/33220
Fixes: https://github.com/nodejs/node/issues/33219
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-06-08 19:32:25 -07:00
Anna Henningsen
c129e8809e
fs: forbid concurrent operations on Dir handle
...
libuv does not expect concurrent operations on `uv_dir_t` instances,
and will gladly create memory leaks, corrupt data, or crash the
process.
This patch forbids that, and:
- Makes sure that concurrent async operations are run sequentially
- Throws an exception if sync operations are attempted during an
async operation
The assumption here is that a thrown exception is preferable to
a potential hard crash.
This fully fixes flakiness from `parallel/test-fs-opendir` when
run under ASAN.
PR-URL: https://github.com/nodejs/node/pull/33274
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-06-08 19:32:24 -07:00
rickyes
6356ad42ab
lib: fix validateport error message when allowZero is false
...
PR-URL: https://github.com/nodejs/node/pull/32861
Fixes: https://github.com/nodejs/node/issues/32857
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-13 17:52:56 +02:00
Myles Borins
195043f910
module: refactor condition
...
PR-URL: https://github.com/nodejs/node/pull/32989
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
2020-05-13 17:52:53 +02:00
Myles Borins
3dc3772bb0
module: improve error for invalid package targets
...
For targets that are strings that do not start with `./` or `/` the
error will now have additional information about what the programming
error is.
Closes: https://github.com/nodejs/node/issues/32034
PR-URL: https://github.com/nodejs/node/pull/32052
Fixes: https://github.com/nodejs/node/issues/32034
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Signed-off-by: Myles Borins <myles.borins@gmail.com >
2020-05-13 17:52:47 +02:00
cjihrig
ea4302bd46
errors: drop pronouns from ERR_WORKER_PATH message
...
This commit drops pronouns from the ERR_WORKER_PATH message,
and also shortens the text a bit.
PR-URL: https://github.com/nodejs/node/pull/32285
Refs: https://github.com/nodejs/node/pull/31664
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-04-28 16:14:49 +02:00
Anna Henningsen
7410e8d63a
esm: port loader code to JS
...
There is no reason for this to be in C++. Using JavaScript means that
the code is more accessible to more developers, which is important
for any Node.js feature. This also simplifies the code significantly
in some areas. On the technical side, this potentially also enables
making some of the file system operations that are involved
asynchronous.
PR-URL: https://github.com/nodejs/node/pull/32201
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-04-28 16:14:46 +02:00
Antoine du HAMEL
217e3dfea6
worker: allow URL in Worker constructor
...
The explicit goal is to let users use `import.meta.url` to
re-load thecurrent module inside a Worker instance.
Fixes: https://github.com/nodejs/node/issues/30780
PR-URL: https://github.com/nodejs/node/pull/31664
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-04-28 16:14:39 +02:00
James M Snell
434ca8766a
lib: move isLegalPort to validators, refactor
...
isLegalPort was used multiple places in the same way -- to validate
the port and throw if necessary. Moved into internal/validators.
PR-URL: https://github.com/nodejs/node/pull/31851
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-04-28 16:00:49 +02:00
simon
6348fae690
tls: expose SSL_export_keying_material
...
Fixes: https://github.com/nodejs/node/issues/31802
PR-URL: https://github.com/nodejs/node/pull/31814
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-04-28 16:00:47 +02:00
Anna Henningsen
ab8f38b551
worker: add ability to take heap snapshot from parent thread
...
PR-URL: https://github.com/nodejs/node/pull/31569
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-04-28 16:00:46 +02:00
Tobias Nießen
40253cc1c8
crypto: add crypto.diffieHellman
...
Currently, Node.js has separate (stateful) APIs for DH/ECDH, and no
support for ECDH-ES. This commit adds a single stateless function to
compute the DH/ECDH/ECDH-ES secret based on two KeyObjects.
PR-URL: https://github.com/nodejs/node/pull/31178
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-04-28 16:00:36 +02:00
Tobias Nießen
1977136a19
crypto: add DH support to generateKeyPair
...
This allows using the generateKeyPair API for DH instead of the old
stateful DH APIs.
PR-URL: https://github.com/nodejs/node/pull/31178
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-04-28 16:00:35 +02:00
Gus Caplan
eda6665799
vm: add code cache support for SourceTextModule
...
PR-URL: https://github.com/nodejs/node/pull/31278
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-04-28 16:00:35 +02:00
Guy Bedford
c537afb18c
module: package "exports" error refinements
...
Backport-PR-URL: https://github.com/nodejs/node/pull/32610
PR-URL: https://github.com/nodejs/node/pull/31625
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2020-04-03 15:56:41 -04:00
Harshitha KP
65729f966e
worker: emit runtime error on loop creation failure
...
Instead of hard asserting throw a runtime error,
that is more consumable.
Fixes: https://github.com/nodejs/node/issues/31614
PR-URL: https://github.com/nodejs/node/pull/31621
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-30 10:59:55 -07:00
Antoine du HAMEL
9f8d315a09
worker: add support for .cjs extension
...
PR-URL: https://github.com/nodejs/node/pull/31662
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-03-30 10:59:47 -07:00
Denys Otrishko
30dbc84642
worker: properly handle env and NODE_OPTIONS in workers
...
PR-URL: https://github.com/nodejs/node/pull/31711
Fixes: https://github.com/nodejs/node/issues/30627
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-03-30 10:59:42 -07:00
Tobias Nießen
b1517a4f6c
errors: make use of "cannot" consistent
...
PR-URL: https://github.com/nodejs/node/pull/31420
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-03-16 19:41:58 -07:00
Gerhard Stoebich
7231090a5d
errors: remove dead code in ERR_INVALID_ARG_TYPE
...
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.
PR-URL: https://github.com/nodejs/node/pull/31322
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-03-16 19:41:38 -07:00
Geoffrey Booth
c6300e15bc
module: loader getSource, getFormat, transform hooks
...
PR-URL: https://github.com/nodejs/node/pull/30986
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-02-06 02:49:37 +00:00
Ruben Bridgewater
df94cfb67c
errors: improve ERR_INVALID_ARG_TYPE
...
ERR_INVALID_ARG_TYPE is the most common error used throughout the
code base. This improves the error message by providing more details
to the user and by indicating more precisely which values are allowed
ones and which ones are not.
It adds the actual input to the error message in case it's a primitive.
If it's a class instance, it'll print the class name instead of
"object" and "falsy" or similar entries are not named "type" anymore.
PR-URL: https://github.com/nodejs/node/pull/29675
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:32 +00:00
e2cb5d0754
wasi: introduce initial WASI support
...
Co-authored-by: Gus Caplan <me@gus.host >
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com >
Co-authored-by: Jiawen Geng <technicalcute@gmail.com >
Co-authored-by: Tobias Nießen <tniessen@tnie.de >
Co-authored-by: Chengzhong Wu <legendecas@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/30258
Refs: https://github.com/nodejs/node/pull/27850
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Wyatt Preul <wpreul@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-02-06 02:49:25 +00:00
Sebastien Ahkrin
947d066da7
lib: replace Map global by the primordials
...
PR-URL: https://github.com/nodejs/node/pull/31155
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:24 +00:00
Sebastien Ahkrin
dc9a51d72b
lib: replace use of Error with primordials
...
PR-URL: https://github.com/nodejs/node/pull/31163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:24 +00:00
Sebastien Ahkrin
d5d0744d1a
lib: replace WeakMap global by the primordials
...
PR-URL: https://github.com/nodejs/node/pull/31158
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:24 +00:00
Sebastien Ahkrin
993c419ce7
lib: replace every Symbol.for by SymbolFor primordials
...
PR-URL: https://github.com/nodejs/node/pull/30857
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:22 +00:00
Sebastien Ahkrin
b95c50b392
lib: replace Symbol global by the primordials Symbol
...
PR-URL: https://github.com/nodejs/node/pull/30737
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-06 02:49:22 +00:00
Michaël Zasso
099edea144
lib: use static Number properties from primordials
...
PR-URL: https://github.com/nodejs/node/pull/30686
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-06 02:49:22 +00:00
Michaël Zasso
9260844e91
lib: enforce use of Array from primordials
...
PR-URL: https://github.com/nodejs/node/pull/30635
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-02-06 02:49:21 +00:00
Michaël Zasso
e2ae4c1aa1
lib: flatten access to primordials
...
Store all primordials as properties of the primordials object.
Static functions are prefixed by the constructor's name and prototype
methods are prefixed by the constructor's name followed by "Prototype".
For example: primordials.Object.keys becomes primordials.ObjectKeys.
Backport-PR-URL: https://github.com/nodejs/node/pull/30731
PR-URL: https://github.com/nodejs/node/pull/30610
Refs: https://github.com/nodejs/node/issues/29766
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:21 +00:00
bcoe
2986982459
errors: support prepareSourceMap with source-maps
...
Adds support for Error.prepareStackTrace override, when
--enable-source-maps is set.
PR-URL: https://github.com/nodejs/node/pull/31143
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-06 02:49:19 +00:00
Rich Trott
8a9243afce
tls: introduce ERR_TLS_INVALID_CONTEXT
...
It is trivially possible to cause an internal assertion error with
tls.createSecurePair(). Throw a friendly error instead. Reserve internal
assertions for things that we believe to be impossible.
PR-URL: https://github.com/nodejs/node/pull/30718
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:01 +00:00