summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2023-04-26fix(core): Wrap safe collections' argument of primordials (#18750)Kenta Moriuchi
2023-04-25refactor(ext/kv): don't use bigint literals (#18841)Bartek Iwańczuk
This causes `DCHECK` fail in V8 when pointer compression is disabled.
2023-04-25refactor(ext/websocket): use specialized ops (#18819)Bartek Iwańczuk
Instead of relying on `op_ws_send` to send different kinds of messages, use specialized ops everywhere.
2023-04-25refactor(ext/http): comments for h2c code (#18833)Matt Mastracci
2023-04-25fix(ext/node): fix hash.flush (#18818)Yoshiya Hinosawa
2023-04-24refactor(ext/node): enforce interior mutable for `NodePermissions` to remove ↵David Sherret
clones (#18831) We can make `NodePermissions` rely on interior mutability (which the `PermissionsContainer` is already doing) in order to not have to clone everything all the time. This also reduces the chance of an accidental `borrow` while `borrrow_mut`.
2023-04-24refactor(ext/node): allow injecting `NodeFs` from CLI (#18829)David Sherret
This allows providing a `NodeFs` as part of the `WorkerOptions`.
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-24fix(npm): only include top level packages in top level node_modules ↵David Sherret
directory (#18824) We were indeterministically including packages in the top level `node_modules/` folder when using a local node_modules directory. This change aligns with pnpm and only includes top level packages in this folder. This should be faster for initializing the folder, but may expose issues in packages that reference other packages not defined in their dependencies. That said, the behaviour previously was previously broken. This has exposed a bug in the require implementation where it doesn't find a package (which is the main underlying issue here). There is a failing test already for this in the test suite after this change. Closes #18822 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-24refactor(ext/node): reorganize ops (#18799)Bartek Iwańczuk
Move all op related code of "ext/node" to "ext/node/ops" module. These files were unnecessarily scattered around the extension.
2023-04-23chore: remove tokio-tungstenite dependency (#18814)Bartek Iwańczuk
2023-04-23refactor(ext/websocket): Remove dep on tungstenite by reworking code (#18812)Matt Mastracci
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-21refactor(node): move most of cli/node to ext/node (#18797)David Sherret
This is just a straight refactor and I didn't do any cleanup in ext/node. After this PR we can start to clean it up and make things private that don't need to be public anymore.
2023-04-21refactor: move some CJS and ESM code analysis to ext/node (#18789)David Sherret
2023-04-21fix(ext/websocket): upgrade fastwebsockets to 0.2.4 (#18791)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18775
2023-04-20refactor(ext/websocket): use fastwebsockets client (#18725)Divy Srivastava
2023-04-20refactor(ext/node): remove polyfills/_core.ts (#18766)Yoshiya Hinosawa
2023-04-20refactor(ext/webidl): remove option bags from "makeException" (#18679)Bartek Iwańczuk
Creating these options bags is more costly than passing arguments one-by-one. Especially since `prefix` and `context` are passed to all functions.
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: deflake 'check_sockopt' (#18763)Bartek Iwańczuk
This function was inherently racy which showed on slow machines - the connect future started before the spawned task was first polled. This change makes it so we're already accepting a connection when the connect future is first polled.
2023-04-18test: fix flaky tcp tests (#18755)Bartek Iwańczuk
https://github.com/denoland/deno/actions/runs/4734473301/jobs/8403453096?pr=18749
2023-04-18chore: forward v1.32.5 release commit to main (#18758)denobot
Co-authored-by: levex <levex@users.noreply.github.com> Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-04-18refactor(node/crypto): scrypt polyfill to rust (#18746)Levente Kurusa
2023-04-18fix(ext/node): implement crypto.createVerify (#18703)Yoshiya Hinosawa
2023-04-18fix(path): Remove non node symbols (#18630)Ryan Clements
- preserve referential invariants (e.g. path.posix === posix) - remove glob and separator exports - save removal of fromFileUrl and toFileUrl for a different PR as that refactor is more involved - addresses #18177
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-17chore(ext/fs): decouple fs trait from deno_core (#18732)Luca Casonato
This commit removes the dependencies on `deno_core` for the Fs trait. This allows to move the trait into a different crate that does not depend on core in the limit. This adds a new `bounds` field to `deno_core::extension!` that expands to `where` clauses on the generated code. This allows to add bounds to the extension parameters, such as `Fs::File: Resource`.
2023-04-17test: don't silently fail in check_sockopt (#18737)Bartek Iwańczuk
2023-04-15feat(kv): AtomicOperation#sum (#18704)Ryan Dahl
2023-04-14fix(core): Use safe primordials wrappers (#18687)Kenta Moriuchi
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-13chore: bump fastwebsockets to 0.1.3 (#18684)Divy Srivastava
Fixes build on aarch64 Linux. See https://github.com/littledivy/fastwebsockets/issues/2
2023-04-13refactor(cli,ext,ops): cleanup `regex` with `lazy-regex` (#17296)Yiyu Lin
- bump deps: the newest `lazy-regex` need newer `oncecell` and `regex` - reduce `unwrap` - remove dep `lazy_static` - make more regex cached --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-13perf(ext/websocket): make `op_server_ws_next_event` deferred (#18632)Divy Srivastava
Avoid attempting to read immediately, wasting time polling the future. 2% throughput improvement on Linux.
2023-04-12refactor(ext/webidl): remove object from 'requiredArguments' (#18674)Bartek Iwańczuk
This should produce a little less garbage and using an object here wasn't really required. --------- Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com> Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2023-04-12chore: fix windows clippy errors (#18670)David Sherret
2023-04-12chore: forward v1.32.4 release commit to main (#18669)denobot
Co-authored-by: levex <levex@users.noreply.github.com>
2023-04-12refactor(ext/fs): abstract FS via FileSystem trait (#18599)Luca Casonato
This commit abstracts out the specifics of the underlying system calls FS operations behind a new `FileSystem` and `File` trait in the `ext/fs` extension. This allows other embedders to re-use ext/fs, but substituting in a different FS backend. This is likely not the final form of these traits. Eventually they will be entirely `deno_core::Resource` agnostic, and will live in a seperate crate. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
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(ext/kv): keys must be arrays (#18655)Luca Casonato
There was some leftover code from previous iterations, where keys could be single parts instead of arrays also. This didn't match the types.
2023-04-07chore: fix linting on main (#18633)David Sherret
2023-04-07fix(ext/node): add X509Certificate (#18625)Divy Srivastava
Towards #18455