From 047a3f8edd2d96904bf7a574fb8bef9d082a2d2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 21:15:58 +0000 Subject: [PATCH 1/9] Bump github.com/gdamore/tcell/v2 from 2.4.0 to 2.5.1 Bumps [github.com/gdamore/tcell/v2](https://github.com/gdamore/tcell) from 2.4.0 to 2.5.1. - [Release notes](https://github.com/gdamore/tcell/releases) - [Changelog](https://github.com/gdamore/tcell/blob/master/CHANGESv2.md) - [Commits](https://github.com/gdamore/tcell/compare/v2.4.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/gdamore/tcell/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 3 +-- go.sum | 18 ++++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1a6b4673..9205fd1a 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,8 @@ module github.com/mum4k/termdash go 1.14 require ( - github.com/gdamore/tcell/v2 v2.4.0 + github.com/gdamore/tcell/v2 v2.5.1 github.com/kylelemons/godebug v1.1.0 github.com/mattn/go-runewidth v0.0.13 github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e - golang.org/x/text v0.3.4 // indirect ) diff --git a/go.sum b/go.sum index 05254dd9..e06fe788 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,23 @@ github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell/v2 v2.4.0 h1:W6dxJEmaxYvhICFoTY3WrLLEXsQ11SaFnKGVEXW57KM= -github.com/gdamore/tcell/v2 v2.4.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU= +github.com/gdamore/tcell/v2 v2.5.1 h1:zc3LPdpK184lBW7syF2a5C6MV827KmErk9jGVnmsl/I= +github.com/gdamore/tcell/v2 v2.5.1/go.mod h1:wSkrPaXoiIWZqW/g7Px4xc79di6FTcpB8tvaKJ6uGBo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e h1:T8/SzSWIDoWV9trslLNfUdJ5yHrIXXuODEy5M0vou4U= github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 h1:saXMvIOKvRFwbOMicHXr0B1uwoxq9dGmLe5ExMES6c4= +golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From bb460d221d289faa03ec52fe73c04e1aa48d98e9 Mon Sep 17 00:00:00 2001 From: Aniket Teredesai Date: Fri, 1 Jul 2022 09:22:23 +0530 Subject: [PATCH 2/9] add tcell's dim text style --- cell/cell.go | 8 ++++++++ cell/cell_test.go | 2 ++ terminal/tcell/cell_options.go | 3 ++- terminal/tcell/cell_options_test.go | 5 +++++ terminal/termbox/cell_options.go | 5 +++++ terminal/termbox/cell_options_test.go | 1 + 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cell/cell.go b/cell/cell.go index 08a7ab06..ae3db0af 100644 --- a/cell/cell.go +++ b/cell/cell.go @@ -31,6 +31,7 @@ type Options struct { Strikethrough bool Inverse bool Blink bool + Dim bool } // Set allows existing options to be passed as an option. @@ -110,3 +111,10 @@ func Blink() Option { co.Blink = true }) } + +// Dim makes the cell foreground color dim. Only works when using the tcell backend. +func Dim() Option { + return option(func(co *Options) { + co.Dim = true + }) +} diff --git a/cell/cell_test.go b/cell/cell_test.go index 1447e3f2..3651b253 100644 --- a/cell/cell_test.go +++ b/cell/cell_test.go @@ -82,6 +82,7 @@ func TestNewOptions(t *testing.T) { Strikethrough(), Inverse(), Blink(), + Dim(), }, want: &Options{ Bold: true, @@ -90,6 +91,7 @@ func TestNewOptions(t *testing.T) { Strikethrough: true, Inverse: true, Blink: true, + Dim: true, }, }, } diff --git a/terminal/tcell/cell_options.go b/terminal/tcell/cell_options.go index b23fa3c0..a28e0050 100644 --- a/terminal/tcell/cell_options.go +++ b/terminal/tcell/cell_options.go @@ -70,6 +70,7 @@ func cellOptsToStyle(opts *cell.Options, colorMode terminalapi.ColorMode) tcell. Underline(opts.Underline). StrikeThrough(opts.Strikethrough). Reverse(opts.Inverse). - Blink(opts.Blink) + Blink(opts.Blink). + Dim(opts.Dim) return st } diff --git a/terminal/tcell/cell_options_test.go b/terminal/tcell/cell_options_test.go index 03b9b92a..0b0c2299 100644 --- a/terminal/tcell/cell_options_test.go +++ b/terminal/tcell/cell_options_test.go @@ -325,6 +325,11 @@ func TestCellOptsToStyle(t *testing.T) { opts: cell.Options{Blink: true}, want: tcell.StyleDefault.Blink(true), }, + { + colorMode: terminalapi.ColorModeNormal, + opts: cell.Options{Dim: true}, + want: tcell.StyleDefault.Dim(true), + }, } for _, tc := range tests { diff --git a/terminal/termbox/cell_options.go b/terminal/termbox/cell_options.go index 73864513..bae9f08d 100644 --- a/terminal/termbox/cell_options.go +++ b/terminal/termbox/cell_options.go @@ -67,6 +67,11 @@ func cellOptsToFg(opts *cell.Options) (tbx.Attribute, error) { if opts.Blink { return 0, errors.New("Termbox: Unsupported attribute: Blink") } + + if opts.Dim { + return 0, errors.New("Termbox: Unsupported attribute: Dim") + } + return a, nil } diff --git a/terminal/termbox/cell_options_test.go b/terminal/termbox/cell_options_test.go index e12c3b9c..0fe00a2a 100644 --- a/terminal/termbox/cell_options_test.go +++ b/terminal/termbox/cell_options_test.go @@ -62,6 +62,7 @@ func TestCellFontModifier(t *testing.T) { {cell.Options{Strikethrough: true}, 0, true}, {cell.Options{Inverse: true}, tbx.AttrReverse, false}, {cell.Options{Blink: true}, 0, true}, + {cell.Options{Dim: true}, 0, true}, } for _, tc := range tests { From 231073378f36ab2de5aa664bd23e18924fb20389 Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 13:35:59 -0400 Subject: [PATCH 3/9] Fixing invalid path to autogen_licenses script. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8be8141d..7e756479 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ script: - CGO_ENABLED=1 go test -mod=mod -race ./... - go vet ./... - diff -u <(echo -n) <(gofmt -d -s .) - - diff -u <(echo -n) <(./internal/scripts/autogen_licences.sh .) + - diff -u <(echo -n) <(./private/scripts/autogen_licences.sh .) - diff -u <(echo -n) <(golint ./...) - $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN env: From 1bfe58881100d20d8bc1ff1e4b4072189ca0acea Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 13:36:32 -0400 Subject: [PATCH 4/9] Updating dependencies. --- go.mod | 6 ++++-- go.sum | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9205fd1a..4f647e2a 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ module github.com/mum4k/termdash -go 1.14 +go 1.17 require ( github.com/gdamore/tcell/v2 v2.5.1 github.com/kylelemons/godebug v1.1.0 github.com/mattn/go-runewidth v0.0.13 - github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e + github.com/nsf/termbox-go v1.1.1 + golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect ) diff --git a/go.sum b/go.sum index e06fe788..a0739c31 100644 --- a/go.sum +++ b/go.sum @@ -6,17 +6,21 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e h1:T8/SzSWIDoWV9trslLNfUdJ5yHrIXXuODEy5M0vou4U= -github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= +github.com/nsf/termbox-go v1.1.1 h1:nksUPLCb73Q++DwbYUBEglYBRPZyoXJdrj5L+TkjyZY= +github.com/nsf/termbox-go v1.1.1/go.mod h1:T0cTdVuOwf7pHQNtfhnEbzHbcNyCEcVU4YPpouCbVxo= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 h1:saXMvIOKvRFwbOMicHXr0B1uwoxq9dGmLe5ExMES6c4= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= From cf2f350dffb82d1f338aef42cec4d04b4963efdf Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 13:36:44 -0400 Subject: [PATCH 5/9] Updating CHANGELOG. --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b068f78a..daee85bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added support for `tcell`'s `Dim` text style. + +### Changed + +- Bump github.com/gdamore/tcell from 2.4.0 to 2.5.1. +- Bump github.com/nsf/termbox-go to v1.1.1. +- Change the Go version in `go.mod` to 1.17. + +### Fixed + +- Fixed invalid path to the `autogen_licences.sh` script in `.travis.ci`. + ## [0.16.1] - 13-Jan-2022 ### Changed From f3c638c8e9614ba3986ad0865c57d1a5e29af246 Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 13:41:12 -0400 Subject: [PATCH 6/9] Executed `go mod tidy`. --- CHANGELOG.md | 1 + go.mod | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index daee85bb..f553920b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump github.com/gdamore/tcell from 2.4.0 to 2.5.1. - Bump github.com/nsf/termbox-go to v1.1.1. - Change the Go version in `go.mod` to 1.17. +- Executed `go mod tidy`. ### Fixed diff --git a/go.mod b/go.mod index 4f647e2a..b096ba5e 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,13 @@ require ( github.com/kylelemons/godebug v1.1.0 github.com/mattn/go-runewidth v0.0.13 github.com/nsf/termbox-go v1.1.1 +) + +require ( + github.com/gdamore/encoding v1.0.0 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect + golang.org/x/text v0.3.7 // indirect ) From 4a87d5279a64c8e08c08d36b2b7d8997274bd8cc Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 13:46:45 -0400 Subject: [PATCH 7/9] Add a missing license. --- private/faketerm/diff_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/private/faketerm/diff_test.go b/private/faketerm/diff_test.go index 2900f836..8223a87f 100644 --- a/private/faketerm/diff_test.go +++ b/private/faketerm/diff_test.go @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package faketerm import ( From f0f01d71fec842ad6324c5f8e0ae77e5e64e6785 Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 14:37:04 -0400 Subject: [PATCH 8/9] Attempt go install instead go get. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e756479..cd62bee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ go: - 1.17.x - stable before_install: - - go get golang.org/x/tools/cmd/cover - - go get github.com/mattn/goveralls + - go install golang.org/x/tools/cmd/cover@latest + - go install github.com/mattn/goveralls@latest + - go install golang.org/x/lint/golint@latest script: - go get -t ./... - - go get -u golang.org/x/lint/golint # Temporarily set -mod=mod to allow modification of go.mod and go.sum. # This seems to be caused by a sum missing in the tcell dependency and # should be removed when no longer needed. From 07a736f64323e3e83ebb7e7b6d4c66f36d14a4a9 Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Thu, 7 Jul 2022 14:58:03 -0400 Subject: [PATCH 9/9] Modify CHANGELOG for release v0.17.0. --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f553920b..32659772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.17.0] - 07-Jul-2022 + ### Added - Added support for `tcell`'s `Dim` text style. @@ -487,7 +489,8 @@ identifiers shouldn't be used externally. - The Gauge widget. - The Text widget. -[unreleased]: https://github.com/mum4k/termdash/compare/v0.16.1...devel +[unreleased]: https://github.com/mum4k/termdash/compare/v0.17.0...devel +[0.17.0]: https://github.com/mum4k/termdash/compare/v0.16.1...v0.17.0 [0.16.1]: https://github.com/mum4k/termdash/compare/v0.16.0...v0.16.1 [0.16.0]: https://github.com/mum4k/termdash/compare/v0.15.0...v0.16.0 [0.15.0]: https://github.com/mum4k/termdash/compare/v0.14.0...v0.15.0