Andreu Botella
3e7afb8918
chore(runtime): Make some ops in ext and runtime infallible. ( #14589 )
...
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-13 10:36:31 +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
David Sherret
de33017a8b
fix(test): actually capture stdout and stderr in workers ( #14435 )
2022-05-01 14:44:55 -04:00
David Sherret
3b40be2f6e
fix: deno task
forward double hyphen ( #14419 )
2022-04-27 15:43:36 -04: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
David Sherret
c0e3b6096d
refactor(lsp): store all the assets in Rust when initializing ( #14367 )
2022-04-25 11:23:24 -04: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
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
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
a4c1e1bdcf
fix: upgrade to swc_ecmascript 0.143 ( #14238 )
2022-04-08 12:31:47 -04:00
Jason
a6e4b4297d
refactor(lsp): migrate from lspower back to tower-lsp ( #14163 )
2022-04-03 14:17:30 +10:00
David Sherret
1c37ac3352
chore(tests): use custom temp dir creation for the tests ( #14153 )
2022-04-01 11:15:37 -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
David Sherret
4a0b2c28a1
chore(ci): fix lsp bench due to notification that was accidentally added ( #14148 )
2022-03-29 17:28:55 -04:00
David Sherret
03c71a8b4a
chore: upgrade dprint-core to 0.54.1 ( #14146 )
2022-03-29 13:33:00 -04:00
Kitson Kelly
5a6a1eeb39
feat(lsp): support API for config file ( #14139 )
...
Closes: #13910
2022-03-29 11:27:43 +11:00
Kitson Kelly
33a8613451
fix(lsp): watch .jsonc files ( #14135 )
2022-03-28 20:40:39 +11:00
David Sherret
53dac7451b
chore: remove all pub(crate)
s from the cli crate ( #14083 )
2022-03-23 09:54:22 -04:00
Kitson Kelly
1414dc503b
feat(lsp): support deno.enablePaths setting ( #13978 )
...
Ref: denoland/vscode_deno#633
2022-03-21 12:33:37 +11:00
Aaron O'Mullan
88d0f01948
feat(ops): custom arity ( #13949 )
...
Also cleanup & drop ignored wildcard op-args
2022-03-14 23:38:53 +01:00
Divy Srivastava
b4e42953e1
feat(core): codegen ops ( #13861 )
...
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-03-14 18:44:15 +01:00
David Sherret
e8c47755bb
chore(lsp): log more for "unexpected positions" lsp error ( #13815 )
...
Ref #13657
2022-03-03 08:06:38 +11:00
David Sherret
3b12afd072
chore: upgrade to Rust 1.59 ( #13767 )
2022-02-24 20:03:12 -05:00
Kitson Kelly
973fe6dd3a
refactor: remove dead code from lsp ( #13743 )
2022-02-24 08:01:20 +11:00
Kitson Kelly
ee27b9dd7e
feat: allow specification of import map in config file ( #13739 )
...
Closes: #12800
2022-02-23 10:51:14 +11:00
Maxim
65de5fb465
refactor: use Arc
instead of making copies of Flags
struct ( #13610 )
2022-02-11 14:04:31 -05:00
Kitson Kelly
2f2c778a07
feat(lsp): support linking to symbols in JSDoc on hover ( #13631 )
...
Closes #13198
2022-02-10 10:08:53 +11:00
Kitson Kelly
773f882e5e
feat(lsp): provide completions from import map if available ( #13624 )
...
Closes #13619
2022-02-10 07:13:50 +11:00
Kitson Kelly
9c7ed1c98b
fix(lsp): op_exists handles bad specifiers ( #13612 )
...
Fixes: #13611
2022-02-07 10:39:07 +11:00
David Sherret
8cc9a9350b
fix(lsp): do not panic getting root_uri to auto discover configuration file ( #13603 )
2022-02-05 17:41:15 -05:00
Kitson Kelly
af5a373e00
feat(lsp): add redirect diagnostic and quick fix ( #13580 )
...
Ref: #12864
2022-02-04 18:14:57 +11:00
David Sherret
ed3086e4b1
refactor(lsp): remove circular dependency between LanguageServer
and DiagnosticsServer
( #13577 )
2022-02-02 18:02:59 -05:00
David Sherret
37aba8f754
perf(lsp): cancellable TS diagnostics ( #13565 )
2022-02-02 09:25:22 -05:00
Kitson Kelly
26f5c223df
fix(lsp): properly display x-deno-warning with redirects ( #13554 )
...
Fixes: #13472
2022-02-02 13:04:26 +11:00
Kitson Kelly
7d356250e8
refactor: integrate deno_graph breaking changes ( #13495 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-02-01 09:33:57 +11:00
David Sherret
a2e4fa471b
fix(lsp): regression where certain diagnostics were showing for disabled files ( #13530 )
2022-01-29 17:50:15 -05:00
David Sherret
d4dd9ae4cf
refactor(lsp): remove RwLock on Config
( #13485 )
2022-01-25 10:30:38 -05:00
David Sherret
0e12acc6ff
refactor(lsp): Documents - combine duplicate exists methods ( #13479 )
2022-01-25 09:21:59 -05:00
David Sherret
2f72c44e1d
fix(lsp): independent diagnostic publishing should include all diagnostic sources on each publish ( #13483 )
2022-01-24 18:04:24 -05:00
David Sherret
bc8de78da3
perf(lsp): independent diagnostic source publishes ( #13427 )
2022-01-24 15:30:01 -05:00
Kitson Kelly
1a3983a538
perf(lsp): improve some tsc op hot paths ( #13473 )
2022-01-24 19:01:33 +11:00
Kitson Kelly
3ec248cff8
fix(lsp): respect DENO_CERT and other options related to TLS certs ( #13467 )
...
Fixes #13437
2022-01-24 11:27:52 +11:00
David Sherret
f73a5fbc89
refactor(lsp): reduce data stored in StateSnapshot
( #13426 )
2022-01-19 17:10:14 -05:00
Kitson Kelly
6cf05220e3
fix(lsp): better handling of registry config errors ( #13418 )
...
Fixes: #13383
Fixes: denoland/vscode_deno#609
2022-01-20 08:05:19 +11:00
David Sherret
1cece36fa5
refactor(lsp): store the LspUrlMap
's state inside a mutex ( #13416 )
2022-01-19 11:38:40 -05:00
David Sherret
b3545dd447
refactor(lsp): store assets behind a mutex ( #13414 )
2022-01-18 16:28:47 -05:00
Ryan Dahl
39ea4abff4
feat: auto-discover config file ( #13313 )
2022-01-17 20:10:17 -05:00
David Sherret
1ab5dea367
refactor(lsp): remove performance
from StateSnapshot
( #13403 )
2022-01-17 17:09:43 -05:00
Ryan Dahl
3595f37b07
refactor: simplify how LSP deals with config file specifier ( #13401 )
2022-01-17 14:45:05 -05:00
David Sherret
ad224f53c7
chore: upgrade to rust 1.58 ( #13377 )
2022-01-15 07:10:12 +01:00
David Sherret
eda6e58520
refactor: upgrade to import_map v0.6 ( #13368 )
2022-01-13 18:17:56 -05:00
David Sherret
f12164646b
refactor: move transpiling to deno_ast ( #13332 )
2022-01-13 11:58:00 -05:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 ( #13306 )
...
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
Kitson Kelly
57bfa87b2c
feat(lsp): provide registry details on hover if present ( #13294 )
...
Closes: #13272
2022-01-07 11:27:13 +11:00
David Sherret
19c8cd3a45
fix: upgrade swc_ecmascript to 0.103 ( #13284 )
2022-01-04 17:02:56 -05:00
Kitson Kelly
01ff7a8784
fix(lsp): handle repeating patterns in registry correctly ( #13275 )
2022-01-04 17:42:33 +11:00
Kitson Kelly
2e72893fa2
fix(lsp): better handling of folders in registry completions ( #13250 )
2022-01-02 16:27:19 +11:00
Kitson Kelly
0ae46a975c
fix(lsp): properly generate data URLs for completion items ( #13246 )
2022-01-02 16:25:42 +11:00
Aaron O'Mullan
42777f2541
cleanup(cli/lsp): use op Extensions ( #13225 )
2021-12-29 15:22:00 +01:00
Kitson Kelly
6d017d42aa
fix(lsp): add code lens for tests just using named functions ( #13218 )
...
Fixes: #13216
2021-12-29 14:00:24 +11:00
Kitson Kelly
8547a37132
chore: update deno_graph and deno_doc ( #13173 )
2021-12-22 14:25:06 +01:00
Kitson Kelly
b5fdfb9d25
feat(lsp): supply accept header when fetching registry config ( #13159 )
...
Closes #13153
2021-12-21 13:40:22 +11:00
Jesper van den Ende
0888ba7a8d
feat(lsp): add code lens for debugging tests ( #13138 )
...
Closes: #13130
2021-12-20 16:00:38 +11:00
Divy Srivastava
6de53b631f
refactor: use once_cell
instead of lazy_static
( #13135 )
2021-12-18 16:14:42 -05:00
Nayeem Rahman
9ffc7edc23
refactor(cli): use GraphData for check and emit ( #12960 )
2021-12-16 21:45:41 +11:00
Kitson Kelly
e28fb70aee
fix(lsp): provide diagnostics for import assertions ( #13105 )
...
Fixes: #13099
2021-12-16 14:53:17 +11:00
David Sherret
6c324acf23
feat: REPL import specifier auto-completions ( #13078 )
2021-12-15 13:23:43 -05:00
Bartek Iwańczuk
a1f0796fcc
feat: Add support for import assertions and JSON modules ( #12866 )
...
This commit adds proper support for import assertions and JSON modules.
Implementation of "core/modules.rs" was changed to account for multiple possible
module types, instead of always assuming that the code is an "ES module". In
effect "ModuleMap" now has knowledge about each modules' type (stored via
"ModuleType" enum). Module loading pipeline now stores information about
expected module type for each request and validates that expected type matches
discovered module type based on file's "MediaType".
Relevant tests were added to "core/modules.rs" and integration tests,
additionally multiple WPT tests were enabled.
There are still some rough edges in the implementation and not all WPT were
enabled, due to:
a) unclear BOM handling in source code by "FileFetcher"
b) design limitation of Deno's "FileFetcher" that doesn't download the same
module multiple times in a single run
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-12-15 19:22:36 +01:00
Kitson Kelly
e8d7b430ce
chore: updates to support deno_graph API changes ( #13080 )
2021-12-15 07:39:20 +11:00
David Sherret
c9d32e0581
fix(lsp): handle import specifier not having a trailing quote ( #13074 )
...
* fix(lsp): handle import specifier not having a trailing quote
* clean up
* Add test.
2021-12-13 16:28:35 -05:00
Kitson Kelly
a54fc7a129
feat(lsp): improve registry completion suggestions ( #13023 )
...
Resolves #10051
2021-12-14 06:24:11 +11:00
Kitson Kelly
345f0fbe5c
feat(cli): update to TypeScript 4.5 ( #12410 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-12-10 09:12:21 +11:00
Kitson Kelly
2347e60934
feat(lsp): registry suggestion cache respects cache headers ( #13010 )
...
Fixes #9931
2021-12-09 22:16:17 +11:00
David Sherret
1507b8c984
fix: upgrade swc fixing many bundling and --no-check
bugs ( #13025 )
2021-12-08 19:12:14 -05:00
Bartek Iwańczuk
c59f90d01f
chore: upgrade to Rust 1.57.0 ( #12968 )
2021-12-04 14:19:06 +01:00
Bartek Iwańczuk
e68a241946
chore: upgrade lspower to 1.4.0 ( #12894 )
2021-11-25 12:10:12 +11:00
David Sherret
adc5974333
fix(lsp): lsp should respect include/exclude files in format config ( #12876 )
2021-11-24 15:14:19 -05:00
David Sherret
0f90b4665a
chore(lsp): fix possible race condition with tests expecting 3 publishDiagnostics messages ( #12868 )
...
The tests expect 3 publish notifications. It was possible for less than 3 to occur if two or more tasks set the diagnostics in the collection, exited the lock at the same time, then called `publish_diagnostics`
2021-11-23 20:04:27 -05:00
igorsaux
3f8c3b8568
fix(lsp): normalize urls in did_change_watched_files ( #12873 )
2021-11-23 12:32:40 -05:00
David Sherret
51e3db956a
fix(cli): config file should resolve paths relative to the config file ( #12867 )
...
* Add `specifier_to_file_path` to support converting a ModuleSpecifier with a unix-style path to a PathBuf on Windows.
2021-11-23 10:38:11 -05:00
Kitson Kelly
210300d049
feat(lsp): add type definition provider ( #12789 )
2021-11-23 11:09:19 +11:00
Kitson Kelly
bf5657cd59
feat(lsp): add workspace symbol provider ( #12787 )
2021-11-23 11:08:56 +11:00
igorsaux
3abe31252e
fix(lsp): use lint exclude files list from the config file ( #12825 )
2021-11-22 18:10:33 -05:00
David Sherret
c82ce74133
refactor(lsp): remove Documents
mutex and require Documents
to be mutated to change it ( #12747 )
2021-11-18 13:50:24 -05:00
Kitson Kelly
14f83da221
fix(lsp): tag deprecated diagnostics properly ( #12801 )
2021-11-18 13:05:20 +11:00
Kitson Kelly
cc38580106
fix(lsp): retain module dependencies when parse is invalid ( #12782 )
...
Fixes #12753
2021-11-17 09:23:25 +11:00
Ryan Dahl
b2036a4db7
refactor: re-export anyhow from deno_core ( #12777 )
2021-11-16 09:02:28 -05:00
David Sherret
28dbb4a95e
refactor(lsp): prefer using document instead of documents collection ( #12720 )
2021-11-12 11:42:04 -05:00
Kitson Kelly
31fde9deba
chore(lsp): align ScriptElementKind to current versions of TypeScript/vscode ( #12663 )
2021-11-09 21:45:40 +11:00
Kitson Kelly
f5eb177f50
feat(cli): support React 17 JSX transforms ( #12631 )
...
Closes #8440
2021-11-09 12:26:39 +11:00
Bert Belder
f1b1a3f389
refactor: move mod tokio_util
to runtime ( #12332 )
...
This avoids a bunch of duplicated code.
2021-11-08 12:49:11 -08:00
Kitson Kelly
182de1452b
fix(lsp): display module types only dependencies on hover ( #12683 )
...
Fixes: #12675
2021-11-08 11:50:48 +11:00
Kitson Kelly
91f8bdda2c
fix(lsp): cache unsupported import completion origins ( #12661 )
...
Fixes #12621
2021-11-08 09:35:32 +11:00
Luca Casonato
b6b25671b2
fix(lsp): display signature docs as markdown ( #12636 )
...
These were previously displayed as plain text. Now they are displayed as
`MarkupContent` with type `Markdown`.
2021-11-07 23:26:11 +01:00
Zheyu Zhang
efe956b4fd
fix(lint): use recommended tag if there is no tags in config file or flags ( #12644 )
2021-11-04 11:12:12 -04:00
Luca Casonato
318dcc33af
Revert "feat(cli): enable useUnknownInCatchVariables
by default" ( #12643 )
...
This partially reverts commit a065604155
.
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-11-04 11:30:37 +01:00
David Sherret
0ec151b8cb
chore: upgrade deno_ast to 0.5.0 ( #12595 )
2021-11-01 16:22:27 -04:00
Kitson Kelly
34a9ddff09
refactor(lsp): use deno_graph and single document struct ( #12535 )
...
Closes #12473
2021-10-29 10:56:01 +11:00