deno/ext/node/polyfills/internal
Daniel Osvaldo Rahmanto 432761aac5
Some checks are pending
ci / build libs (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
fix(ext/node): fs.stat and fs.statSync compatibility (#30637)
Closes #30570

Changes in this PR:
- Implement `ino`, `nlink`, and `blocks` properties of `Deno.FileInfo`
on Windows. These changes are automatically reflected to the
corresponding node stat function. In order to do so, I had to tinker
with the
[createByteStruct](a3a904da14/ext/fs/30_fs.js (L297))
function to create another optional int type, apart from `?u64`. It's
common for small sized files on Windows (particularly NTFS file system)
to have a `Stats.blocks` property of 0, and currently all 0 values with
type `?u64` will be coerced into `null` by `createByteStruct`.
- Refactor the `BigIntStats` and `Stats` class, to use the same class
with Node.js that are provided from
[utils.mjs](7f8e488c36/ext/node/polyfills/internal/fs/utils.mjs (L577)).
Also ensures that all properties are not `null` or `undefined`.
- Addresses the `prefer-primordials` lint rule.
2025-09-15 15:29:30 +02:00
..
assert fix(ext/node): add assert.CallTracker (#29226) 2025-05-09 14:55:28 +00:00
console fix(ext/node): use primordials in ext/node/polyfills/internal/console/constructor.mjs (#29605) 2025-06-05 01:12:58 +02:00
crypto fix(ext/node): crypto.hkdfSync returns wrong result for non-Uint8Array TypedArray inputs (#30463) 2025-08-23 11:56:19 +02:00
dns fix(ext/node): improve getaddrinfo compatibility (#29501) 2025-06-02 11:34:36 +09:00
events fix(ext/node): fix addAbortListener (#29634) 2025-06-06 21:31:41 +09:00
fs fix(ext/node): fs.stat and fs.statSync compatibility (#30637) 2025-09-15 15:29:30 +02:00
http2 fix(ext/node): add "internal/http2/util" module (#29474) 2025-05-28 21:46:36 +09:00
process fix(ext/node): use primordials in ext/node/polyfills/internal/process/per_thread.mjs (#29550) 2025-06-02 11:14:44 +02:00
readline fix(ext/node): readline line separators (#30630) 2025-09-06 11:48:54 -04:00
streams fix(ext/node): remove duplicated stream classes (#29860) 2025-06-25 10:21:03 +09:00
test chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
util fix(ext/node): use primordials in ext/node/polyfills/internal/util/inspect.mjs (#29691) 2025-06-11 13:07:52 +09:00
webstreams fix(ext/node): Readable adapter cancel semantics (#30526) 2025-09-01 09:29:06 +00:00
assert.mjs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
async_hooks.ts feat(node): implement async hooks for nextTick TickObject tracking (#30578) 2025-09-03 10:44:10 +02:00
blocklist.mjs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
buffer.d.ts chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
buffer.mjs fix(ext/node): handle large buffer correctly (#30369) 2025-08-10 14:02:43 +02:00
child_process.ts fix(ext/node): ignore Node.js' --experimental-* flags when spawning child process (#26351) 2025-09-04 12:18:51 +00:00
cli_table.ts fix(ext/node): use primordials in ext/node/polyfills/internal/cli_table.ts (#29257) 2025-05-12 02:47:28 +02:00
constants.ts chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
dgram.ts fix(ext/node): use primordials in ext/node/polyfills/internal/dgram.ts (#29204) 2025-05-08 16:03:55 +02:00
dtrace.ts chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
error_codes.ts chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
errors.ts fix(ext/node): os.setPriority and os.getPriority compatibility (#30383) 2025-08-18 19:07:28 +02:00
event_target.mjs fix(ext/node): use primordials in ext/node/polyfills/internal/event_target.mjs (#29772) 2025-06-17 11:56:12 +09:00
fixed_queue.ts chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
hide_stack_frames.ts fix(ext/node): use primordials in ext/node/polyfills/internal/hide_stack_frames.ts (#29067) 2025-04-28 16:00:54 +09:00
http.ts fix(ext/node): use primordials in ext/node/polyfills/internal/http.ts (#29082) 2025-04-29 18:34:22 +02:00
idna.ts fix(ext/node): use primordials in ext/node/polyfills/internal/idna.ts (#29085) 2025-05-07 16:01:03 +02:00
net.ts fix(ext/node): use primordials in ext/node/polyfills/internal/net.ts (#29297) 2025-05-15 09:01:50 +02:00
normalize_encoding.ts fix(ext/node): accept base64url encoding on StringDecoder (#30366) 2025-08-10 18:49:14 +05:30
options.ts fix(ext/node): print warnings to stderr (#29527) 2025-06-02 11:36:47 +09:00
primordials.mjs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
querystring.ts fix(ext/node): use primordials in ext/node/polyfills/internal/querystring.ts (#29264) 2025-05-13 11:06:25 +09:00
stream_base_commons.ts fix(ext/node): use primordials in ext/node/polyfills/internal/stream_base_commons.ts (#29290) 2025-05-14 11:54:23 +02:00
timers.mjs fix(ext/node): use primordials in ext/node/polyfills/internal/timers.mjs (#29269) 2025-05-13 02:09:51 +02:00
url.ts fix(ext/node): use primordials in ext/node/polyfills/internal/url.ts (#29146) 2025-05-13 23:30:44 +00:00
util.mjs fix(ext/node): accept base64url encoding on StringDecoder (#30366) 2025-08-10 18:49:14 +05:30
validators.mjs fix(ext/node): fs.symlink and fs.symlinkSync compatibility (#30555) 2025-09-03 17:48:13 -04:00