Skip to content
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"build": {
"dockerfile": "../tools/devtools/Dockerfile",
"args": {
"BASE_IMG": "mcr.microsoft.com/devcontainers/typescript-node:18-bullseye"
"BASE_IMG": "mcr.microsoft.com/devcontainers/typescript-node:24-trixie"
}
},
"postCreateCommand": "sudo find . -name node_modules -exec chown node:node {} \\;",
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/examples-autocomplete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: builds the autocomplete example usage of reference-lib
on:
push:
branches: ['main']
paths: ['examples/autocomplete/**', 'reference-lib/**']
paths: ['examples/autocomplete/**', '.github/workflows/examples-autocomplete.yml', 'reference-lib/**']
pull_request:
branches: ['main']
paths: ['examples/autocomplete/**', 'reference-lib/**']
paths: ['examples/autocomplete/**', '.github/workflows/examples-autocomplete.yml', 'reference-lib/**']

defaults:
run:
Expand All @@ -18,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 24
- name: build the reference-lib
working-directory: ./reference-lib
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/examples-ref-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: builds the example ref-browser usage of reference-lib
on:
push:
branches: ['main']
paths: ['examples/ref-browser/**', 'reference-lib/**']
paths: ['examples/ref-browser/**', '.github/workflows/examples-ref-browser.yml', 'reference-lib/**']
pull_request:
branches: ['main']
paths: ['examples/ref-browser/**', 'reference-lib/**']
paths: ['examples/ref-browser/**', '.github/workflows/examples-ref-browser.yml', 'reference-lib/**']

defaults:
run:
Expand All @@ -18,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 24
- name: build the reference-lib
working-directory: ./reference-lib
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reference-converter.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
fi
- uses: actions/setup-node@v6
with:
node-version: 24
- name: update npm package version
if: steps.diff.outputs.reference_change
run: npm version patch --no-git-tag-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reference-converter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
cache: false
- name: use the same version of GOLANGCI_LINT_VERSION as devtools
run: make devtools-versions >> "$GITHUB_ENV"
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v9
with:
working-directory: ${{ env.working-directory }}
version: v${{ env.GOLANGCI_LINT_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/reference-lib.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version: 24
- name: Install dependencies
run: npm ci
- name: Test it out
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: "2"
linters:
# add non-default linters https://golangci-lint.run/usage/linters/#disabled-by-default
# add non-default linters https://golangci-lint.run/docs/linters/
enable:
- bodyclose
- errorlint
Expand Down
2 changes: 1 addition & 1 deletion reference-converter/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nginxinc/nginx-directive-reference/reference-converter

go 1.24
go 1.25

require (
github.com/gomarkdown/markdown v0.0.0-20241205020045-f7e15b2f3e62
Expand Down
2 changes: 1 addition & 1 deletion reference-converter/internal/atom/atom.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func openURL(ctx context.Context, url string, client http.Client) ([]byte, error
if err != nil {
return nil, fmt.Errorf("unable to download %s: %w", url, err)
}
defer res.Body.Close()
defer res.Body.Close() //nolint:errcheck // nothing to do about it

if res.StatusCode != http.StatusOK {
return nil, fmt.Errorf("unable to download %s: %s", url, res.Status)
Expand Down
2 changes: 1 addition & 1 deletion reference-converter/internal/parse/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (l *link) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
title = p.Name
}

title = strings.Replace(title, "\n", " ", -1)
title = strings.ReplaceAll(title, "\n", " ")

href := attrs["url"]
if href == "" {
Expand Down
6 changes: 3 additions & 3 deletions reference-converter/internal/tarball/tarball.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func openURL(ctx context.Context, url string, client http.Client) ([]File, error
if err != nil {
return nil, fmt.Errorf("unabled to download %s: %w", url, err)
}
defer res.Body.Close()
defer res.Body.Close() //nolint:errcheck // nothing to do about it
if res.StatusCode != http.StatusOK {
return nil, fmt.Errorf("unabled to download %s: %s", url, res.Status)
}
Expand All @@ -71,7 +71,7 @@ func openFile(ctx context.Context, path string) ([]File, error) {
if err != nil {
return nil, err
}
defer f.Close()
defer f.Close() //nolint:errcheck // nothing to do about it
return open(ctx, f, slog.With(slog.String("path", path)))
}

Expand All @@ -81,7 +81,7 @@ func open(ctx context.Context, raw io.Reader, log *slog.Logger) ([]File, error)
if err != nil {
return nil, err
}
defer gz.Close()
defer gz.Close() //nolint:errcheck // nothing to do about it

tr := tar.NewReader(gz)

Expand Down
2 changes: 1 addition & 1 deletion reference-converter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func runConverter() error {
slog.ErrorContext(ctx, "failed to open dst", slog.Any("error", err))
return err
}
defer dst.Close()
defer dst.Close() //nolint:errcheck // nothing to do about it
if err := ref.Write(ctx, dst); err != nil {
slog.ErrorContext(ctx, "failed to save", slog.Any("error", err))
return err
Expand Down
10 changes: 5 additions & 5 deletions tools/devtools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG GO_VERSION=1.24
ARG NODE_VERSION=18
ARG BASE_IMG=docker.io/library/node:${NODE_VERSION}-bullseye
ARG GO_VERSION=1.25
ARG NODE_VERSION=24
ARG BASE_IMG=docker.io/library/node:${NODE_VERSION}-trixie

FROM docker.io/library/golang:${GO_VERSION}-bullseye AS golang
FROM docker.io/library/golang:${GO_VERSION}-trixie AS golang
ARG GO_JUNIT_REPORT_VERSION=latest
ARG GOPLS_VERSION=latest
ARG DELVE_VERSION=latest
ARG GOLANGCI_LINT_VERSION=1.64.8
ARG GOLANGCI_LINT_VERSION=2.7.2

RUN go install github.com/jstemmer/go-junit-report/v2@${GO_JUNIT_REPORT_VERSION} \
&& go install -v golang.org/x/tools/gopls@${GOPLS_VERSION} \
Expand Down