summaryrefslogtreecommitdiff
path: root/tests/unit_node/_fs
AgeCommit message (Collapse)Author
2024-11-13feat(ext/fs): add ctime to Deno.stats and use it in node compat layer (#24801)Łukasz Czerniawski
This PR fixes #24453, by introducing a ctime (using ctime for UNIX and ChangeTime for Windows) to Deno.stats. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-09-14feat: TypeScript 5.6 and `npm:@types/node@22` (#25614)David Sherret
2024-09-11BREAKING(fs): remove `Deno.FsFile.prototype.rid` (#25499)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-29test: run `node_unit_tests` with `DENO_FUTURE=1` (#25285)Bartek Iwańczuk
This is blocking https://github.com/denoland/deno/pull/25213. Turns out a bunch of FS APIs are completely broken because they use RIDs (resource IDs) instead of FDs (file descriptors).
2024-08-20chore: enable no-console dlint rule (#25113)David Sherret
2024-08-16fix(node/fs): Use correct offset and length in node:fs.read and write (#25049)Nathan Whitaker
My fix in #25030 was buggy, I forgot to pass the `byteOffset` and `byteLength`. Whoops. I also discovered that fs.read was not respecting the `offset` argument, and we were constructing a new `Buffer` for the callback instead of just passing the original one (which is what node does, and the @types/node definitions also indicate the callback should get the same type). Fixes #25028.
2024-08-14fix(node/fs): node:fs.read and write should accept typed arrays other than ↵Nathan Whitaker
Uint8Array (#25030) Part of #25028. Our underlying read/write operations in `io` assume the buffer is a Uint8Array, but we were passing in other typed arrays (in the case above it was `Int8Array`).
2024-07-31fix(node/fs/promises): watch should be async iterable (#24805)Marvin Hagemeister
The way `fs.watch` works is different in `node:fs/promises` than `node:fs`. It has a different function signature and it returns an async iterable instead, see https://nodejs.org/api/fs.html#fspromiseswatchfilename-options Fixes https://github.com/denoland/deno/issues/24661
2024-07-25chore: update to `std@2024.07.19` (#24715)Asher Gomez
2024-06-19fix(ext/node): Add Dirent.path and Dirent.parentPath (#24257)Divy Srivastava
2024-06-17fix(ext/node): use `Deno.FsFile.statSync()` (#24234)Asher Gomez
2024-06-05chore: upgrade dlint to 0.60.0 (#24041)Bartek Iwańczuk
Factoring out `dlint` upgrade from https://github.com/denoland/deno/pull/24034 as it requires us to change the lint step on mac to use ARM runners. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-05-28fix(ext/node/fs): `position` argument not applied (#24009)Marvin Hagemeister
We didn't honour the `position` options of `fd.read` and `fd.write` because we checked if the buffer is of type `Buffer` instead of just `Uint8Array`. Node does the latter. In doing so I noticed that the file handle id was written to a public property which it definitely shouldn't be. This was probably a typo. Fixes https://github.com/denoland/deno/issues/23707
2024-04-20fix(ext/node): `cp` into non-existent parent directory (#23469)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20604
2024-03-20chore(ext/io): remove use of deprecated `Deno.writeSync()` (#22872)Asher Gomez
2024-03-20fix(ext/node): FsWatcher ref and unref (#22987)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22973 --------- Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-03-16fix(ext/node): pass normalized watchFile handler to StatWatcher (#22940)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22939
2024-03-13feat(node): implement fs.statfs() (#22862)Nayeem Rahman
2024-03-09fix(ext/node): support junction symlinks on Windows (#22762)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20609 Vitepress support! `vitepress dev` and `vitepress build` via BYONM
2024-03-06fix(ext/node): add default methods to fs.StatsBase (#22750)Divy Srivastava
2024-02-13chore: use `@std` import instead of `@test_util/std` (#22398)Asher Gomez
This PR: 1. Replaces `@test_util/std`-prefixed imports with `@std`. 2. Adds `@std/` import map entries to a few `deno.json` files.
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.