summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-15fix(ext/ffi): use SafeMap in getTypeSizeAndAlignment (#17305)Garcia
2023-01-15fix(ext/flash): Fix panic when JS caller doesn't consume request body (#16173)Isaiah Gamble
If the JS handler gets a POST, PUT, or PATCH request, but doesn't `await` the body, deno would panic because it will try to read the body even though the request has already been handled. Not sure how/where to test this case, so I could use some help with that.
2023-01-15fix(ext/fetch): remove Response.trailer from types (#17284)Geert-Jan Zwiers
2023-01-15fix(core): Add `Generator` and `AsyncGenerator` to promordials (#17241)Kenta Moriuchi
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-15fix(ext/fetch) Fix request clone error in flash server (#16174)Isaiah Gamble
2023-01-15refactor: clean up `unwrap` and `clone` (#17282)Yiyu Lin
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-01-15refactor(core): Move optional callbacks from `JsRuntimeState` to ↵Andreu Botella
`ContextState` (#17422) The `JsRuntimeState` struct stores a number of JS callbacks that are used either in the event loop or when interacting with V8. Some of these callback fields are vectors of callbacks, and therefore could plausibly store at least one callback per realm. However, some of those fields are `Option<v8::Global<v8::Function>>`, which would make the callbacks set by a realm override the one that might have been set by a different realm. As it turns out, all of the current such optional callbacks (`js_promise_reject_cb`, `js_format_exception_cb` and `js_wasm_streaming_cb`) are only used from inside a realm, and therefore this change makes it so such callbacks can only be set from inside a realm, and will only affect that realm. This is a reland of #15599. Towards #13239.
2023-01-15fix(napi): functions related to errors (#17370)Bartek Iwańczuk
This commits fixes various NAPI functions related to creation and throwing of errors.
2023-01-15fix(ext/flash): Fix typo in 'chunked' flash ops (#17302)Kamil Ogórek
Just a `s/chuncked/chunked/g`.
2023-01-14fix(npm): handle an npm package that has itself as a dependency (#17425)David Sherret
I'm not sure this properly handles scenarios where an npm package uses an alias that resolves to itself, we can fix that if we find a package that actually depends on that behavior. Closes #17420
2023-01-14refactor: create enum for `--builtin` doc flag (#17423)David Sherret
2023-01-14refactor(tsc): do not store some typescript declaration file text in ↵David Sherret
multiple places (#17410)
2023-01-14fix(ext/flash): Correctly handle errors for chunked responses (#17303)Kamil Ogórek
The leading cause of the problem was that `handleResponse` has `tryRespondChunked` passed as an argument, which in turn is implemented as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in the repro code. `handleResponse` was not handled correctly, as it not returned any value, and had no `catch` attached to it. It also effectively was never correctly handled inside two other blocks with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp, "..."))` as well, as it just short-circuited the promise with an empty resolve, instead of relying on the last `(async () => {})` block. This change makes `handleResponse` return a correct value and attach `onError` handler to the "non-thenable" variant of response handling code.
2023-01-14fix(ext/flash): Correctly handle errors for chunked responses (#17303)Kamil Ogórek
The leading cause of the problem was that `handleResponse` has `tryRespondChunked` passed as an argument, which in turn is implemented as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in the repro code. `handleResponse` was not handled correctly, as it not returned any value, and had no `catch` attached to it. It also effectively was never correctly handled inside two other blocks with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp, "..."))` as well, as it just short-circuited the promise with an empty resolve, instead of relying on the last `(async () => {})` block. This change makes `handleResponse` return a correct value and attach `onError` handler to the "non-thenable" variant of response handling code.
2023-01-14fix(runtime/fs): preserve permissions in copyFileSync for macOS (#17412)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16921
2023-01-14feat(core): Reland support for async ops in realms (#17204)Andreu Botella
Currently realms are supported on `deno_core`, but there was no support for async ops anywhere other than the main realm. The main issue is that the `js_recv_cb` callback, which resolves promises corresponding to async ops, was only set for the main realm, so async ops in other realms would never resolve. Furthermore, promise ID's are specific to each realm, which meant that async ops from other realms would result in a wrong promise from the main realm being resolved. This change takes the `ContextState` struct added in #17050, and adds to it a `js_recv_cb` callback for each realm. Combined with the fact that that same PR also added a list of known realms to `JsRuntimeState`, and that #17174 made `OpCtx` instances realm-specific and had them include an index into that list of known realms, this makes it possible to know the current realm in the `queue_async_op` and `queue_fast_async_op` methods, and therefore to send the results of promises for each realm to that realm, and prevent the ID's from getting mixed up. Additionally, since promise ID's are no longer unique to the isolate, having a single set of unrefed ops doesn't work. This change therefore also moves `unrefed_ops` from `JsRuntimeState` to `ContextState`, and adds the lengths of the unrefed op sets for all known realms to get the total number of unrefed ops to compare in the event loop. This PR is a reland of #14734 after it was reverted in #16366, except that `ContextState` and `JsRuntimeState::known_realms` were previously relanded in #17050. Another significant difference with the original PR is passing around an index into `JsRuntimeState::known_realms` instead of a `v8::Global<v8::Context>` to identify the realm, because async op queuing in fast calls cannot call into V8, and therefore cannot have access to V8 globals. This also simplified the implementation of `resolve_async_ops`. Co-authored-by: Luis Malheiro <luismalheiro@gmail.com>
2023-01-14chore(napi): Remove unstable libuv methods (#17416)Divy Srivastava
This commit removes the libuv pollyfills introduced with Node-API support. It is too much Node-specific. Most Node-API modules that depend on libuv are already giving up the benefits of Node-API. We should rather encourage modules to use `ThreadSafeFunction` or `AsyncWork` to interface with the event loop. Relevant discussion a few months ago: https://github.com/denoland/deno/pull/13633#discussion_r904916178 cc @bartlomieju
2023-01-14fix(napi): correct arguments for napi_get_typedarray_info (#17306)Bartek Iwańczuk
2023-01-14chore: upgrade rusty_v8 to 0.60.1 (#17407)Bartek Iwańczuk
Required for https://github.com/denoland/deno/pull/17306
2023-01-14fix(npm): use original node regex in npm resolution (#17404)Kiryl Dziamura
Fixes regex for matching conditional exports in a package. Updated to the same regex Node.js uses.
2023-01-14refactor(bench/http): Use optional chaining instead of `||` fallthrough (#17317)Max Coplan
2023-01-13refactor(coverage): use FileFlags struct (#17388)Geert-Jan Zwiers
2023-01-13refactor(cli/tools): reduce cloning (#17309)Geert-Jan Zwiers
2023-01-13fix(napi): allow cleanup hook to remove itself (#17402)Bartek Iwańczuk
This commit fixes "cleanup hooks" in NAPI integration in two ways: - don't hold to RefCell's borrow while iterating over hooks - allow a hook to remove itself when being called
2023-01-13fix(napi): update node version to lts (#17399)Lino Le Van
2023-01-13chore(ci): use windows-2022 runner on skipped release job on PRs (#17398)David Sherret
2023-01-13chore: small cleanup of scripts in ./tools and run copyright checker in ↵David Sherret
lint.js (#17393)
2023-01-13chore: forward 1.29.3 release back to main (#17401)David Sherret
2023-01-13fix(permissions): lock stdio streams when prompt is shown (#17392)Bartek Iwańczuk
This commit changes permission prompt to lock stdio streams when prompt is shown.
2023-01-13tests: Disable flaky flash_shutdown test (#17390)Bartek Iwańczuk
2023-01-13fix(napi): date and unwrap handling (#17369)Bartek Iwańczuk
2023-01-13chore: add `copyright_checker` tool and add the missing copyright (#17285)Yiyu Lin
2023-01-12chore(ci): try to make sysroot step more reliable (#17383)David Sherret
Main is failing a lot because of: ``` Err:8 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 debootstrap all 1.0.118ubuntu1.8 Connection failed [IP: 40.81.13.82 80] Fetched 44.1 MB in 60s (734 kB/s) E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.118ubuntu1.8_all.deb Connection failed [IP: 40.81.13.82 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ```
2023-01-13tests: move integration tests to a single module (#17380)Bartek Iwańczuk
Effectively reverts changes done in https://github.com/denoland/deno/pull/16816
2023-01-13fix: make self and window getters only & make getterOnly ignore setting (#17362)Leo Kettmeir
2023-01-12chore(ci): only run doc tests on linux (#17379)David Sherret
Doc tests were observed to take over 100s on the Mac CI in one instance.
2023-01-13fix(webidl): properly implement setlike (#17363)Leo Kettmeir
2023-01-12chore(ci): try some wpt parallelism (#17375)David Sherret
2023-01-12chore(ci): skip running the benchmarks on a PR except when a label is added ↵David Sherret
(#17377)
2023-01-12chore(ci): fix canary publish on main (#17374)David Sherret
Ref #17358
2023-01-12chore(ci): use mtime cache for fastci (#17373)David Sherret
2023-01-12chore(ci): do not clone submodule ./test_util/wpt unnecessarily (#17372)David Sherret
2023-01-12chore(ci): only install node for the benchmarks (#17371)David Sherret
2023-01-12ci: update Windows runner, update Google Cloud integration, update Node (#17358)Bartek Iwańczuk
This commit rolls up following PRs into a single one: - https://github.com/denoland/deno/pull/16672 - https://github.com/denoland/deno/pull/16674 - https://github.com/denoland/deno/pull/16972 Generation script was updated to take into account these changes. Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Geert-Jan Zwiers <geertjanzwiers@protonmail.com> Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-12Revert "test: fix flaky deno_land_unsafe_ssl test (#17357)" (#17368)Bartek Iwańczuk
This reverts commit ee2c6cb04af232be672b31b81f7c377b2f571267. Closes https://github.com/denoland/deno/issues/17359
2023-01-12fix(napi): Implement `napi_threadsafe_function` ref and unref (#17304)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-12fix: check if BroadcastChannel is open before sending (#17366)Leo Kettmeir
Fixes #16978
2023-01-12feat: allow passing a ReadableStream to Deno.writeFile/Deno.writeTextFile ↵Leo Kettmeir
(#17329) Closes #13229
2023-01-12fix: don't unwrap in test pipe handling logic (#17341)Leo Kettmeir
Fixes #14746