Skip to content

Commit

Permalink
fix(deps): Update module github.com/spf13/cobra to v1.8.0 (#1592)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/spf13/cobra](https://togithub.com/spf13/cobra) | require | minor | `v1.6.1` -> `v1.8.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>spf13/cobra (github.com/spf13/cobra)</summary>

### [`v1.8.0`](https://togithub.com/spf13/cobra/releases/tag/v1.8.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.7.0...v1.8.0)

#### ✨ Features

-   Support usage as plugin for tools like kubectl by [@&#8203;nirs](https://togithub.com/nirs) in [spf13/cobra#2018 - this means that programs that utilize a "plugin-like" structure have much better support and usage (like for completions, command paths, etc.)
-   Move documentation sources to site/content by [@&#8203;umarcor](https://togithub.com/umarcor) in [spf13/cobra#1428
-   Add 'one required flag' group by [@&#8203;marevers](https://togithub.com/marevers) in [spf13/cobra#1952 - this includes a new `MarkFlagsOneRequired` API for flags which can be used to mark a flag group as required and cause command failure if at least one is not used when invoked.
-   Customizable error message prefix by [@&#8203;5ouma](https://togithub.com/5ouma) in [spf13/cobra#2023 - This adds the `SetErrPrefix` and `ErrPrefix` APIs on the `Command` struct to allow for setting a custom prefix for errors
-   feat: add getters for flag completions by [@&#8203;avirtopeanu-ionos](https://togithub.com/avirtopeanu-ionos) in [spf13/cobra#1943
-   Feature: allow running persistent run hooks of all parents by [@&#8203;vkhoroz](https://togithub.com/vkhoroz) in [spf13/cobra#2044
-   Improve API to get flag completion function by [@&#8203;marckhouzam](https://togithub.com/marckhouzam) in [spf13/cobra#2063

#### 🐛 Bug fixes

-   Fix typo in fish completions by [@&#8203;twpayne](https://togithub.com/twpayne) in [spf13/cobra#1945
-   Fix grammar: 'allows to' by [@&#8203;supertassu](https://togithub.com/supertassu) in [spf13/cobra#1978
-   powershell: escape variable with curly brackets by [@&#8203;Luap99](https://togithub.com/Luap99) in [spf13/cobra#1960
-   Don't complete --help flag when flag parsing disabled by [@&#8203;marckhouzam](https://togithub.com/marckhouzam) in [spf13/cobra#2061
-   Replace all non-alphanumerics in active help env var program prefix by [@&#8203;scop](https://togithub.com/scop) in [spf13/cobra#1940

#### 🔧 Maintenance

-   build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#1971
-   build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#1976
-   build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#2021
-   build(deps): bump actions/setup-go from 3 to 4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#1934
-   build(deps): bump github.com/cpuguy83/go-md2man/v2 from 2.0.2 to 2.0.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#2047
-   build(deps): bump actions/checkout from 3 to 4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [spf13/cobra#2028
-   command: temporarily disable G602 due to [securego/gosec#1005](https://togithub.com/securego/gosec/issues/1005) by [@&#8203;umarcor](https://togithub.com/umarcor) in [spf13/cobra#2022

#### 🧪 Testing & CI/CD

-   test: make fish_completions_test more robust by [@&#8203;branchvincent](https://togithub.com/branchvincent) in [spf13/cobra#1980
-   golangci: enable 'unused' and disable deprecated replaced by it by [@&#8203;umarcor](https://togithub.com/umarcor) in [spf13/cobra#1983
-   cleanup: minor corrections to unit tests by [@&#8203;JunNishimura](https://togithub.com/JunNishimura) in [spf13/cobra#2003
-   ci: test golang 1.21 by [@&#8203;nunoadrego](https://togithub.com/nunoadrego) in [spf13/cobra#2024
-   Fix linter errors by [@&#8203;marckhouzam](https://togithub.com/marckhouzam) in [spf13/cobra#2052
-   Add tests for flag completion registration by [@&#8203;marckhouzam](https://togithub.com/marckhouzam) in [spf13/cobra#2053

#### ✏️ Documentation

-   doc: fix typo, Deperecated -> Deprecated by [@&#8203;callthingsoff](https://togithub.com/callthingsoff) in [spf13/cobra#2000
-   Add notes to doc about the execution condition of \*PreRun and \*PostRun functions by [@&#8203;haoming29](https://togithub.com/haoming29) in [spf13/cobra#2041

***

Thank you everyone who contributed to this release and all your hard work! Cobra and this community would never be possible without all of you!!!! 🐍

**Full Changelog**: spf13/cobra@v1.7.0...v1.8.0

### [`v1.7.0`](https://togithub.com/spf13/cobra/releases/tag/v1.7.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.6.1...v1.7.0)

##### ✨ Features

-   Allow to preserve ordering of completions in `bash`, `zsh`, `pwsh`, & `fish`: [@&#8203;h4ck3rk3y](https://togithub.com/h4ck3rk3y) [#&#8203;1903](https://togithub.com/spf13/cobra/issues/1903)
-   Add support for PowerShell 7.2+ in completions: [@&#8203;oldium](https://togithub.com/oldium) [#&#8203;1916](https://togithub.com/spf13/cobra/issues/1916)
-   Allow sourcing zsh completion script: [@&#8203;marckhouzam](https://togithub.com/marckhouzam) [#&#8203;1917](https://togithub.com/spf13/cobra/issues/1917)

##### 🐛 Bug fixes

-   Don't remove flag values that match sub-command name: [@&#8203;brianpursley](https://togithub.com/brianpursley) [#&#8203;1781](https://togithub.com/spf13/cobra/issues/1781)
-   Fix powershell completions not returning single word: [@&#8203;totkeks](https://togithub.com/totkeks) [#&#8203;1850](https://togithub.com/spf13/cobra/issues/1850)
-   Remove masked `template` import variable name: [@&#8203;yashLadha](https://togithub.com/yashLadha) [#&#8203;1879](https://togithub.com/spf13/cobra/issues/1879)
-   Correctly detect completions with dash in argument: [@&#8203;oncilla](https://togithub.com/oncilla) [#&#8203;1817](https://togithub.com/spf13/cobra/issues/1817)

##### 🧪 Testing & CI/CD

-   Deprecate Go 1.15 in CI: [@&#8203;umarcor](https://togithub.com/umarcor) [#&#8203;1866](https://togithub.com/spf13/cobra/issues/1866)
-   Deprecate Go 1.16 in CI: [@&#8203;umarcor](https://togithub.com/umarcor) [#&#8203;1926](https://togithub.com/spf13/cobra/issues/1926)
-   Add testing for Go 1.20 in CI: [@&#8203;umarcor](https://togithub.com/umarcor) [#&#8203;1925](https://togithub.com/spf13/cobra/issues/1925)
-   Add tests to illustrate unknown flag bug: [@&#8203;brianpursley](https://togithub.com/brianpursley) [#&#8203;1854](https://togithub.com/spf13/cobra/issues/1854)

##### 🔧 Maintenance

-   Update main image to better handle dark backgrounds: [@&#8203;Deleplace](https://togithub.com/Deleplace) and [@&#8203;marckhouzam](https://togithub.com/marckhouzam) [#&#8203;1883](https://togithub.com/spf13/cobra/issues/1883)
-   Fix `stale.yaml` mispellings: [@&#8203;enrichman](https://togithub.com/enrichman) [#&#8203;1863](https://togithub.com/spf13/cobra/issues/1863)
-   Remove stale bot from GitHub actions: [@&#8203;jpmcb](https://togithub.com/jpmcb) [#&#8203;1908](https://togithub.com/spf13/cobra/issues/1908)
-   Add makefile target for installing dependencies: [@&#8203;umarcor](https://togithub.com/umarcor) [#&#8203;1865](https://togithub.com/spf13/cobra/issues/1865)
-   Add Sia to projects using Cobra: [@&#8203;mike76-dev](https://togithub.com/mike76-dev) [#&#8203;1844](https://togithub.com/spf13/cobra/issues/1844)
-   Add `Vitess` and `Arewefastyet` to projects using cobra: [@&#8203;frouioui](https://togithub.com/frouioui) [#&#8203;1932](https://togithub.com/spf13/cobra/issues/1932)
-   Fixup for Kubescape github org: [@&#8203;dwertent](https://togithub.com/dwertent) [#&#8203;1874](https://togithub.com/spf13/cobra/issues/1874)
-   Fix route for GitHub workflows badge: [@&#8203;sh-cho](https://togithub.com/sh-cho) [#&#8203;1884](https://togithub.com/spf13/cobra/issues/1884)
-   Fixup for GoDoc style documentation: [@&#8203;yashLadha](https://togithub.com/yashLadha) [#&#8203;1885](https://togithub.com/spf13/cobra/issues/1885)
-   Various bash scripting improvements for completion: [@&#8203;scop](https://togithub.com/scop) [#&#8203;1702](https://togithub.com/spf13/cobra/issues/1702)
-   Add Constellation to projects using Cobra: [@&#8203;datosh](https://togithub.com/datosh) [#&#8203;1829](https://togithub.com/spf13/cobra/issues/1829)

##### ✏️ Documentation

-   Add documentation about disabling completion descriptions: [@&#8203;Shihta](https://togithub.com/Shihta) [#&#8203;1901](https://togithub.com/spf13/cobra/issues/1901)
-   Improve `MarkFlagsMutuallyExclusive` example in user guide: [@&#8203;janhn](https://togithub.com/janhn) [#&#8203;1904](https://togithub.com/spf13/cobra/issues/1904)
-   Update `shell_completions.md`: [@&#8203;gusega](https://togithub.com/gusega) [#&#8203;1907](https://togithub.com/spf13/cobra/issues/1907)
-   Update copywrite year: [@&#8203;umarcor](https://togithub.com/umarcor) [#&#8203;1927](https://togithub.com/spf13/cobra/issues/1927)
-   Document suggested layout of subcommands: [@&#8203;lcarva](https://togithub.com/lcarva) [#&#8203;1930](https://togithub.com/spf13/cobra/issues/1930)
-   Replace deprecated ExactValidArgs with MatchAll in doc: [@&#8203;doniacld](https://togithub.com/doniacld) [#&#8203;1836](https://togithub.com/spf13/cobra/issues/1836)

***

This release contains several long running fixes, improvements to powershell completions, and further optimizations for completions.

Thank you everyone who contributed to this release and all your hard work! Cobra and this community would never be possible without all of you! 🐍

Full changelog:  spf13/cobra@v1.6.1...v1.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
  • Loading branch information
cq-bot committed Apr 1, 2024
1 parent 5331564 commit fc8558b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/simple_plugin/go.mod
Expand Up @@ -90,7 +90,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/tdewolff/minify/v2 v2.20.18 // indirect
Expand Down
7 changes: 3 additions & 4 deletions examples/simple_plugin/go.sum
Expand Up @@ -52,7 +52,7 @@ github.com/cloudquery/plugin-pb-go v1.19.5/go.mod h1:jebRaJiStH+RH+9aYFEPxnJucQj
github.com/cloudquery/plugin-sdk/v2 v2.7.0 h1:hRXsdEiaOxJtsn/wZMFQC9/jPfU1MeMK3KF+gPGqm7U=
github.com/cloudquery/plugin-sdk/v2 v2.7.0/go.mod h1:pAX6ojIW99b/Vg4CkhnsGkRIzNaVEceYMR+Bdit73ug=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -129,7 +129,6 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI=
Expand Down Expand Up @@ -221,8 +220,8 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -16,7 +16,7 @@ require (
github.com/invopop/jsonschema v0.12.0
github.com/rs/zerolog v1.32.0
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/spf13/cobra v1.6.1
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/thoas/go-funk v0.9.3
go.opentelemetry.io/otel v1.20.0
Expand Down
7 changes: 3 additions & 4 deletions go.sum
Expand Up @@ -52,7 +52,7 @@ github.com/cloudquery/plugin-pb-go v1.19.5/go.mod h1:jebRaJiStH+RH+9aYFEPxnJucQj
github.com/cloudquery/plugin-sdk/v2 v2.7.0 h1:hRXsdEiaOxJtsn/wZMFQC9/jPfU1MeMK3KF+gPGqm7U=
github.com/cloudquery/plugin-sdk/v2 v2.7.0/go.mod h1:pAX6ojIW99b/Vg4CkhnsGkRIzNaVEceYMR+Bdit73ug=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -129,7 +129,6 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI=
Expand Down Expand Up @@ -221,8 +220,8 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
Expand Down

1 comment on commit fc8558b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Benchmark results

  • Glob-8 ns/op: 91.66

Please sign in to comment.