From 0fdf5f5be5e35959b8d6d1051317304655509617 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 18 Sep 2024 14:09:58 -0400 Subject: [PATCH] feat: use bubbletea/v2 --- cursor/cursor.go | 2 +- filepicker/filepicker.go | 2 +- go.mod | 3 +-- go.sum | 4 ---- help/help.go | 2 +- list/defaultitem.go | 2 +- list/list.go | 2 +- list/list_test.go | 2 +- paginator/paginator.go | 2 +- paginator/paginator_test.go | 2 +- progress/progress.go | 2 +- spinner/spinner.go | 2 +- stopwatch/stopwatch.go | 2 +- table/table.go | 2 +- textarea/textarea.go | 2 +- textarea/textarea_test.go | 2 +- textinput/textinput.go | 2 +- timer/timer.go | 2 +- viewport/viewport.go | 2 +- 19 files changed, 18 insertions(+), 23 deletions(-) diff --git a/cursor/cursor.go b/cursor/cursor.go index 1297422d..2f69eeea 100644 --- a/cursor/cursor.go +++ b/cursor/cursor.go @@ -4,7 +4,7 @@ import ( "context" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/filepicker/filepicker.go b/filepicker/filepicker.go index 8bb68fd2..bda8ffb6 100644 --- a/filepicker/filepicker.go +++ b/filepicker/filepicker.go @@ -10,7 +10,7 @@ import ( "sync" "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/dustin/go-humanize" ) diff --git a/go.mod b/go.mod index de9cb9df..d6781936 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/MakeNowJust/heredoc v1.0.0 github.com/atotto/clipboard v0.1.4 - github.com/charmbracelet/bubbletea v1.1.1-0.20240830154658-85c5adc127b3 + github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2 github.com/charmbracelet/harmonica v0.2.0 github.com/charmbracelet/lipgloss v0.13.0 github.com/charmbracelet/x/ansi v0.3.2 @@ -21,7 +21,6 @@ require ( require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymanbagabas/go-udiff v0.2.0 // indirect - github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2 // indirect github.com/charmbracelet/x/term v0.2.0 // indirect github.com/charmbracelet/x/windows v0.2.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect diff --git a/go.sum b/go.sum index 9bdd1270..d0613eee 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,6 @@ github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiE github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= -github.com/charmbracelet/bubbletea v1.1.1-0.20240830154658-85c5adc127b3 h1:oqDwkNLoIVbOjX0ZomkPljMtRKZvJMpYkR1A68QcbJo= -github.com/charmbracelet/bubbletea v1.1.1-0.20240830154658-85c5adc127b3/go.mod h1:RYka31SjvShLlaYsbsBSiXnneU2JUEoKvI3nrOUaJuw= github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2 h1:833Ay19EJBhkDboQHmISKX8LaPfVj3Y8vYG8/MlD4p0= github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2/go.mod h1:j0gn4ft5CE7NDYNZjAA3hBM8t2OPjI8urxuAD0oR4w8= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= @@ -49,7 +47,5 @@ golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZ golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/help/help.go b/help/help.go index f4e1c971..449ae23e 100644 --- a/help/help.go +++ b/help/help.go @@ -4,7 +4,7 @@ import ( "strings" "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/list/defaultitem.go b/list/defaultitem.go index 3f07cef6..ab6ce8f0 100644 --- a/list/defaultitem.go +++ b/list/defaultitem.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/ansi" ) diff --git a/list/list.go b/list/list.go index c16f0af7..78f5e4f9 100644 --- a/list/list.go +++ b/list/list.go @@ -10,7 +10,7 @@ import ( "strings" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/ansi" "github.com/sahilm/fuzzy" diff --git a/list/list_test.go b/list/list_test.go index 2627e5b1..d1d8524b 100644 --- a/list/list_test.go +++ b/list/list_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type item string diff --git a/paginator/paginator.go b/paginator/paginator.go index 7b8715f2..23915e39 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) // Type specifies the way we render pagination. diff --git a/paginator/paginator_test.go b/paginator/paginator_test.go index 4243a193..162c0577 100644 --- a/paginator/paginator_test.go +++ b/paginator/paginator_test.go @@ -3,7 +3,7 @@ package paginator import ( "testing" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func TestNew(t *testing.T) { diff --git a/progress/progress.go b/progress/progress.go index be5b16b6..71d15a3d 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -7,7 +7,7 @@ import ( "sync" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/harmonica" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/ansi" diff --git a/spinner/spinner.go b/spinner/spinner.go index bb53597f..7b592b15 100644 --- a/spinner/spinner.go +++ b/spinner/spinner.go @@ -4,7 +4,7 @@ import ( "sync" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/stopwatch/stopwatch.go b/stopwatch/stopwatch.go index 82356613..a37a0f23 100644 --- a/stopwatch/stopwatch.go +++ b/stopwatch/stopwatch.go @@ -5,7 +5,7 @@ import ( "sync" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) var ( diff --git a/table/table.go b/table/table.go index 3b931ff2..dff47809 100644 --- a/table/table.go +++ b/table/table.go @@ -6,7 +6,7 @@ import ( "github.com/charmbracelet/bubbles/help" "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/viewport" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/mattn/go-runewidth" ) diff --git a/textarea/textarea.go b/textarea/textarea.go index a825bd02..9252dad1 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -13,7 +13,7 @@ import ( "github.com/charmbracelet/bubbles/runeutil" "github.com/charmbracelet/bubbles/textarea/memoization" "github.com/charmbracelet/bubbles/viewport" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/ansi" rw "github.com/mattn/go-runewidth" diff --git a/textarea/textarea_test.go b/textarea/textarea_test.go index ed52180b..7831ce1e 100644 --- a/textarea/textarea_test.go +++ b/textarea/textarea_test.go @@ -6,7 +6,7 @@ import ( "unicode" "github.com/MakeNowJust/heredoc" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/x/ansi" ) diff --git a/textinput/textinput.go b/textinput/textinput.go index ec7a7c9f..0b1c86a9 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -10,7 +10,7 @@ import ( "github.com/charmbracelet/bubbles/cursor" "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbles/runeutil" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" rw "github.com/mattn/go-runewidth" "github.com/rivo/uniseg" diff --git a/timer/timer.go b/timer/timer.go index b9e76348..fa56305b 100644 --- a/timer/timer.go +++ b/timer/timer.go @@ -5,7 +5,7 @@ import ( "sync" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) var ( diff --git a/viewport/viewport.go b/viewport/viewport.go index 870fac48..8a42b6f9 100644 --- a/viewport/viewport.go +++ b/viewport/viewport.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" )