Files
scriptc/packages
Chris Tate 253fed8940 Emit Node's Timeout delay warnings and convert untyped timer delays with ToNumber
setTimeout and setInterval set a delay outside [1, 2^31-1] to 1ms, as
before, and now also emit the warning Node's Timeout constructor emits
then: TimeoutOverflowWarning for each delay past 2^31-1, and
TimeoutNegativeWarning and TimeoutNaNWarning once per process. The
warnings reach the 'warning' listeners and the default stderr report on
the next tick, as process.emitWarning delivers them. An omitted or
undefined delay warns nothing, and neither do the global functions while
mock.timers mocks them; node:timers imports keep warning.

The check is the runtime's scr_timer_user_delay, which a call emits only
when its delay is not a literal in range. An untyped delay (a JavaScript
value) now converts with ToNumber, as Node's `after *= 1` does, instead of
failing a number check: null, booleans, strings, arrays and objects become
delays, and undefined stays the omitted delay.
2026-10-30 08:21:18 -05:00
..
2026-10-29 20:04:10 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 15:55:05 -05:00
2026-10-29 06:02:00 -05:00
2026-10-29 06:02:00 -05:00