From 3b4ed2958039071a839c9c80854c0daca8458fa3 Mon Sep 17 00:00:00 2001 From: Michael Primeaux Date: Tue, 1 Jul 2025 21:04:36 -0500 Subject: [PATCH] debt: Upgrade dependencies --- .github/workflows/ci.yaml | 2 +- CHANGELOG.md | 15 +++++++- Makefile | 2 +- go.mod | 2 +- go.sum | 4 +- scripts/os-type.sh | 80 +++++++++++++++++++++++++++++++++++++++ vendor/modules.txt | 2 +- 7 files changed, 100 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a3080a9..86e9f61 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,7 +58,7 @@ jobs: # Ref: https://github.com/golangci/golangci-lint-action - name: Lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: args: --timeout=30m --config=.golangci.yaml --issues-exit-code=0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f9574b..f39c05c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,18 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security +--- +## [0.4.1] - 2025-07-01 + +### Added +### Changed +- **debt**: Upgraded all dependencies to the latest supported versions. + +### Deprecated +### Removed +### Fixed +### Security + --- ## [0.4.0] - 2025-04-16 @@ -79,7 +91,8 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security -[Unreleased]: https://github.com/sixafter/graph/compare/v0.4.0...HEAD +[Unreleased]: https://github.com/sixafter/graph/compare/v0.4.1...HEAD +[0.4.1]: https://github.com/sixafter/graph/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/sixafter/graph/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/sixafter/graph/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/sixafter/graph/compare/v0.1.0...v0.2.0 diff --git a/Makefile b/Makefile index 5138b7d..9a2b696 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ vuln: ## Check for vulnerabilities .PHONY: help help: ## Display this help screen - @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | sort # %: - rule which match any task name; @: - empty recipe = do nothing %: diff --git a/go.mod b/go.mod index 58d96af..0be66ac 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24 require ( github.com/stretchr/testify v1.10.0 - golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b ) require ( diff --git a/go.sum b/go.sum index 470275a..3a67469 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/scripts/os-type.sh b/scripts/os-type.sh index 7009ea3..443c038 100755 --- a/scripts/os-type.sh +++ b/scripts/os-type.sh @@ -4,6 +4,9 @@ # This source code is licensed under the Apache 2.0 License found in the # LICENSE file in the root directory of this source tree. +# Detect the platform (similar to $OSTYPE) +# OS=${OSTYPE//[0-9.]/} + UNAME=$( command -v uname) function detect_os() { @@ -37,6 +40,54 @@ function is_linux() { return $(false) } +function is_linux_arm() { + if ! $(is_linux); then + return $(false) + fi + + local ARCH + ARCH=$(uname -m) + + case "$ARCH" in + arm*|aarch64) + return $(true) + ;; + *) + return $(false) + ;; + esac +} + +function is_linux_amd() { + if ! $(is_linux); then + return $(false) + fi + + local ARCH + ARCH=$(uname -m) + + if [[ "$ARCH" == "x86_64" ]]; then + return $(true) + fi + + return $(false) +} + +function is_linux_x86() { + if ! $(is_linux); then + return $(false) + fi + + local ARCH + ARCH=$(uname -m) + + if [[ "$ARCH" == "i386" || "$ARCH" == "i686" ]]; then + return $(true) + fi + + return $(false) +} + function is_macos() { local OS=$(detect_os) if [[ $OS == 'macOS' ]]; then @@ -72,3 +123,32 @@ function is_macos_amd() { return $(false) } + +function is_linux_ubuntu() { + if ! $(is_linux); then + return $(false) + fi + + if [[ -f /etc/os-release ]]; then + . /etc/os-release + if [[ $ID == 'ubuntu' ]]; then + return $(true) + fi + fi + + return $(false) +} + +function is_wsl() { + if ! $(is_linux); then + return $(false) + fi + + # WSL detection based on /proc/version or osrelease + if grep -qiE 'microsoft|wsl' /proc/version 2>/dev/null || \ + grep -qiE 'microsoft|wsl' /proc/sys/kernel/osrelease 2>/dev/null; then + return $(true) + fi + + return $(false) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index ebdf36d..e27464c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,7 +10,7 @@ github.com/pmezard/go-difflib/difflib ## explicit; go 1.17 github.com/stretchr/testify/assert github.com/stretchr/testify/assert/yaml -# golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 +# golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b ## explicit; go 1.23.0 golang.org/x/exp/constraints # gopkg.in/yaml.v3 v3.0.1