summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2023-10-10feat(ext/web): cancel support for TransformStream (#20815)Luca Casonato
2023-10-10fix(ext/web): writability of `ReadableStream.from` (#20836)Luca Casonato
Fixes a WPT in `URL` and `ReadableStream`. Some unrelated WPT expectation changes due to WPT update.
2023-10-08fix(node/buffer): utf8ToBytes should return a Uint8Array (#20769)Aapo Alasuutari
2023-09-30test(node_compat): add `test-http-url.parse*` (#20458)Hirotaka Tagawa / wafuwafu13
Add `test-http-url.parse*` tests for Node compat.
2023-09-27chore: add back dotcom step to release (#20713)David Sherret
Accidentally removed in https://github.com/denoland/deno/commit/69b7166c20b47d320fc85e33dca9414c92ec9c6f
2023-09-26chore: clean up lint script (#20682)Luca Casonato
Right now, if one of the linters fails, the all other ones continue running in the background. This fixes this by waiting until all linters are done before settling.
2023-09-23fix(node): supported arguments to `randomFillSync` (#20637)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20634
2023-09-20chore: update manual instructions for doing a release (#20578)David Sherret
2023-09-13chore(test_util): ensure that extra expectations are an error even without a ↵Matt Mastracci
filter (#20483) Running `tools/wpt.ts` with a filter would cause an error if there were extra, leftover expectations in expectations.json. These errors would not appear if no filter was passed, often leaving the filtered version of the test runner broken. This also introduces a smarter bit of logic where filters can be specified with a leading slash (`tools/wpt.ts run -- /url` is equivalent to `tools/wpt.ts run -- url`)
2023-09-13chore: bump deno_core and cargo update (#20480)Matt Mastracci
Bump deno_core, pulling in new rusty_v8. Requires some op2/deprecation fixes.
2023-09-07chore: make downloadPrebuilt a little more reliable (#20401)Matt Mastracci
Makes the prebuilt installation a bit more reliable: - Check for 200 - Check for an executable header (MZ, ELF, etc) - Download to a .temp file until we're certain the file is valid - If multiple requests for a tool are made, only run one task
2023-09-07feat: support import attributes (#20342)David Sherret
2023-09-06chore: pin third_party (#20386)David Sherret
2023-09-04chore: disable 'test-http-content-length.js` test (#20344)Bartek Iwańczuk
2023-09-03chore(release): fix workspace formatter (#20357)Divy Srivastava
2023-08-30chore: bump deno_core to 0.207.0 (#20333)Matt Mastracci
rusty_v8 -> "0.75.1"
2023-08-28fix(node/http): correctly send `Content-length` header instead of ↵osddeitf
`Transfer-Encoding: chunked` (#20127) Fix #20063.
2023-08-23fix(ext/web): add stream tests to detect v8slice split bug (#20253)Matt Mastracci
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-21refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193)David Sherret
2023-08-19chore: remove third_party submodule (#20201)Divy Srivastava
removes third_party submodule, tools are installed on-demand. - removed `load_test` and websocket benchmark (covered by benchy) - removed node/bun http benchmarks (covered by benchy) - `dlint` & `dprint` downloaded on-demand. - `wrk` & `hyperfine` downloaded before CI benchmark run. Install locally using: `./tools/install_prebuilt.js wrk hyperfine` #### updating dlint/dprint update version in `tools/util.js` and place binary in `denoland/deno_third_party`.
2023-08-17perf(ext/event): optimize Event constructor (#20181)Marcos Casagrande
This PR optimizes `Event` constructor - ~Added a fast path for empty `eventInitDict`~ Removed `EventInit` dictionary converter - Don't make `isTrusted` a [LegacyUnforgeable](https://webidl.spec.whatwg.org/#LegacyUnforgeable) property. Doing so makes it non-spec compliant but calling `Object/Reflect.defineProperty` on the constructor is a big bottleneck. Node did the same a few months ago https://github.com/nodejs/node/pull/46974. In my opinion, the performance gains are worth deviating from the spec for a browser-related property. **This PR** ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.36.1 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ------------------------------------------------------------------------------- ----------------------------- event constructor no init 36.69 ns/iter 27,257,504.6 (33.36 ns … 42.45 ns) 37.71 ns 39.61 ns 40.07 ns event constructor 36.7 ns/iter 27,246,776.6 (33.35 ns … 56.03 ns) 37.73 ns 40.14 ns 41.74 ns ``` **main** ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.36.1 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ------------------------------------------------------------------------------- ----------------------------- event constructor no init 380.48 ns/iter 2,628,275.8 (366.66 ns … 399.39 ns) 384.58 ns 398.27 ns 399.39 ns event constructor 480.33 ns/iter 2,081,882.6 (466.67 ns … 503.47 ns) 484.27 ns 501.28 ns 503.47 ns ``` ```js Deno.bench("event constructor no init", () => { const event = new Event("foo"); }); Deno.bench("event constructor", () => { const event = new Event("foo", { bubbles: true, cancelable: false }); }); ``` towards https://github.com/denoland/deno/issues/20167
2023-08-15fix(runtime): navigator.userAgent in web worker (#20129)await-ovo
Fixes https://github.com/denoland/deno/issues/20079 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-15fix(ext/fetch): clone second branch chunks in Body.clone() (#20057)Marcos Casagrande
This PR makes `Body.clone()` spec compliant: https://fetch.spec.whatwg.org/#concept-body-clone > 1, Let « out1, out2 » be the result of [teeing](https://streams.spec.whatwg.org/#readablestream-tee) body’s [stream](https://fetch.spec.whatwg.org/#concept-body-stream). > ... > To tee a [ReadableStream](https://streams.spec.whatwg.org/#readablestream) stream, return ? [ReadableStreamTee](https://streams.spec.whatwg.org/#readable-stream-tee)(stream, true). --- Closes #10994
2023-08-12chore: deno_core -> 0.201.0 (#20135)Matt Mastracci
2023-08-08fix(ext/abort): trigger AbortSignal events in correct order (#20095)Marcos Casagrande
This PR ensures that the original signal event is fired before any dependent signal events. --- The enabled tests fail on `main`: ``` assert_array_equals: Abort events fired in correct order expected property 0 to be "original-aborted" but got "clone-aborted" (expected array ["original-aborted", "clone-aborted"] got ["clone-aborted", "original-aborted"]) ```
2023-08-05chore: use zlib-ng for flate2 (#20059)Matt Mastracci
Extracted from PR #16011
2023-08-05chore(wpt): expose gc (#20060)Marcos Casagrande
This PR exposes garbage collector for WPT see: https://github.com/web-platform-tests/wpt/blob/3d80f7e87928e2d0da25d1c60a13dab001332139/common/gc.js#L34-L36 ``` /streams/readable-streams/garbage-collection.any.html test stderr: Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. file result: ok. 4 passed; 0 failed; 0 expected failure; total 4 (255ms) ---------------------------------------- /streams/readable-streams/garbage-collection.any.worker.html test stderr: Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal. file result: ok. 4 passed; 0 failed; 0 expected failure; total 4 (277ms) ``` This PR removes that warning and improves coverage.
2023-08-04fix(ext/file): resolve unresolved Promise in Blob.stream (#20039)Marcos Casagrande
This PR fixes some crashing WPT tests due to an unresolved promise. --- This could be a [stream spec](https://streams.spec.whatwg.org) bug When `controller.close` is called on a byob stream, there's no cleanup of pending `readIntoRequests`. The only cleanup of pending `readIntoRequests` happen when `.byobRequest.respond(0)` is called, it happens here:https://github.com/denoland/deno/blob/6ba245fe2570b29e35a4fd296a196a58870b1e3c/ext/web/06_streams.js#L2026 which ends up calling `readIntoRequest.closeSteps(chunk);` in https://github.com/denoland/deno/blob/6ba245fe2570b29e35a4fd296a196a58870b1e3c/ext/web/06_streams.js#L2070 To reproduce: ```js async function byobRead() { const input = [new Uint8Array([8, 241, 48, 123, 151])]; const stream = new ReadableStream({ type: "bytes", async pull(controller) { if(input.length === 0) { controller.close(); // controller.byobRequest.respond(0); // uncomment for fix return } controller.enqueue(input.shift()) }, }); const reader = stream.getReader({ mode: 'byob' }); const r1 = await reader.read(new Uint8Array(64)); console.log(r1); const r2 = await reader.read(new Uint8Array(64)); console.log(r2); } await byobRead(); ``` Running the script triggers: ``` error: Top-level await promise never resolved ```
2023-07-31fix: call setIsTrusted for generated events (MessageEvent) (#19919)Ricardo Iván Vieitez Parra
This addresses issue #19918. ## Issue description Event messages have the wrong isTrusted value when they are not triggered by user interaction, which differs from the browser. In particular, all MessageEvents created by Deno have isTrusted set to false, even though it should be true. This is my first ever contribution to Deno, so I might be missing something.
2023-07-30fix(ext/compression): throw TypeError on corrupt input (#19979)Marcos Casagrande
`TypeError` should be thrown when decompressing a corrupt input
2023-07-28refactor(cli/tools): split bench into multiple modules (#19974)Bartek Iwańczuk
I was asked to add "iter/s" to the benchmark output, before attempting that I wanted to split this into multiple modules.
2023-07-28feat(ext/websocket): allow HTTP(S) protocol in URL (#19862)Leo Kettmeir
Closes #19093
2023-07-02refactor: rename built-in node modules from ext:deno_node/ to node: (#19680)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19510
2023-07-02feat: ReadableStream.from (#19446)Leo Kettmeir
Closes #19417
2023-07-02feat(ext/url): URLSearchParams two-argument delete() and has() (#19654)Lino Le Van
2023-07-02feat(ext/fetch): add Headers#getSetCookie (#13542)Luca Casonato
Spec change: https://github.com/whatwg/fetch/pull/1346 Tests: https://github.com/web-platform-tests/wpt/pull/31442 (ran against this PR and they all pass) --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-29fix(ext/websocket): Ensure that errors are available after async response ↵Matt Mastracci
returns (#19642) Fixes the WPT tests that test w/invalid codes. Also explicitly ignoring some h2 tests to hopefully prevent flakes. The previous changes to WebSocketStream introduced a bug where the close errors were not made available if the `pull` method was re-entrant.
2023-06-27chore(ext/node): disable prefer-primordials on a per-file basis (#19553)Kenta Moriuchi
2023-06-26chore: Ensure copyright line is the first in the file (#19608)Matt Mastracci
The copyright checker was allowing files with code above the copyright line in a few places, mainly as a result of IDEs ordering imports improperly. This makes the check more robust, and adds a whitelist of valid lines that may appear before the copyright line.
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-25chore: disable /websocket/stream/tentative/close.any.worker.html?wss (#19606)Bartek Iwańczuk
This test is very flaky.
2023-06-24fix(ext/node): support brotli APIs (#19223)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-12feat: Adaptations to support OpenBSD port (#19153)VlkrS
2023-06-09chore: update release doc template (#19441)Bartek Iwańczuk
That action is not working properly.
2023-06-08chore: update wpt (#19422)Leo Kettmeir
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-05fix(ext/crypto): fix JWK import of Ed25519 (#19279)Levente Kurusa
Fixes: #18049 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.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-01chore(core): Update certs for WPT (#19351)Matt Mastracci