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

24 commits

Author SHA1 Message Date
Yiyu Lin
896dd56b7a
refactor(cli,core,ext,rt): remove some unnecessary clone or malloc (#17274) 2023-01-05 14:29:50 -05:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 (#17247)
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
sigmaSd
c39550fe52
fix(repl): doing two history searches exiting with ctrl+c should not exit repl (#17079)
fix https://github.com/denoland/deno/issues/16147
2022-12-16 18:39:52 -05:00
Bartek Iwańczuk
ff71ef8175
fix(repl): errors shouldn't terminate repl (#17082)
This commit changes REPL to never surface errors coming
from code execution, but instead print them as errors
to the REPL itself.
2022-12-16 17:11:10 +01:00
Bartek Iwańczuk
435948e470
feat(repl): support npm packages (#16770)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-13 13:53:32 +01:00
David Sherret
6541a0a9fd
refactor: cleanup main.rs (#16996)
1. Extracts out some code from main.rs
2. Inlines all the `x_command` functions in main.rs
2022-12-09 09:40:48 -05:00
Bartek Iwańczuk
1a472ad06b
feat(repl): run "deno repl" with no permissions (#16795)
This commit changes "deno repl" command to run with no permissions by
default and accept "--allow-*" flags. 

This change is dictated by the fact that currently there is no way to
run REPL with limited permissions. Technically it's a breaking 
change in the CLI command, but there's agreement in the team 
that it has merit and it's a good solution.

Running just "deno" command still starts the REPL with full permissions
allowed, but now a banner is printed to inform users about that:
2022-12-07 20:21:18 +01:00
Bartek Iwańczuk
d1962e07af
fix(repl): respect --quiet flag (#16875)
This commit changes REPL behavior to respect --quiet flag. Once 
this flag is present REPL will not print a banner at the start.
2022-11-30 23:25:20 +01:00
David Sherret
0c0af67f89
refactor: DenoDir - move to cache folder and make root_dir private (#16823) 2022-11-26 00:04:30 +00:00
David Sherret
6de3d7f184
refactor: move cdp.rs to tools/repl (#16821) 2022-11-25 18:38:08 -05:00
Bartek Iwańczuk
433f38084b
fix(repl): more reliable history handling (#16797)
This commit changes history handling of the REPL.

There were some situations were history wasn't properly saved and flushed to a
file, making history very spotty. This commit changes it to save every line into
the history file and flush it to disk before being evaluated.

Thanks to this all lines, including "close()" will be stored in the history
file.

If for any reason we're not able to save history file, a single warning will be
printed to the REPL and it will continue to work, even if subsequent tries will
fail to save to disk.
2022-11-25 02:56:47 +01:00
Kayla Washburn
1ef96343a1
feat: allow exiting on two consecutive ctrl+c presses (#15981) 2022-09-22 04:42:09 -04:00
David Sherret
1fcecb6789
refactor: upgrade to deno_ast 0.15 (#14680) 2022-05-20 16:40:55 -04: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
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
Leo Kettmeir
4799aaac15
refactor: factor out CDP message types (#13551) 2022-02-07 17:05:49 +01:00
Bartek Iwańczuk
b7b6b9c9e5
Revert "refactor: factor out CDP message types (#13501)" (#13540)
This reverts commit 382a978859.
2022-01-31 14:00:18 +01:00
Leo Kettmeir
382a978859
refactor: factor out CDP message types (#13501) 2022-01-27 15:09:47 +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
Bartek Iwańczuk
3db18bf9e6
refactor(repl): factor out ReplEditor and ReplSession (#13131) 2021-12-18 02:18:17 +01:00
David Sherret
6c324acf23
feat: REPL import specifier auto-completions (#13078) 2021-12-15 13:23:43 -05:00
Bartek Iwańczuk
0dec9b4381
fix: op_set_exit_code (#13034)
Fixes "op_set_exit_code" by sharing a single "Arc" between
all workers (via "op state") instead of having a "global" value stored in
"deno_runtime" crate. As a consequence setting an exit code is always
scoped to a tree of workers, instead of being overridable if there are
multiple worker tree (like in "deno test --jobs" subcommand).

Refactored "cli/main.rs" functions to return "Result<i32, AnyError>" instead
of "Result<(), AnyError>" so they can return exit code.
2021-12-11 15:56:45 +01:00
David Sherret
1507b8c984
fix: upgrade swc fixing many bundling and --no-check bugs (#13025) 2021-12-08 19:12:14 -05:00
David Sherret
6a780543a4
refactor(repl): move rustyline sync channel communication into struct (#12900) 2021-11-25 14:05:12 -05:00
Renamed from cli/tools/repl.rs (Browse further)