summaryrefslogtreecommitdiff
path: root/cli/tools/repl/editor.rs
AgeCommit message (Collapse)Author
2024-05-08chore: enable clippy::print_stdout and clippy::print_stderr (#23732)David Sherret
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
2024-03-04chore: fix typos (#22677)cui fliter
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-06chore: update rustyline to 13.0.0 (#21481)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/18453. This update also makes it possible to address https://github.com/denoland/deno/issues/8049 by using https://docs.rs/rustyline/latest/rustyline/struct.Editor.html#method.create_external_printer
2023-11-05refactor: unify CDP types in a single module (#21094)Bartek Iwańczuk
This commit moves all Chrome Devtools Protocol messages to `cli/cdp.rs` and refactors all places using these types to pull them from a common place. No functional changes.
2023-10-24fix: improved using declaration support (#20959)David Sherret
Upgrades to deno_ast 0.30.
2023-08-02fix(repl): highlight from ident in import from or export from (#20023)await-ovo
2023-07-13chore: update to Rust 1.71 (#19822)Matt Mastracci
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-03-28chore: restore pty tests and make them run on the Linux CI (#18424)David Sherret
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-16fix(repl): Hide indexable properties in tab completion (#18141)Roy Li
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-17feat(repl): add `DENO_REPL_HISTORY` to change history file path (#18047)Nick Hanley
2023-03-15fix(repl): do not panic deleting `Deno` or deleting all its properties (#18211)David Sherret
Closes #18194 Closes #12092
2023-03-15refactor: remove usages of `map_or` / `map_or_else` (#18212)David Sherret
These methods are confusing because the arguments are backwards. I feel like they should have never been added to `Option<T>` and that clippy should suggest rewriting to `map(...).unwrap_or(...)`/`map(...).unwrap_or_else(|| ...)` https://github.com/rust-lang/rfcs/issues/1025
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-16fix(repl): improve validator to mark more code as incomplete (#17443)David Sherret
Closes #17442
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
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-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-16fix(repl): doing two history searches exiting with ctrl+c should not exit ↵sigmaSd
repl (#17079) fix https://github.com/denoland/deno/issues/16147
2022-11-25refactor: move cdp.rs to tools/repl (#16821)David Sherret
2022-11-25fix(repl): more reliable history handling (#16797)Bartek Iwańczuk
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-08-10feat(repl): add color to functions for syntax highlighting (#15434)sigmaSd
2022-07-18chore(repl): update rustyline to 10.0.0 (#15232)sigmaSd
2022-06-22fix(repl): use spaces for tab handler on windows (#14931)sigmaSd
There is a bug in rustyline with tabs on Windows, so we insert spaces for now.
2022-06-21chore: fix pty_tab_handler test on windows (#14927)David Sherret
2022-06-20fix(repl): accept tab when previous character is whitespace (#14898)sigmaSd
2022-06-15feat(repl): Add key binding to force a new line (#14536)sigmaSd
This commit adds key binding for "ctrl+s" combination that will force a new line in REPL.
2022-05-20refactor: upgrade to deno_ast 0.15 (#14680)David Sherret
2022-04-08fix: upgrade to swc_ecmascript 0.143 (#14238)David Sherret
2022-02-24chore: upgrade to Rust 1.59 (#13767)David Sherret
2022-02-07refactor: factor out CDP message types (#13551)Leo Kettmeir
2022-01-31Revert "refactor: factor out CDP message types (#13501)" (#13540)Bartek Iwańczuk
This reverts commit 382a978859a7a7a4351542be818bb2e59523429c.
2022-01-27refactor: factor out CDP message types (#13501)Leo Kettmeir
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-18refactor(repl): factor out ReplEditor and ReplSession (#13131)Bartek Iwańczuk