summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-08fix(ext/websocket): Close socket on bad string data (#19424)Matt Mastracci
2023-06-08chore: Use relative paths for assert imports to avoid test flakes (#19427)Matt Mastracci
Tests occasionally fail if we get a bad gateway attempting to fetch the assertion module
2023-06-08refactor(compile): store the npm snapshot in the eszip (#19343)David Sherret
2023-06-08perf(ext/websocket): Reduce GC pressure & monomorpize op_ws_next_event (#19405)Matt Mastracci
Reduce the GC pressure from the websocket event method by splitting it into an event getter and a buffer getter. Before: 165.9k msg/sec After: 169.9k msg/sec
2023-06-08chore: Ensure we only end up with the clang version we want & upgrade libffi ↵Matt Mastracci
(#19421) The number of clang versions installed on the build machines is too dang high.
2023-06-08feat(node_compat): Add a write method to the FileHandle class (#19385)nasa
## WHY ref: https://github.com/denoland/deno/issues/19165 The FileHandle class has many missing methods compared to node. ## WHAT Add write method
2023-06-08feat(node_compat): Add a read method to the FileHandle class (#19359)nasa
ref: #19165 The FileHandle class has many missing methods compared to node.
2023-06-08perf: use sendto syscalls (#19414)Bartek Iwańczuk
This switches syscall used in HTTP and WS server from "writev" to "sendto". "DENO_USE_WRITEV=1" can be used to enable using "writev" syscall. Doing this for easier testing of various setups.
2023-06-08chore: upgrade to Rust 1.68.2 (#19416)Bartek Iwańczuk
Also prints disk size in release builds.
2023-06-07fix(napi): don't panic if symbol can't be found (#19397)Bartek Iwańczuk
This should return an error to the caller to make it easier to track what went wrong. Should help with debugging https://github.com/denoland/deno/issues/19389
2023-06-07chore: downgrade to Rust 1.68 (#19411)David Sherret
Problems still persist from https://github.com/denoland/deno/pull/19407 -- downgrading to try out 1.68
2023-06-07ci: output file system space before and after building (#19409)David Sherret
This will help give us better insight.
2023-06-07refactor(core): use JoinSet instead of FuturesUnordered (#19378)Bartek Iwańczuk
This commit migrates "deno_core" from using "FuturesUnordered" to "tokio::task::JoinSet". This makes every op to be a separate Tokio task and should unlock better utilization of kqueue/epoll. There were two quirks added to this PR: - because of the fact that "JoinSet" immediately polls spawn tasks, op sanitizers can give false positives in some cases, this was alleviated by polling event loop once before running a test with "deno test", which gives canceled ops an opportunity to settle - "JsRuntimeState::waker" was moved to "OpState::waker" so that FFI API can still use threadsafe functions - without this change the registered wakers were wrong as they would not wake up the whole "JsRuntime" but the task associated with an op --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-06-07chore: downgrade to Rust 1.69 (#19407)David Sherret
2023-06-07refactor: helpers methods on `TypeCheckMode` (#19393)David Sherret
2023-06-07fix(cli): formatting bench with colors (#19323)Mike Mulchrone
2023-06-07perf(ext/websocket): monomorphize code (#19394)Bartek Iwańczuk
Using `deopt-explorer` I found that a bunch of fields on `WebSocket` class were polymorphic. Fortunately it was enough to initialize them to `undefined` to fix the problem.
2023-06-06perf(cli): conditionally load typescript declaration files (#19392)David Sherret
Closes #18583
2023-06-06fix(repl): correctly print string exception (#19391)sigmaSd
Fixes a recent regression where `throw "hello"` in the repl prints `Uncaught undefined` instead of `throw "hello"`
2023-06-06chore(core): build_bench tool (#19387)Matt Mastracci
This is a quick tool that I've been using to build benchmarking builds for Deno. Usage: Build a benchmark `HEAD~1` and `origin/main` executable: ```sh deno run tools/build_bench.ts HEAD~1 origin/main ``` Build debug benchmark executables of the last three commits: ```sh deno run tools/build_bench.ts --profile debug HEAD HEAD~1 HEAD~2 ```
2023-06-06perf(http): avoid flattening http headers (#19384)Marvin Hagemeister
2023-06-06fix(node/http): use fake socket and proper url handling (#19340)Leo Kettmeir
Fixes https://github.com/denoland/deno/issues/19349 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-06refactor(serde_v8): don't access backing store twice (#19382)Bartek Iwańczuk
I did that change recently, did spot that we're calling `get_backing_store()` in succession and that API call is not cheap.
2023-06-06perf(ext/websocket): Make send sync for non-stream websockets (#19376)Matt Mastracci
No need to go through the async machinery for `send(String | Buffer)` -- we can fire and forget, and then route any send errors into the async call we're already making (`op_ws_next_event`). Early benchmark on MacOS: Before: 155.8k msg/sec After: 166.2k msg/sec (+6.6%) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-06feat(ext/node): Very basic node:http2 support (#19344)Matt Mastracci
This commit adds basic support for "node:http2" module. Not all APIs have been yet implemented, but this change already allows to use this module for some basic functions. The "grpc" package is still not working, but it's a good stepping stone. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-06fix(ext/console): fix inspecting large ArrayBuffers (#19373)ud2
2023-06-06refactor(core): ensureFastOps is an op-generating proxy (#19377)Matt Mastracci
Startup benchmark shows no changes (within 1ms, identical system/user times).
2023-06-06chore: upgrade to Rust 1.70.0 (#19345)David Sherret
Co-authored-by: linbingquan <695601626@qq.com>
2023-06-05fix: upgrade to deno_ast 0.27 (#19375)David Sherret
Closes #19148
2023-06-05chore: update deno_lint to 0.46.0 (#19372)Kenta Moriuchi
2023-06-05fix(ext/crypto): fix JWK import of Ed25519 (#19279)Levente Kurusa
Fixes: #18049 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-05feat(node_compat): Add a close method to the FileHandle class. (#19357)nasa
## WHY ref: https://github.com/denoland/deno/issues/19165 The FileHandle class has many missing methods compared to node. Add these. ## WHAT - Add close method --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-06-05feat(runtime): Add an OpenBSD implementation for rss() (#19221)VlkrS
In case you would consider including specific implementations and not only build fixes, here's the implementation of the ```rss()``` function for OpenBSD.
2023-06-05feat: add more options to Deno.inspect (#19337)Leo Kettmeir
For https://github.com/denoland/deno_std/issues/3404 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-06-05feat(runtime): support creating workers using custom v8 params (#19339)Mathias Lafeldt
In order to limit the memory usage of isolates via heap_limits.
2023-06-05perf: optimize RegExp usage in JS (#19364)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/19330 Shows about 1% improvement in the HTTP benchmark.
2023-06-04fix(ext/web): Copy EventTarget list before dispatch (#19360)Koen
Related issue: https://github.com/denoland/deno/issues/19358. This is a regression that seems to have been introduced in https://github.com/denoland/deno/pull/18905. It looks to have been a performance optimization. The issue is probably easiest described with some code: ```ts const target = new EventTarget(); const event = new Event("foo"); target.addEventListener("foo", () => { console.log('base'); target.addEventListener("foo", () => { console.log('nested'); }); }); target.dispatchEvent(event); ``` Essentially, the second event listener is being attached while the `foo` event is still being dispatched. It should then not fire that second event listener, but Deno currently does.
2023-06-03refactor(core): remove force_op_registration and cleanup ↵Nayeem Rahman
JsRuntimeForSnapshot (#19353) Addresses https://github.com/denoland/deno/pull/19308#discussion_r1212248194. Removes force_op_registration as it is no longer necessary.
2023-06-03perf(ext/http): Migrate op_http_get_request_method_and_url to v8::Array (#19355)Kamil Ogórek
Tackles 3rd item from https://github.com/denoland/deno/issues/19330 list. Before: 113.9k After: 114.3k
2023-06-02perf(ext/http): Migrate op_http_get_request_headers to v8::Array (#19354)Kamil Ogórek
2023-06-02fix(kv) run sqlite transactions via spawn_blocking (#19350)Igor Zinkovsky
`rusqlite` does not support async operations; with this PR SQLite operations will run through `spawn_blocking` to ensure that the event loop does not get blocked. There is still only a single SQLite connection. So all operations will do an async wait on the connection. In the future we can add a connection pool if needed.
2023-06-02perf(ext/http): Use flat list of headers for multiple set/get methods (#19336)Kamil Ogórek
This PR attempts to resolve the first item on the list from https://github.com/denoland/deno/issues/19330 which is about using a flat list of interleaved key/value pairs, instead of a nested array of tuples. I can tackle some more if you can provide a quick example of using raw v8 arrays, cc @mmastrac
2023-06-02fix(node): map stdio [0, 1, 2] to "inherit" (#19352)Marvin Hagemeister
<!-- Before submitting a PR, please read https://deno.com/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. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> Internally, `node-tap` spawns a child process with `stdio: [0, 1, 2]`. Whilst we don't support passing fd numbers as an argument so far, it turns out that `[0, 1, 2]` is equivalent to `"inherit"` which we already support. See: https://nodejs.org/api/child_process.html#optionsstdio Mapping it to `"inherit"` is fine for us and gets us one step closer in getting `node-tap` working. I'm now at the stage where already the coverage table is shown 🎉
2023-06-02feat(node_compat): Added base implementation of FileHandle (#19294)nasa
<!-- Before submitting a PR, please read https://deno.com/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. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> ## WHY ref: https://github.com/denoland/deno/issues/19165 Node's fs/promises includes a FileHandle class, but deno does not. The open function in Node's fs/promises returns a FileHandle, which provides an IO interface to the file. However, deno's open function returns a resource id. ### deno ```js > const fs = await import("node:fs/promises"); undefined > const file3 = await fs.open("./README.md"); undefined > file3 3 > file3.read undefined Node: ``` ### Node ```js > const fs = await import("fs/promises"); undefined > const file3 = await fs.open("./tests/e2e_unit/testdata/file.txt"); undefined > file3 FileHandle { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, close: [Function: close], [Symbol(kCapture)]: false, [Symbol(kHandle)]: FileHandle {}, [Symbol(kFd)]: 24, [Symbol(kRefs)]: 1, [Symbol(kClosePromise)]: null } > file3.read [Function: read] ``` To be compatible with Node, deno's open function should also return a FileHandle. ## WHAT I have implemented the first step in adding a FileHandle. - Changed the return value of the open function to a FileHandle object - Implemented the readFile method in FileHandle - Add test code ## What to do next This PR is the first step in adding a FileHandle, and there are things that should be done next. - Add functionality equivalent to Node's FileHandle to FileHandle (currently there is only readFile) --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-06-02chore(tools): Add core import-map (#19346)Aapo Alasuutari
Adds an import map of the core and ext JavaScript files. This was created manually but a script to create one automatically wouldn't be too much of a big thing either. This should make working on especially the Node polyfills much more pleasant, as it gives you feedback on if your imports are correct. Unfortunately the TypeScript declaration files of some of the internal modules clash with the import map and override the data from the actual files with data from the declaration files. Those do not contain all exports nor is their data always up to date. Still, this is much better than not having one.
2023-06-02chore(node_compat): fix path strings generated by `setup.ts` (#19347)Hirotaka Tagawa / wafuwafu13
2023-06-02fix(node): don't close stdio streams (#19256)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19255 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-06-01chore(core): Update certs for WPT (#19351)Matt Mastracci
2023-06-01chore(ext/http): add env var to disable writev syscall (#19338)Bartek Iwańczuk
2023-06-01chore(node_compat): add deno task for setting up and running tests (#19293)Hirotaka Tagawa / wafuwafu13