summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-26feat(ext/net): reusePort for TCP on Linux (#16398)Luca Casonato
2022-10-26refactor(ext/streams): remove fake detached (#16431)Marcos Casagrande
Removed "fake detached" logic since it's no longer needed after [#16294](https://github.com/denoland/deno/pull/16294) landed
2022-10-26feat(runtime): make kill signal optional (#16299)Leo Kettmeir
This commit changes "Deno.kill()" method to have a default value, that is "SIGTERM".
2022-10-26fix(core) Include causes when converting anyhow errors to JS exceptions (#16397)Jan Špaček
When an op returns an `anyhow` error with a cause (usually added using the `.context()` method), the `Error` thrown into JavaScript contains only the message of the outernmost error in the chain. This PR simply changes the formatting of `anyhow::Error` from `"{}"` to `"{:#}"`: This significantly improves errors for code that embeds Deno and defines custom ops. For example, in [chiselstrike/chiselstrike](https://github.com/chiselstrike/chiselstrike), this PR improves an error message like ``` Error: could not plan migration ``` to ``` Error: could not plan migration: could not migrate table for entity "E": could not add column for field "title": the field does not have a default value ```
2022-10-26core: enable --harmony-change-array-by-copy V8 flag (#16429)Bartek Iwańczuk
Enables [Change Array by copy proposal](https://github.com/tc39/proposal-change-array-by-copy) via a V8 flag.
2022-10-26fix(compile): show an error when using npm specifiers (#16430)David Sherret
Closes #16427
2022-10-26chore: improve built-in API documentation (#16158)Kitson Kelly
Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Colin Ihrig <cjihrig@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-26fix(upgrade): Added error message when using canary option with M1 (#16382)doi yuki
before ``` Looking up latest version Found latest version 8c9e6c5565c1c00437d083de76cdd944e44b1d99 Checking https://dl.deno.land/canary/8c9e6c5565c1c00437d083de76cdd944e44b1d99/deno-aarch64-apple-darwin.zip Download could not be found, aborting ``` after ``` Looking up latest canary version Found latest version 8c9e6c5565c1c00437d083de76cdd944e44b1d99 error: Canary builds are not available for M1 ``` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-26feat(cli): show error cause recursion information (#16384)Cre3per
2022-10-26perf(ext/web): optimize transferArrayBuffer (#16294)Divy Srivastava
Avoid copying enqueued data + misc optimizations to skip webidl converter.
2022-10-26feat: Stabilize Deno.osRelease() API (#15973)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/15928
2022-10-26perf(core): do not drive JsInspector by default (#16410)Divy Srivastava
Part of https://github.com/denoland/deno/pull/16377
2022-10-25feat(task): support `sleep` suffixes (#16425)David Sherret
Co-authored-by: sigmaSd <sigmasd@users.noreply.github.com>
2022-10-26feat: Stabilize Deno.consoleSize() API (#15933)Bartek Iwańczuk
This commit stabilizes "Deno.consoleSize()" API. There is one change compared to previous unstable API, in that the API doesn't accept any arguments. Console size is established by querying syscalls for stdio streams at fd 0, 1 and 2.
2022-10-25Revert "Revert "refactor(ext/net): clean up variadic network ops (#16… ↵Bartek Iwańczuk
(#16422) …392)" (#16417)" This reverts commit 8e3f825c921b38141afa7a69a0664881c5c94461.
2022-10-25feat: stabilize Deno.utime() and Deno.utimeSync() (#16421)Colin Ihrig
2022-10-25Revert "refactor(ext/net): clean up variadic network ops (#16392)" (#16417)Bartek Iwańczuk
Should fix https://github.com/denoland/deno_std/issues/2807
2022-10-25fix: listenTlsWithReuseAddr test (#16420)Bartek Iwańczuk
2022-10-25feat: stabilize Deno.futime() and Deno.futimeSync() (#16415)Colin Ihrig
2022-10-25chore: fix flaky esm_module_deno_test test (#16419)David Sherret
2022-10-25fix(npm): add support for npm packages in lock files (#15938)Bartek Iwańczuk
This commit adds support for npm packages in the lock file.
2022-10-25chore(napi): fix typo in README.md (#16414)Ikko Ashimine
Enviornment -> Environment
2022-10-25fix: upgrade swc_ecma_parser to 0.122.19 - deno_ast 0.20 (#16406)David Sherret
2022-10-25feat: stabilize Deno.loadavg() (#16412)Colin Ihrig
2022-10-25perf(core): avoid isolate slots for ModuleMap (#16409)Divy Srivastava
2022-10-25feat(ext/web): use ArrayBuffer.was_detached() (#16307)Marcos Casagrande
This PR adds a way to reliably check if an ArrayBuffer was detached
2022-10-25feat(lint): add a report lint config setting (#16045)Brenley Dueck
Builds off this PR to add a "report" setting to deno.json which can be "pretty", "compact", or "json".
2022-10-24perf(ext/web): add op_encode_binary_string (#16352)Marcos Casagrande
Add a new op to use in `reader.readAsBinaryString(blob)`. ``` File API binary string: 400b 35.12 µs/iter (21.93 µs … 3.27 ms) 31.87 µs 131.95 µs 217.63 µs File API binary string: 4kb 46.49 µs/iter (29.36 µs … 4.42 ms) 42.5 µs 122.48 µs 155.1 µs File API binary string: 2.2mb 4.17 ms/iter (1.75 ms … 8.54 ms) 5.48 ms 7.39 ms 8.54 ms ``` **main** ``` benchmark time (avg) (min … max) p75 p99 p995 --------------------------------------------------------------------- ----------------------------- File API binary string: 400b 56.17 µs/iter (43.09 µs … 784.52 µs) 49.6 µs 177.18 µs 241.23 µs File API binary string: 4kb 277.2 µs/iter (240.29 µs … 1.84 ms) 269.87 µs 649.79 µs 774.46 µs File API binary string: 2.2mb 180.03 ms/iter (173.32 ms … 194.35 ms) 182.54 ms 194.35 ms 194.35 ms ``` It can also handle bigger files, when encoding a 200mb file, main crashes with OOM ``` <--- Last few GCs ---> [132677:0x560504676550] 5012 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; [132677:0x560504676550] 5038 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; [132677:0x560504676550] 5064 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; ```
2022-10-24fix(cli): Fixed bug where the progress bar did not clear (#16401)nasa
2022-10-24feat: Stabilize Deno.stdin.setRaw() (#16399)Bartek Iwańczuk
2022-10-24experiment(ext/web): Don't expose event classes during the bootstrap phase ↵Andreu Botella
(#16213)
2022-10-24test(wpt): add mimesniff tests (#16225)Marcos Casagrande
This PR enables 1027/1911 [mimesniff](https://wpt.fyi/results/mimesniff/mime-types?label=master&product=chrome%5Bexperimental%5D&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&product=deno&aligned&view=subtest) tests.
2022-10-24refactor(ext/net): clean up variadic network ops (#16392)Luca Casonato
Previously `op_net_listen`, `op_net_accept`, and various other ops in ext/net where variadic on the transport. This created a lot of code bloat. This commit updates the code to instead have separate ops for each transport.
2022-10-24fix(ext/fetch): fix `size_hint` on response body resource (#16254)Marcos Casagrande
2022-10-24perf(ext/streams): fast path when consuming body of tee'd stream (#16329)Marcos Casagrande
Add a fast path for consuming the body of cloned `Request`/`Response`, which is very common specially when using `cache` API.
2022-10-24feat(ext/net): add reuseAddress option for UDP (#13849)Gianluca Oldani
This commit adds a `reuseAddress` option for UDP sockets. When this option is enabled, one can listen on an address even though it is already being listened on from a different process or thread. The new socket will steal the address from the existing socket. On Windows and Linux this uses the `SO_REUSEADDR` option, while on other Unixes this is done with `SO_REUSEPORT`. This behavior aligns with what libuv does. TCP sockets still unconditionally set the `SO_REUSEADDR` flag - this behavior matches Node.js and Go. This PR does not change this behaviour. Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-10-24fix(ext/net): don't remove sockets on unix listen (#16394)Luca Casonato
When listening on a UNIX socket path, Deno currently tries to unlink this path prior to actually listening. The implementation of this behaviour is VERY racy, involves 2 additional syscalls, and does not match the behaviour of any other runtime (Node.js, Go, Rust, etc). This commit removes this behaviour. If a user wants to listen on an existing socket, they must now unlink the file themselves prior to listening. This change in behaviour only impacts --unstable APIs, so it is not a breaking change.
2022-10-23perf(ext/web/encoding): avoid copy in decode (#16364)Marcos Casagrande
2022-10-22fix(build) assume a custom compiler will support ↵Luke Channings
--export-dynamic-symbol-list linker flag. (#16387) This PR fixes a regression that caused deno binaries produced by the CI release workflows to be larger than expected. **The problem:** The build script will determine whether the linker supports the `--export-dynamic-symbol-list` flag by looking at the glibc version installed on the system. Ubuntu 20.04 ships with glibc 2.31, which does not support this flag. Upon investigation, I discovered that the CI pipeline does not use the gcc compiler provided by the `build-essential` package, and instead uses *clang-14*, which does support the new flag. **The solution:** Whenever a custom C Compiler is configured, the build script now assumes the compiler supports the `--export-dynamic-symbol-list` flag. This is not always going to be the case (you could use clang-8, for example), but it puts the onus on the user making the override to ensure the compiler has support. This will return deno builds for Linux to their previous size of ~100MB, and also allow builds under older glibc/gcc versions to succeed. If a user is compiling deno with a custom compiler that does not support this new flag, however, their build will fail. I expect this is a rare scenario, however, and suggest we cross that bridge if and when we come to it.
2022-10-22fix(lsp): regression - error when removing file (#16388)David Sherret
2022-10-22refactor: testable update checker code (#16386)David Sherret
2022-10-21feat(upgrade): check if user has write access to deno exe (#16378)sigmaSd
2022-10-21refactor(lockfile): migrate from v1 to v2 in-memory (#16385)Bartek Iwańczuk
<!-- Before submitting a PR, please read http://deno.land/manual/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. -->
2022-10-21feat(unstable/npm): initial type checking of npm specifiers (#16332)David Sherret
2022-10-21fix(upgrade): put prompt date in the past when creating a file (#16380)Bartek Iwańczuk
2022-10-21perf(core): don't access isolate slots for JsRuntimeState (#16376)Divy Srivastava
example writeFile benchmark: ``` # before time 188 ms rate 53191 time 168 ms rate 59523 time 167 ms rate 59880 time 166 ms rate 60240 time 168 ms rate 59523 time 173 ms rate 57803 time 183 ms rate 54644 # after time 157 ms rate 63694 time 152 ms rate 65789 time 151 ms rate 66225 time 151 ms rate 66225 time 152 ms rate 65789 ```
2022-10-21chore(core): remove `core.opSync` (#16379)Divy Srivastava
This patch removes the last uses of `core.opSync` from Deno. The new and JIT-friendly way to call sync ops is `core.ops.op_name()`.
2022-10-21fix(ext/ffi): Use PointerValue in UnsafePointerView and UnsafeFnPointer ↵Aapo Alasuutari
types (#16354) There were still remaining bigint usages for pointers. This now finally fixes all of them, there is only the one `type PointerValue = number | bigint;` line that references `bigint` in the unstable type definition file.
2022-10-21fix(ext/ffi): Use BufferSource for FFI buffer types (#16355)Aapo Alasuutari
Potential fix for type-code mismatch in FFI buffer types. The code supports ArrayBuffers, but types only reflect TypedArray support. There's also an existing type for this sort of stuff: `BufferSource`. (Although, it uses `ArrayBufferView` which doesn't actually connect with the TypedArray interfaces specifically, but it's just a type inheritance difference and nothing more.)
2022-10-21Revert realms from deno_core (#16366)Divy Srivastava
This revert has been discussed at length out-of-band (including with @andreubotella). The realms work in impeding ongoing event loop and performance work. We very much want to land realms but it needs to wait until these lower-level refactors are complete. We hope to bring realms back in a couple weeks.