summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2023-11-18chore: update wpt (#21255)Leo Kettmeir
2023-11-17chore: bump deno_core (#21242)Matt Mastracci
2023-11-17chore(tools): update release_doc_template.md (#21230)Yoshiya Hinosawa
2023-11-13chore: update wpt (#21178)Leo Kettmeir
For #20849
2023-11-13feat(ext/web): add `AbortSignal.any()` (#21087)Kenta Moriuchi
Fixes #18944
2023-11-10chore: give suggestion on PR open failure (#21145)Divy Srivastava
2023-11-08chore: remove op_baseline and flamebench (#21120)Matt Mastracci
ops are better tested in deno_core, and flamebench has rotted quite a bit.
2023-11-02chore: fix dlint version and sanity check version after download (#21058)Matt Mastracci
Follow-up to fix version error introduced in #21014
2023-11-01feat(ext/websocket): websockets over http2 (#21040)Matt Mastracci
Implements `WebSocket` over http/2. This requires a conformant http/2 server supporting the extended connect protocol. Passes approximately 100 new WPT tests (mostly `?wpt_flags=h2` versions of existing websockets APIs). This is implemented as a fallback when http/1.1 fails, so a server that supports both h1 and h2 WebSockets will still end up on the http/1.1 upgrade path. The patch also cleas up the websockets handshake to split it up into http, https+http1 and https+http2, making it a little less intertwined. This uncovered a likely bug in the WPT test server: https://github.com/web-platform-tests/wpt/issues/42896
2023-11-01feat(cron) implement Deno.cron() (#21019)Igor Zinkovsky
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs. * State: All cron state is in memory. Cron jobs are scheduled according to the cron schedule expression and the current time. No state is persisted to disk. * Time zone: Cron expressions specify time in UTC. * Overlapping executions: not permitted. If the next scheduled execution time occurs while the same cron job is still executing, the scheduled execution is skipped. * Retries: failed jobs are automatically retried until they succeed or until retry threshold is reached. Retry policy can be optionally specified using `options.backoffSchedule`.
2023-11-01fix(ext/node): adapt dynamic type checking to Node.js behavior (#21014)Kenta Moriuchi
2023-10-31feat(ext/web): EventSource (#14730)Leo Kettmeir
Closes #10298 --------- Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-10-30fix: implement node:tty (#20892)Divy Srivastava
Fixes #21012 Closes https://github.com/denoland/deno/issues/20855 Fixes https://github.com/denoland/deno/issues/20890 Fixes https://github.com/denoland/deno/issues/20611 Fixes https://github.com/denoland/deno/issues/20336 Fixes `create-svelte` from https://github.com/denoland/deno/issues/17248 Fixes more reports here: - https://github.com/denoland/deno/issues/6529#issuecomment-1432690559 - https://github.com/denoland/deno/issues/6529#issuecomment-1522059006 - https://github.com/denoland/deno/issues/6529#issuecomment-1695803570
2023-10-30chore: upgrade rsa to 0.9 (#21016)Divy Srivastava
2023-10-25feat(unstable): ability to `npm install` then `deno run main.ts` (#20967)David Sherret
This PR adds a new unstable "bring your own node_modules" (BYONM) functionality currently behind a `--unstable-byonm` flag (`"unstable": ["byonm"]` in a deno.json). This enables users to run a separate install command (ex. `npm install`, `pnpm install`) then run `deno run main.ts` and Deno will respect the layout of the node_modules directory as setup by the separate install command. It also works with npm/yarn/pnpm workspaces. For this PR, the behaviour is opted into by specifying `--unstable-byonm`/`"unstable": ["byonm"]`, but in the future we may make this the default behaviour as outlined in https://github.com/denoland/deno/issues/18967#issuecomment-1761248941 This is an extremely rough initial implementation. Errors are terrible in this and the LSP requires frequent restarts. Improvements will be done in follow up PRs.
2023-10-11feat(WebSocketStream): rename connection to opened (#20878)Leo Kettmeir
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