Skip to content

Commit

Permalink
chore(deps): bump rustyline from 10.1.1 to 11.0.0 (#16517)
Browse files Browse the repository at this point in the history
* chore(deps): bump rustyline from 10.1.1 to 11.0.0

Bumps [rustyline](https://github.com/kkawakam/rustyline) from 10.1.1 to 11.0.0.
- [Release notes](https://github.com/kkawakam/rustyline/releases)
- [Changelog](https://github.com/kkawakam/rustyline/blob/master/History.md)
- [Commits](kkawakam/rustyline@v10.1.1...v11.0.0)

---
updated-dependencies:
- dependency-name: rustyline
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update rustyline by specifying an in memory history manager

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stephen Wakely <fungus.humungus@gmail.com>
  • Loading branch information
dependabot[bot] and StephenWakely authored Feb 20, 2023
1 parent 4d5d281 commit 2b28408
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
30 changes: 3 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/vrl/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ indoc = "2.0.0"
once_cell = { version = "1.17", optional = true }
prettytable-rs = { version = "0.10", default-features = false, optional = true }
regex = { version = "1", default-features = false, optional = true, features = ["perf"] }
rustyline = { version = "10", default-features = false, optional = true }
rustyline = { version = "11", default-features = false, optional = true }
serde_json = "1"
thiserror = "1"
vector-common = { path = "../../vector-common", default-features = false }
Expand Down
5 changes: 3 additions & 2 deletions lib/vrl/cli/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use rustyline::{
error::ReadlineError,
highlight::{Highlighter, MatchingBracketHighlighter},
hint::{Hinter, HistoryHinter},
history::MemHistory,
validate::{self, ValidationResult, Validator},
Context, Editor, Helper,
};
Expand Down Expand Up @@ -61,7 +62,7 @@ pub(crate) fn run(
let mut state = TypeState::default();

let mut rt = Runtime::new(state::Runtime::default());
let mut rl = Editor::<Repl>::new()?;
let mut rl = Editor::<Repl, MemHistory>::new()?;
rl.set_helper(Some(Repl::new()));

#[allow(clippy::print_stdout)]
Expand All @@ -83,7 +84,7 @@ pub(crate) fn run(
// Capture "help docs <func_name>"
Ok(line) if func_docs_regex.is_match(line) => show_func_docs(line, &func_docs_regex),
Ok(line) => {
rl.add_history_entry(line);
rl.add_history_entry(line)?;

let command = match line {
"next" => {
Expand Down

0 comments on commit 2b28408

Please sign in to comment.