Matt Mastracci
2fc8d2a354
chore: completely disable websocketstream_test ( #22360 )
2024-02-09 02:09:19 +00:00
Matt Mastracci
a417772bd7
chore: Promote some integration tests to js_unit_tests ( #22355 )
...
- Move a workers test to js_unit_tests and make it work
- (slightly) repair the websocketstream_test and make it a JS unit test.
This test was being ignored and rotted quite a bit, but there's some
value in running as much of it as we can.
- Merge the two websocket test files
2024-02-08 13:09:47 -07:00
Matt Mastracci
ffbb1bad03
chore(cli): Use @test_util for relative path for unit tests ( #22327 )
...
This removes the majority of `../../../../../../test_util` relative
imports from the codebase, allowing us to move this code more easily in
the future.
2024-02-07 09:51:28 -07:00
Bartek Iwańczuk
7c111da5f6
fix: Support Symbol.metadata ( #22282 )
...
This commit adds support for "Symbol.metadata" which was
omitted when adding support for the Decorators Proposal.
Closes https://github.com/denoland/deno/issues/22111
2024-02-06 14:57:25 +01:00
Bartek Iwańczuk
07a94984e1
chore: remove opcall_test.ts ( #22227 )
...
This test should be in `deno_core`.
Ref https://github.com/denoland/deno_core/issues/533
2024-02-04 12:10:24 -07:00
Bartek Iwańczuk
13a91a69f8
refactor: remove imported ops from Deno.core.ops ( #22194 )
...
This commit adds a list of ops to `runtime/99_main.js` that are
currently relying on getting them from `Deno.core.ops`. All ops that are not
present in the list are removed from `Deno.core.ops` on startup (they are
imported from "virtual op module" - `ext:core/ops`) making them effectively
inaccessible to user code.
This change lowers the number of ops exposed to user code from 650 to
around 260. This number should be gradually decreased in follow-up PRs.
2024-01-31 22:39:56 +01:00
Leo Kettmeir
8f76762793
feat(web): ImageBitmap ( #21898 )
2024-01-22 12:08:01 +01:00
Bartek Iwańczuk
3e68114736
chore: increase unit test timeout to 3m ( #21760 )
...
Alternative to #21758 to fix timing out tests on Windows.
2024-01-02 16:56:52 +01:00
David Sherret
7e72f3af61
chore: update copyright to 2024 ( #21753 )
2024-01-01 19:58:21 +00:00
Leo Kettmeir
393abed387
feat: bring back WebGPU ( #20812 )
...
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-09 01:19:16 +01:00
Jamie
8c0fb9003d
feat(ext/web): add ImageData Web API ( #21183 )
...
Fixes #19288
Adds the `ImageData` Web API.
This would be beneficial to projects using `ImageData` as a convenient
transport layer for pixel data. This is common in Web Assembly projects
that manipulate images. Having this global available in Deno would
improve compatibility of existing JS libraries.
**References**
- [MDN ImageData Web
API](https://developer.mozilla.org/en-US/docs/Web/API/ImageData )
- [whatwg HTML Standard Canvas
Spec](https://html.spec.whatwg.org/multipage/canvas.html#pixel-manipulation )
2023-12-06 14:20:28 +01:00
Raashid Anwar
cac17267fb
fix(ext/kv): throw error if already closed ( #21459 )
...
If KV is closed and tries to listen queue should throw an error
closes #20991
2023-12-05 10:16:47 -08:00
David Sherret
29011d5929
chore: various improvements to tests ( #21222 )
2023-11-17 10:05:42 -05:00
Matt Mastracci
485fade0b6
chore: migrate to new deno_core and metrics ( #21057 )
...
- Uses the new OpMetrics system for sync and async calls
- Partial revert of #21048 as we moved Array.fromAsync upstream to
deno_core
2023-11-05 14:27:36 -07:00
Igor Zinkovsky
01d3e0f317
feat(cron) implement Deno.cron() ( #21019 )
...
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-01 11:57:55 -07:00
Matt Mastracci
b75f3b5ca0
feat(ext/websocket): split websocket read/write halves ( #20579 )
...
Fixes some UB when sending and receiving at the same time.
2023-10-30 11:49:19 -06:00
Bartek Iwańczuk
46a4bd5178
feat(unstable): add Deno.jupyter.broadcast
API ( #20656 )
...
Closes https://github.com/denoland/deno/issues/20591
---------
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-27 02:21:06 +02:00
Igor Zinkovsky
441b860978
fix(ext/kv): don't panic if listening on queues and KV is not closed ( #20317 )
...
fixes #20312
2023-08-29 11:24:44 -07:00
Matt Mastracci
23ff0e722e
feat(ext/web): resourceForReadableStream ( #20180 )
...
Extracted from fast streams work.
This is a resource wrapper for `ReadableStream`, allowing us to treat
all `ReadableStream` instances as resources, and remove special paths in
both `fetch` and `serve`.
Performance with a ReadableStream response yields ~18% improvement:
```
return new Response(new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]));
controller.close();
}
})
```
This patch:
```
12:36 $ third_party/prebuilt/mac/wrk http://localhost:8080
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 99.96us 100.03us 6.65ms 98.84%
Req/Sec 47.73k 2.43k 51.02k 89.11%
959308 requests in 10.10s, 117.10MB read
Requests/sec: 94978.71
Transfer/sec: 11.59MB
```
main:
```
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 163.03us 685.51us 19.73ms 99.27%
Req/Sec 39.50k 3.98k 66.11k 95.52%
789582 requests in 10.10s, 82.83MB read
Requests/sec: 78182.65
Transfer/sec: 8.20MB
```
2023-08-17 07:52:37 -06:00
Igor Zinkovsky
fd9d6baea3
feat(kv) queue implementation ( #19459 )
...
Extend the unstable `Deno.Kv` API to support queues.
2023-06-13 17:49:57 -07:00
Matt Mastracci
612226de8e
chore(cli): One Rust test per JS and Node unit test file ( #19199 )
...
This runs our `js_unit_tests` and `node_unit_tests` in parallel, one
rust test per JS unit test file. Some of our JS tests don't like running
in parallel due to port requirements, so this also makes those use a
specific port-per-file. This does not attempt to make the node-compat
tests work.
2023-05-22 13:35:59 -06:00
Bartek Iwańczuk
683dbd7f3b
Revert "refactor: don't expose Deno[Deno.internal].core namespace" ( #18881 )
...
Also conditionally disabled one test if there's not enough space on
device.
2023-04-28 00:37:03 +02:00
Bartek Iwańczuk
14aaa73c02
refactor: don't expose Deno[Deno.internal].core namespace ( #18816 )
2023-04-26 19:57:38 +02:00
Bartek Iwańczuk
2846bbe0a3
refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally ( #18568 )
...
This commit changes implementation of "Deno.serve()" API to use
"Deno.serveHttp()" under the hood. This change will allow us to
remove the "flash" server implementation, bringing stability to the
"Deno.serve()" API.
"cli/tests/unit/flash_test.ts" was renamed to "serve_test.ts".
Closes https://github.com/denoland/deno/issues/15574
Closes https://github.com/denoland/deno/issues/15504
Closes https://github.com/denoland/deno/issues/15646
Closes https://github.com/denoland/deno/issues/15909
Closes https://github.com/denoland/deno/issues/15911
Closes https://github.com/denoland/deno/issues/16828
Closes https://github.com/denoland/deno/issues/18046
Closes https://github.com/denoland/deno/issues/15869
2023-04-03 17:44:18 +02:00
Matt Mastracci
79fb3b1f35
chore(cli): ensure no signal on test exit ( #18354 )
...
If deno crashes on exit, we get a failure on the exit code (None instead
of Some(0) but we never see the signal.
2023-03-22 18:00:07 +00:00
Matt Mastracci
42d13c4e6a
chore(cli): disable flash_test as it is causing SIGSEGV ( #18358 )
2023-03-22 13:42:50 -04:00
Bartek Iwańczuk
9e282155b7
tests: move integration tests to a single module ( #17380 )
...
Effectively reverts changes done in
https://github.com/denoland/deno/pull/16816
2023-01-13 02:59:13 +01:00