summaryrefslogtreecommitdiff
path: root/tests/unit_node
AgeCommit message (Collapse)Author
2024-04-30fix(ext/node): support multiple message listeners on MessagePort (#23600)Satya Rohith
Closes https://github.com/denoland/deno/issues/23561
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-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-21fix(ext/node): define http.maxHeaderSize (#23479)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/23432
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): `cp` into non-existent parent directory (#23469)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20604
2024-04-20fix(ext/node): Support `env` option in worker_thread (#23462)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23455
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): worker_threads.receiveMessageOnPort doesn't panic (#23406)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/23386. Instead of using async `recv()` method, it was replaced with a poll based function that doesn't hold onto RefCell borrow across await point. Fixes https://github.com/denoland/deno/issues/23362
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): 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-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-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
2024-04-03fix(ext/node): polyfill node:domain module (#23088)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/16852 --------- Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-04-02feat: improve AsyncLocalStorage api (#23175)Alex Yang
Fixes: https://github.com/denoland/deno/issues/23174
2024-04-02fix(ext/node): MessagePort works (#22999)Satya Rohith
Closes https://github.com/denoland/deno/issues/22951 Closes https://github.com/denoland/deno/issues/23001 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-02chore: update `std` submodule to 0.221.0 (#23112)Asher Gomez
2024-03-28fix(ext/node): support stdin: "inherit" in node:child_process (#23110)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23051
2024-03-26feat: TypeScript 5.4 (#23086)David Sherret
Fork PR: https://github.com/denoland/TypeScript/pull/10 Closes #23080
2024-03-24fix(ext/node): handle `null` in stdio array (#23048)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23045
2024-03-22fix(ext/node): handle KeyObject in `prepareAsymmetricKey` (#23026)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20938
2024-03-21chore: ignore flaky brotli test (#23020)Divy Srivastava
Closes https://github.com/denoland/deno/issues/22898
2024-03-21fix(ext/node): ECDH.publicKey() point encoding (#23013)Divy Srivastava
2024-03-20chore(ext/io): remove use of deprecated `Deno.writeSync()` (#22872)Asher Gomez
2024-03-20fix(ext/node): spread args in setImmediate (#22998)Satya Rohith
Closes https://github.com/denoland/deno/issues/22997 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-20fix(ext/node): implement EventEmitterAsyncResource (#22994)Divy Srivastava
Fixes #22729
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-20fix(ext/node): add process.setSourceMapsEnabled noop (#22993)Satya Rohith
Closes https://github.com/denoland/deno/issues/22992
2024-03-20fix(ext/node): worker_threads ESM handling (#22841)mash-graz
Fixes #22840 Fixes #22964
2024-03-19fix(ext/node): support Diffie-Hellman key type in ↵Asher Gomez
`crypto.createPrivateKey()` (#22984) Towards #22489 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-03-18fix(node): implement v8 serialize and deserialize (#22975)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22971
2024-03-18fix(ext/node): support public key point encoding in ECDH.generateKeys() (#22976)Satya Rohith
Towards https://github.com/denoland/deno/issues/22921 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.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-16fix(ext/node): support MessagePort in `WorkerOptions.workerData` (#22950)Bartek Iwańczuk
This commit fixes passing `MessagePort` instances to `WorkerOptions.workerData`. Before they were not serialized and deserialized properly when spawning a worker thread. Closes https://github.com/denoland/deno/issues/22935
2024-03-14fix(ext/node): Support private EC key signing (#22914)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18972 Support for web-push VAPID keys & jws signing - Fixes EC keygen to return raw private key and uncompressed public key point. - Support for `EC PRIVATE KEY`
2024-03-14fix(ext/node): support `spki` format in createPublicKey (#22918)Divy Srivastava
2024-03-14fix(ext/node): crypto.getCipherInfo() (#22916)Divy Srivastava
Stub implementation of getCipherInfo(). Good enough for most cases. Note: We do not support all OpenSSL ciphers (likely never will) Fixes https://github.com/denoland/deno/issues/21805
2024-03-14fix(ext/node): DH (`dhKeyAgreement`) support for `createPrivateKey` (#22891)Divy Srivastava
Ref https://github.com/denoland/deno/pull/22511
2024-03-13feat(node): implement fs.statfs() (#22862)Nayeem Rahman
2024-03-13fix(ext/node): initial `crypto.createPublicKey()` support (#22509)Asher Gomez
Closes #21807 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-13feat(ext/node): add more named curves in `crypto.generateKeyPair[Sync]()` ↵Asher Gomez
(#22882) Towards fixing #21761
2024-03-12fix(ext/node): flush brotli decompression stream (#22856)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22259 The decompressed input size was not restored because of improper flushing of the CBrotliDecompressStream state.
2024-03-11test(ext/node): add worker_threads test for SharedArrayBuffer (#22850)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/22815
2024-03-11fix(ext/node): Match punycode module behavior to node (#22847)Nathan Whitaker
Fixes #19214. We were using the `idna` crate to implement our polyfill for `punycode.toASCII` and `punycode.toUnicode`. The `idna` crate is correct, and adheres to the IDNA2003/2008 spec, but it turns out `node`'s implementations don't really follow any spec! Instead, node splits the domain by `'.'` and punycode encodes/decodes each part. This means that node's implementations will happily work on codepoints that are disallowed by the IDNA specs, causing the error in #19214. While fixing this, I went ahead and matched the node behavior on all of the punycode functions and enabled node's punycode test in our `node_compat` suite.
2024-03-11fix(runtime): Restore default signal handler after user handlers are ↵Nathan Whitaker
unregistered (#22757) <!-- 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 #22724. Fixes #7164. This does add a dependency on `signal-hook`, but it's just a higher level API on top of `signal-hook-registry` (which we and `tokio` already depend on) and doesn't add any transitive deps.
2024-03-11chore: fix child_process test (#22845)David Sherret
This was failing in old versions of git.
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