Antoine du Hamel
825029ec59
repl: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36264
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-02 20:22:03 +00:00
Benjamin Gruenbaum
ef8d0e9798
events: support signal in EventTarget
...
PR-URL: https://github.com/nodejs/node/pull/36258
Fixes: https://github.com/nodejs/node/issues/36073
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-12-02 14:55:08 +00:00
James M Snell
9e446b3e9f
worker: add experimental BroadcastChannel
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36271
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-12-01 08:02:28 -08:00
bcoe
09fd8f13c8
errors: display original symbol name
...
If symbol names array has been populated in source map, include
original symbol name in error message.
Fixes https://github.com/nodejs/node/issues/35325
PR-URL: https://github.com/nodejs/node/pull/36042
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-12-01 07:23:56 -08:00
James M Snell
8ff2501a04
module: add isPreloading indicator
...
Adds a `module.isPreloading` property that is `true` only during the
preload (`-r`) phase of Node.js bootstrap. This provides modules an
easy, non-hacky way of knowing if they are being loaded during preload.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36263
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-30 08:26:46 -08:00
Zijian Liu
6ca7312f0e
tty: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36272
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-29 05:57:36 -08:00
Zijian Liu
b938f88204
fs: pass ERR_DIR_CLOSED asynchronously to dir.close
...
Pass the error to the callback or returns a rejected Promise instead of
throwing a synchonous error.
Fixes: https://github.com/nodejs/node/issues/36237
PR-URL: https://github.com/nodejs/node/pull/36243
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2020-11-27 18:43:41 +01:00
Antoine du Hamel
8d6c2f2ada
fs: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36196
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-11-27 18:40:51 +01:00
Antoine du Hamel
b4c2ff5a3b
policy: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36210
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-11-27 17:19:30 +00:00
Antoine du Hamel
866b1e67cc
quic: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36211
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-25 05:24:28 -08:00
Antoine du Hamel and ExE Boss
05847a71e9
lib: refactor primordials.uncurryThis
...
This is done to avoid creating an array and gain performance.
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/36221
Refs: https://v8.dev/blog/v8-release-80#optimizing-higher-order-builtins
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-11-25 13:20:00 +00:00
Antoine du Hamel
d4501b17e2
process: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36212
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-24 05:27:19 -08:00
James M Snell
513764b580
events: graduate Event, EventTarget, AbortController
...
Graduate these from experimental status
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-11-23 09:33:41 -08:00
Madara Uchiha
630afc3703
http2: add support for AbortSignal to http2Session.request
...
- Add support
- Add test
- Docs once PR is up
PR-URL: https://github.com/nodejs/node/pull/36070
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-11-21 14:30:06 +02:00
Antoine du Hamel
893d8a60cb
errors: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36167
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-11-20 22:22:42 +01:00
Antoine du Hamel
f47d65538a
async_hooks: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36168
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-11-20 20:10:19 +00:00
Antoine du Hamel
514f464a60
http2: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36142
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-20 21:01:00 +01:00
Antoine du Hamel
3e0194e88e
lib: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36140
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-11-19 19:18:14 +01:00
Antoine du Hamel
ad0a01caed
http2: add support for TypedArray to getUnpackedSettings
...
PR-URL: https://github.com/nodejs/node/pull/36141
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-19 17:48:02 +00:00
Benjamin Gruenbaum
d7bfa58942
lib: set abort-controller toStringTag
...
PR-URL: https://github.com/nodejs/node/pull/36115
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-11-19 15:56:51 +00:00
Benjamin Gruenbaum
2097ffd7cb
http: add support for abortsignal to http.request
...
PR-URL: https://github.com/nodejs/node/pull/36048
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-19 14:32:44 +00:00
Antoine du Hamel
a46b21f556
lib: remove primordials.SafePromise
...
PR-URL: https://github.com/nodejs/node/pull/36149
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-11-19 04:33:43 -08:00
Nikola Glavina
d05c271f17
fs: filehandle read now accepts object as argument
...
PR-URL: https://github.com/nodejs/node/pull/34180
Fixes: https://github.com/nodejs/node/issues/34176
Refs: https://nodejs.org/api/fs.html#fs_filehandle_read_options
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-11-18 19:50:44 +01:00
James M Snell
dc79f3f37c
events: add max listener warning for EventTarget
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36001
Fixes: https://github.com/nodejs/node/issues/35990
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-16 09:48:18 +00:00
Benjamin Gruenbaum
cd3134029e
promise: emit error on domain unhandled rejections
...
PR-URL: https://github.com/nodejs/node/pull/36082
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-16 10:56:44 +02:00
Szymon Marczak
9ea0fae7ea
dns: add a cancel() method to the promise Resolver
...
PR-URL: https://github.com/nodejs/node/pull/33099
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-11-15 00:17:32 +01:00
raisinten
22293eab48
events: disabled manual construction AbortSignal
...
Fixes: https://github.com/nodejs/node/issues/36064
PR-URL: https://github.com/nodejs/node/pull/36094
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-14 14:46:30 +00:00
Antoine du Hamel
1d02a35869
vm: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36023
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-14 14:46:19 +00:00
Antoine du Hamel
829786088a
esm: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36019
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-14 14:46:06 +00:00
Antoine du Hamel
5c3944fa20
lib,tools: enforce access to prototype from primordials
...
PR-URL: https://github.com/nodejs/node/pull/36025
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-14 05:56:39 -08:00
Antoine du Hamel
c7d2a4544b
cluster: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36011
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-13 23:35:43 +00:00
Antoine du Hamel
28f31bdb6a
crypto: fix passing TypedArray to webcrypto AES methods
...
Refs: https://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface
Fixes: https://github.com/nodejs/node/issues/36083
PR-URL: https://github.com/nodejs/node/pull/36087
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-11-13 22:00:15 +00:00
Antoine du Hamel
e174afeff2
child_process: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36003
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-13 22:00:05 +00:00
Antoine du Hamel
d8f66c1e57
assert: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/35998
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-13 21:59:55 +00:00
raisinten and Antoine du Hamel
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
zhangyongsheng
c0ac692ba7
http2: allow setting the local window size of a session
...
PR-URL: https://github.com/nodejs/node/pull/35978
Fixes: https://github.com/nodejs/node/issues/31084
Refs: https://github.com/nodejs/node/pull/26962
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-11-11 23:14:56 +08:00
Szymon Marczak
564fcb8f78
http2: delay session.receive() by a tick
...
PR-URL: https://github.com/nodejs/node/pull/35985
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-11 06:07:24 -08:00
sapics
00b5ee6083
querystring: reduce memory usage by Int8Array
...
PR-URL: https://github.com/nodejs/node/pull/34179
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-11-10 20:22:08 +00:00
Mattias Runge-Broberg and Colin Ihrig
60a97c0b42
readline: add getPrompt to get the current prompt
...
Since there is a setPrompt() there should be a getPrompt().
There are use-cases where it is needed to know what the
current prompt is. Adding a getPrompt() negates the need
to store the set prompt externally or read the internal
_prompt which would be bad practice.
Co-authored-by: Colin Ihrig <cjihrig@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2020-11-10 19:46:51 +00:00
Gil Pedersen
3c38445cc8
stream: fix thrown object reference
...
PR-URL: https://github.com/nodejs/node/pull/36065
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-11-10 16:34:35 +00:00
Benjamin Gruenbaum
d9dadacb35
fs: support abortsignal in writeFile
...
PR-URL: https://github.com/nodejs/node/pull/35993
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-11-10 14:30:17 +00:00
Robert Nagy
dd0f8f18c2
stream: writableNeedDrain
...
Don't write to a stream which already has a full buffer.
Fixes: https://github.com/nodejs/node/issues/35341
PR-URL: https://github.com/nodejs/node/pull/35348
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-11-10 10:44:16 +01:00
Antoine du Hamel
da53a3caa3
crypto: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36012
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-09 20:23:07 -08:00
Antoine du Hamel
2c77fe192e
module: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36024
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-11-09 19:05:31 +00:00
Baruch Odem (Rothkoff)
a8b9ede3c1
fs: replace finally with PromisePrototypeFinally
...
https://github.com/nodejs/node/pull/35993#discussion_r518703665
PR-URL: https://github.com/nodejs/node/pull/35995
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-09 19:05:21 +00:00
Antoine du Hamel
b589128f6f
bootstrap: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/35999
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2020-11-09 19:23:46 +01:00
masx200
0d2e198914
http2: add has method to proxySocketHandler
...
PR-URL: https://github.com/nodejs/node/pull/35197
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-09 19:03:54 +01:00
ExE Boss and Antoine du Hamel
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
Benjamin Gruenbaum
1a6d4dce6d
events: getEventListeners static
...
PR-URL: https://github.com/nodejs/node/pull/35991
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-11-09 07:39:31 +00:00
Antoine du Hamel
ad98cf04f3
stream: remove isPromise utility function
...
The function was not checking if the parameter was actually a Promise
instance, but if it has a `then` method. Removing the utility function
in favor of a clearer `typeof` check, handling the case when the
thenable throws if then method is accessed more than once.
PR-URL: https://github.com/nodejs/node/pull/35925
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-11-09 06:17:29 +00:00