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

306 commits

Author SHA1 Message Date
David Sherret
e46584a75a
fix(vendor): ignore import map in output directory instead of erroring (#14998) 2022-06-29 20:41:48 -04:00
David Sherret
8c4420c005
refactor: rename RootConfig to CliOptions (#15007) 2022-06-29 11:51:11 -04:00
David Sherret
01adbb1efb
refactor: add RootConfig (#14985) 2022-06-28 16:45:55 -04:00
Colin Ihrig
0f6a5c5fc2
feat(web): add beforeunload event (#14830)
This commit adds the 'beforeunload' event.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-28 10:49:30 -04:00
David Sherret
e1c90963fb
refactor: create args folder (#14982) 2022-06-27 16:54:09 -04:00
Bartek Iwańczuk
d39094913e
fix: don't error if Deno.bench() or Deno.test() are used in run subcommand (#14946) 2022-06-24 12:00:53 +02:00
Bartek Iwańczuk
1e3713c3bc
fix(fmt): ignore node_modules directory (#14943) 2022-06-23 01:17:49 +02:00
sigmaSd
efaa149819
fix(repl): use spaces for tab handler on windows (#14931)
There is a bug in rustyline with tabs on Windows, so we insert spaces for now.
2022-06-22 10:28:28 -04:00
David Sherret
7ad0d09228
chore: fix pty_tab_handler test on windows (#14927) 2022-06-21 15:24:50 -04:00
sigmaSd
ac2cf2cb3e
fix(repl): accept tab when previous character is whitespace (#14898) 2022-06-20 18:47:25 -04:00
David Sherret
a7339f756c
refactor: add EmitCache trait (#14925) 2022-06-20 17:59:52 -04:00
David Sherret
f564497630
fix(fmt): should fail --check on parse error (#14907) 2022-06-18 12:44:43 -04:00
Nayeem Rahman
845d4754c6
fix(check): use "moduleDetection": "force" (#14875) 2022-06-15 12:26:43 -04:00
sigmaSd
8bfa89a478
feat(repl): Add key binding to force a new line (#14536)
This commit adds key binding for "ctrl+s" 
combination that will force a new line in REPL.
2022-06-15 02:19:06 +02:00
Mark Ladyshau
d4f609d8e7
feat(test): update test summary report (#14629) 2022-06-14 20:51:49 +02:00
David Sherret
443041c23e
feat(vendor): support using an existing import map (#14836) 2022-06-14 10:05:37 -04:00
Bartek Iwańczuk
4a0a412d7c
feat: no type-check by default (#14691)
This commit changes default default behavior of type checking
for several subcommands.

Instead of type checking and reporting type errors only for local
files, the type checking is skipped entirely. Type checking can
still be enabled using the "--check" flag.

Following subcomands are affected:
- deno cache
- deno install
- deno eval
- deno run
2022-06-13 23:13:16 +02:00
David Sherret
3dd981e199
feat(fmt): support formatting cjs, cts, mjs, and mts files (#14837) 2022-06-09 19:55:04 -04:00
Kayla Washburn
94068b7109
feat(task): add --cwd flag for configuring the working directory (#14823) 2022-06-08 15:30:16 -06:00
Nayeem Rahman
f0dd751190
refactor(bench): Allocate IDs for benches (#14757) 2022-05-30 19:58:44 +02:00
David Sherret
d93b7627f0
fix(vendor): handle relative imports when mapped local folder name differs from remote's (#14465) 2022-05-23 12:49: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
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
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
Luca Casonato
0ee76da07b
chore: update to rust 1.60.0 & update Cargo.lock (#14260)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-13 01:12:55 +02:00
David Sherret
e3f4b02f48
fix: do not panic on TestOutputPipe::flush when receiver dropped (#14560) 2022-05-10 17:59:35 -04:00
David Sherret
abf72c5b37
chore: fix flaky steps_output_within - part 2 (#14562) 2022-05-10 16:24:37 -04: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
Nayeem Rahman
ca134d25e1
feat(test): Show Deno.test() call locations for failures (#14484) 2022-05-05 01:15:54 +02:00
David Sherret
d79a869ee6
chore: fix flaky steps_output_within test (#14479) 2022-05-04 17:01:51 -04:00
Geert-Jan Zwiers
253fbf9d2a
fix(coverage): exclude .snap files (#14480) 2022-05-04 13:10:55 +02:00
David Sherret
e099ddb87c
fix(vendor): do not panic on relative specifier with scheme-like folder name (#14453) 2022-05-02 09:07:41 -04:00
David Sherret
de33017a8b
fix(test): actually capture stdout and stderr in workers (#14435) 2022-05-01 14:44:55 -04: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
Baoshuo Ren
2c33293f66
chore: remove git.io link (#14402)
All links on git.io will stop redirecting after April 29, 2022.

- https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-26 18:39:47 -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
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
Colin Ihrig
2a93c134dc
feat(repl): add global clear() function (#14332)
This commit adds a clear() function in the REPL which works
similar to console.clear().
2022-04-20 15:48:15 -04: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
Naju Mancheril
3833d37b15
feat(repl): add "--eval-file" flag to execute a script file on startup (#14247)
This commit adds support for "--eval-file" in "deno repl" subcommand.

This flag can be used to pass paths or URLs to files, that will be executed
on REPL startup. All files will be executed in the same context as the REPL
(ie. as "plain old scripts", not ES modules), sharing the global scope.

This feature allows to implement custom REPLs on top of Deno's REPL.
2022-04-20 14:16:37 +02:00
David Sherret
ae479b1036
perf(fmt/lint): incremental formatting and linting (#14314) 2022-04-19 22:14:00 -04: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
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
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