summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
2024-11-16feat(jupyter): Add `Deno.jupyter.image` API (#26284)Bartek Iwańczuk
This commit adds `Deno.jupyter.image` API to display PNG and JPG images: ``` const data = Deno.readFileSync("./my-image.jpg"); Deno.jupyter.image(data); Deno.jupyter.image("./my-image.jpg"); ```
2024-11-15feat(fetch): accept async iterables for body (#26882)Luca Casonato
Reland of #24623, but with a fix for `String` objects. Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-11-13feat(ext/fs): add ctime to Deno.stats and use it in node compat layer (#24801)Łukasz Czerniawski
This PR fixes #24453, by introducing a ctime (using ctime for UNIX and ChangeTime for Windows) to Deno.stats. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-11-12fix(ext/websocket): initialize `error` attribute of WebSocket ErrorEvent ↵Divy Srivastava
(#26796) Fixes https://github.com/denoland/deno/issues/26216 Not required by the spec but Discord.js depends on it, see https://github.com/denoland/deno/issues/26216#issuecomment-2466060306
2024-11-08feat(ext/http): abort event when request is cancelled (#26781)Divy Srivastava
```js Deno.serve(async (req) => { const { promise, resolve } = Promise.withResolvers<void>(); req.signal.addEventListener("abort", () => { resolve(); }); await promise; return new Response("Ok"); }); ```
2024-11-07chore: make commandWithCwdIsAsync test less flaky (#26770)Nathan Whitaker
2024-11-07feat(ext/http): abort signal when request is cancelled (#26761)Divy Srivastava
Closes https://github.com/denoland/deno/issues/21653
2024-11-04chore: update dlint to v0.68.0 for internal (#26711)Kenta Moriuchi
2024-10-22fix(ext/console): ignore casing for named colors in css parsing (#26466)Leo Kettmeir
2024-10-22refactor(runtime/ops): use concrete error types (#26409)Leo Kettmeir
2024-10-14fix(console/ext/repl): support using parseFloat() (#25900)Mohammad Sulaiman
Fixes #21428 Co-authored-by: tannal <tannal2409@gmail.com>
2024-10-08fix(console): missing cause property on non-error objects (#26061)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26047
2024-10-07fix(ext/webstorage): make `getOwnPropertyDescriptor` with symbol return ↵Leo Kettmeir
`undefined` (#13348) Closes #13347
2024-10-04refactor: improve node permission checks (#26028)David Sherret
Does less work when requesting permissions with `-A`
2024-10-03fix(ext/crypto): fix identity test for x25519 derive bits (#26011)Divy Srivastava
2024-10-02Revert "fix(urlpattern): fallback to empty string for undefined group ↵Leo Kettmeir
values" (#25961)
2024-09-27fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of ↵Nathan Whitaker
env var (#25896) Fixes https://github.com/denoland/deno/issues/25401. Fixes https://github.com/denoland/deno/issues/25841. Fixes https://github.com/denoland/deno/issues/25891.
2024-09-27BREAKING(ext/net): improved error code accuracy (#25383)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-24fix: better error for Deno.UnsafeWindowSurface, correct HttpClient name, ↵Leo Kettmeir
cleanup unused code (#25833)
2024-09-23feat(ext/crypto): import and export p521 keys (#25789)Divy Srivastava
Towards https://github.com/denoland/deno/issues/13449
2024-09-23fix(ext/web): don't ignore capture in EventTarget.removeEventListener (#25788)carles escrig royo
2024-09-22BREAKING(webgpu/unstable): move `width` and `height` options to ↵Divy Srivastava
`UnsafeWindowSurface` constructor (#24200) Fixes https://github.com/denoland/deno/issues/23508 `width` and `height` are required to configure the wgpu surface because Deno is headless and depends on user to create a window. The options were non-standard extension of `GPUCanvasConfiguration#configure`. This PR adds a required options parameter with the `width` and `height` options to `Deno.UnsafeWindowSurface` constructor. ```typescript // Old, non-standard extension of GPUCanvasConfiguration const surface = new Deno.UnsafeWindowSurface("x11", displayHandle, windowHandle); const context = surface.getContext(); context.configure({ width: 600, height: 800, /* ... */ }); ``` ```typescript // New const surface = new Deno.UnsafeWindowSurface({ system: "x11", windowHandle, displayHandle, width: 600, height: 800, }); const context = surface.getContext(); context.configure({ /* ... */ }); ```
2024-09-20perf(ext/web): optimize performance.measure() (#25774)carles escrig royo
This PR optimizes the case when `performance.measure()` needs to find the startMark by name. It is a simple change on `findMostRecent` fn to avoiding copying and reversing the complete entries list. Adds minor missing tests for: - `clearMarks()`, general - `clearMeasures()`, general - `measure()`, case when the startMarks name exists more than once ### Benchmarks #### main ``` CPU | AMD Ryzen 7 PRO 6850U with Radeon Graphics Runtime | Deno 2.0.0-rc.4 (x86_64-unknown-linux-gnu) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ---------------------- ----------------------------- --------------------- -------------------------- worst case measure() 2.1 ms 486.9 ( 1.7 ms … 2.4 ms) 2.2 ms 2.4 ms 2.4 ms ``` #### this PR ``` CPU | AMD Ryzen 7 PRO 6850U with Radeon Graphics Runtime | Deno 2.0.0-rc.4 (x86_64-unknown-linux-gnu) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ---------------------- ----------------------------- --------------------- -------------------------- worst case measure() 966.3 µs 1,035 (876.9 µs … 1.1 ms) 1.0 ms 1.1 ms 1.1 ms ``` ```ts Deno.bench("worst case measure()", (b) => { performance.mark('start'); for (let i = 0; i < 1e5; i += 1) { performance.mark(crypto.randomUUID()); } b.start(); performance.measure('total', 'start'); b.end(); performance.clearMarks(); performance.clearMeasures(); }); ```
2024-09-19refactor(ext/kv): align error messages (#25500)Ian Bull
Towards https://github.com/denoland/deno/issues/25269
2024-09-19refactor(ext/webgpu): align error messages (#25719)Ian Bull
Aligns the error messages in the ext/webgpu folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-18refactor(ext): align error messages (#25496)Ian Bull
Aligns the error messages in the ext/http and a few messages in the ext/fetch folder to be in-line with the Deno style guide. This change-set also removes some unnecessary checks in the 00_serve.ts. These options were recently removed, so it doesn't make sense to check for them anymore. https://github.com/denoland/deno/issues/25269
2024-09-18fix(ext/http): gracefully handle Response.error responses (#25712)Luca Casonato
Fixes #14371
2024-09-18feat(check): turn on noImplicitOverride (#25695)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/11836 Ref https://github.com/denoland/deno/issues/25162
2024-09-18tests: re-enable WebGPU tests on macOS aarch64 (#25702)Luca Casonato
2024-09-17chore(fs): undeprecate `Deno.FsWatcher.prototype.return()` (#25623)Asher Gomez
2024-09-16refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508)David Sherret
This makes the permission system more versatile.
2024-09-16fix(runtime): don't error `child.output()` on consumed stream (#25657)Luca Casonato
This fixes the fast path for `readableStreamCollectIntoUint8Array` to only trigger if the readable stream has not yet been disturbed - because otherwise we may not be able to close it if the read errors.
2024-09-14feat: print `Listening on` messages on stderr instead of stdout (#25491)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/25114 --------- Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
2024-09-14feat: TypeScript 5.6 and `npm:@types/node@22` (#25614)David Sherret
2024-09-13refactor(runtime): align error messages (#25563)Ian Bull
Aligns the error messages in the runtime folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-12fix(ext/console): prevent duplicate error printing when the cause is ↵MujahedSafaa
assigned (#25327) This commit fixes the error format when the cause is assigned separately, ensuring that the cause is only printed once instead of twice. The fix addresses issue [#21651](https://github.com/denoland/deno/issues/21651).
2024-09-12test: remove `DENO_FUTURE` (#25587)Asher Gomez
2024-09-11BREAKING(net): remove `Deno.[Tls]Listener.prototype.rid` (#25556)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-10BREAKING(net): remove ↵Asher Gomez
`Deno.ConnectTlsOptions.{certChain,certFile,privateKey}` and `Deno.ListenTlsOptions.certChain,certFile,keyFile}` (#25525) Towards #22079
2024-09-11BREAKING(fs): remove `Deno.FsFile.prototype.rid` (#25499)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-10feat(cli): use NotCapable error for permission errors (#25431)Luca Casonato
Closes #7394 --------- Co-authored-by: snek <snek@deno.com>
2024-09-10test: remove usage of `--unstable` flag (#25549)Bartek Iwańczuk
This commit removes all occurrences of `--unstable` flag from all the tests that are run in CI. Turns out none of the tests actually required that flag anymore.
2024-09-09BREAKING(fs): remove `Deno.fsync[Sync]()` (#25448)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-10BREAKING(io): remove `Deno.{Reader,Writer}[Sync]` and `Deno.Closer` (#25524)Asher Gomez
2024-09-09BREAKING(fs): remove `Deno.fdatasync[Sync]()` (#25520)Asher Gomez
2024-09-06BREAKING(net): remove `Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid` ↵Asher Gomez
(#25446) Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-07chore: soft-remove `Deno.{stdin,stderr,stdout}.rid` (#25479)Asher Gomez
Towards #22079
2024-09-06fix: invalid ipv6 hostname on `deno serve` (#25482)Marvin Hagemeister
This PR fixes an invalid URL being printed when running `deno serve` Before: invalid URL ```sh $ deno serve --host localhost deno serve: Listening on http://::1:8000/ ``` After: valid URL ```sh $ deno serve --host localhost deno serve: Listening on http://[::1]:8000/ ```
2024-09-06BREAKING(buffer): remove `Deno.Buffer` (#25441)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06chore(net): soft-remove `Deno.serveHttp()` (#25451)Asher Gomez
Towards #22079 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>