Carlos Espa
f5d454ac7e
src: add receiver to fast api callback methods
...
When creating an fast api the callback might use the receiver. In that
case if the internal binding is destructured the method won't have
access to the reciver and it will throw. Passing the receiver as second
argument ensures the receiver is available.
PR-URL: https://github.com/nodejs/node/pull/54408
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2024-09-28 09:46:03 +00:00
Sonny
090add7864
fs: refactoring declaratively with Array.fromAsync
...
Refs: https://github.com/nodejs/node/pull/51912
PR-URL: https://github.com/nodejs/node/pull/54644
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2024-09-27 11:59:09 +02:00
Yagiz Nizipli
9195210399
lib,src: use built-in array buffer detach, transfer
...
PR-URL: https://github.com/nodejs/node/pull/54837
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-09-16 00:32:04 +00:00
Yagiz Nizipli
f468509cf6
zlib: add typings for better dx
...
PR-URL: https://github.com/nodejs/node/pull/54699
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-14 22:36:24 +08:00
Antoine du Hamel
7c58645aca
lib: move Symbol[Async]Dispose
polyfills to internal/util
...
PR-URL: https://github.com/nodejs/node/pull/54853
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-10 21:24:56 +00:00
1ilsang
94419bf64d
typings: fix TypedArray to a global type
...
PR-URL: https://github.com/nodejs/node/pull/54063
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-06 08:29:11 +00:00
Andrew Moon
c890a9660c
typings: provide internal types for wasi bindings
...
PR-URL: https://github.com/nodejs/node/pull/54119
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2024-08-24 16:59:17 +00:00
Michaël Zasso
05495909d7
src,test: track URL.canParse
fast API calls
...
Also regroup two small test files for naming consistency and simplify
the tests.
PR-URL: https://github.com/nodejs/node/pull/54356
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-15 14:23:43 +00:00
Michaël Zasso
1d35a066e7
src,test: ensure that V8 fast APIs are called
...
Adds a debug-only macro that can be used to track when a V8 fast API is
called. A map of counters is maintained in in thread-local storage and
an internal API can be called to get the total count associated with
a call id.
Specific tests are added and `crypto.timingSafeEqual` as well as
internal documentation are updated to show how to use the macro
and test fast API calls without running long loops.
PR-URL: https://github.com/nodejs/node/pull/54317
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-08-13 12:37:02 +00:00
Rafael Gonzaga
88760f1c30
typings: add util.styleText type definition
...
PR-URL: https://github.com/nodejs/node/pull/54252
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-08-09 19:36:27 +00:00
Jungku Lee
8e1e3a8dea
typings: add missing binding function writeFileUtf8()
...
PR-URL: https://github.com/nodejs/node/pull/54110
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-08-01 16:21:57 +00:00
1ilsang
3c50297e9e
typings: apply lint
...
PR-URL: https://github.com/nodejs/node/pull/54065
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-29 21:19:58 +00:00
1ilsang
5210cd860a
typings: fix typo on quic onSessionDatagram
...
PR-URL: https://github.com/nodejs/node/pull/54064
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-29 04:52:07 +00:00
Yagiz Nizipli
88027e84d8
fs: optimize fs.cpSync
js calls
...
PR-URL: https://github.com/nodejs/node/pull/53614
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-22 16:00:39 +00:00
Yagiz Nizipli
7168295e7a
fs: move rmSync
implementation to c++
...
PR-URL: https://github.com/nodejs/node/pull/53617
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-07-18 20:02:49 +00:00
Benjamin Gruenbaum
fd21dd45d5
http, readline: replace sort with toSorted
...
PR-URL: https://github.com/nodejs/node/pull/53623
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-10 16:46:24 +00:00
Yagiz Nizipli
307430e490
fs: improve error performance of fs.dir
...
PR-URL: https://github.com/nodejs/node/pull/53667
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-07-09 14:38:01 +00:00
Yagiz Nizipli
f1ac7df535
fs: fix typings
...
PR-URL: https://github.com/nodejs/node/pull/53626
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-04 11:04:37 +00:00
Yagiz Nizipli
dd0e99fee0
typings: add fs_dir
types
...
PR-URL: https://github.com/nodejs/node/pull/53631
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-30 16:39:06 +00:00
Rafael Gonzaga
951af83033
lib,src: remove --experimental-policy
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/52583
Refs: https://github.com/nodejs/node/issues/52575
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-05-07 16:25:45 +00:00
Yagiz Nizipli
128c60d906
cli: implement node --run <script-in-package-json>
...
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/52190
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2024-04-08 00:49:14 +00:00
Gabriel Bota
a3abc42587
async_hooks,inspector: implement inspector api without async_wrap
...
Implementing the inspector session object as an async resource causes
unwanted context change when a breakpoint callback function is being
called. Modelling the inspector api without the AsyncWrap base class
ensures that the callback has access to the AsyncLocalStorage instance
that is active in the affected user function.
See `test-inspector-async-context-brk.js` for an illustration of the
use case.
PR-URL: https://github.com/nodejs/node/pull/51501
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-01-24 13:29:28 +00:00
Yagiz Nizipli
0056147a87
src: add process.loadEnvFile
and util.parseEnv
...
PR-URL: https://github.com/nodejs/node/pull/51476
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-01-23 18:46:26 +00:00
James M Snell
c3664227a8
quic: add quic internalBinding, refine Endpoint, add types
...
PR-URL: https://github.com/nodejs/node/pull/51112
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-12-26 16:27:49 -08:00
Yagiz Nizipli
bfa2eebdb2
fs: remove internalModuleReadJSON
binding
...
PR-URL: https://github.com/nodejs/node/pull/51224
Refs: https://github.com/nodejs/node/commit/45e4f82912
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2023-12-21 21:23:20 +00:00
Yagiz Nizipli
3551dc07eb
fs: throw fchownSync error from c++
...
PR-URL: https://github.com/nodejs/node/pull/51075
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-12 00:34:47 +00:00
Yagiz Nizipli
01dae5f877
lib,src: replace toUSVString with toWellFormed()
...
PR-URL: https://github.com/nodejs/node/pull/47342
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-11-29 16:00:57 +00:00
CanadaHonk
4466deeb34
fs: add c++ fast path for writeFileSync utf8
...
PR-URL: https://github.com/nodejs/node/pull/49884
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-27 00:01:39 +00:00
CanadaHonk
f11b2061ea
fs: improve error performance for rmdirSync
...
PR-URL: https://github.com/nodejs/node/pull/49846
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-26 19:23:41 +00:00
CanadaHonk
ea88a3e1f2
fs: improve error perf of sync lstat
+fstat
...
PR-URL: https://github.com/nodejs/node/pull/49868
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-23 00:25:15 +00:00
Yagiz Nizipli
f13dbfd43a
src: move package resolver to c++
...
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:38 +00:00
Jungku Lee
506858bf13
fs: improve error performance for readSync
...
PR-URL: https://github.com/nodejs/node/pull/50033
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-21 02:00:00 +00:00
Jungku Lee
fbd08ec4f3
fs: improve error performance for fsyncSync
...
PR-URL: https://github.com/nodejs/node/pull/49880
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-20 23:39:14 +00:00
CanadaHonk
c37cf1832c
fs: improve error performance for mkdirSync
...
PR-URL: https://github.com/nodejs/node/pull/49847
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-20 23:39:03 +00:00
Yagiz Nizipli
1a5db6f173
fs: improve error performance of realpathSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:27 +00:00
Yagiz Nizipli
5f0276d7a0
fs: improve error performance of lchownSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:26 +00:00
Yagiz Nizipli
449dc45691
fs: improve error performance of symlinkSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:25 +00:00
Yagiz Nizipli
7603bf5b81
fs: improve error performance of readlinkSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:24 +00:00
Yagiz Nizipli
d68996538c
fs: improve error performance of mkdtempSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:23 +00:00
Yagiz Nizipli
6b566415e8
fs: improve error performance of linkSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:22 +00:00
Yagiz Nizipli
1635366ad4
fs: improve error performance of chownSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:21 +00:00
Yagiz Nizipli
a7e40f5ce5
fs: improve error performance of renameSync
...
PR-URL: https://github.com/nodejs/node/pull/49962
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-18 15:56:20 +00:00
Yagiz Nizipli
18a818744f
fs: improve error performance of readdirSync
...
PR-URL: https://github.com/nodejs/node/pull/50131
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-10-14 19:35:01 +00:00
Niklas Mollenhauer
9df864ddeb
typings: use Symbol.dispose
and Symbol.asyncDispose
in types
...
PR-URL: https://github.com/nodejs/node/pull/50123
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-10-14 06:41:59 +00:00
Yagiz Nizipli
d3985296a9
fs: fix unlinkSync
typings
...
PR-URL: https://github.com/nodejs/node/pull/49859
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-12 11:14:37 -04:00
CanadaHonk
6bc7fa7906
fs: improve error perf of sync chmod
+fchmod
...
PR-URL: https://github.com/nodejs/node/pull/49859
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-12 11:14:34 -04:00
CanadaHonk
6bd77db41f
fs: improve error perf of sync *times
...
PR-URL: https://github.com/nodejs/node/pull/49864
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-12 11:12:19 -04:00
Jungku Lee
f7a160d5b4
fs: improve error performance for fdatasyncSync
...
PR-URL: https://github.com/nodejs/node/pull/49898
Refs: https://github.com/nodejs/performance/issues/106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-10-04 00:19:13 +00:00
Yagiz Nizipli
05be31d5de
esm: improve getFormatOfExtensionlessFile
speed
...
PR-URL: https://github.com/nodejs/node/pull/49965
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-10-01 18:32:07 +00:00
Sam Verschueren
1b96975f27
lib: fix primordials
typings
...
PR-URL: https://github.com/nodejs/node/pull/49895
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-09-29 13:58:42 +00:00