summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2023-01-06perf(ext,runtime): remove using `SafeArrayIterator` from `for-of` (#17255)Kenta Moriuchi
2023-01-05refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)Yiyu Lin
2023-01-05chore: forward v1.29.2 release commit to main (#17277)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-04chore(cli,ext,rt): remove some unnecessary `clone` or `malloc` (#17261)Yiyu Lin
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-28fix(ext/net): Remove unstable check from op_node_unstable_net_listen_udp ↵Kamil Ogórek
(#17207) The whole point of creating this alternative operation was to allow usage in node, without `--unstable` flag. Introduced and I believe missed in https://github.com/denoland/deno/pull/16520/
2022-12-28feat(unstable): Add Deno.Conn.ref()/unref() (#17170)Bartek Iwańczuk
This commit adds "Deno.Conn.ref()" and "Deno.Conn.unref()" methods. These methods can be used to make connection block or not block the event loop from finishing. Refing/unrefing only influences "read" operations - ie. scheduling writes to a connection _do_ keep event loop alive. Required for https://github.com/denoland/deno/issues/16710
2022-12-23fix(ext/fetch): Guard against invalid URL before its used by reqwest (#17164)Kamil Ogórek
2022-12-22fix(ext): Add checks for owning properties in for-in loops (#17139)Kenta Moriuchi
In the for-in loops, there were a few places where we forgot to check if objects owned some properties, so I added them.
2022-12-20chore: bump deno_fetch and deno_http versions (#17124)Ryan Dahl
https://github.com/denoland/deno/pull/17081 https://github.com/denoland/deno/pull/17126
2022-12-20fix(ext/http): close stream on resp body error (#17126)Luca Casonato
Previously, errored streaming response bodies did not cause the HTTP stream to be aborted. It instead caused the stream to be closed gracefully, which had the result that the client could not detect the difference between a successful response and an errored response. This commit fixes the issue by aborting the stream on error.
2022-12-20chore: Update dlint (#17031)Kenta Moriuchi
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-12-19fix: display URL in invalid URL error (#17128)Leo Kettmeir
2022-12-19fix(npm): conditional exports with --node-modules-dir (#17111)Bartek Iwańczuk
This commit fixes conditional exports in `require()` implementation if `--node-modules-dir` flag is used.
2022-12-19fix(ext/fetch): handle errors in req body stream (#17081)Luca Casonato
Right now an error in a request body stream causes an uncatchable global promise rejection. This PR fixes this to instead propagate the error correctly into the promise returned from `fetch`. It additionally fixes errored readable stream bodies being treated as successfully completed bodies by Rust.
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-16fix(npm): fix require resolution if using --node-modules-dir (#17087)Bartek Iwańczuk
In our `require()` implementation we use a special logic to resolve "base path" when looking for matching packages, however this logic is in contradiction to what needs to happen if there's a local "node_modules" directory used. This commit changes require implementation to be aware if we're running off of global node modules cache or a local one.
2022-12-15fix(npm): improve exports resolution when type checking (#17071)David Sherret
Closes #17012
2022-12-15chore: forward v1.29.1 release commit to main (#17067)denobot
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2022-12-15Revert "feat(ops): Fast zero copy string arguments (#16777)" (#17063)Bartek Iwańczuk
This reverts commit 9b2b8df927ac23cfa99016a684179f2a3198ba2e. Closes https://github.com/dsherret/ts-morph/issues/1372 Closes https://github.com/denoland/deno/issues/16979
2022-12-151.29.0 (#17052)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-12-14feat: Stabilize Deno.TcpConn.setNoDelay() and Deno.TcpConn.setKeepAlive() ↵Bartek Iwańczuk
(#17003) This commit stabilizes following APIs: - `Deno.TcpConn.setNoDelay()` - `Deno.TcpConn.setKeepAlive()`
2022-12-13feat(napi): improve napi coverage (#16198)Divy Srivastava
2022-12-13docs: use example & default tags (#17032)Leo Kettmeir
2022-12-12refactor(ext/ffi): split into multiple parts (#16950)Divy Srivastava
- [x] `dlfcn.rs` - `dlopen()`-related code. - [x] `turbocall.rs` - Call trampoline JIT compiler. - [x] `repr.rs` - Pointer representation. Home of the UnsafePointerView ops. - [x] `symbol.rs` - Function symbol related code. - [x] `callback.rs` - Home of `Deno.UnsafeCallback` ops. - [x] `ir.rs` - Intermediate representation for values. Home of the `NativeValue` type. - [x] `call.rs` - Generic call ops. Home to everything related to calling FFI symbols. - [x] `static.rs` - static symbol support I find easier to work with this setup, I eventually want to expand TurboCall to unroll type conversion loop in generic calls, generate code for individual symbols (lazy function pointers), etc.
2022-12-07feat(fmt): improve width calculation (#16982)David Sherret
Formats code according to Unicode Standard Annex #11 rules (https://crates.io/crates/unicode-width). This aligns `deno fmt` more with prettier.
2022-12-07fix(ext/websocket): Reland make try_send ops infallible (#16968)Divy Srivastava
Reverts denoland/deno#16743 This fixes the server hangs we were seeing in benchy. cc @billywhizz
2022-12-06fix(ext/fetch): new Request should soft clone (#16869)Luca Casonato
Previously the inner request object of the original and the new request were the same, causing the requests to be entangled and mutable changes to one to be visible to the other. This fixes that.
2022-12-05refactor: remove references to Deno.core in bootstrap code (#16937)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/16881
2022-12-05fix(ops): disallow auto-borrowing OpState across potential await point (#16952)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16934 Example compiler error: ``` error: mutable opstate is not supported in async ops --> core/ops_builtin.rs:122:1 | 122 | #[op] | ^^^^^ | = note: this error originates in the attribute macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) ```
2022-12-02feat(ops): Fast zero copy string arguments (#16777)Divy Srivastava
Uses SeqOneByteString optimization to do zero-copy `&str` arguments in fast calls. - [x] Depends on https://github.com/denoland/rusty_v8/pull/1129 - [x] Depends on https://chromium-review.googlesource.com/c/v8/v8/+/4036884 - [x] Disable in async ops - [x] Make it work with owned `String` with an extra alloc in fast path. - [x] Support `Cow<'_, str>`. Owned for slow case, Borrowed for fast case ```rust #[op] fn op_string_len(s: &str) -> u32 { str.len() as u32 } ```
2022-12-01perf(ext/websocket): skip Events constructor checks (#16365)Divy Srivastava
WebSocket internal events can bypass Event's webidl checks and `ReflectDefineProperty` on the object value. Note, this intentionally makes websocket events `isTrusted` configurable (not spec-compliant) which hurts performance a lot. Before: ``` Msg/sec: 167627.750000 Msg/sec: 168239.250000 Msg/sec: 169690.000000 ``` After: ``` Msg/sec: 191065.500000 Msg/sec: 194745.250000 Msg/sec: 194746.000000 ```
2022-12-01chore: forward v1.28.3 release commit to main (#16884)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-30chore: upgrade rusty_v8 to 0.58.0 (#16879)Bartek Iwańczuk
2022-11-30fix(ext/web): fix typings for readable stream readers (#16191)ud2
* Introduces `ReadableStreamDefaultReadResult` and modifies `ReadableStreamDefaultReader.read` to return this type (closes #15269). * Adds the missing `ReadableStreamBYOBReader` constructor. * Removes the nonexistent `ReadableStreamReader` class.
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-28fix(npm): allow to inspect npm modules with --inspect-brk (#16841)Bartek Iwańczuk
2022-11-27fix(ext/ffi): Null buffer pointer value is inconsistent (#16625)Aapo Alasuutari
Currently, slow call path will always create a dangling pointer to replace a null pointer when called with eg. a `new Uint8Array()` parameter, which V8 initialises as a null pointer backed buffer. However, the fast call path will never change the pointer value and will thus expose a null pointer. Thus, it's possible that the pointer value that a native call sees coming from Deno changes between two sequential invocations of the same function with the exact same parameters. Since null pointers can be quite important, and `Uint8Array` is the chosen fast path for Deno FFI `"buffer"` parameters, I think it is fairly important that the null pointer be properly exposed to the native code. Thus this PR. ### `*mut c_void` While here, I also changed the type of our pointer values to `*mut c_void`. This is mainly due to JS buffers always being `*mut`, and because we offer a way to turn a pointer into a JS `ArrayBuffer` (`op_ffi_get_buf`) which is read-write. I'm not exactly sure which way we should really go here, we have pointers that are definitely mut but we also cannot assume all of our pointers are. So, do we go with the maxima or the minima? ### `optimisedCall(new Uint8Array())` V8 seems to have a bug where calling an optimised function with a newly created empty `Uint8Array` (no argument or 0) will not see the data pointer being null but instead it's some stable pointer, perhaps pointing to some internal null-backing-store. The pointer value is also an odd (not even) number, so it might specifically be a tagged pointer. This will probably be an issue for some users, if they try to use eg. `method(cstr("something"), new Uint8Array())` as a way to do a fast call to `method` with a null pointer as the second parameter. If instead of a `new Uint8Array()` the user instead uses some `const NULL = new Uint8Array()` where the `NULL` buffer has been passed to a slow call previously, then the fast call will properly see a null pointer. I'll take this up with some V8 engineers to see if this couldn't be fixed.
2022-11-27perf(ops): Reenable fast unit result optimization (#16827)Divy Srivastava
The optimization was missed in the optimizer rewrite https://github.com/denoland/deno/pull/16514
2022-11-27Revert "fix(ext/flash): graceful server startup/shutdown with unsettl… ↵Bartek Iwańczuk
(#16839) …ed promises in mind (#16616)" This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c. There are reports saying that Vite is often hanging in 1.28.2 and this is the only PR that changed something with HTTP server. I think we should hold off on trying to fix this and instead focus on #16787 CC @magurotuna
2022-11-26feat(ops): support raw pointer arguments (#16826)Divy Srivastava
See https://github.com/denoland/deno/pull/16814#discussion_r1032744083. Allows nullable buffers in low-level ops like FFI: ```rust fn op_ffi_ptr_of<FP>( state: &mut OpState, buf: *const u8, out: &mut [u32], ) where FP: FfiPermissions + 'static { // .. } ```
2022-11-24chore: forward v1.28.2 release commit to main (#16796)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-24fix(npm/types): resolve main entrypoint declaration file when no types entry ↵David Sherret
(#16791) Closes #16782
2022-11-24fix(ext/flash): graceful server startup/shutdown with unsettled promises in ↵Yusuke Tanaka
mind (#16616) This PR resets the revert commit made by #16610, bringing back #16383 which attempts to fix the issue happening when we use the flash server with `--watch` option enabled. Also, some code changes are made to pass the regression test added in #16610.
2022-11-22chore: workspace inheritance (#16343)Leo Kettmeir
2022-11-22Reland "perf(ext/flash): optimize response streaming" (#16660)Divy Srivastava
2022-11-22fix(inspector): ensure console methods provided by inspector are available ↵Bartek Iwańczuk
(#16724)