Commit Graph

8 Commits

Author SHA1 Message Date
James M Snell
97a3a8204c test: replace more uses of global with globalThis
PR-URL: https://github.com/nodejs/node/pull/56712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-25 07:23:11 +00:00
Lenz Weber-Tronic
c1ccade02f
lib: disable default memory leak warning for AbortSignal
This change sets the default `kMaxEventTargetListeners` property for
`AbortSignal` instances to 0, disabling the check per default, to
enable users to write isomorphic library code.
If desirable, the max event target listeners check can still be
enabled for individual `AbortSignal` instances by calling
`setMaxListeners` on them.

Refs: https://github.com/nodejs/node/issues/54758
PR-URL: https://github.com/nodejs/node/pull/55816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-12-07 10:41:00 +00:00
sinkhaha
c0a6320a48
events: update MaxListenersExceededWarning message log
PR-URL: https://github.com/nodejs/node/pull/51921
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-12 18:16:09 +00:00
Raz Luvaton
c39f04c141
events: remove weak listener for event target
Fixes: https://github.com/nodejs/node/issues/48951
PR-URL: https://github.com/nodejs/node/pull/48952
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-08-12 18:20:54 +00:00
Rich Trott
d5d7a416c7
test: add trailing commas in event tests
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: https://github.com/nodejs/node/pull/45448#pullrequestreview-1179370442
PR-URL: https://github.com/nodejs/node/pull/45466
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-11-22 23:03:33 +00:00
James M Snell
4388c1478a test: fix missed warning for non-experimental AbortController
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36240
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-11-23 20:49:35 -08: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
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