0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

35 commits

Author SHA1 Message Date
David Sherret
43cd0459b9
fix(lsp): formatting should error on certain additional swc diagnostics (#12491) 2021-10-21 10:18:18 -04:00
David Sherret
9b1f0c8ba3
chore: upgrade crates based on deno ast 0.3 (#12403) 2021-10-12 09:58:04 -04:00
Yoshiya Hinosawa
f602d63f48
fix(repl): avoid panic when assigned to globalThis (#12273) 2021-10-01 00:25:58 +09:00
Ryan Dahl
01da1d0adc
refactor: Rename ProgramState to ProcState (#12204)
Move Arc into struct
2021-09-24 11:10:42 -04:00
Kitson Kelly
bf6dbf9855
fix(cli): better handling of source maps (#11954)
Ref: #11874
2021-09-08 14:05:34 +10:00
David Sherret
2c2e3ec1ca
refactor(lsp): use deno_ast and cache swc ASTs (#11780) 2021-09-07 10:39:32 -04:00
Casper Beyer
b8cfc95470
fix(cli/tools/repl): dont highlight candidate when completion is list (#11697) 2021-08-14 10:19:30 +02: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
466d3df9d1
refactor: make ParsedModule implement Sync (#11581) 2021-08-06 10:36:16 -04:00
Yusuke Tanaka
8f00b5542c
chore: upgrade Rust to 1.54.0 (#11554) 2021-07-30 15:03:41 +02:00
Ayato Tokubi
af4912ed0d
fix(repl): output error without hanging when input is invalid (#11426) 2021-07-19 05:38:13 -07:00
David Sherret
d9c43f7f43
feat(repl): support autocomplete on declarations containing a primitive (#11325) 2021-07-08 12:58:18 -04:00
David Sherret
7fc0e8ec8c
chore: use parking_lot for synchronization primitives to align with tokio (#11289)
parking_lot is already transitively used in tokio via the "full" cargo feature
2021-07-06 23:48:01 -04:00
Casper Beyer
78ac19f51f
fix(repl): do not panic when Deno.inspect throws (#11292) 2021-07-06 23:33:06 +02:00
Bert Belder
5db9f627e3
chore: get rid of REPL timeout (#11175)
* Get rid of timeout
* Use tokio channel and reduce calls to run_event_loop

Co-authored-by: David Sherret <dsherret@gmail.com>
2021-06-29 14:39:28 -04:00
David Sherret
4b3845b998
feat(repl): support import declarations in the REPL (#11086) 2021-06-24 09:00:46 -04:00
Casper Beyer
68c519d061
feat(repl): show list completion (#11001) 2021-06-22 02:07:26 +02:00
David Sherret
2d2b5625e0
feat(repl): Type stripping in the REPL (#10934) 2021-06-21 15:13:25 -04:00
David Sherret
b4026dac9c
fix(repl): Complete declarations (#10963) 2021-06-15 09:31:36 -04:00
David Sherret
67690b78bd
refactor(repl): Extract out structs for internal REPL code (#10915)
* Extract out ReplEditor.
* Extract out ReplSession.
* Move PRELUDE declaration up.
2021-06-09 19:07:50 -04:00
Bartek Iwańczuk
e5beb800c9
refactor: move JsRuntimeInspector to deno_core (#10763)
This commit moves implementation of "JsRuntimeInspector" to "deno_core" crate.

To achieve that following changes were made:

* "Worker" and "WebWorker" no longer own instance of "JsRuntimeInspector",
instead it is now owned by "deno_core::JsRuntime".

* Consequently polling of inspector is no longer done in "Worker"/"WebWorker",
instead it's done in "deno_core::JsRuntime::poll_event_loop".

* "deno_core::JsRuntime::poll_event_loop" and "deno_core::JsRuntime::run_event_loop",
now accept "wait_for_inspector" boolean that tells if event loop should still be 
"pending" if there are active inspector sessions - this change fixes the problem 
that inspector disconnects from the frontend and process exits once the code has
stopped executing.
2021-05-26 21:07:12 +02:00
Bartek Iwańczuk
e9edd7e14d
refactor: Rewrite Inspector implementation (#10725)
This commit refactors implementation of inspector.

The intention is to be able to move inspector implementation to "deno_core".

Following things were done to make that possible:

* "runtime/inspector.rs" was split into "runtime/inspector/mod.rs"
and "runtime/inspector/server.rs", separating inspector implementation
from Websocket server implementation.

* "DenoInspector" was renamed to "JsRuntimeInspector" and reference to "server"
was removed from the structure, making it independent of Websocket server
used to connect to Chrome Devtools.

* "WebsocketSession" was renamed to "InspectorSession" and rewritten in such
a way that it's not tied to Websockets anymore; instead it accepts a pair
of "proxy" channel ends that allow to integrate the session with different
"transports".

* "InspectorSession" was renamed to "LocalInspectorSession" to better indicate
that it's an "in-memory" session and doesn't require Websocket server. It was
also rewritten in such a way that it uses "InspectorSession" from previous point
instead of reimplementing "v8::inspector::ChannelImpl" trait; this is done by using
the "proxy" channels to communicate with the V8 session.

Consequently "LocalInspectorSession" is now a frontend to "InspectorSession". This
introduces a small inconvenience that awaiting responses for "LocalInspectorSession" requires
to concurrently poll worker's event loop. This arises from the fact that "InspectorSession"
is now owned by "JsRuntimeInspector", which in turn is owned by "Worker" or "WebWorker".
To ease this situation "Worker::with_event_loop" helper method was added, that takes
a future and concurrently polls it along with the event loop (using "tokio::select!" macro
inside a loop).
2021-05-26 17:47:33 +02:00
Casper Beyer
b47f9cee8c
fix(repl): filter out symbol candidates (#9555) 2021-02-21 16:58:31 +01:00
Casper Beyer
36e9e53b37
refactor(cli/tools/repl): merge highlighter into helper (#9448) 2021-02-08 17:25:10 +01:00
Casper Beyer
c83e261b42
fix(repl): prevent symbol completion panic (#9400) 2021-02-05 12:09:52 +01:00
Bert Belder
ca07bab594
Remove unnecessary boxing of tokio::time::Sleep (#9105) 2021-01-13 10:55:28 -08:00
Bartek Iwańczuk
275a5c65a2
upgrade: tokio 1.0 (#8779)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-01-11 23:50:02 -08:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 (#9092) 2021-01-11 18:13:41 +01:00
Bartek Iwańczuk
2e74f164b6
refactor: deno_runtime crate (#8640)
This commit moves Deno JS runtime, ops, permissions and
inspector implementation to new "deno_runtime" crate located
in "runtime/" directory.

Details in "runtime/README.md".

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-12-13 19:45:53 +01:00
Liam Murphy
c74132d3cd
fix: higlight async and of in REPL (#8569) 2020-12-01 14:52:03 -05:00
Casper Beyer
5560a6d589
fix(repl): close calls sometimes prints results (#8558) 2020-12-01 14:13:30 +01:00
Liam Murphy
228ecb0acb
refactor(repl): use SWC lexer to highlight and validate (#8496) 2020-11-27 20:14:54 +01:00
Bartek Iwańczuk
85a5a081b2
refactor(cli): reorganize main.rs and split workers (#8495)
Factored out "init_v8_flags", "init_logger" and 
"get_subcommand" from "main" function.

Also "Worker" was removed in favor of moving 
logic to "MainWorker" and "WebWorker" respectively.
2020-11-26 15:17:45 +01:00
crowlKats
a08d2eee2b
add canary versioning (#8480) 2020-11-25 05:30:14 -05:00
Bartek Iwańczuk
9eaa1fb71d
refactor(cli): move tooling to cli/tools/ (#8424)
This commit moves following tools into a single "tools"
module located at "cli/tools/mod.rs":
- formatter 
- linter
- test runner
- coverage collector
- installer
- binary upgrader
- repl
2020-11-19 19:19:34 +01:00
Renamed from cli/repl.rs (Browse further)