Skip to content

Commit 0a8a2a7

Browse files
nigorollja7ad
authored andcommitted
chore: Bump golang-jwt to v5 and, consequently, the minimum go version to 1.21
In a project using this module it was noticed that it was the (only) reason to still also include jwt/v4. JWT usage in this module seems rather limited, so regressions seem unlikely. Based on review feedback, also bump the newest go version for tests to 1.25 `git config --global --add safe.directory /home/package` is added to the Dockerfile to avoid VCS stamping failures.
1 parent b094d05 commit 0a8a2a7

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

.github/workflows/pre-release-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
strategy:
1515
matrix:
1616
# Current go.mod version and latest stable go version
17-
go: ["1.20", "1.24"]
17+
go: ["1.21", "1.25"]
1818
include:
19-
- go: "1.20"
19+
- go: "1.21"
2020
tag: current
21-
- go: "1.24"
21+
- go: "1.25"
2222
tag: latest
2323

2424
name: integration-tests-against-rc (go ${{ matrix.tag }} version)

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/setup-go@v6
1616
with:
17-
go-version: 1.24
17+
go-version: 1.25
1818
- uses: actions/checkout@v6
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v9
@@ -35,11 +35,11 @@ jobs:
3535
strategy:
3636
matrix:
3737
# Current go.mod version and latest stable go version
38-
go: ["1.20", "1.24"]
38+
go: ["1.21", "1.25"]
3939
include:
40-
- go: "1.20"
40+
- go: "1.21"
4141
tag: current
42-
- go: "1.24"
42+
- go: "1.25"
4343
tag: latest
4444

4545
name: integration-tests (go ${{ matrix.tag }} version)

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
FROM golang:1.20-buster
1+
FROM golang:1.21-bookworm
22

33
WORKDIR /home/package
44

5+
RUN git config --global --add safe.directory /home/package
6+
57
COPY go.mod .
68
COPY go.sum .
79

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
- [Table of Contents](#table-of-contents)
3434
- [📖 Documentation](#-documentation)
35-
- [🔧 Installation (\>= 1.20)](#-installation--120)
35+
- [🔧 Installation (\>= 1.21)](#-installation--121)
3636
- [🚀 Getting started](#-getting-started)
3737
- [Add documents](#add-documents)
3838
- [Basic Search](#basic-search)
@@ -52,7 +52,7 @@ This readme contains all the documentation you need to start using this Meilisea
5252
For general information on how to use Meilisearch—such as our API reference, tutorials, guides, and in-depth articles—refer to our [main documentation website](https://www.meilisearch.com/docs/).
5353

5454

55-
## 🔧 Installation (>= 1.20)
55+
## 🔧 Installation (>= 1.21)
5656

5757
With `go get` in command line:
5858
```bash

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/meilisearch/meilisearch-go
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/andybalholm/brotli v1.1.1
7-
github.com/golang-jwt/jwt/v4 v4.5.2
7+
github.com/golang-jwt/jwt/v5 v5.3.0
88
github.com/stretchr/testify v1.11.1
99
)
1010

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7X
22
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
6-
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
5+
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
6+
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
77
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
88
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
99
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=

meilisearch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
"time"
99

10-
"github.com/golang-jwt/jwt/v4"
10+
"github.com/golang-jwt/jwt/v5"
1111
)
1212

1313
type meilisearch struct {

types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"time"
66

7-
"github.com/golang-jwt/jwt/v4"
7+
"github.com/golang-jwt/jwt/v5"
88
)
99

1010
const (

0 commit comments

Comments
 (0)