Commit Graph

175 Commits

Author SHA1 Message Date
Kohei Ueno
71ca6d7d6a
util: add maxArrayLength option to Set and Map
PR-URL: https://github.com/nodejs/node/pull/43576
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-07-14 16:24:19 +01:00
Kohei Ueno
90bc773fb8
util: refactor to use validateObject
PR-URL: https://github.com/nodejs/node/pull/43769
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-07-13 06:41:03 +01:00
Livia Medeiros
653cfff223
util: add AggregateError.prototype.errors to inspect output
PR-URL: https://github.com/nodejs/node/pull/43646
Fixes: https://github.com/nodejs/node/issues/43645
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-09 17:01:02 +01:00
Ruben Bridgewater
7cfd5f169c util: remove unnecessary template string
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41082
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-09 15:46:39 +00:00
Ruben Bridgewater
b5cb3410e0 util: mark cwd grey while inspecting errors
This changes the util.inspect() output for errors in case stack
traces contain the current working directory in their trace.
If that's the case, the cwd part is marked grey to focus on the
rest of the path.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41082
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-09 15:46:38 +00:00
Kohei Ueno
550e814903
util: avoid inline access to Symbol.iterator
PR-URL: https://github.com/nodejs/node/pull/43683
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-07-09 12:59:50 +01:00
Antoine du Hamel
a055337a02
lib: refactor to avoid unsafe regex primordials
PR-URL: https://github.com/nodejs/node/pull/43475
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2022-06-27 17:16:06 +02:00
cola119
027c2880a6 util: fix TypeError of symbol in template literals
PR-URL: https://github.com/nodejs/node/pull/42790
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2022-06-17 12:33:55 +02:00
Antoine du Hamel
06d8606960
lib: use null-prototype objects for property descriptors
Refs: https://github.com/nodejs/node/pull/42921

PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-06-03 09:23:58 +01:00
Daeyeon Jeong
f7cd3f6e0c
console: fix console.dir crash on a revoked proxy
Fixes: https://github.com/nodejs/node/issues/43095

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: https://github.com/nodejs/node/pull/43100
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-22 11:41:55 +01:00
Rich Trott
78a2cd8624 lib: add comments to empty catch statements
PR-URL: https://github.com/nodejs/node/pull/41831
Refs: https://eslint.org/docs/rules/no-empty
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-05 12:58:30 +00:00
Rich Trott
ac06951049 util: check for null instead of flasy in loop
This prepares the code for the no-cond-assign ESLint rule.

PR-URL: https://github.com/nodejs/node/pull/41614
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-01-22 19:38:13 -08:00
Rich Trott
dcc368f4be tools,lib,test: enable ESLint no-regex-spaces rule
PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-01-13 17:12:05 -08:00
Rich Trott
55ceaec111 tools,benchmark,lib,test: enable no-case-declarations lint rule
PR-URL: https://github.com/nodejs/node/pull/41385
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-05 07:42:19 -08:00
Ruben Bridgewater
54e9cba336
util: do not reduce to a single line if not appropriate using inspect
This makes sure entries are not lined up on a single line if the
content contains any new line. That would otherwise cause confusing
output.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41083
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-24 07:32:59 -08:00
Jordan Harband
8d1f13b376
util: display a present-but-undefined error cause
See https://github.com/nodejs/node/pull/41097#issuecomment-997055761

PR-URL: https://github.com/nodejs/node/pull/41247
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-21 23:46:36 +00:00
Ruben Bridgewater
c2ff69db4c util: serialize falsy cause values while inspecting errors
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41097
Fixes: https://github.com/nodejs/node/issues/41096
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-12-11 12:05:41 +00:00
Ruben Bridgewater
1133796dbf util: make sure error causes of any type may be inspected
An error cause may be of any type. Handle all of them, no matter
if they are an error or not.

Fixes: https://github.com/nodejs/node/issues/41096

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41097
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-12-11 12:05:41 +00:00
Ruben Bridgewater
4569674e39
util: pass through the inspect function to custom inspect functions
This allows to use more portable custom inspect functions.

Fixes: https://github.com/nodejs/node/issues/35956

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41019
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-12-11 11:49:45 +00:00
Ruben Bridgewater
76372607a6
util: escape lone surrogate code points using .inspect()
Unpaired surrogate code points have no representation in UTF8.
Therefore, such code points are just "random" output that is
unreadable. Instead, escape the code points similar to C0 and C1
control characters.

Refs: https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41001
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-06 17:38:15 +00:00
Ruben Bridgewater
85764c0e1a
util: add numericSeparator to util.inspect
This adds the `numericSeparator` option to util.inspect. Using it
separates numbers by thousands adding the underscore accordingly.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41003
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-12-03 14:56:43 +00:00
Ruben Bridgewater
0a9cb170fe
util: always visualize cause property in errors during inspection
While inspecting errors, always visualize the cause. That property
is non-enumerable by default while being useful in general for
debugging.

Duplicated stack frames are hidden.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41002
Fixes: https://github.com/nodejs/node/issues/40859
Fixes: https://github.com/nodejs/node/issues/38725
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-12-02 06:01:50 +00:00
Rich Trott
1e8b296c58
lib,test,tools: use consistent JSDoc types
This could be in preparation of implementing the jsdoc/check-types
ESLint rule.

PR-URL: https://github.com/nodejs/node/pull/40989
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2021-11-29 06:48:00 +00:00
cjihrig
606bb52159
util: improve ansi escape code regex
PR-URL: https://github.com/nodejs/node/pull/40214
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-01 22:57:10 -04:00
cjihrig
396b14b6c6
util: expose stripVTControlCharacters()
This commit exposes the existing stripVTControlCharacters()
method with docs and some additional input validation.

PR-URL: https://github.com/nodejs/node/pull/40214
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-01 22:56:58 -04:00
bl-ue
dccf64ee9d lib: fix typos
PR-URL: https://github.com/nodejs/node/pull/38846
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-06-01 12:06:37 +02:00
Antoine du Hamel
26e318a321
doc: use HEAD instead of master for links
PR-URL: https://github.com/nodejs/node/pull/38518
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: Darshan Sen <raisinten@gmail.com>
2021-05-05 10:45:30 +02:00
Ruben Bridgewater
942b76d9e5
util: fix infinite recursion during inspection
A specially crafted object with circular structures behind getters
could cause a infinite recursion. This is now fixed by detecting the
objects as already visited.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/37079
Fixes: https://github.com/nodejs/node/issues/37054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-04-30 12:46:48 -07:00
Antoine du Hamel
d756d2b99c lib: enforce using primordials.globalThis instead of global
PR-URL: https://github.com/nodejs/node/pull/38230
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-17 15:30:58 +02:00
Rich Trott
038608d401 tools: relax max-len lint rule for template strings
Splitting template strings across multiple lines can make them harder to
read.

PR-URL: https://github.com/nodejs/node/pull/38097
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-07 04:16:35 -07:00
Rich Trott
45cdc134cd util: remove unreachable inspect code
Convert invariant from if statement to an assertion. The condition is
believed to be impossible to trigger.

PR-URL: https://github.com/nodejs/node/pull/37941
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-28 21:42:41 -07:00
Anna Henningsen
7296bcb3cb util: inspect __proto__ key as written in object literal
Since util.inspect() gives object-literal-like output, handle the
special `__proto__` key in the way that it would be handled in object
literals.

PR-URL: https://github.com/nodejs/node/pull/37713
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-03-13 20:38:26 +01:00
Luigi Pinca
e84e6e7fad stream,util: fix "the the" typo in comments
PR-URL: https://github.com/nodejs/node/pull/37674
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-03-13 10:01:19 +01:00
Antoine du Hamel
f34d8de65a lib: remove use of array destructuring
PR-URL: https://github.com/nodejs/node/pull/36818
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-03 19:53:24 +01:00
Rich Trott
b461a1b125 doc,lib: prepare for stricter multi-line array linting
We're about to turn on a requirement for dangling commas.

PR-URL: https://github.com/nodejs/node/pull/37088
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-02-19 09:55:35 -08:00
Rich Trott
04bef7aabd util: use assert for unreachable code
Great effort is taken to keep `util.inspect()` from throwing while
inspecting a linked list or other items that require recursion. It is
likely still possible at this time to cause a throw with prototype
pollution, but that will change soon when the code is modified to use
primordials.

This commit instructs our coverage to not be concerned about not being
able to reach the throwing-an-error code and changes the throw there to
an assert so users will be instructed to open a bug with Node.js should
they manage to cause the code to throw.

PR-URL: https://github.com/nodejs/node/pull/37249
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-02-08 09:52:58 -08:00
ExE Boss
728fee22e9 lib: add bound apply variants of varargs primordials
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/37005
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-28 18:45:43 +01:00
ZiJian Liu
029d1fd797 lib: refactor to use validateObject
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/37028
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-28 12:53:50 +01:00
ExE Boss
e9944e9a38 util: prefer Reflect.ownKeys(…)
PR-URL: https://github.com/nodejs/node/pull/36740
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-20 01:25:17 +01:00
raisinten
9a18bf2f8c
repl: refactor to avoid unsafe array iteration
PR-URL: https://github.com/nodejs/node/pull/36663
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-18 13:29:43 -08:00
Rohan Chougule
779f1bbd74 util: refactor inspect.js to use more primodials
PR-URL: https://github.com/nodejs/node/pull/36730
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
2021-01-05 19:47:45 +01:00
Antoine du Hamel
ecdff81684 util: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36265
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-12-28 19:47:41 +00:00
Antoine du Hamel
bd6f2303f4 lib: add primordials.SafeStringIterator
PR-URL: https://github.com/nodejs/node/pull/36526
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-12-25 18:11:23 +00:00
Rich Trott
f43d1ca3b0 util: simplify constructor retrieval in inspect()
Instead of looping through a list of typed arrays, use
TypedArrayPrototypeGetSymbolToStringTag.

PR-URL: https://github.com/nodejs/node/pull/36466
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-12-14 05:42:06 -08:00
Ruben Bridgewater
1e665095c8 util: fix instanceof checks with null prototypes during inspection
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

Fixes: https://github.com/nodejs/node/issues/35730

PR-URL: https://github.com/nodejs/node/pull/36178
Fixes: https://github.com/nodejs/node/issues/36151
Refs: https://github.com/nodejs/node/pull/35754
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-12-12 20:58:02 +00:00
Ruben Bridgewater
f78da00ab7 util: fix module prefixes during inspection
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

Fixes: https://github.com/nodejs/node/issues/36151

PR-URL: https://github.com/nodejs/node/pull/36178
Fixes: https://github.com/nodejs/node/issues/35730
Refs: https://github.com/nodejs/node/pull/35754
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-12-12 20:58:01 +00:00
ExE Boss
c83e599420
lib: add uncurried accessor properties to primordials
Closes: https://github.com/nodejs/node/pull/32127

PR-URL: https://github.com/nodejs/node/pull/36329
Fixes: https://github.com/nodejs/node/issues/32127
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-12-07 10:02:34 -08:00
raisinten
929c51f14a util: fix to inspect getters that access this
Fixes: https://github.com/nodejs/node/issues/36045

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36052
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-11-12 05:39:43 -08:00
ExE Boss
c925e24ae7 lib: add %TypedArray% abstract constructor to primordials
Refs: https://github.com/nodejs/node/pull/35448
Refs: https://github.com/nodejs/node/pull/36003
Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36016
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2020-11-09 09:41:14 +00:00
Michaël Zasso
21782277c2
src: use node:moduleName as builtin module filename
This change allows for easier recognition of builtin modules in stack
traces.

Refs: https://github.com/nodejs/node/issues/11893

PR-URL: https://github.com/nodejs/node/pull/35498
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-10-07 17:35:14 +02:00