1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

248 commits

Author SHA1 Message Date
Kitson Kelly
7eee521199
feat: update to TypeScript 4.7 (#14242) 2022-06-01 10:19:18 +10:00
David Sherret
b65d5024ef
fix: read raw stdin to prevent buffering (regression) (#14704) 2022-05-23 12:35:02 -04:00
David Sherret
69be1f3cf7
fix: deno task should actually use current exe for deno command (#14705) 2022-05-23 12:04:28 -04:00
Colin Ihrig
d55444b41c
fix(coverage): do not report transpiled files with no lines (#14699)
This commit omits files from the coverage report that have no
lines of code to report coverage for.

Fixes: https://github.com/denoland/deno/issues/14683
2022-05-22 10:45:22 -04:00
David Sherret
1fcecb6789
refactor: upgrade to deno_ast 0.15 (#14680) 2022-05-20 16:40:55 -04:00
Yoshiya Hinosawa
e7c894e8f5
fix: prevent Deno.exit to fail when dispatchEvent tampered (#14665)
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-05-20 11:57:05 +09:00
Geert-Jan Zwiers
4daf1bb81a
fix(bench): update typo in bench summary (#14672) 2022-05-19 23:39:59 +02:00
Leo Kettmeir
4e1ca1d178
refactor: use spawn API across codebase (#14414) 2022-05-18 22:00:11 +02:00
Aleksei Kosyrev
037466e9cd
fix(ext/tls): ability to ignore IP-address certificate errors (#14610) 2022-05-18 13:32:12 +02:00
Bartek Iwańczuk
9a85a95c43
feat: subcommands type-check only local files by default (#14623)
This commit changes default mode of type-checking to "local" 
and adds "--check" flag to following subcommands:
- deno bench
- deno bundle
- deno cache
- deno compile
- deno eval
- deno install
- deno test
2022-05-17 23:53:42 +02:00
Nayeem Rahman
330c820ae8
BREAKING(unstable): Enable Deno namespace in workers by default (#14581)
This commit removes "WorkerOptions.deno" option as a boolean,
as well as "WorkerOptions.deno.namespace" settings. Starting
with this commit all workers have access to "Deno" namespace
by default.
2022-05-17 22:27:17 +02:00
Bartek Iwańczuk
f57aac77ff
BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463) 2022-05-17 13:50:31 -04:00
Bartek Iwańczuk
d76acfdc17
fix: base64 encoding of source maps with emojis (#14607)
This commit fixes source maps for files that contain emojis.

This is done by updating "deno_ast" to "0.14.1" for the case
of "--no-check" flag (ie using SWC emit) and by overriding
TSC's default base64 encoder (which turned out to be buggy)
for the type checking case.
2022-05-17 16:59:35 +02:00
Craig Morten
10a68a5635
feat(ext/net): add CAA DNS record support in Deno.resolveDns() API (#14624) 2022-05-16 11:20:41 +02:00
Craig Morten
c9e9265c3e
feat(ext/net): support NAPTR records in Deno.resolveDns() API (#14613) 2022-05-15 17:42:02 +02:00
Craig Morten
38e0a2ec1b
feat(ext/net): support full SOA record interface (#14617) 2022-05-15 16:43:08 +02:00
Thanapat Chotipun
bd4256262a
feat(ext/net): add support for SOA records in Deno.resolveDns() API (#14534) 2022-05-14 14:08:35 +02:00
Bartek Iwańczuk
939a070c8c
feat: add --no-config flag (#14555)
This flag disables loading of configuration file, ie. it will not be
automatically discovered and loaded. Of course this flag conflicts
with "--config" flag and they cannot be used together.
2022-05-13 17:40:50 +02:00
Bartek Iwańczuk
b543e84b39
chore: update test_util/std/ submodule (#14595) 2022-05-13 17:08:02 +02:00
David Sherret
e6142fafba
chore: fix flaky integration::test::pass test (#14571) 2022-05-11 18:05:54 -04:00
Nayeem Rahman
cb884de2e9
fix(runtime/web_worker): Use biased select when getting module result (#14553) 2022-05-10 11:26:57 +02:00
Bartek Iwańczuk
d4ad2b809c
feat(test): repeat test name if there's user output (#14495)
This commit changes test report output to repeat test name
before printing result, but only if there's user output, denoted
by markers.
2022-05-09 13:25:04 +02:00
Nayeem Rahman
23efc4fcab
feat(test): Represent uncaught errors (#14513)
This commit adds better reporting of uncaught errors
in top level scope of testing files. This change affects
both console runner as well as LSP runner.
2022-05-09 11:44:50 +02:00
Bartek Iwańczuk
ab728e9ccf
feat(test): change "failures:" headers in test report (#14490) 2022-05-09 10:56:13 +02:00
Aaron O'Mullan
d0f5cd6a06
fix(core): avoid panic on non-string Error.name (#14529)
Fixes #14518
2022-05-08 23:03:00 +02:00
Bartek Iwańczuk
bcd875030a
refactor(core): add AssertedModuleType enum (#14501)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-05-07 18:46:35 +02:00
Nayeem Rahman
ca134d25e1
feat(test): Show Deno.test() call locations for failures (#14484) 2022-05-05 01:15:54 +02:00
Nayeem Rahman
6a21fe745a
test: Manually truncate path string (#14407) 2022-05-05 01:13:00 +02:00
Geert-Jan Zwiers
253fbf9d2a
fix(coverage): exclude .snap files (#14480) 2022-05-04 13:10:55 +02:00
Thanapat Chotipun
e3954df8c5
feat(ext/net): add "NS" record support in Deno.resolveDns API (#14372) 2022-05-03 20:04:20 +02:00
Adilson Schmitt Junior
256dcb058a
fix(test/bench): accept file protocol module specifier CLI args (#14429) 2022-05-02 15:43:03 -04:00
David Sherret
de33017a8b
fix(test): actually capture stdout and stderr in workers (#14435) 2022-05-01 14:44:55 -04:00
Kitson Kelly
ef26a267ae
fix(cli): add dom.extras lib (#14430)
Closes: #12558
Fixes: #14344
2022-04-29 13:47:58 +10:00
Andreu Botella
ba799b6729
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-27 18:22:47 +02:00
Nayeem Rahman
9853c96cc4
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-27 01:06:10 +02:00
David Sherret
58eab0e2b3
fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-26 19:00:04 -04:00
David Sherret
a1b4aa2ae6
fix(test): capture inherited stdout and stderr for subprocesses in test output (#14395) 2022-04-26 14:46:49 -04:00
Nayeem Rahman
e9041b9edc
fix(runtime/js/spawn): Pass stdio options for spawn() and spawnSync() (#14358) 2022-04-24 17:21:22 +02:00
evan
602097ab6e
fix(bench): report pending summary before clearing (#14369) 2022-04-23 14:20:28 +02:00
evan
6fad5c33c9
fix(bench): reset reporter context (#14360)
This commit fixes previous file benchmarks leaking into the next file benchmarks summary.
2022-04-22 13:43:22 +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
Luca Casonato
803499886b
Remove the DENO_FUTURE_CHECK warning (#14320)
It has good intentions, but it is a really terrible user experience. As
such we shouldn't print this warning.
2022-04-19 17:08:23 +02:00
Nayeem Rahman
c30d95f2e3
feat(ext/web): add globalThis.reportError() (#13799) 2022-04-19 10:59:51 +02:00
Nayeem Rahman
66fbdd2ed4
feat: Add DENO_NO_PROMPT variable (#14209)
This commit adds support for "DENO_NO_PROMPT" env
variable, that can be used instead of "--no-prompt" flag
to completely disable permission prompts.
2022-04-18 21:08:30 +02:00
Nayeem Rahman
2f29673fb2
fix(cli/emit): Check JS roots with // @ts-check (#14090) 2022-04-18 16:52:26 +02:00
Bartek Iwańczuk
f52031ecdf
feat(test): skip internal stack frames for errors (#14302)
This commit changes "deno test" to filter out stack frames if it is beneficial to the user.

This is the case when there are stack frames coming from "internal" code
below frames coming from user code.

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-18 15:22:23 +02:00
Bartek Iwańczuk
9c5928b5aa
fix: panic when trying to pledge permissions before restoring previous pledge (#14306)
This commit fixes and edge case, where testing/benching code could pledge new
permission set before restoring the previous pledge.

Appropriate panics were added and tests that assert that process is killed
in case of "recursive pledge".
2022-04-17 17:47:24 +02:00
Nayeem Rahman
bd6494d119
fix(cli/tools/test): Prefix test module paths with "./" (#14301) 2022-04-16 21:51:55 +02: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
a87be28a46
feat: Better formatting for AggregateError (#14285)
This commit adds "aggregated" field to "deno_core::JsError" that stores
instances of "JsError" recursively to properly handle "AggregateError"
formatting. Appropriate logics was added to "PrettyJsError" and
"console" API to format AggregateErrors.

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-16 16:12:26 +02:00