Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ratatui to 0.28.0 and all other dependencies #69

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
384 changes: 240 additions & 144 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 25 additions & 17 deletions component-generated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,45 @@ name = "component-generated"
version = "0.1.0"
edition = "2021"
description = "An example generated using the component template"

authors = ["Josh McKinney <[email protected]>"]
build = "build.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
better-panic = "0.3.0"
clap = { version = "4.4.5", features = ["derive", "cargo", "wrap_help", "unicode", "string", "unstable-styles"] }
color-eyre = "0.6.2"
clap = { version = "4.4.5", features = [
"derive",
"cargo",
"wrap_help",
"unicode",
"string",
"unstable-styles",
] }
color-eyre = "0.6.3"
config = "0.14.0"
crossterm = { version = "0.27.0", features = ["serde", "event-stream"] }
crossterm = { version = "0.28.1", features = ["serde", "event-stream"] }
derive_deref = "1.1.1"
directories = "5.0.1"
futures = "0.3.28"
human-panic = "1.2.0"
futures = "0.3.30"
human-panic = "2.0.1"
json5 = "0.4.1"
lazy_static = "1.4.0"
libc = "0.2.148"
lazy_static = "1.5.0"
libc = "0.2.158"
pretty_assertions = "1.4.0"
ratatui = { version = "0.27.0", features = ["serde", "macros"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
ratatui = { version = "0.28.0", features = ["serde", "macros"] }
serde = { version = "1.0.208", features = ["derive"] }
serde_json = "1.0.125"
signal-hook = "0.3.17"
strip-ansi-escapes = "0.2.0"
strum = { version = "0.26.1", features = ["derive"] }
tokio = { version = "1.32.0", features = ["full"] }
tokio-util = "0.7.9"
tracing = "0.1.37"
strum = { version = "0.26.3", features = ["derive"] }
tokio = { version = "1.39.3", features = ["full"] }
tokio-util = "0.7.11"
tracing = "0.1.40"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "serde"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "serde"] }

[build-dependencies]
vergen = { version = "8.2.6", features = [ "build", "git", "gitoxide", "cargo" ]}
anyhow = "1.0.86"
vergen = { version = "9.0.0", features = ["build"] }
vergen-gix = "1.0.0"
17 changes: 11 additions & 6 deletions component-generated/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
vergen::EmitBuilder::builder()
.all_build()
.all_git()
.emit()?;
Ok(())
use anyhow::Result;
use vergen::{BuildBuilder, Emitter};
use vergen_gix::GixBuilder;

fn main() -> Result<()> {
let build = BuildBuilder::all_build()?;
let gix = GixBuilder::all_git()?;
Emitter::default()
.add_instructions(&build)?
.add_instructions(&gix)?
.emit()
}
2 changes: 1 addition & 1 deletion component-generated/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl App {
fn render(&mut self, tui: &mut Tui) -> Result<()> {
tui.draw(|frame| {
for component in self.components.iter_mut() {
if let Err(err) = component.draw(frame, frame.size()) {
if let Err(err) = component.draw(frame, frame.area()) {
let _ = self
.action_tx
.send(Action::Error(format!("Failed to draw: {:?}", err)));
Expand Down
7 changes: 5 additions & 2 deletions component-generated/src/components.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use color_eyre::Result;
use crossterm::event::{KeyEvent, MouseEvent};
use ratatui::{layout::Rect, Frame};
use ratatui::{
layout::{Rect, Size},
Frame,
};
use tokio::sync::mpsc::UnboundedSender;

use crate::{action::Action, config::Config, tui::Event};
Expand Down Expand Up @@ -48,7 +51,7 @@ pub trait Component {
/// # Returns
///
/// * `Result<()>` - An Ok result or an error.
fn init(&mut self, area: Rect) -> Result<()> {
fn init(&mut self, area: Size) -> Result<()> {
let _ = area; // to appease clippy
Ok(())
}
Expand Down
43 changes: 26 additions & 17 deletions component/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,46 @@ name = "{{project-name | kebab_case}}"
version = "0.1.0"
edition = "2021"
description = "{{project-description}}"
{% if repository != "" %}repository = "{{repository}}"{% endif %}
authors = ["{{authors}}"]
build = "build.rs"
{%- if repository != "" %}repository = "{{repository}}"{% endif %}

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
better-panic = "0.3.0"
clap = { version = "4.4.5", features = ["derive", "cargo", "wrap_help", "unicode", "string", "unstable-styles"] }
color-eyre = "0.6.2"
clap = { version = "4.4.5", features = [
"derive",
"cargo",
"wrap_help",
"unicode",
"string",
"unstable-styles",
] }
color-eyre = "0.6.3"
config = "0.14.0"
crossterm = { version = "0.27.0", features = ["serde", "event-stream"] }
crossterm = { version = "0.28.1", features = ["serde", "event-stream"] }
derive_deref = "1.1.1"
directories = "5.0.1"
futures = "0.3.28"
human-panic = "1.2.0"
futures = "0.3.30"
human-panic = "2.0.1"
json5 = "0.4.1"
lazy_static = "1.4.0"
libc = "0.2.148"
lazy_static = "1.5.0"
libc = "0.2.158"
pretty_assertions = "1.4.0"
ratatui = { version = "0.27.0", features = ["serde", "macros"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
ratatui = { version = "0.28.0", features = ["serde", "macros"] }
serde = { version = "1.0.208", features = ["derive"] }
serde_json = "1.0.125"
signal-hook = "0.3.17"
strip-ansi-escapes = "0.2.0"
strum = { version = "0.26.1", features = ["derive"] }
tokio = { version = "1.32.0", features = ["full"] }
tokio-util = "0.7.9"
tracing = "0.1.37"
strum = { version = "0.26.3", features = ["derive"] }
tokio = { version = "1.39.3", features = ["full"] }
tokio-util = "0.7.11"
tracing = "0.1.40"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "serde"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "serde"] }

[build-dependencies]
vergen = { version = "8.2.6", features = [ "build", "git", "gitoxide", "cargo" ]}
anyhow = "1.0.86"
vergen = { version = "9.0.0", features = ["build"] }
vergen-gix = "1.0.0"
17 changes: 11 additions & 6 deletions component/template/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
vergen::EmitBuilder::builder()
.all_build()
.all_git()
.emit()?;
Ok(())
use anyhow::Result;
use vergen::{BuildBuilder, Emitter};
use vergen_gix::GixBuilder;

fn main() -> Result<()> {
let build = BuildBuilder::all_build()?;
let gix = GixBuilder::all_git()?;
Emitter::default()
.add_instructions(&build)?
.add_instructions(&gix)?
.emit()
}
2 changes: 1 addition & 1 deletion component/template/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl App {
fn render(&mut self, tui: &mut Tui) -> Result<()> {
tui.draw(|frame| {
for component in self.components.iter_mut() {
if let Err(err) = component.draw(frame, frame.size()) {
if let Err(err) = component.draw(frame, frame.area()) {
let _ = self
.action_tx
.send(Action::Error(format!("Failed to draw: {:?}", err)));
Expand Down
7 changes: 5 additions & 2 deletions component/template/src/components.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use color_eyre::Result;
use crossterm::event::{KeyEvent, MouseEvent};
use ratatui::{layout::Rect, Frame};
use ratatui::{
layout::{Rect, Size},
Frame,
};
use tokio::sync::mpsc::UnboundedSender;

use crate::{action::Action, config::Config, tui::Event};
Expand Down Expand Up @@ -48,7 +51,7 @@ pub trait Component {
/// # Returns
///
/// * `Result<()>` - An Ok result or an error.
fn init(&mut self, area: Rect) -> Result<()> {
fn init(&mut self, area: Size) -> Result<()> {
let _ = area; // to appease clippy
Ok(())
}
Expand Down
6 changes: 3 additions & 3 deletions simple-async-generated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT"
edition = "2021"

[dependencies]
crossterm = { version = "0.27.0", features = ["event-stream"] }
crossterm = { version = "0.28.1", features = ["event-stream"] }
futures = "0.3.30"
ratatui = "0.27.0"
tokio = { version = "1.35.1", features = ["full"] }
ratatui = "0.28.0"
tokio = { version = "1.39.3", features = ["full"] }
14 changes: 0 additions & 14 deletions simple-async-generated/src/lib.rs

This file was deleted.

21 changes: 15 additions & 6 deletions simple-async-generated/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
use simple_async_generated::app::{App, AppResult};
use simple_async_generated::event::{Event, EventHandler};
use simple_async_generated::handler::handle_key_events;
use simple_async_generated::tui::Tui;
use std::io;
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;

use ratatui::{backend::CrosstermBackend, Terminal};

use crate::{
app::{App, AppResult},
event::{Event, EventHandler},
handler::handle_key_events,
tui::Tui,
};

pub mod app;
pub mod event;
pub mod handler;
pub mod tui;
pub mod ui;

#[tokio::main]
async fn main() -> AppResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion simple-async-generated/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ pub fn render(app: &mut App, frame: &mut Frame) {
)
.style(Style::default().fg(Color::Cyan).bg(Color::Black))
.centered(),
frame.size(),
frame.area(),
)
}
6 changes: 3 additions & 3 deletions simple-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT"
edition = "2021"

[dependencies]
crossterm = { version = "0.27.0", features = ["event-stream"] }
crossterm = { version = "0.28.1", features = ["event-stream"] }
futures = "0.3.30"
ratatui = "0.27.0"
tokio = { version = "1.35.1", features = ["full"] }
ratatui = "0.28.0"
tokio = { version = "1.39.3", features = ["full"] }
14 changes: 0 additions & 14 deletions simple-async/src/lib.rs

This file was deleted.

21 changes: 15 additions & 6 deletions simple-async/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
use {{crate_name}}::app::{App, AppResult};
use {{crate_name}}::event::{Event, EventHandler};
use {{crate_name}}::handler::handle_key_events;
use {{crate_name}}::tui::Tui;
use std::io;
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;

use ratatui::{backend::CrosstermBackend, Terminal};

use crate::{
app::{App, AppResult},
event::{Event, EventHandler},
handler::handle_key_events,
tui::Tui,
};

pub mod app;
pub mod event;
pub mod handler;
pub mod tui;
pub mod ui;

#[tokio::main]
async fn main() -> AppResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion simple-async/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ pub fn render(app: &mut App, frame: &mut Frame) {
)
.style(Style::default().fg(Color::Cyan).bg(Color::Black))
.centered(),
frame.size(),
frame.area(),
)
}
2 changes: 1 addition & 1 deletion simple-generated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ license = "MIT"
edition = "2021"

[dependencies]
ratatui = "0.27.0"
ratatui = "0.28.0"
14 changes: 0 additions & 14 deletions simple-generated/src/lib.rs

This file was deleted.

21 changes: 15 additions & 6 deletions simple-generated/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
use simple_generated::app::{App, AppResult};
use simple_generated::event::{Event, EventHandler};
use simple_generated::handler::handle_key_events;
use simple_generated::tui::Tui;
use std::io;
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;

use ratatui::{backend::CrosstermBackend, Terminal};

use crate::{
app::{App, AppResult},
event::{Event, EventHandler},
handler::handle_key_events,
tui::Tui,
};

pub mod app;
pub mod event;
pub mod handler;
pub mod tui;
pub mod ui;

fn main() -> AppResult<()> {
// Create an application.
Expand Down
2 changes: 1 addition & 1 deletion simple-generated/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ pub fn render(app: &mut App, frame: &mut Frame) {
)
.style(Style::default().fg(Color::Cyan).bg(Color::Black))
.centered(),
frame.size(),
frame.area(),
)
}
Loading