summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-04-26fix(dts): `URLPatternComponentResult` groups should have possibly undefined ↵David Sherret
key values (#18643) Closes #18640
2023-04-27fix(ext/http): internal upgradeHttpRaw works with "Deno.serve()" API (#18859)Matt Mastracci
Fix internal "upgradeHttpRaw" API restoring capability to upgrade HTTP connection in polyfilles "node:http" API.
2023-04-26feat(cli): don't check permissions for statically analyzable dynamic imports ↵Nayeem Rahman
(#18713) Closes #17697 Closes #17658
2023-04-26refactor: don't expose Deno[Deno.internal].core namespace (#18816)Bartek Iwańczuk
2023-04-26feat(ext/kv): add more atomic operation helpers (#18854)Ryan Dahl
Co-authored-by: losfair <zhy20000919@hotmail.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-04-26perf(ext/http): optimize for zero or one-packet response streams (#18834)Matt Mastracci
Improve `deno_reactdom_ssr_flash.jsx` by optimizing for zero/one-packet response streams.
2023-04-26BREAKING(unstable): remove "Deno.serve(handler, options)" overload (#18759)Bartek Iwańczuk
In preparation to stabilization of the API this overload was decided to be removed.
2023-04-26chore: upgrade rusty_v8 to 0.70.0 (#18844)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/18369
2023-04-26fix(core): Wrap safe collections' argument of primordials (#18750)Kenta Moriuchi
2023-04-25fix(ext/node): fix hash.flush (#18818)Yoshiya Hinosawa
2023-04-24feat(ext/http): h2c for http/2 (#18817)Matt Mastracci
This implements HTTP/2 prior-knowledge connections, allowing clients to request HTTP/2 over plaintext or TLS-without-ALPN connections. If a client requests a specific protocol via ALPN (`h2` or `http/1.1`), however, the protocol is forced and must be used.
2023-04-24test: disable flaky Node test (#18821)Bartek Iwańczuk
If we hit a slow runner this test almost always fails.
2023-04-23test: deflake worker tests (#18813)Bartek Iwańczuk
2023-04-23refactor: rewrite client side tests to 'fastwebsockets' crate (#18800)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/18781.
2023-04-23fix(ext/http): ensure that multiple upgrades and multiple simultaneous ↵Matt Mastracci
requests cannot cause a panic (#18810) Fix a bug where we weren't saving `slabId` in #18619, plus add some robustness checks around multiple upgrades (w/test).
2023-04-22feat(ext/http): Rework Deno.serve using hyper 1.0-rc3 (#18619)Matt Mastracci
This is a rewrite of the `Deno.serve` API to live on top of hyper 1.0-rc3. The code should be more maintainable long-term, and avoids some of the slower mpsc patterns that made the older code less efficient than it could have been. Missing features: - `upgradeHttp` and `upgradeHttpRaw` (`upgradeWebSocket` is available, however). - Automatic compression is unavailable on responses.
2023-04-22feat(node/http): implement ClientRequest.setTimeout() (#18783)Levente Kurusa
- implement setTimeout with matching semantics of Node - add the test from Node but leave it turned off because ClientRequest has no underlying socket
2023-04-22refactor: rewrite tests to "fastwebsockets" crate (#18781)Bartek Iwańczuk
Migrating off of `tokio-tungstenite` crate. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-04-21feat: upgrade deno_ast to 0.26 (#18795)David Sherret
Closes #18792
2023-04-21fix(test): allow explicit undefined for boolean test options (#18786)Nayeem Rahman
Fixes #18784.
2023-04-21fix(ext/websocket): upgrade fastwebsockets to 0.2.4 (#18791)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18775
2023-04-19fix(compile): write bytes directly to output file (#18777)David Sherret
1. Adds cli/standalone folder 2. Writes the bytes directly to the output file. When adding npm packages this might get quite large, so let's not keep the final output in memory just in case.
2023-04-19fix(test/coverage): exclude test files (#18748)Levente Kurusa
Fixes: #18454
2023-04-19fix(ext/node): implement asymmetric keygen (#18651)Divy Srivastava
Towards #18455 This commit implements the keypair generation for asymmetric keys for the `generateKeyPair` API. See how key material is managed in this implementation: https://www.notion.so/denolandinc/node-crypto-design-99fc33f568d24e47a5e4b36002c5325d?pvs=4 Private and public key encoding depend on `KeyObject#export` which is not implemented. I've also skipped ED448 and X448 since we need a crate for that in WebCrypto too.
2023-04-19fix(ext/node): improve vm.runInThisContext (#18767)Yoshiya Hinosawa
2023-04-19fix(ext/node): add crypto.sign|verify methods (#18765)Yoshiya Hinosawa
2023-04-19tests: disable another flaky test (#18762)Bartek Iwańczuk
This test is flaky too, it actually shouldn't be running since it's not listed in `cli/tests/node_compat/config.jsonc` at all.
2023-04-19chore: disable flaky Node compat tests (#18760)Bartek Iwańczuk
I'm not able to reproduce any of the failures from CI on my machine. I'm going to disable these tests for now as they are holding us back.
2023-04-18test: fix flaky worker test (#18754)Bartek Iwańczuk
https://github.com/denoland/deno/actions/runs/4734585198/jobs/8403719901?pr=18753
2023-04-18refactor(node/crypto): scrypt polyfill to rust (#18746)Levente Kurusa
2023-04-18chore(ext/node): restore http_test from std (#18747)Yoshiya Hinosawa
2023-04-18fix(ext/node): implement crypto.createVerify (#18703)Yoshiya Hinosawa
2023-04-18fix(ext/node): add req.socket.remoteAddress (#18733)Yoshiya Hinosawa
2023-04-18fix(ext/node): polyfill response._implicitHeader method (#18738)Yoshiya Hinosawa
2023-04-18chore: update node compat config (#18736)Yoshiya Hinosawa
2023-04-17refactor(tests): Watcher test timeout (#18459)Cre3per
Closes #17438
2023-04-16Revert "perf(core): immediately schedule another tick if there are un… ↵Bartek Iwańczuk
(#18718) …polled ops (#18611)" This reverts commit 4317055a3e49c7a75648480bbc86e4b466c60b5e. Reverting because we discovered while working on https://github.com/denoland/deno/pull/18619 that it doesn't work correctly (sometimes waker just stops working).
2023-04-14chore: fix running node tests in parallel on Windows (#18711)David Sherret
2023-04-14chore: remove node_modules folder being created in testdata directory (#18708)David Sherret
2023-04-14fix(ext/websocket): Avoid write deadlock that requires read_frame to ↵Divy Srivastava
complete (#18705) Fixes https://github.com/denoland/deno/issues/18700 Timeline of the events that lead to the bug. 1. WebSocket handshake complete 2. Server on `read_frame` holding an AsyncRefCell borrow of the WebSocket stream. 3. Client sends a TXT frame after a some time 4. Server recieves the frame and goes back to `read_frame`. 5. After some time, Server starts a `write_frame` but `read_frame` is still holding a borrow! ^--- Locked. read_frame needs to complete so we can resume the write. This commit changes all writes to directly borrow the `fastwebsocket::WebSocket` resource under the assumption that it won't affect ongoing reads.
2023-04-14refactor(core): limit number of boundary crossings between Rust and V8 (#18652)Bartek Iwańczuk
This commit refactors "deno_core" to do fewer boundary crossings from Rust to V8. In other words we are now calling V8 from Rust fewer times. This is done by merging 3 distinct callbacks into a single one. Instead of having "op resolve" callback, "next tick" callback and "macrotask queue" callback, we now have only "Deno.core.eventLoopTick" callback, which is responsible for doing the same actions previous 3 callbacks. On each of the event loop we were doing at least 2 boundary crosses (timers macrotask queue callback and unhandled promise rejection callback) and up to 4 crosses if there were op response and next tick callbacks coming from Node.js compatibility layer. Now this is all done in a single callback. Closes https://github.com/denoland/deno/issues/18620
2023-04-13refactor(cli): move runTests() and runBenchmarks() to rust (#18563)Nayeem Rahman
Stores the test/bench functions in rust op state during registration. The functions are wrapped in JS first so that they return a directly convertible `TestResult`/`BenchResult`. Test steps are still mostly handled in JS since they are pretty much invoked by the user. Allows removing a bunch of infrastructure for communicating between JS and rust. Allows using rust utilities for things like shuffling tests (`Vec::shuffle`). We can progressively move op and resource sanitization to rust as well. Fixes #17122. Fixes #17312.
2023-04-13chore: bump child_process_test timeouts for slow CI (#18689)David Sherret
2023-04-13fix(test): add process sigint handler for --watch (#18678)Nayeem Rahman
Fixes #18676.
2023-04-12fix(npm): eagerly reload package information when version from lockfile not ↵David Sherret
found locally (#18673) Closes #18624
2023-04-12fix(npm): cache bust npm specifiers more aggressively (#18636)David Sherret
Part 1: #18622 Part 2: This PR Closes #16901 --------- Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-04-12fix(core): preserve syntax error locations in dynamic imports (#18664)Nayeem Rahman
Fixes #6259. Adds the location for v8 syntax errors to the message (`message += " at {location}"`) when rethrowing them for dynamic imports. Discussing with @bartlomieju on discord I proposed just preserving v8's error and not reconstructing it, allowing the standard stack trace to just point to the syntax error instead of the dynamic import. But on further thought this way has parity with SWC's syntax errors + has the advantage of showing both the syntax error and dynamic import location. ```ts // temp.js await import("./temp2.js"); // temp2.js function foo() { await Promise.resolve(); } // Before: // error: Uncaught (in promise) SyntaxError: Unexpected reserved word // await import("./temp2.js"); // ^ // at async file:///.../temp.js:1:1 // After: // error: Uncaught (in promise) SyntaxError: Unexpected reserved word at file:///.../temp2.js:2:3 // await import("./temp2.js"); // ^ // at async file:///.../temp.js:1:1 ```
2023-04-12fix(ext/cache): cache.put overwrites previous call (#18649)Satya Rohith
2023-04-12refactor(node/crypto): port polyfill to Rust for randomInt, randomFill, ↵Levente Kurusa
randomFillSync (#18658) Pretty much as per the title, I'd welcome some feedback especially around the array/buffer handling in the two randomFill functions.
2023-04-11fix(npm): do not "npm install" when npm specifier happens to match ↵David Sherret
package.json entry (#18660)