Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump version of go tools, go compiler, and goquery (fixes CVE) #1031

Merged
merged 5 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- uses: DeterminateSystems/nix-installer-action@v16
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: DeterminateSystems/magic-nix-cache-action@v3
- uses: DeterminateSystems/magic-nix-cache-action@v8

- name: Test
run: nix develop --command xc test-cover
Expand All @@ -42,11 +42,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- uses: DeterminateSystems/nix-installer-action@v16
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: DeterminateSystems/magic-nix-cache-action@v3
- uses: DeterminateSystems/magic-nix-cache-action@v8

- name: Lint
run: nix develop --command xc lint
Expand All @@ -56,11 +56,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- uses: DeterminateSystems/nix-installer-action@v16
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: DeterminateSystems/magic-nix-cache-action@v3
- uses: DeterminateSystems/magic-nix-cache-action@v8

- name: Generate
run: nix develop --command xc ensure-generated
Expand All @@ -70,11 +70,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- uses: DeterminateSystems/nix-installer-action@v16
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: DeterminateSystems/magic-nix-cache-action@v3
- uses: DeterminateSystems/magic-nix-cache-action@v8

- name: Fmt
run: nix develop --command xc fmt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- uses: actions/setup-node@v4
with:
node-version: '20'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
with:
go-version: 1.22
cache: true
- uses: ko-build/setup-ko@v0.6
- uses: sigstore/cosign-installer@v3.3.0
- uses: ko-build/setup-ko@v0.7
- uses: sigstore/cosign-installer@v3.7.0
with:
cosign-release: v2.2.3
- uses: goreleaser/goreleaser-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.810
0.3.812
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ cd cmd/templ
go build
```

### nix-update-gomod2nix

```sh
gomod2nix
```

### install-snapshot

Build and install current version.
Expand Down
2 changes: 1 addition & 1 deletion cmd/templ/generatecmd/run/testprogram/go.mod.embed
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module testprogram

go 1.22.6
go 1.23
2 changes: 1 addition & 1 deletion cmd/templ/generatecmd/testwatch/testdata/go.mod.embed
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module templ/testproject

go 1.21
go 1.23

require github.com/a-h/templ v0.2.513 // indirect

Expand Down
7 changes: 5 additions & 2 deletions cmd/templ/lspcmd/lsp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func TestHover(t *testing.T) {
expectedHover := protocol.Hover{
Contents: protocol.MarkupContent{
Kind: "markdown",
Value: "```go\npackage fmt\n```\n\n[`fmt` on pkg.go.dev](https://pkg.go.dev/fmt)",
Value: "```go\npackage fmt\n```\n\n---\n\n[`fmt` on pkg.go.dev](https://pkg.go.dev/fmt)",
},
}
if diff := lspdiff.Hover(expectedHover, *actual); diff != "" {
Expand All @@ -233,9 +233,12 @@ func TestHover(t *testing.T) {
expectedHover := protocol.Hover{
Contents: protocol.MarkupContent{
Kind: "markdown",
Value: "```go\nfunc fmt.Sprintf(format string, a ...any) string\n```\n\nSprintf formats according to a format specifier and returns the resulting string.\n\n\n[`fmt.Sprintf` on pkg.go.dev](https://pkg.go.dev/fmt#Sprintf)",
Value: "```go\nfunc fmt.Sprintf(format string, a ...any) string\n```\n\n---\n\nSprintf formats according to a format specifier and returns the resulting string.\n\n\n---\n\n[`fmt.Sprintf` on pkg.go.dev](https://pkg.go.dev/fmt#Sprintf)",
},
}
if actual == nil {
return "expected hover to be non-nil", false
}
if diff := lspdiff.Hover(expectedHover, *actual); diff != "" {
return fmt.Sprintf("unexpected hover: %v", diff), false
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/templ/lspcmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func run(ctx context.Context, log *zap.Logger, templStream jsonrpc2.Stream, args

log.Info("creating gopls client")
clientProxy, clientInit := proxy.NewClient(log, cache, diagnosticCache)
_, goplsConn, goplsServer := protocol.NewClient(context.Background(), clientProxy, jsonrpc2.NewStream(rwc), log)
_, goplsConn, goplsServer := protocol.NewClient(ctx, clientProxy, jsonrpc2.NewStream(rwc), log)
defer goplsConn.Close()

log.Info("creating proxy")
Expand Down
1 change: 0 additions & 1 deletion cmd/templ/lspcmd/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ func (p *Server) Initialize(ctx context.Context, params *lsp.InitializeParams) (
isTemplFile, goURI := convertTemplToGoURI(uri)

if !isTemplFile {
p.Log.Info("not a templ file", zap.String("uri", string(uri)))
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/templ/testproject/testdata/go.mod.embed
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module templ/testproject

go 1.21
go 1.23

require github.com/a-h/templ v0.2.513 // indirect

Expand Down
4 changes: 2 additions & 2 deletions examples/counter-basic/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/a-h/templ/examples/counter-basic

go 1.21
go 1.23

toolchain go1.21.5
toolchain go1.23.3

require github.com/a-h/templ v0.2.233

Expand Down
8 changes: 4 additions & 4 deletions examples/counter/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/a-h/templ/examples/counter

go 1.21
go 1.23

toolchain go1.21.5
toolchain go1.23.3

require (
github.com/a-h/templ v0.2.234-0.20230427112944-80f0dc03a8a8
Expand Down Expand Up @@ -45,8 +45,8 @@ require (
github.com/yuin/goldmark v1.7.4 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/tools v0.24.0 // indirect
)

Expand Down
8 changes: 4 additions & 4 deletions examples/counter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
Expand Down
4 changes: 2 additions & 2 deletions examples/external-libraries/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/a-h/templ/examples/external-libraries

go 1.21
go 1.23

toolchain go1.21.5
toolchain go1.23.3

require github.com/a-h/templ v0.2.304

Expand Down
6 changes: 4 additions & 2 deletions examples/integration-chi/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module github.com/a-h/templ/examples/integration-chi

go 1.21.1
go 1.23

toolchain go1.23.3

require (
github.com/a-h/templ v0.2.364
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/chi/v5 v5.2.0
)

replace github.com/a-h/templ => ../../
4 changes: 2 additions & 2 deletions examples/integration-chi/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=
github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
45 changes: 29 additions & 16 deletions examples/integration-gin/go.mod
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
module github.com/a-h/templ/examples/integration-gin

go 1.21.1
go 1.23

toolchain go1.23.3

require (
github.com/a-h/templ v0.2.663
github.com/gin-gonic/gin v1.10.0
github.com/gin-gonic/gin v1.10.1-0.20241230033924-23d6961aeb9d
)

require (
github.com/bytedance/sonic v1.11.9 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/bytedance/sonic v1.12.6 // indirect
github.com/bytedance/sonic/loader v0.2.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.7 // indirect
github.com/gin-contrib/sse v1.0.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/go-playground/validator/v10 v10.23.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/onsi/ginkgo/v2 v2.22.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.48.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
go.uber.org/mock v0.5.0 // indirect
golang.org/x/arch v0.12.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/protobuf v1.36.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading
Loading