summaryrefslogtreecommitdiff
path: root/ext/fs
AgeCommit message (Collapse)Author
2024-07-09refactor: use concrete error types for node resolution (#24470)David Sherret
This will help clean up some of the code in the CLI because we'll be able to tell how the resolution failed (not part of this PR).
2024-07-05refactor: move `FileCollector` to deno_config (#24433)David Sherret
2024-07-05fix(node): Implement `fs.lchown` (and `process.getegid`) (#24418)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/21260. Part of https://github.com/denoland/deno/issues/18218. Implements `node:fs.lchown`, and enables the node_compat test for it. The test uses `process.getegid`, which we didn't have implemented, so I went ahead and implemented that as well to get the test working.
2024-07-04fix: revert accidentally added `parentPath` on `DirEntry` (#24438)David Sherret
Reverts the accidentally added `.parentPath` on dir entries in https://github.com/denoland/deno/pull/24257/files This should not have been added to the public api and is not documented.
2024-07-02fix(ext/node): Add `fs.lutimes` / `fs.lutimesSync` (#23172)Nathan Whitaker
Part of #18218 - Adds `fs.lutimes` and `fs.lutimesSync` to our node polyfills. To do this I added methods to the `FileSystem` trait + ops to expose the functionality to JS. - Exports `fs._toUnixTimestamp`. Node exposes an internal util `toUnixTimestamp` from the fs module to be used by unit tests (so we need it for the unit test to pass unmodified). It's weird because it's only supposed to be used internally but it's still publicly accessible - Matches up error handling and timestamp handling for fs.futimes and fs.utimes with node - Enables the node_compat utimes test - this exercises futimes, lutimes, and utimes.
2024-06-26refactor: move PackageJson to deno_config (#24348)David Sherret
2024-06-19chore: forward v1.44.4 release commit to main (#24271)denobot
This is the release commit being forwarded back to main for 1.44.4 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-06-19fix(ext/node): Add Dirent.path and Dirent.parentPath (#24257)Divy Srivastava
2024-06-19chore: forward v1.44.3 release commit to main (#24256)denobot
This is the release commit being forwarded back to main for 1.44.3 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-06-13chore: forward v1.44.2 release commit to main (#24194)denobot
Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
2024-06-08fix(ext/node): lossy UTF-8 read node_modules files (#24140)Luca Casonato
Previously various reads of files in `node_modules` would error on invalid UTF-8. These were cases involving: - reading package.json from Rust - reading package.json from JS - reading CommonJS files from JS - reading CommonJS files from Rust (for ESM translation) - reading ESM files from Rust
2024-06-06refactor: remove `PermissionsContainer` in deno_runtime (#24119)David Sherret
Also removes permissions being passed in for node resolution. It was completely useless because we only checked it for reading package.json files, but Deno reading package.json files for resolution is perfectly fine. My guess is this is also a perf improvement because Deno is doing less work.
2024-06-06chore: forward v1.44.1 release commit to main (#24115)denobot
This is the release commit being forwarded back to main for 1.44.1 Co-authored-by: devsnek <devsnek@users.noreply.github.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-05-301.44.0 (#24045)denobot
Bumped versions for 1.44.0 Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-05-28fix(ext/fs): truncate files when a ReadableStream is passed to writeFile ↵charlotte ✨
(#23330) Closes #19697. This fixes a bug where the writeFile API can create partially-overwritten files which may lead to invalid / corrupt files or data leakage. It also aligns the behavior of writing a ReadableStream and writing a Uint8Array to the disk.
2024-05-23feat(ext/fs): stabilize `Deno.FsFile.unlock[Sync]()` and ↵Asher Gomez
`Deno.FsFile.lock[Sync]()` (#23754) Related #22230 CC @dyedgreen
2024-05-23fix(runtime): use more null proto objects (#23921)Luca Casonato
This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-22feat(ext/fs): stabilize `Deno.FsFile.syncData[Sync]()` and ↵Asher Gomez
`Deno.FsFile.sync[Sync]()` (#23733) Closes #22230
2024-05-22chore: forward v1.43.6 release commit to main (#23936)Bartek Iwańczuk
Bumped versions for 1.43.6 Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-17chore: forward v1.43.4 commit to main (#23861)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-13chore: cleanup unused dependencies (#23787)Leo Kettmeir
2024-05-10chore: forward v1.43.3 release commit to main (#23771)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-09chore: forward v1.43.2 release commit to main (#23749)denobot
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED** This is the release commit being forwarded back to main for 1.43.2 Please ensure: - [x] Everything looks ok in the PR - [x] The release has been published To make edits to this PR: ```shell git fetch upstream forward_v1.43.2 && git checkout -b forward_v1.43.2 upstream/forward_v1.43.2 ``` Don't need this PR? Close it. cc @nathanwhit Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com> Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-08fix(runtime): allow nul device on windows (#23741)Matt Mastracci
Fixes [23721](https://github.com/denoland/deno/issues/23721)
2024-05-011.43.0 (#23629)denobot
Bumped versions for 1.43.0 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-251.43.0 (#23549)denobot
Bumped versions for 1.43.0 Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-04-20fix(ext/node): `cp` into non-existent parent directory (#23469)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20604
2024-04-19feat(runtime): Allow embedders to perform additional access checks on file ↵Matt Mastracci
open (#23208) Embedders may have special requirements around file opening, so we add a new `check_open` permission check that is called as part of the file open process.
2024-04-16chore: forward v1.42.4 commit to `main` (#23394)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-04-12chore: forward v1.42.3 release commit to main (#23335)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-04-11chore: forward v1.42.2 release commit to main (#23315)denobot
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-04-07FUTURE(ext/fs): make `Deno.FsFile` constructor illegal (#23235)Asher Gomez
I'm unsure whether we're planning to make the `Deno.FsFile` constructor illegal or remove `FsFile` from the `Deno.*` namspace in Deno 2. Either way, this PR works towards the former. I'll create a superceding PR if the latter is planned instead. Towards #23089
2024-04-01chore: forward v1.42.1 release commit to main (#23162)denobot
This is the release commit being forwarded back to main for 1.42.1 Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-03-281.42.0 (#23105)denobot
Bumped versions for 1.42.0 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-03-14chore: Forward 1.41.3 release commit (#22930)Nathan Whitaker
Forward 1.41.3 release commit Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
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-08chore: forward v1.41.2 release commit to main (#22793)denobot
This is the release commit being forwarded back to main for 1.41.2 Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-07fix(publish): make include and exclude work (#22720)David Sherret
1. Stops `deno publish` using some custom include/exclude behaviour from other sub commands 2. Takes ancestor directories into account when resolving gitignore 3. Backards compatible change that adds ability to unexclude an exclude by using a negated glob at a more specific level for all sub commands (see https://github.com/denoland/deno_config/pull/44).
2024-03-06chore: upgrade deno_core (#22725)Nathan Whitaker
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. -->
2024-02-29chore: forward v1.41.1 release commit to main (#22643)denobot
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-02-221.41.0 (#22524)denobot
Bumped versions for 1.41.0 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-02-21fix(ext/fs): make errors in tempfile creation clearer (#22498)Matt Mastracci
When using a prefix or suffix containing an invalid filename character, it's not entirely clear where the errors come from. We make these errors more consistent across platforms. In addition, all permission prompts for tempfile and tempdir were printing the same API name. We also take the opportunity to make the tempfile random space larger by 2x (using a base32-encoded u64 rather than a hex-encoded u32).
2024-02-19chore(fs): rename `op_fs_file_stat_{async/sync}` ops (#22476)Asher Gomez
Renames `op_fs_fstat_{sync/async}` to `op_fs_file_stat_{async/sync}` in preparation of the upcoming removal of `Deno.fstat()` in v2.
2024-02-18feat(fs): `Deno.FsFile.{isTerminal,setRaw}()` (#22234)Asher Gomez
Closes #22229. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-02-15chore: forward v1.40.5 release commit to main (#22424)denobot
This is the release commit being forwarded back to main for 1.40.5 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-02-08chore: forward v1.40.4 release commit to main (#22345)denobot
This is the release commit being forwarded back to main for 1.40.4 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-02-07chore: upgrade deno_core to 0.259.0 (#22311)Bartek Iwańczuk
This update brings number of ops available to user code down to 45.
2024-02-05feat(unstable): `Deno.FsFile.lock[Sync]()` and `Deno.FsFile.unlock[Sync]()` ↵Asher Gomez
(#22235) Closes #22178.
2024-02-01chore: forward v1.40.3 release commit to main (#22220)Divy Srivastava
This is the release commit being forwarded back to main for 1.40.3 Ref https://github.com/denoland/deno/pull/22219
2024-02-01fix(fs): copyFile NUL path on macOS (#22216)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22211