Commit graph

191 commits

Author SHA1 Message Date
Kenta Moriuchi f0a3d20642
fix(runtime): use more null proto objects again (#25040)
proceed with #23921

This PR is a preparation for
https://github.com/denoland/deno_lint/pull/1307

---------

Signed-off-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-06 12:52:59 +02:00
Asher Gomez dcf155516b
BREAKING(fs): disallow new Deno.FsFile() (#25478)
Towards #22079
2024-09-06 18:28:42 +10:00
Asher Gomez 7d95c5c062
BREAKING(fs): remove Deno.funlock[Sync]() (#25442)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-05 11:23:37 +00:00
Asher Gomez c73b4a0877
BREAKING(fs): remove Deno.seek[Sync]() (#25449)
Towards #22079
2024-09-05 20:37:28 +10:00
Asher Gomez 713ed065e7
BREAKING(fs): remove Deno.File (#25447)
Towards #22079
2024-09-05 16:22:47 +10:00
denobot e27a19c02c
chore: forward v1.46.3 release commit to main (#25425)
This is the release commit being forwarded back to main for 1.46.3
2024-09-04 17:16:24 +00:00
Asher Gomez 3d36cbd056
BREAKING(fs): remove Deno.ftruncate[Sync]() (#25412)
Towards #22079

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04 08:53:43 +00:00
Asher Gomez b72d1a7256
BREAKING(fs): remove Deno.fstat[Sync]() (#25351)
Towards #22079

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04 01:28:15 +00:00
Asher Gomez 9bf10aa1e0
chore(fs): remove Deno.flock[Sync]() (#25350)
Towards #22079
2024-09-03 18:39:37 +10:00
Asher Gomez b536ed1a74
chore(fs): remove Deno.futime[Sync]() (#25252) 2024-08-31 13:13:23 +10:00
denobot 0fb8df6c0c
chore: forward v1.46.2 release commit to main (#25296)
This is the release commit being forwarded back to main for 1.46.2
2024-08-29 22:13:28 +02:00
denobot 716ae4d8cb
chore: forward v1.46.1 release commit to main (#25155) 2024-08-22 10:44:53 -07:00
denobot 3314a0ceb8
1.46.0 (#25139)
Bumped versions for 1.46.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-22 02:16:45 +02:00
Yazan AbdAl-Rahman 4f49f703c1
fix(cli): update permission prompt message for compiled binaries (#24081)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 01:20:06 +00:00
Bedis Nbiba ee2b6899a1
fix: add permission name when accessing a special file errors (#25085) 2024-08-19 17:45:10 +00:00
denobot 6267905f09
chore: forward v1.45.5 release commit to main (#24818) 2024-07-31 15:14:27 -07:00
denobot ed2bf8ce31
chore: forward v1.45.4 release commit to main (#24754)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-07-26 14:26:13 -04:00
David Sherret 3bf147fe28
refactor: decouple node resolution from deno_core (#24724) 2024-07-25 19:08:14 -04:00
David Sherret 6055629ee7
refactor: update to use deno_package_json (#24688)
This is in preparation for extracting out node resolution code from
ext/node (which is something I'm going to do gradually over time).

Uses https://github.com/denoland/deno_package_json
2024-07-23 17:34:46 -04:00
denobot 9806064ac2
chore: forward v1.45.3 release commit to main (#24681)
Some checks are pending
ci / publish canary (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-22.04' || github.reposi… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-22.04' || 'macos-13' }}, … (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, release, ${{ github.repository == 'denoland/deno' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}, true, ${{ !startsWith(github.ref, 'refs/tags/') }}) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, debug, ubuntu-22.04, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, linux, debug, ubuntu-22.04) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, bench, linux, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request' && !contains(github.event.pull_reques… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-22.04' || 'macos-14' }},… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, debug, macos-14) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, release, ubicloud-standard-16-arm, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, debug, ubicloud-standard-16-arm) (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
This is the release commit being forwarded back to main for 1.45.3

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-23 03:41:40 +02:00
Divy Srivastava bf9c08b705
fix(ext/node): stat.mode on windows (#24434) 2024-07-17 19:43:40 -07:00
Divy Srivastava 078def0ff8
perf(ext/node): optimize fs.exists[Sync] (#24613)
Use `access` on *nix and `GetFileAttributesW` on Windows.

[Benchmark](https://paste.divy.work/p/-gq8Ark.js):
```
$ deno run -A bench.mjs # main (568dd)
existsSync: 8980.636629ms

$ target/release/deno run -A bench.mjs # this PR
existsSync: 6448.7604519999995ms

$ bun bench.mjs
existsSync: 6562.88671ms

$ node bench.mjs
existsSync: 7740.064653ms
```

Ref https://github.com/denoland/deno/pull/24434#discussion_r1679777912
2024-07-17 18:05:51 +05:30
denobot 3a48bc695f
chore: forward v1.45.2 release commit to main (#24564)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-07-12 18:05:45 -04:00
denobot 0be4c8947d
chore: forward v1.45.1 release commit to main (#24540)
This is the release commit being forwarded back to main for 1.45.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-07-12 01:14:14 +02:00
denobot 04ff5c731d
1.45.0 (#24512)
Bumped versions for 1.45.0

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-11 00:08:02 +02:00
David Sherret 839caf6faf
refactor: use concrete error types for node resolution (#24470)
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-09 12:15:03 -04:00
David Sherret 80df9aec1d
refactor: move FileCollector to deno_config (#24433) 2024-07-05 17:53:09 -04:00
Nathan Whitaker d4d3a3c54f
fix(node): Implement fs.lchown (and process.getegid) (#24418)
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-05 18:32:51 +00:00
David Sherret d91215d418
fix: revert accidentally added parentPath on DirEntry (#24438)
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-04 20:58:30 -04:00
Nathan Whitaker dadc606419
fix(ext/node): Add fs.lutimes / fs.lutimesSync (#23172)
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-07-02 19:33:32 -07:00
David Sherret 0da01c0ca6
refactor: move PackageJson to deno_config (#24348) 2024-06-26 21:24:10 +00:00
denobot 6c6ee02dfd
chore: forward v1.44.4 release commit to main (#24271)
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-19 20:29:53 +02:00
Divy Srivastava 209b286813
fix(ext/node): Add Dirent.path and Dirent.parentPath (#24257) 2024-06-19 12:51:01 +05:30
denobot 1d6b775f81
chore: forward v1.44.3 release commit to main (#24256)
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-19 03:17:32 +02:00
denobot efb2085b61
chore: forward v1.44.2 release commit to main (#24194)
Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
2024-06-13 01:57:22 +00:00
Luca Casonato c1f23c5788
fix(ext/node): lossy UTF-8 read node_modules files (#24140)
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-08 18:36:13 +02:00
David Sherret 386d5c8310
refactor: remove PermissionsContainer in deno_runtime (#24119)
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-06 23:37:53 -04:00
denobot 4d531bf229
chore: forward v1.44.1 release commit to main (#24115)
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-06-06 03:23:10 +00:00
denobot 9e2971d40f
1.44.0 (#24045)
Bumped versions for 1.44.0

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-05-30 04:49:23 +00:00
charlotte ✨ 506c275053
fix(ext/fs): truncate files when a ReadableStream is passed to writeFile (#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-28 00:14:35 +02:00
Asher Gomez 4908d45758
feat(ext/fs): stabilize Deno.FsFile.unlock[Sync]() and Deno.FsFile.lock[Sync]() (#23754)
Related #22230
CC @dyedgreen
2024-05-23 09:17:00 +10:00
Luca Casonato 971f09abe4
fix(runtime): use more null proto objects (#23921)
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-23 00:03:35 +02:00
Asher Gomez 6c167c64d6
feat(ext/fs): stabilize Deno.FsFile.syncData[Sync]() and Deno.FsFile.sync[Sync]() (#23733)
Closes #22230
2024-05-22 21:59:51 +00:00
Bartek Iwańczuk fabd9a214b
chore: forward v1.43.6 release commit to main (#23936)
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-22 01:35:04 +00:00
Bartek Iwańczuk 2b560be83f
chore: forward v1.43.4 commit to main (#23861)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-05-17 03:57:53 +02:00
Leo Kettmeir df879f9f74
chore: cleanup unused dependencies (#23787) 2024-05-13 14:23:39 -07:00
denobot dac49a116e
chore: forward v1.43.3 release commit to main (#23771)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-10 19:20:34 -04:00
denobot e6dc4dfbff
chore: forward v1.43.2 release commit to main (#23749)
**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-09 00:45:01 +00:00
Matt Mastracci 9f7f681e26
fix(runtime): allow nul device on windows (#23741)
Fixes [23721](https://github.com/denoland/deno/issues/23721)
2024-05-08 14:39:06 -06:00
denobot 5ff881a073
1.43.0 (#23629)
Bumped versions for 1.43.0

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-05-01 12:16:39 +05:30