Chris Tate
61de523d3e
Lower statSync's throwIfNoEntry option without building the error
...
fs.statSync(path, options) and fs.lstatSync(path, options) now compile
with an inline options object, where throwIfNoEntry takes any boolean and
bigint must be false, or with a stored options object whose only member
is throwIfNoEntry, read at each call. With throwIfNoEntry: false the
result is Stats | undefined, and a missing entry (ENOENT, or ENOTDIR for a
path through a file, a dangling link's stat included) answers undefined
without building the error object, as Node's binding does. Other
failures still throw. Before, any second argument was refused.
Stats | undefined is a nullable union, so the result is the Stats pointer
itself (NULL for undefined) rather than a union box, and Stats snapshots
come from the small-object allocator. A stat-and-test probe such as
`stat !== undefined && stat.isFile()` therefore makes no system
allocator calls. stat?.isFile() and the other type tests also lower
through optional chains.
existsSync answers false for a path with a null byte, as Node does,
instead of testing the path up to that byte.
Corpus 5747 and 5748 cover the typed and JavaScript forms.
2026-10-16 09:01:01 -05:00
..
2026-10-12 12:25:30 -05:00
2026-10-14 21:28:04 -05:00
2026-10-14 21:28:04 -05:00
2026-10-11 07:08:22 -07:00
2026-10-16 08:11:29 -05:00
2026-10-15 04:46:38 -07:00
2026-10-16 00:06:31 -05:00
2026-10-15 22:01:38 -05:00
2026-10-14 08:46:13 -05:00
2026-10-16 08:09:52 -05:00
2026-10-16 00:26:28 -05:00
2026-09-26 19:09:54 -05:00
2026-10-05 17:51:24 -05:00
2026-10-15 02:27:13 -05:00
2026-10-13 12:29:07 -05:00
2026-10-15 02:06:23 -05:00
2026-10-14 21:17:46 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 08:11:29 -05:00
2026-10-16 08:11:29 -05:00
2026-10-16 01:39:10 -05:00
2026-10-16 01:39:10 -05:00
2026-10-16 07:32:06 -05:00
2026-10-16 07:32:06 -05:00
2026-10-15 18:47:02 -05:00
2026-10-14 04:53:07 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 01:18:54 -05:00
2026-10-13 18:55:55 -05:00
2026-10-16 03:50:17 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 01:58:45 -05:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-16 00:06:31 -05:00
2026-10-16 01:58:45 -05:00
2026-10-15 01:51:36 -05:00
2026-10-15 04:02:33 -05:00
2026-10-16 07:54:59 -05:00
2026-10-15 14:15:33 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 07:34:12 -05:00
2026-10-16 07:34:12 -05:00
2026-08-23 20:16:13 -05:00
2026-10-14 21:22:39 -05:00
2026-10-16 01:39:10 -05:00
2026-10-15 20:18:29 -05:00
2026-10-15 21:07:04 -05:00
2026-10-14 17:18:04 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 20:54:30 -05:00
2026-10-15 18:26:31 -05:00
2026-10-14 11:43:44 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 14:15:33 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 13:06:33 -05:00
2026-08-16 22:59:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 03:03:32 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 02:06:23 -05:00
2026-10-15 07:59:19 -05:00
2026-09-28 19:01:50 -05:00
2026-10-13 19:48:11 -05:00
2026-10-14 23:20:57 -05:00
2026-10-14 11:43:44 -05:00
2026-10-15 14:57:16 -05:00
2026-10-15 18:35:02 -05:00
2026-10-15 13:06:33 -05:00
2026-10-14 08:10:02 -05:00
2026-10-14 17:27:02 -05:00
2026-10-16 00:06:31 -05:00
2026-10-15 07:59:19 -05:00
2026-10-15 21:44:38 -05:00
2026-10-15 21:44:38 -05:00
2026-10-15 21:44:38 -05:00
2026-10-15 19:59:56 -05:00
2026-10-16 07:27:17 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 07:27:17 -05:00
2026-10-14 22:15:06 -05:00
2026-10-08 15:40:53 -05:00
2026-10-16 09:01:01 -05:00
2026-10-16 09:01:01 -05:00
2026-10-14 11:43:44 -05:00
2026-08-23 20:16:13 -05:00
2026-10-14 11:43:44 -05:00
2026-08-23 20:16:13 -05:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-16 07:27:17 -05:00
2026-10-16 07:27:17 -05:00
2026-10-16 07:27:17 -05:00
2026-10-14 22:15:06 -05:00
2026-10-11 06:39:41 -07:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-10-07 19:07:02 -05:00
2026-08-23 20:16:13 -05:00
2026-10-16 03:36:39 -05:00
2026-10-15 19:21:26 -05:00
2026-10-13 19:48:11 -05:00
2026-10-13 19:48:11 -05:00
2026-10-15 02:06:23 -05:00
2026-10-06 13:07:11 -05:00
2026-10-06 13:07:11 -05:00
2026-10-06 13:07:11 -05:00
2026-10-14 04:53:07 -05:00
2026-10-15 02:06:23 -05:00
2026-10-14 00:25:07 -05:00
2026-10-15 11:34:00 -05:00
2026-10-14 11:43:44 -05:00
2026-10-15 07:59:19 -05:00
2026-10-16 07:27:17 -05:00
2026-08-23 20:16:13 -05:00
2026-10-16 07:27:17 -05:00
2026-10-14 08:10:02 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 07:01:01 -05:00
2026-10-14 14:10:43 -05:00
2026-10-15 02:06:23 -05:00
2026-10-13 07:48:24 -05:00
2026-10-16 08:11:29 -05:00
2026-10-15 02:06:23 -05:00
2026-10-16 07:49:10 -05:00
2026-10-16 00:35:06 -05:00
2026-10-16 07:27:17 -05:00
2026-10-16 07:01:01 -05:00
2026-10-15 19:59:56 -05:00
2026-10-16 00:06:31 -05:00
2026-10-16 00:06:31 -05:00
2026-10-16 00:06:31 -05:00
2026-10-15 18:46:41 -05:00
2026-10-16 00:01:13 -05:00
2026-10-16 00:01:13 -05:00
2026-10-15 04:47:04 -07:00
2026-10-16 08:11:29 -05:00
2026-10-16 08:11:29 -05:00
2026-10-15 13:42:34 -05:00
2026-10-15 08:35:14 -05:00
2026-10-14 17:27:02 -05:00
2026-10-15 23:16:04 -05:00
2026-10-15 23:16:04 -05:00
2026-10-14 17:27:02 -05:00
2026-10-03 05:38:29 -05:00
2026-10-07 19:07:02 -05:00
2026-10-15 17:46:09 -05:00
2026-10-15 17:46:09 -05:00
2026-10-14 04:53:07 -05:00
2026-10-15 02:06:23 -05:00
2026-10-14 17:27:02 -05:00
2026-10-14 11:30:47 -05:00
2026-10-13 19:48:11 -05:00
2026-10-14 17:27:02 -05:00
2026-10-15 02:06:23 -05:00
2026-10-14 08:08:06 -05:00
2026-10-16 00:06:31 -05:00
2026-10-14 17:27:02 -05:00
2026-10-12 12:25:30 -05:00
2026-10-14 11:43:44 -05:00
2026-10-15 02:06:23 -05:00
2026-08-10 12:21:11 -05:00
2026-09-29 20:54:09 -05:00
2026-10-14 04:53:07 -05:00
2026-10-16 01:58:45 -05:00
2026-10-07 19:07:02 -05:00
2026-10-11 06:42:16 -07:00
2026-10-07 19:07:02 -05:00
2026-10-15 00:25:52 -05:00
2026-10-14 21:09:51 -05:00
2026-10-15 08:18:16 -05:00