summaryrefslogtreecommitdiff
path: root/ext/node
AgeCommit message (Collapse)Author
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-16fix(ext/node): fix grpc error_handling example (#23755)Satya Rohith
gRPC depends only on the END_STREAM flag to emit "trailers" event which is responsible to propagate the errors correctly. This patch uses Body::is_end_stream() to determine if a stream will end and set the END_STREAM flag. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-16fix(node): error when throwing `FS_EISDIR` (#23829)Marvin Hagemeister
The `EISDIR` error code is not available as a global variable, but must be accessed through the `osConstants.errno` object. Fixes https://github.com/denoland/deno/issues/23695
2024-05-16fix(ext/node): homedir() `getpwuid`/`SHGetKnownFolderPath` fallback (#23841)Divy Srivastava
**Unix**: Returns the value of the HOME environment variable if it is set even if it is an empty string. Otherwise, it tries to determine the home directory by invoking the [getpwuid_r](https://linux.die.net/man/3/getpwuid_r) function with the UID of the current user. **Windows**: Returns the value of the USERPROFILE environment variable if it is set and it is not an empty string. Otherwise, it tries to determine the home directory by invoking the [SHGetKnownFolderPath](https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath) function with [FOLDERID_Profile](https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid). Fixes https://github.com/denoland/deno/issues/23824
2024-05-16fix(ext/node): export geteuid from node:process (#23840)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23827
2024-05-15fix(node): wrong `worker_threads.terminate()` return value (#23803)Marvin Hagemeister
<!-- 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. --> Fixes https://github.com/denoland/deno/issues/23801 --------- Signed-off-by: Marvin Hagemeister <marvinhagemeister50@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-15fix(node): stub `AsyncResource.emitDestroy()` (#23802)Marvin Hagemeister
<!-- 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. --> Fixes https://github.com/denoland/deno/issues/23397
2024-05-13chore: cleanup unused dependencies (#23787)Leo Kettmeir
2024-05-12fix(ext/node): process.uptime works without this (#23786)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/23761 Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-05-10chore: forward v1.43.3 release commit to main (#23771)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-10fix(node): better cjs re-export handling (#23760)David Sherret
Closes #23458
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-05fix(ext/node): don't rely on Deno.env to read NODE_DEBUG (#23694)Satya Rohith
This patch allows implementors to use ext/node without the need to implement Deno.env API. Closes https://github.com/denoland/deno/issues/23687
2024-05-02fix(ext/node): check resource exists before close (#23655)Satya Rohith
2024-05-02fix(ext/node): support delete process.env.var (#23647)Satya Rohith
Closes https://github.com/denoland/deno/issues/23641
2024-05-011.43.0 (#23629)denobot
Bumped versions for 1.43.0 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-30fix(node): require.resolve - fallback to global cache when bare specifier ↵David Sherret
from paths not found (#23618) Part of #22607 (probably closes it, but I haven't done thorough testing) Makes it so that `require.resolve` with `paths` specified will fallback to using the global cache when the paths can't be found when using a global cache (not when using a node_modules folder)
2024-04-30fix(ext/node): support multiple message listeners on MessagePort (#23600)Satya Rohith
Closes https://github.com/denoland/deno/issues/23561
2024-04-30fix(ext/node): read(0) before destroying http2stream (#23505)Satya Rohith
This patch enables gRPC hello world client example to work. Towards #23246 #3326
2024-04-29fix(ext/node): exporting rsa public keys (#23596)Divy Srivastava
Initial support for exporting rsa public KeyObject. Current assumption is that RSA keys are stored in pkcs1 der format in key storage. Ref https://github.com/denoland/deno/issues/23471 Ref https://github.com/denoland/deno/issues/18928 Ref https://github.com/denoland/deno/issues/21124
2024-04-29refactor: remove dead code in node stream polyfill (#23597)Yoshiya Hinosawa
2024-04-29fix(ext/node): support NODE_DEBUG env (#23583)Satya Rohith
2024-04-29fix(ext/node): add support for MessagePort.removeListener/off (#23598)Satya Rohith
Closes https://github.com/denoland/deno/issues/23564
2024-04-27fix(ext/node): support process.stdin.unref() (#22865)Yoshiya Hinosawa
This PR adds private `[REF]()` and `[UNREF]()` methods to Stdin class, and call them from Node.js polyfill layer (`TTY` class). This enables `process.stdin.unref()` and `process.stdin.ref()` for the case when stdin is terminal. closes #21796
2024-04-251.43.0 (#23549)denobot
Bumped versions for 1.43.0 Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2024-04-24feat(ext/http): Implement request.signal for Deno.serve (#23425)Matt Mastracci
When the response has been successfully send, we abort the `Request.signal` property to indicate that all resources associated with this transaction may be torn down.
2024-04-24fix(ext/node): worker_threads copies env object (#23536)Bartek Iwańczuk
Most common argument to `env` option for `worker_threads.Worker` will be `process.env`. In Deno `process.env` is a `Proxy` which can't be cloned using structured clone algorithm. So to be safe, I'm creating a copy of actual object before it's sent to the worker thread. Ref #23522
2024-04-23fix: Float16Array support (#23512)Kenta Moriuchi
Ref #23490, #23277 * remove `--js-float16array` flag (This flag has already added to deno_core) * add some `Float16Array` support
2024-04-21fix(ext/node): define http.maxHeaderSize (#23479)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/23432
2024-04-21fix: Fix some typos in comments (#23470)welfuture
Signed-off-by: welfuture <wellfuture@qq.com>
2024-04-20fix(ext/node): implement process.kill in Rust (#23130)Divy Srivastava
Closes https://github.com/denoland/deno/issues/23056
2024-04-20fix(ext/node): Support `env` option in worker_thread (#23462)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23455
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-18fix(ext/node): Correctly send ALPN on node TLS connections (#23434)Matt Mastracci
Landing work from #21903, plus fixing a node compat bug. We were always sending the HTTP/2 ALPN on TLS connections which might confuse upstream servers. Changes: - Configure HTTP/2 ALPN when making the TLS connection from the HTTP/2 code - Read the `ALPNProtocols` property from the TLS connection options rather than the deno `alpnProtocols` field - Add tests Prereq for landing Deno.serveHttp on Deno.serve: removing older HTTP servers from the codebase.
2024-04-16fix(ext/node): dispatch beforeExit/exit events irrespective of listeners ↵Satya Rohith
(#23382) Closes https://github.com/denoland/deno/issues/23342 Closes https://github.com/denoland/deno/issues/21757
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-16fix(ext/node): panic on 'worker_threads.receiveMessageOnPort' (#23386)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/23362 Previously we were panicking if there was a pending read on a port and `receiveMessageOnPort` was called. This is now fixed by cancelling the pending read, trying to read a message and resuming reading in a loop.
2024-04-15fix(ext/node): add stub for AsyncResource#asyncId() (#23372)Divy Srivastava
Ref https://github.com/denoland/deno/issues/23263
2024-04-13fix(ext/node): use ext/io stdio in WriteStream (#23354)Divy Srivastava
This is the same issue as https://github.com/denoland/deno/pull/23044 but in `WriteStream`. Adding a docusarus test in npm_smoke_tests repo.
2024-04-13fix(ext/node): promise rejection in VM contexts (#23305)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23297 `docusaurus build` works! ``` $ deno run -A repro.js fish: Job 1, 'deno run -A ../../littledivy/fs…' terminated by signal SIGSEGV (Address boundary error) $ denod run -A repro.js error: Uncaught (in promise) Error: rejected ``` Depends on https://github.com/denoland/deno_core/pull/693
2024-04-12chore: remove repetitive words (#23341)youngwendy
Signed-off-by: youngwendy <clonefetch@outlook.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-10chore: update to Rust 1.77.2 (#23262)林炳权
update to Rust 1.77.2 --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-09fix(ext/node): implement MessagePort.unref() (#23278)Satya Rohith
Closes https://github.com/denoland/deno/issues/23252 Closes https://github.com/denoland/deno/issues/23264
2024-04-09fix(ext/node): `node:vm` contexts (#23202)Divy Srivastava
Implement contextified objects in `node:vm` Fixes https://github.com/denoland/deno/issues/23186 Fixes https://github.com/denoland/deno/issues/22395 Fixes https://github.com/denoland/deno/issues/20607 Fixes https://github.com/denoland/deno/issues/18299 Fixes https://github.com/denoland/deno/issues/19395 Fixes https://github.com/denoland/deno/issues/18315 Fixes https://github.com/denoland/deno/issues/18319 Fixes https://github.com/denoland/deno/issues/23183
2024-04-09chore: update `h2` crate (#23272)Asher Gomez
Prerequisite #23273.
2024-04-08fix(ext/node): out-of-order writes of fs.createWriteStream (#23244)Yoshiya Hinosawa
This PR follows this fix (https://github.com/nodejs/node/pull/52005) in Node.js. Stream's construct callback happens one tick earlier by this change, and it prevents the reordering of the first few chunks in `node:stream.Writable` closes #20284
2024-04-05fix(ext/node): hostname is valid IPv4 addr (#23243)Divy Srivastava
Fixes `docusaurus serve`
2024-04-05fix(ext/node): Add "module" to builtinsModule (#23242)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22731