Commit Graph

575 Commits

Author SHA1 Message Date
denobot
d14b77b58e
1.21.3 (#14580) 2022-05-12 16:14:11 +02:00
David Sherret
88cb62cce7
fix: stdout and stderr encoding on Windows (#14559) 2022-05-12 14:16:51 +02:00
David Sherret
d0ee4cd829
refactor: StdFileResource - remove unused cancel handle (#14558) 2022-05-12 14:16:51 +02:00
David Sherret
283f63be40
refactor: remove unused Options on StdFileResource.fs_file (#14549) 2022-05-12 14:16:51 +02:00
Nayeem Rahman
7e530ce1c9
fix(runtime/web_worker): Use biased select when getting module result (#14553) 2022-05-12 14:16:51 +02:00
denobot
2256c697ae
1.21.2 (#14504)
1.21.2
2022-05-05 16:56:49 -04:00
Luca Casonato
12bed56e15
chore: update deps (#14416) 2022-05-05 15:16:36 -04:00
Bartek Iwańczuk
81fd78ae7d
refactor: add core.formatLocationFilename, remove op_format_filename (#14474)
This commit moves "op_format_location" to "core/ops_builtin.rs"
and removes "Deno.core.createPrepareStackTrace" in favor of
"Deno.core.prepareStackTrace".

Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-05 15:16:36 -04:00
Aaron O'Mullan
2080ea6f52
fix(runtime): lossy utf8 readTextFile (#14456) 2022-05-05 13:55:26 -04:00
David Sherret
3d9aecfa7a
fix(test): actually capture stdout and stderr in workers (#14435) 2022-05-05 13:55:13 -04:00
denobot
58bedd8d84
1.21.1 (#14425) 2022-04-28 22:33:09 +02:00
Andreu Botella
e1437d3f51
fix(workers): Make worker.terminate() not block the current thread (#13941)
Calling `worker.terminate()` used to kill the worker's isolate and
then block until the worker's thread finished. This blocks the calling
thread if the worker's event loop was blocked in a sync op (as with
`Deno.sleepSync`), which wasn't realized at the time, but since the
worker's isolate was killed at that moment, it would not block the
calling thread if the worker was in a JS endless loop.

However, in #12831, in order to work around a V8 bug, worker
termination was changed to first set a signal to let the worker event
loop know that termination has been requested, and only kill the
isolate if the event loop has not finished after 2 seconds. However,
this change kept the blocking, which meant that JS endless loops in
the worker now blocked the parent for 2 seconds.

As it turns out, after #12831 it is fine to signal termination and
even kill the worker's isolate without waiting for the thread to
finish, so this change does that. However, that might leave the async
ops that receive messages and control data from the worker pending
after `worker.terminate()`, which leads to odd results from the op
sanitizer. Therefore, we set up a `CancelHandler` to cancel those ops
when the worker is terminated.
2022-04-28 19:17:56 +02:00
Aaron O'Mullan
2014f47bd3
perf(runtime): read entire files in single ops (#14261)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-04-28 19:17:52 +02:00
Nayeem Rahman
b7d63eace8
refactor: Remove PrettyJsError and js_error_create_fn (#14378)
This commit:
- removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn
- removes "deno_core::JsError::create" and 
"deno_core::RuntimeOptions::js_error_create_fn"
- adds new option to "deno_runtime::ops::worker_host::init"
2022-04-28 19:17:48 +02:00
David Sherret
23b4a360bb
fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-28 19:17:44 +02:00
David Sherret
33e5da0d68
fix(test): capture inherited stdout and stderr for subprocesses in test output (#14395) 2022-04-28 19:17:36 +02:00
David Sherret
4569851c03
refactor(ops/process): add StdioOrRid enum (#14393) 2022-04-28 19:17:23 +02:00
Aaron O'Mullan
0c9f11bacf
chore: deno_http v0.43.1 (#14392) 2022-04-28 19:17:21 +02:00
Bartek Iwańczuk
37e534dac5
feat: change shade of "gray" color in eye-catchers (#14309)
This commit changes "gray" color for eye-catchers to use 
Ansi(245) color.
2022-04-28 19:15:47 +02:00
Nayeem Rahman
bf5eea0cc6
fix(runtime/js/spawn): Pass stdio options for spawn() and spawnSync() (#14358) 2022-04-28 19:15:43 +02:00
evan
9ae677ef6a
fix(bench): eliminate sanitizeExit overhead (#14361) 2022-04-28 19:15:31 +02:00
Luca Casonato
d14bd135ab
chore: bump crates (#14365) 2022-04-28 19:15:20 +02:00
Divy Srivastava
fe40451a15
Reland "perf(http): optimize ReadableStreams backed by a resource" (#14346) 2022-04-28 19:15:08 +02:00
denobot
29c8cd8aae
1.21.0 (#14336)
Co-authored-by: ry <ry@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-20 21:50:16 -04:00
Bartek Iwańczuk
03019e7781
Revert various PRs related to "ext/http" (#14339)
* Revert "feat(ext/http): stream auto resp body compression (#14325)"
* Revert "core: introduce `resource.read_return` (#14331)"
* Revert "perf(http): optimize `ReadableStream`s backed by a resource (#14284)"
2022-04-21 02:22:55 +02:00
Leo Kettmeir
8a7539cab3
feat(runtime): two-tier subprocess API (#11618) 2022-04-21 00:20:33 +02:00
evan
f785ecee1a
feat(bench): update API, new console reporter (#14305)
This commit changes "deno bench" subcommand, by updating
the "Deno.bench" API as follows:
- remove "Deno.BenchDefinition.n"
- remove "Deno.BenchDefintion.warmup"
- add "Deno.BenchDefinition.group"
- add "Deno.BenchDefintion.baseline"

This is done because bench cases are no longer run fixed amount
of iterations, but instead they are run until there is difference between
subsequent runs that is statistically insiginificant.

Additionally, console reporter was rewritten completely, to looks
similar to "hyperfine" reporter.
2022-04-20 21:06:39 +02:00
Divy Srivastava
2612b6f20f
core: introduce resource.read_return (#14331) 2022-04-20 18:39:13 +02:00
Divy Srivastava
57a8fc37fc
perf(http): optimize ReadableStreams backed by a resource (#14284) 2022-04-20 18:16:44 +05:30
Divy Srivastava
1c05e41f37
perf(runtime): bypass tokio file and bump op buffer size to 64K (#14319) 2022-04-19 20:11:31 +05:30
Nayeem Rahman
c30d95f2e3
feat(ext/web): add globalThis.reportError() (#13799) 2022-04-19 10:59:51 +02:00
David Sherret
a64e63c361
perf: move Deno.writeTextFile and like functions to Rust (#14221)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-18 18:00:14 -04:00
David Sherret
7919dc902d
fix(permissions): fallback to denied access if the permission prompt fails (#14235) 2022-04-18 09:00:38 -04:00
Bartek Iwańczuk
5f2d9a4a22
feat(test): use structured data for JavaScript errors in tests (#14287)
This commit rewrites test runner to send structured error data from JavaScript
to Rust instead of passing strings. This will allow to customize display of errors
in test report (which will be addressed in follow up commits).
2022-04-16 19:51:12 +02:00
Bartek Iwańczuk
0bb96cde72
refactor: update runtime code for primordial check x in y (#13642)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-16 14:09:07 +02:00
Nayeem Rahman
8b31fc23cd
refactor: Move source map lookups to core (#14274)
The following transformations gradually faced by "JsError" have all been 
moved up front to "JsError::from_v8_exception()": 

- finding the first non-"deno:" source line; 
- moving "JsError::script_resource_name" etc. into the first error stack 
in case of syntax errors; 
- source mapping "JsError::script_resource_name" etc. when wrapping 
the error even though the frame locations are source mapped earlier; 
- removing "JsError::{script_resource_name,line_number,start_column,end_column}"
entirely in favour of "js_error.frames.get(0)". 

We also no longer pass a js-side callback to "core/02_error.js" from cli. 
I avoided doing this on previous occasions because the source map lookups 
were in an awkward place.
2022-04-15 16:08:09 +02:00
Bartek Iwańczuk
244926e83c
feat(test): format user code output (#14271)
This commit changes "deno test" to better denote user output coming
from test cases.

This is done by printing "---- output ----" and "---- output end ----"
markers if an output is produced. The output from "console" and
"Deno.core.print" is captured, as well as direct writes to "Deno.stdout"
and "Deno.stderr".

To achieve that new APIs were added to "deno_core" crate, that allow
to replace an existing resource with a different one (while keeping resource
ids intact). Resources for stdout and stderr are replaced by pipes.

Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-15 14:24:41 +02:00
David Sherret
0e4574b2e3
chore: forward v1.20.6 release commit to main (#14288) 2022-04-14 15:50:48 -04:00
Nayeem Rahman
7d50a5fd43
refactor(core/error): Clarify JsError message fields (#14269) 2022-04-13 16:41:39 +02:00
AEtheve
c03fbb3c1f
fix(test): Don't error on missing op details (#14184) 2022-04-13 14:18:12 +02:00
Nayeem Rahman
4d18f558e4
feat(ext/web): Add error events for event listener and timer errors (#14159)
- feat: Add handleable error event for even listener errors
- feat: Add handleable error event for setTimeout()/setInterval() errors
- feat: Add Deno.core.destructureError()
- feat: Add Deno.core.terminate()
- fix: Don't throw listener errors from dispatchEvent()
- fix: Use biased mode when selecting between mod_evaluate() and
  run_event_loop() results
2022-04-13 11:50:57 +02:00
David Sherret
b2aaf708ab
chore: forward v1.20.5 release commit to main (#14232) 2022-04-07 14:40:20 -04:00
Yongwook Choi
0df1854249
feat(test): Add "name", "origin" and "parent" to "Deno.TestContext" (#14007)
This commit adds following fields to "Deno.TestContext" interface:
- name
- origin
- parent

These are prerequisites for supporting snapshot functionality in
"std/testing".
2022-04-06 16:51:38 +02:00
Bartek Iwańczuk
6c25b5135d
chore: update tokio, tokio-util and libc dependencies (#14174) 2022-04-02 19:54:40 +02:00
David Sherret
7fec7c834c
1.20.4 (#14168) 2022-03-31 15:48:35 -04:00
Kitson Kelly
061090de7e
feat(lsp): add experimental testing API (#13798)
Ref: denoland/vscode_deno#629
2022-03-30 09:59:27 +11:00
ichizok
f7ce96ea6e
fix(runtime/ops/signal.rs): Add Solaris signals (#13931) 2022-03-29 04:00:20 +02:00
Luca Casonato
37b0ec454c
chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
David Sherret
4691bde429
fix: Deno.run - do not modify user provided cmd array (#14109) 2022-03-25 08:17:13 -04:00
Kitson Kelly
cff1e92ecf 1.20.2 2022-03-24 14:47:06 +11:00