David Sherret
28a72d5488
feat(lsp): ability to configure document pre-load limit ( #19097 )
...
Adds a `deno.preloadLimit` option (ex. `"deno.preloadLimit": 2000`)
which specifies how many file entries to traverse on the file system
when the lsp loads or its configuration changes.
Closes #18955
2023-05-11 17:17:14 -04:00
Leo Kettmeir
9c8ebce3dc
refactor: merge Deno & Node inspectors ( #18691 )
2023-04-30 07:24:13 +00:00
Nayeem Rahman
0b296c6378
fix(repl): don't panic on undefined exception ( #18888 )
...
Fixes regression from #18878 where `Promise.reject()`,
`Promise.reject(undefined)` and `reportError(undefined)` panic in the
REPL.
Fixes `throw undefined` printing `Uncaught Unknown exception` instead of
`Uncaught undefined`.
2023-04-28 15:21:55 +02:00
Nayeem Rahman
504482dadd
fix(repl): print unhandled rejections and event errors ( #18878 )
...
Fixes #8858 .
Fixes #8869 .
```
$ target/debug/deno
Deno 1.32.5
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> Promise.reject(new Error("bar"));
Promise { <rejected> Error: bar
at <anonymous>:2:16 }
Uncaught (in promise) Error: bar
at <anonymous>:2:16
> reportError(new Error("baz"));
undefined
Uncaught Error: baz
at <anonymous>:2:13
>
2023-04-27 23:36:49 +02:00
David Sherret
bac8e4f6f2
fix(repl): disable language server document preloading in the repl ( #18543 )
...
This was an oversight because the repl uses the language server under
the hood. Also, never preloads from a root directory.
Part of #18538
2023-04-01 12:02:44 -04:00
David Sherret
7722014497
fix(lsp): include all diagnosable documents on initialize ( #17979 )
...
Closes https://github.com/denoland/vscode_deno/issues/797
Closes https://github.com/denoland/deno/issues/11190
Closes https://github.com/denoland/vscode_deno/issues/811
Closes https://github.com/denoland/vscode_deno/issues/761
Closes https://github.com/denoland/vscode_deno/issues/585
Closes https://github.com/denoland/vscode_deno/issues/561
Closes https://github.com/denoland/vscode_deno/issues/410
2023-03-30 17:47:53 -04:00
David Sherret
c4f82cab31
fix(lsp): textDocument/references
should respect includeDeclaration
( #18496 )
2023-03-30 16:15:21 +00:00
David Sherret
e0429e2ad6
fix(repl): improve package.json support ( #18497 )
...
1. Fixes a cosmetic issue in the repl where it would display lsp warning
messages.
2. Lazily loads dependencies from the package.json on use.
3. Supports using bare specifiers from package.json in the REPL.
Closes #17929
Closes #18494
2023-03-30 10:43:16 -04:00
David Sherret
b5d3eb5c23
chore: fix flaky pty_internal_repl ( #18486 )
2023-03-29 00:25:28 +00:00
David Sherret
6fb6b0c1f3
chore: restore pty tests and make them run on the Linux CI ( #18424 )
...
1. Rewrites the tests to be more back and forth rather than getting the
output all at once (which I believe was causing the hangs on linux and
maybe mac)
2. Runs the pty tests on the linux ci.
3. Fixes a bunch of tests that were just wrong.
4. Adds timeouts on the pty tests.
2023-03-28 21:49:00 +00:00
Roy Li
2c7174a5a2
fix(repl): Hide indexable properties in tab completion ( #18141 )
...
Closes #17831 . This change hides the indices of any indexed collection
when triggering tab completion for object properties in the REPL.
An example is shown in the issue, but for verbosity here is another.
Before the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
0 map
1 reverse
2 reduce
...
```
After the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
constructor reduce
BYTES_PER_ELEMENT reduceRight
buffer set
...
```
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-03-16 19:46:50 +00:00
Nick Hanley
1a3c2e2f1d
feat(repl): add DENO_REPL_HISTORY
to change history file path ( #18047 )
2023-03-17 01:22:24 +09:00
David Sherret
c1eba16b84
fix(repl): do not panic deleting Deno
or deleting all its properties ( #18211 )
...
Closes #18194
Closes #12092
2023-03-15 21:41:13 -04:00
Nick Hanley
64354f4112
chore(tests): use temp dir in test missing_deno_dir
( #18057 )
...
Fixes #18056
2023-03-07 00:00:51 -05:00
David Sherret
b3e88e0681
refactor: deno_graph 0.43 upgrade ( #17692 )
2023-02-09 22:00:23 -05:00
Gasman
0eb5be9a12
fix(ext/console): log class for class constructor ( #17615 )
...
Co-authored-by: tannal <tannal.cn@gmail.com>
2023-02-05 00:34:36 +01:00
David Sherret
dc854e83a4
fix(repl): handle @types/node not being cached in the repl ( #17617 )
...
Closes #17599
2023-02-01 16:37:05 -05:00
David Sherret
f5840bdcd3
chore: upgrade to Rust 1.67 ( #17548 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-27 10:43:16 -05:00
Divy Srivastava
d5634164cb
chore: use rustfmt imports_granularity option ( #17421 )
...
Closes https://github.com/denoland/deno/issues/2699
Closes https://github.com/denoland/deno/issues/2347
Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not
need to switch the cargo toolchain to nightly. Do we care about
formatting stability of our codebase across Rust versions? (I don't)
2023-01-14 23:18:58 -05: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
Bartek Iwańczuk
7e0c558187
tests: move integration tests to separate modules ( #16816 )
2022-11-26 02:29:56 +01:00
David Sherret
1464b756a4
refactor: move out test files from root testdata directory into sub directories ( #15949 )
2022-09-19 10:32:21 -04:00
Jason
8178665bd1
fix(cli/repl): await Promise.any([])... ( #15623 )
2022-09-02 13:38:06 +02:00
Nayeem Rahman
a74b2ecf37
fix(repl): don't terminate on unhandled error events ( #15548 )
2022-09-02 12:43:39 +02:00
David Sherret
944d708e3c
chore: fix pty_complete_imports test on linux/mac ( #15191 )
2022-07-13 10:49:14 -04:00
David Sherret
3a4e95c431
fix(repl): do not panic for import completions when the import specifier is empty ( #15177 )
2022-07-12 21:56:48 -04:00
David Sherret
2ff3e8a6c5
chore: fix repl::pty_emoji test on linux ( #15166 )
2022-07-12 11:05:56 -04:00
David Sherret
3455f16079
chore(test_util): add new string assertion macros ( #14928 )
2022-06-21 15:25:07 -04:00
sigmaSd
ac2cf2cb3e
fix(repl): accept tab when previous character is whitespace ( #14898 )
2022-06-20 18:47:25 -04:00
David Sherret
1fcecb6789
refactor: upgrade to deno_ast 0.15 ( #14680 )
2022-05-20 16:40:55 -04:00
David Sherret
0ea6b51bf0
fix: stdout and stderr encoding on Windows ( #14559 )
2022-05-11 12:48:38 -04:00
David Sherret
f07f246ae8
chore: fix pty_complete_imports test ( #14400 )
2022-04-26 09:53:22 -04:00
David Sherret
4cc5b2126a
chore(tests): fix pty_clear_function on Windows ( #14364 )
2022-04-22 17:49:10 -04: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
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
a4c1e1bdcf
fix: upgrade to swc_ecmascript 0.143 ( #14238 )
2022-04-08 12:31:47 -04:00
Yoshiya Hinosawa
b751e97a01
fix(repl): fix null eval result ( #13804 )
...
Co-authored-by: Satya Rohith <me@satyarohith.com>
2022-03-02 13:39:08 +09:00
Leo Kettmeir
4799aaac15
refactor: factor out CDP message types ( #13551 )
2022-02-07 17:05:49 +01: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
David Sherret
ac06797fa8
chore(tests): remove pty_complete_imports test for deleting the cwd ( #13164 )
2021-12-21 12:21:07 -05:00
David Sherret
6c324acf23
feat: REPL import specifier auto-completions ( #13078 )
2021-12-15 13:23:43 -05:00
David Sherret
1507b8c984
fix: upgrade swc fixing many bundling and --no-check
bugs ( #13025 )
2021-12-08 19:12:14 -05:00
Yoshiya Hinosawa
f602d63f48
fix(repl): avoid panic when assigned to globalThis ( #12273 )
2021-10-01 00:25:58 +09:00
David Sherret
0f23d92601
chore(tests): windows pty tests ( #12091 )
2021-09-20 22:15:44 -04:00
David Sherret
2c2e3ec1ca
refactor(lsp): use deno_ast and cache swc ASTs ( #11780 )
2021-09-07 10:39:32 -04:00
David Sherret
15a763152f
chore: move test files to testdata directory ( #11601 )
2021-08-11 10:20:47 -04:00
David Sherret
864ce6e832
feat(repl): add --eval flag for evaluating code when the repl starts ( #11590 )
2021-08-06 17:30:28 -04:00
David Sherret
e9ddc7a41a
feat(repl): support exports in the REPL ( #11592 )
2021-08-06 09:37:24 -04:00
Ayato Tokubi
af4912ed0d
fix(repl): output error without hanging when input is invalid ( #11426 )
2021-07-19 05:38:13 -07:00
Ayato Tokubi
6ce2a089a8
chore(repl): fix integration test input to not throw parse errors ( #11401 )
2021-07-14 14:41:24 -04:00