From b3ad58fa04fb2447d1a788d1fe61b2ed581a403e Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Wed, 14 Aug 2024 16:31:14 +0000 Subject: [PATCH 001/570] releaser: Prepare repository for 0.133.0-DEV [ci skip] --- common/hugo/version_current.go | 6 +++--- hugoreleaser.env | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index 58abd1d59..a33ff5106 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -17,7 +17,7 @@ package hugo // This should be the only one. var CurrentVersion = Version{ Major: 0, - Minor: 132, - PatchLevel: 2, - Suffix: "", + Minor: 133, + PatchLevel: 0, + Suffix: "-DEV", } diff --git a/hugoreleaser.env b/hugoreleaser.env index 66bcfd0d8..9cca7015f 100644 --- a/hugoreleaser.env +++ b/hugoreleaser.env @@ -1,7 +1,8 @@ # Release env. # These will be replaced by script before release. -HUGORELEASER_TAG=v0.132.1 -HUGORELEASER_COMMITISH=1bde700dfc0770bb11eb8445aff1ab5abdccb46e +HUGORELEASER_TAG=v0.132.2 +HUGORELEASER_COMMITISH=3fd26c70dff5934ec1802b9563530130ed1bca75 + From 2168c5b125020a1841450730edc1b0ed2141d239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 14 Aug 2024 11:34:21 +0200 Subject: [PATCH 002/570] Upgrade to Go 1.23 Fixes #12763 --- .circleci/config.yml | 4 +- .github/workflows/test.yml | 2 +- go.mod | 2 +- hugofs/fs.go | 3 +- modules/client.go | 12 - scripts/fork_go_templates/main.go | 2 +- testscripts/commands/mod.txt | 3 +- testscripts/commands/mod_npm.txt | 2 + testscripts/commands/mod_npm_withexisting.txt | 1 + tpl/internal/go_templates/cfg/cfg.go | 2 + tpl/internal/go_templates/fmtsort/sort.go | 113 +---- .../go_templates/fmtsort/sort_test.go | 17 +- .../go_templates/htmltemplate/content.go | 5 +- tpl/internal/go_templates/htmltemplate/doc.go | 10 +- .../htmltemplate/examplefiles_test.go | 3 - .../go_templates/htmltemplate/exec_test.go | 6 +- tpl/internal/go_templates/htmltemplate/js.go | 5 +- .../go_templates/htmltemplate/template.go | 22 +- .../go_templates/htmltemplate/transition.go | 2 +- tpl/internal/go_templates/testenv/testenv.go | 21 +- tpl/internal/go_templates/texttemplate/doc.go | 7 + .../go_templates/texttemplate/example_test.go | 2 +- .../texttemplate/examplefiles_test.go | 3 - .../go_templates/texttemplate/exec.go | 39 +- .../go_templates/texttemplate/exec_test.go | 102 +++- .../go_templates/texttemplate/funcs.go | 46 +- .../go_templates/texttemplate/helper.go | 34 +- .../texttemplate/hugo_template.go | 13 +- .../go_templates/texttemplate/link_test.go | 8 +- .../go_templates/texttemplate/parse/node.go | 12 +- .../go_templates/texttemplate/parse/parse.go | 60 +-- .../texttemplate/parse/parse_test.go | 435 ++++++++++++------ .../go_templates/texttemplate/template.go | 6 +- tpl/tplimpl/tplimpl_integration_test.go | 14 + 34 files changed, 616 insertions(+), 402 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index beee3b536..0ff955936 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ parameters: defaults: &defaults resource_class: large docker: - - image: bepsays/ci-hugoreleaser:1.22200.20501 + - image: bepsays/ci-hugoreleaser:1.22300.20000 environment: &buildenv GOMODCACHE: /root/project/gomodcache version: 2 @@ -60,7 +60,7 @@ jobs: environment: <<: [*buildenv] docker: - - image: bepsays/ci-hugoreleaser-linux-arm64:1.22200.20501 + - image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000 steps: - *restore-cache - &attach-workspace diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5491090e..120262098 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: test: strategy: matrix: - go-version: [1.21.x, 1.22.x] + go-version: [1.22.x, 1.23.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/go.mod b/go.mod index f9776279e..40f90c45f 100644 --- a/go.mod +++ b/go.mod @@ -170,4 +170,4 @@ require ( software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect ) -go 1.21.8 +go 1.22.6 diff --git a/hugofs/fs.go b/hugofs/fs.go index fc0ea71c6..fab0d3886 100644 --- a/hugofs/fs.go +++ b/hugofs/fs.go @@ -147,7 +147,8 @@ func isWrite(flag int) bool { // TODO(bep) move this to a more suitable place. func MakeReadableAndRemoveAllModulePkgDir(fs afero.Fs, dir string) (int, error) { // Safe guard - if !strings.Contains(dir, "pkg") { + // Note that the base directory changed from pkg to gomod_cache in Go 1.23. + if !strings.Contains(dir, "pkg") && !strings.Contains(dir, "gomod") { panic(fmt.Sprint("invalid dir:", dir)) } diff --git a/modules/client.go b/modules/client.go index a6caec23c..dce40d2db 100644 --- a/modules/client.go +++ b/modules/client.go @@ -365,18 +365,6 @@ func (c *Client) Get(args ...string) error { } func (c *Client) get(args ...string) error { - var hasD bool - for _, arg := range args { - if arg == "-d" { - hasD = true - break - } - } - if !hasD { - // go get without the -d flag does not make sense to us, as - // it will try to build and install go packages. - args = append([]string{"-d"}, args...) - } if err := c.runGo(context.Background(), c.logger.Out(), append([]string{"get"}, args...)...); err != nil { return fmt.Errorf("failed to get %q: %w", args, err) } diff --git a/scripts/fork_go_templates/main.go b/scripts/fork_go_templates/main.go index 476fe480b..c4dad3224 100644 --- a/scripts/fork_go_templates/main.go +++ b/scripts/fork_go_templates/main.go @@ -16,7 +16,7 @@ import ( ) func main() { - // The current is built with 8e1fdea8316d840fd07e9d6e026048e53290948b go1.22.5 + // The current is built with 6885bad7dd86880be6929c02085e5c7a67ff2887 go1.23.0 // TODO(bep) preserve the staticcheck.conf file. fmt.Println("Forking ...") defer fmt.Println("Done ...") diff --git a/testscripts/commands/mod.txt b/testscripts/commands/mod.txt index 56cea2c00..2fa17dbbe 100644 --- a/testscripts/commands/mod.txt +++ b/testscripts/commands/mod.txt @@ -18,7 +18,8 @@ hugo mod clean ! stderr . stdout 'hugo: removed 1 dirs in module cache for \"github.com/bep/empty-hugo-module\"' hugo mod clean --all -stdout 'Deleted 2\d{2} files from module cache\.' +# Currently this is 299 on MacOS and 301 on Linux. +stdout 'Deleted (2|3)\d{2} files from module cache\.' cd submod hugo mod init testsubmod cmpenv go.mod $WORK/golden/go.mod.testsubmod diff --git a/testscripts/commands/mod_npm.txt b/testscripts/commands/mod_npm.txt index 32cc37f06..3d8903e6a 100644 --- a/testscripts/commands/mod_npm.txt +++ b/testscripts/commands/mod_npm.txt @@ -2,6 +2,7 @@ dostounix golden/package.json + hugo mod npm pack cmp package.json golden/package.json @@ -41,3 +42,4 @@ path="github.com/gohugoio/hugoTestModule2" } -- go.mod -- module github.com/gohugoio/hugoTestModule +go 1.20 diff --git a/testscripts/commands/mod_npm_withexisting.txt b/testscripts/commands/mod_npm_withexisting.txt index e92eba3fd..073af0f07 100644 --- a/testscripts/commands/mod_npm_withexisting.txt +++ b/testscripts/commands/mod_npm_withexisting.txt @@ -55,3 +55,4 @@ path="github.com/gohugoio/hugoTestModule2" } -- go.mod -- module github.com/gohugoio/hugoTestModule +go 1.20 diff --git a/tpl/internal/go_templates/cfg/cfg.go b/tpl/internal/go_templates/cfg/cfg.go index 2af0ec707..08d210b79 100644 --- a/tpl/internal/go_templates/cfg/cfg.go +++ b/tpl/internal/go_templates/cfg/cfg.go @@ -36,6 +36,7 @@ const KnownEnv = ` GOAMD64 GOARCH GOARM + GOARM64 GOBIN GOCACHE GOCACHEPROG @@ -57,6 +58,7 @@ const KnownEnv = ` GOPPC64 GOPRIVATE GOPROXY + GORISCV64 GOROOT GOSUMDB GOTMPDIR diff --git a/tpl/internal/go_templates/fmtsort/sort.go b/tpl/internal/go_templates/fmtsort/sort.go index 278a89bd7..f51cdc708 100644 --- a/tpl/internal/go_templates/fmtsort/sort.go +++ b/tpl/internal/go_templates/fmtsort/sort.go @@ -9,25 +9,23 @@ package fmtsort import ( + "cmp" "reflect" - "sort" + "slices" ) // Note: Throughout this package we avoid calling reflect.Value.Interface as // it is not always legal to do so and it's easier to avoid the issue than to face it. -// SortedMap represents a map's keys and values. The keys and values are -// aligned in index order: Value[i] is the value in the map corresponding to Key[i]. -type SortedMap struct { - Key []reflect.Value - Value []reflect.Value -} +// SortedMap is a slice of KeyValue pairs that simplifies sorting +// and iterating over map entries. +// +// Each KeyValue pair contains a map key and its corresponding value. +type SortedMap []KeyValue -func (o *SortedMap) Len() int { return len(o.Key) } -func (o *SortedMap) Less(i, j int) bool { return compare(o.Key[i], o.Key[j]) < 0 } -func (o *SortedMap) Swap(i, j int) { - o.Key[i], o.Key[j] = o.Key[j], o.Key[i] - o.Value[i], o.Value[j] = o.Value[j], o.Value[i] +// KeyValue holds a single key and value pair found in a map. +type KeyValue struct { + Key, Value reflect.Value } // Sort accepts a map and returns a SortedMap that has the same keys and @@ -48,7 +46,7 @@ func (o *SortedMap) Swap(i, j int) { // Otherwise identical arrays compare by length. // - interface values compare first by reflect.Type describing the concrete type // and then by concrete value as described in the previous rules. -func Sort(mapValue reflect.Value) *SortedMap { +func Sort(mapValue reflect.Value) SortedMap { if mapValue.Type().Kind() != reflect.Map { return nil } @@ -56,18 +54,14 @@ func Sort(mapValue reflect.Value) *SortedMap { // of a concurrent map update. The runtime is responsible for // yelling loudly if that happens. See issue 33275. n := mapValue.Len() - key := make([]reflect.Value, 0, n) - value := make([]reflect.Value, 0, n) + sorted := make(SortedMap, 0, n) iter := mapValue.MapRange() for iter.Next() { - key = append(key, iter.Key()) - value = append(value, iter.Value()) + sorted = append(sorted, KeyValue{iter.Key(), iter.Value()}) } - sorted := &SortedMap{ - Key: key, - Value: value, - } - sort.Stable(sorted) + slices.SortStableFunc(sorted, func(a, b KeyValue) int { + return compare(a.Key, b.Key) + }) return sorted } @@ -82,43 +76,19 @@ func compare(aVal, bVal reflect.Value) int { } switch aVal.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - a, b := aVal.Int(), bVal.Int() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } + return cmp.Compare(aVal.Int(), bVal.Int()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - a, b := aVal.Uint(), bVal.Uint() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } + return cmp.Compare(aVal.Uint(), bVal.Uint()) case reflect.String: - a, b := aVal.String(), bVal.String() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } + return cmp.Compare(aVal.String(), bVal.String()) case reflect.Float32, reflect.Float64: - return floatCompare(aVal.Float(), bVal.Float()) + return cmp.Compare(aVal.Float(), bVal.Float()) case reflect.Complex64, reflect.Complex128: a, b := aVal.Complex(), bVal.Complex() - if c := floatCompare(real(a), real(b)); c != 0 { + if c := cmp.Compare(real(a), real(b)); c != 0 { return c } - return floatCompare(imag(a), imag(b)) + return cmp.Compare(imag(a), imag(b)) case reflect.Bool: a, b := aVal.Bool(), bVal.Bool() switch { @@ -130,28 +100,12 @@ func compare(aVal, bVal reflect.Value) int { return -1 } case reflect.Pointer, reflect.UnsafePointer: - a, b := aVal.Pointer(), bVal.Pointer() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } + return cmp.Compare(aVal.Pointer(), bVal.Pointer()) case reflect.Chan: if c, ok := nilCompare(aVal, bVal); ok { return c } - ap, bp := aVal.Pointer(), bVal.Pointer() - switch { - case ap < bp: - return -1 - case ap > bp: - return 1 - default: - return 0 - } + return cmp.Compare(aVal.Pointer(), bVal.Pointer()) case reflect.Struct: for i := 0; i < aVal.NumField(); i++ { if c := compare(aVal.Field(i), bVal.Field(i)); c != 0 { @@ -198,22 +152,3 @@ func nilCompare(aVal, bVal reflect.Value) (int, bool) { } return 0, false } - -// floatCompare compares two floating-point values. NaNs compare low. -func floatCompare(a, b float64) int { - switch { - case isNaN(a): - return -1 // No good answer if b is a NaN so don't bother checking. - case isNaN(b): - return 1 - case a < b: - return -1 - case a > b: - return 1 - } - return 0 -} - -func isNaN(a float64) bool { - return a != a -} diff --git a/tpl/internal/go_templates/fmtsort/sort_test.go b/tpl/internal/go_templates/fmtsort/sort_test.go index e86b4c673..0986dbb6d 100644 --- a/tpl/internal/go_templates/fmtsort/sort_test.go +++ b/tpl/internal/go_templates/fmtsort/sort_test.go @@ -5,12 +5,13 @@ package fmtsort_test import ( + "cmp" "fmt" "github.com/gohugoio/hugo/tpl/internal/go_templates/fmtsort" "math" "reflect" "runtime" - "sort" + "slices" "strings" "testing" "unsafe" @@ -67,10 +68,6 @@ func TestCompare(t *testing.T) { switch { case i == j: expect = 0 - // NaNs are tricky. - if typ := v0.Type(); (typ.Kind() == reflect.Float32 || typ.Kind() == reflect.Float64) && math.IsNaN(v0.Float()) { - expect = -1 - } case i < j: expect = -1 case i > j: @@ -142,13 +139,13 @@ func sprint(data any) string { return "nil" } b := new(strings.Builder) - for i, key := range om.Key { + for i, m := range om { if i > 0 { b.WriteRune(' ') } - b.WriteString(sprintKey(key)) + b.WriteString(sprintKey(m.Key)) b.WriteRune(':') - fmt.Fprint(b, om.Value[i]) + fmt.Fprint(b, m.Value) } return b.String() } @@ -200,8 +197,8 @@ func makeChans() []chan int { for i := range cs { pin.Pin(reflect.ValueOf(cs[i]).UnsafePointer()) } - sort.Slice(cs, func(i, j int) bool { - return uintptr(reflect.ValueOf(cs[i]).UnsafePointer()) < uintptr(reflect.ValueOf(cs[j]).UnsafePointer()) + slices.SortFunc(cs, func(a, b chan int) int { + return cmp.Compare(reflect.ValueOf(a).Pointer(), reflect.ValueOf(b).Pointer()) }) return cs } diff --git a/tpl/internal/go_templates/htmltemplate/content.go b/tpl/internal/go_templates/htmltemplate/content.go index 9c61cfac0..d19b1ec12 100644 --- a/tpl/internal/go_templates/htmltemplate/content.go +++ b/tpl/internal/go_templates/htmltemplate/content.go @@ -29,7 +29,6 @@ const ( // indirect returns the value, after dereferencing as many times // as necessary to reach the base type (or nil). -// Signature modified by Hugo. TODO(bep) script this. func doIndirect(a any) any { if a == nil { return nil @@ -46,8 +45,8 @@ func doIndirect(a any) any { } var ( - errorType = reflect.TypeOf((*error)(nil)).Elem() - fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() + errorType = reflect.TypeFor[error]() + fmtStringerType = reflect.TypeFor[fmt.Stringer]() ) // indirectToStringerOrError returns the value, after dereferencing as many times diff --git a/tpl/internal/go_templates/htmltemplate/doc.go b/tpl/internal/go_templates/htmltemplate/doc.go index 6be5e0f84..7442194f7 100644 --- a/tpl/internal/go_templates/htmltemplate/doc.go +++ b/tpl/internal/go_templates/htmltemplate/doc.go @@ -232,11 +232,9 @@ Least Surprise Property: knows that contextual autoescaping happens should be able to look at a {{.}} and correctly infer what sanitization happens." -As a consequence of the Least Surprise Property, template actions within an -ECMAScript 6 template literal are disabled by default. -Handling string interpolation within these literals is rather complex resulting -in no clear safe way to support it. -To re-enable template actions within ECMAScript 6 template literals, use the -GODEBUG=jstmpllitinterp=1 environment variable. +Previously, ECMAScript 6 template literal were disabled by default, and could be +enabled with the GODEBUG=jstmpllitinterp=1 environment variable. Template +literals are now supported by default, and setting jstmpllitinterp has no +effect. */ package template diff --git a/tpl/internal/go_templates/htmltemplate/examplefiles_test.go b/tpl/internal/go_templates/htmltemplate/examplefiles_test.go index 43cc3bf01..24b22d984 100644 --- a/tpl/internal/go_templates/htmltemplate/examplefiles_test.go +++ b/tpl/internal/go_templates/htmltemplate/examplefiles_test.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.13 -// +build go1.13 - package template_test import ( diff --git a/tpl/internal/go_templates/htmltemplate/exec_test.go b/tpl/internal/go_templates/htmltemplate/exec_test.go index 428cddc0d..e01813e68 100644 --- a/tpl/internal/go_templates/htmltemplate/exec_test.go +++ b/tpl/internal/go_templates/htmltemplate/exec_test.go @@ -273,8 +273,8 @@ type execTest struct { // of the max int boundary. // We do it this way so the test doesn't depend on ints being 32 bits. var ( - bigInt = fmt.Sprintf("0x%x", int(1<': `\u003e`, } - var jsRegexpReplacementTable = []string{ 0: `\u0000`, '\t': `\t`, diff --git a/tpl/internal/go_templates/htmltemplate/template.go b/tpl/internal/go_templates/htmltemplate/template.go index d7454f101..4582ddd5f 100644 --- a/tpl/internal/go_templates/htmltemplate/template.go +++ b/tpl/internal/go_templates/htmltemplate/template.go @@ -179,7 +179,7 @@ func (t *Template) DefinedTemplates() string { // definition of t itself. // // Templates can be redefined in successive calls to Parse, -// before the first use of Execute on t or any associated template. +// before the first use of [Template.Execute] on t or any associated template. // A template definition with a body containing only white space and comments // is considered empty and will not replace an existing template's body. // This allows using Parse to add new named template definitions without @@ -238,8 +238,8 @@ func (t *Template) AddParseTree(name string, tree *parse.Tree) (*Template, error // Clone returns a duplicate of the template, including all associated // templates. The actual representation is not copied, but the name space of -// associated templates is, so further calls to Parse in the copy will add -// templates to the copy but not to the original. Clone can be used to prepare +// associated templates is, so further calls to [Template.Parse] in the copy will add +// templates to the copy but not to the original. [Template.Clone] can be used to prepare // common templates and use them with variant definitions for other templates // by adding the variants after the clone is made. // @@ -342,7 +342,7 @@ func (t *Template) Funcs(funcMap FuncMap) *Template { } // Delims sets the action delimiters to the specified strings, to be used in -// subsequent calls to Parse, ParseFiles, or ParseGlob. Nested template +// subsequent calls to [Template.Parse], [ParseFiles], or [ParseGlob]. Nested template // definitions will inherit the settings. An empty delimiter stands for the // corresponding default: {{ or }}. // The return value is the template, so calls can be chained. @@ -359,7 +359,7 @@ func (t *Template) Lookup(name string) *Template { return t.set[name] } -// Must is a helper that wraps a call to a function returning (*Template, error) +// Must is a helper that wraps a call to a function returning ([*Template], error) // and panics if the error is non-nil. It is intended for use in variable initializations // such as // @@ -371,10 +371,10 @@ func Must(t *Template, err error) *Template { return t } -// ParseFiles creates a new Template and parses the template definitions from +// ParseFiles creates a new [Template] and parses the template definitions from // the named files. The returned template's name will have the (base) name and // (parsed) contents of the first file. There must be at least one file. -// If an error occurs, parsing stops and the returned *Template is nil. +// If an error occurs, parsing stops and the returned [*Template] is nil. // // When parsing multiple files with the same name in different directories, // the last one mentioned will be the one that results. @@ -436,12 +436,12 @@ func parseFiles(t *Template, readFile func(string) (string, []byte, error), file return t, nil } -// ParseGlob creates a new Template and parses the template definitions from +// ParseGlob creates a new [Template] and parses the template definitions from // the files identified by the pattern. The files are matched according to the // semantics of filepath.Match, and the pattern must match at least one file. // The returned template will have the (base) name and (parsed) contents of the // first file matched by the pattern. ParseGlob is equivalent to calling -// ParseFiles with the list of files matched by the pattern. +// [ParseFiles] with the list of files matched by the pattern. // // When parsing multiple files with the same name in different directories, // the last one mentioned will be the one that results. @@ -485,7 +485,7 @@ func IsTrue(val any) (truth, ok bool) { return template.IsTrue(val) } -// ParseFS is like ParseFiles or ParseGlob but reads from the file system fs +// ParseFS is like [ParseFiles] or [ParseGlob] but reads from the file system fs // instead of the host operating system's file system. // It accepts a list of glob patterns. // (Note that most file names serve as glob patterns matching only themselves.) @@ -493,7 +493,7 @@ func ParseFS(fs fs.FS, patterns ...string) (*Template, error) { return parseFS(nil, fs, patterns) } -// ParseFS is like ParseFiles or ParseGlob but reads from the file system fs +// ParseFS is like [Template.ParseFiles] or [Template.ParseGlob] but reads from the file system fs // instead of the host operating system's file system. // It accepts a list of glob patterns. // (Note that most file names serve as glob patterns matching only themselves.) diff --git a/tpl/internal/go_templates/htmltemplate/transition.go b/tpl/internal/go_templates/htmltemplate/transition.go index d5a05f66d..c430389a3 100644 --- a/tpl/internal/go_templates/htmltemplate/transition.go +++ b/tpl/internal/go_templates/htmltemplate/transition.go @@ -414,7 +414,7 @@ func tJSDelimited(c context, s []byte) (context, int) { // If " 0 && i+7 <= len(s) && bytes.Compare(bytes.ToLower(s[i-1:i+7]), []byte(" 0 && i+7 <= len(s) && bytes.Equal(bytes.ToLower(s[i-1:i+7]), []byte(" Date: Thu, 15 Aug 2024 10:20:43 +0200 Subject: [PATCH 003/570] deps: Upgrade github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec => v1.8.0 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 40f90c45f..cd6b2345c 100644 --- a/go.mod +++ b/go.mod @@ -69,7 +69,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/tdewolff/minify/v2 v2.20.37 github.com/tdewolff/parse/v2 v2.7.15 - github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec + github.com/tetratelabs/wazero v1.8.0 github.com/yuin/goldmark v1.7.4 github.com/yuin/goldmark-emoji v1.0.3 go.uber.org/automaxprocs v1.5.3 diff --git a/go.sum b/go.sum index ca963c250..257a3ef8c 100644 --- a/go.sum +++ b/go.sum @@ -463,6 +463,8 @@ github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03 github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8= github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec h1:KeQseLFSWb9qjW4PSWxciTBk1hbG7KsVx3rs1hIQnbQ= github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= +github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g= +github.com/tetratelabs/wazero v1.8.0/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 53c0ddfcb4ec2f4d021f6f51c04f0ba9db741b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:47:59 +0000 Subject: [PATCH 004/570] build(deps): bump gocloud.dev from 0.38.0 to 0.39.0 Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.38.0 to 0.39.0. - [Release notes](https://github.com/google/go-cloud/releases) - [Commits](https://github.com/google/go-cloud/compare/v0.38.0...v0.39.0) --- updated-dependencies: - dependency-name: gocloud.dev dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 77 ++++++++++++++------------- go.sum | 160 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 118 insertions(+), 119 deletions(-) diff --git a/go.mod b/go.mod index cd6b2345c..834322730 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/yuin/goldmark v1.7.4 github.com/yuin/goldmark-emoji v1.0.3 go.uber.org/automaxprocs v1.5.3 - gocloud.dev v0.38.0 + gocloud.dev v0.39.0 golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 golang.org/x/image v0.19.0 golang.org/x/mod v0.19.0 @@ -81,42 +81,42 @@ require ( golang.org/x/sync v0.8.0 golang.org/x/text v0.17.0 golang.org/x/tools v0.23.0 - google.golang.org/api v0.189.0 + google.golang.org/api v0.191.0 gopkg.in/yaml.v2 v2.4.0 ) require ( cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.7.2 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.10 // indirect - cloud.google.com/go/storage v1.41.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect - github.com/aws/aws-sdk-go v1.51.30 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect + github.com/aws/aws-sdk-go v1.55.5 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.27 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect github.com/aws/smithy-go v1.20.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/dlclark/regexp2 v1.11.0 // indirect @@ -127,12 +127,11 @@ require ( github.com/go-openapi/swag v0.22.8 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/google/wire v0.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/yaml v0.2.0 // indirect @@ -150,20 +149,20 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect golang.org/x/crypto v0.26.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/genproto v0.0.0-20240722135656-d784300faade // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect - google.golang.org/grpc v1.64.1 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/time v0.6.0 // indirect + golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect + google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240812133136-8ffd90a71988 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 // indirect + google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect diff --git a/go.sum b/go.sum index 257a3ef8c..a278f94bb 100644 --- a/go.sum +++ b/go.sum @@ -19,10 +19,10 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.7.2 h1:uiha352VrCDMXg+yoBtaD0tUF4Kv9vrtrWPYXwutnDE= -cloud.google.com/go/auth v0.7.2/go.mod h1:VEc4p5NNxycWQTMQEDQF0bd6aTMb6VgYDXEwiJJQAbs= -cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= -cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,8 +33,10 @@ cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJ cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v1.1.10 h1:ZSAr64oEhQSClwBL670MsJAW5/RLiC6kfw3Bqmd5ZDI= -cloud.google.com/go/iam v1.1.10/go.mod h1:iEgMq62sg8zx446GCaijmA2Miwg5o3UbO+nI47WHJps= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= +cloud.google.com/go/longrunning v0.5.12 h1:5LqSIdERr71CqfUsFlJdBpOkBH8FBCFD7P1nTWy3TYE= +cloud.google.com/go/longrunning v0.5.12/go.mod h1:S5hMV8CDJ6r50t2ubVJSKQVv5u0rmik5//KgLO3k4lU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,15 +47,15 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= -cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 h1:1nGuui+4POelzDwI7RG56yfQJHCnKvwfMoU7VsEp+Zg= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0/go.mod h1:99EvauvlcJ1U06amZiksfYz/3aFGyIhWGHVyiZXtBAI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 h1:H+U3Gk9zY56G3u872L82bk4thcsy2Gghb9ExT4Zvm1o= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0/go.mod h1:mgrmMSgaLp9hmax62XQTd0N4aAqSE5E0DulSpVYK7vc= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= @@ -77,46 +79,46 @@ github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c h1:651/eoCRnQ7YtSjAnSzRucrJz+3iGEFt+ysraELS81M= github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.51.30 h1:RVFkjn9P0JMwnuZCVH0TlV5k9zepHzlbc4943eZMhGw= -github.com/aws/aws-sdk-go v1.51.30/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= github.com/aws/aws-sdk-go-v2 v1.30.3/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= -github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3/go.mod h1:UbnqO+zjqk3uIt9yCACHJ9IVNhyhOCnYk8yA19SAWrM= +github.com/aws/aws-sdk-go-v2/config v1.27.27 h1:HdqgGt1OAP0HkEDDShEl0oSYa9ZZBSOmKpdpsDMdO90= +github.com/aws/aws-sdk-go-v2/config v1.27.27/go.mod h1:MVYamCg76dFNINkZFu4n4RjDixhVr51HLj4ErWzrVwg= +github.com/aws/aws-sdk-go-v2/credentials v1.17.27 h1:2raNba6gr2IfA0eqqiP2XiQ0UVOpGPgDSi0I9iAP+UI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.27/go.mod h1:gniiwbGahQByxan6YjQUMcW4Aov6bLC3m+evgcoN4r4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 h1:KreluoV8FZDEtI6Co2xuNk/UqI9iwMrOx/87PBNIKqw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11/go.mod h1:SeSUYBLsMYFoRvHE0Tjvn7kbxaUhl75CJi1sbfhMxkU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 h1:zeN9UtUlA6FTx0vFSayxSX32HDw73Yb6Hh2izDSFxXY= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10/go.mod h1:3HKuexPDcwLWPaqpW2UR/9n8N/u/3CKcGAzSs8p8u8g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 h1:SoNJ4RlFEQEbtDcCEt+QG56MY4fm4W8rYirAmq+/DdU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15/go.mod h1:U9ke74k1n2bf+RIgoX1SXFed1HLs51OgUSs+Ph0KJP8= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 h1:C6WHdGnTDIYETAm5iErQUiVNsclNx9qbJVPIt03B6bI= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15/go.mod h1:ZQLZqhcu+JhSrA9/NXRm8SkDvsycE+JkV3WGY41e+IM= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15 h1:Z5r7SycxmSllHYmaAZPpmN8GviDrSGhMS6bldqtXZPw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15/go.mod h1:CetW7bDE00QoGEmPUoZuRog07SGVAUVW6LFpNP0YfIg= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.38.4 h1:I/sQ9uGOs72/483obb2SPoa9ZEsYGbel6jcTTwD/0zU= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.38.4/go.mod h1:P6ByphKl2oNQZlv4WsCaLSmRncKEcOnbitYLtJPfqZI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 h1:ZMeFZ5yk+Ek+jNr1+uwCd2tG89t6oTS5yVWpa6yy2es= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7/go.mod h1:mxV05U+4JiHqIpGqqYXOHLPKUC6bDXC44bsUhNjOEwY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17 h1:YPYe6ZmvUfDDDELqEKtAd6bo8zxhkm+XEFEzQisqUIE= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17/go.mod h1:oBtcnYua/CgzCWYN7NZ5j7PotFDaFSUjCYVTtfyn7vw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 h1:HGErhhrxZlQ044RiM+WdoZxp0p+EGM62y3L6pwA4olE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17/go.mod h1:RkZEx4l0EHYDJpWppMJ3nD9wZJAa8/0lq9aVC+r2UII= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15 h1:246A4lSTXWJw/rmlQI+TT2OcqeDMKBdyjEQrafMaQdA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15/go.mod h1:haVfg3761/WF7YPuJOER2MP0k4UAXyHaLclKXB6usDg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 h1:hT8ZAZRIfqBqHbzKTII+CIiY8G2oC9OpLedkZ51DWl8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3/go.mod h1:Lcxzg5rojyVPU/0eFwLtcyTaek/6Mtic5B1gJo7e/zE= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 h1:BXx0ZIxvrJdSgSvKTZ+yRBeSqqgPM89VPlulEcl37tM= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.4/go.mod h1:ooyCOXjvJEsUw7x+ZDHeISPMhtwI3ZCB7ggFMcFfWLU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 h1:yiwVzJW2ZxZTurVbYWA7QOrAaCYQR72t0wrSBfoesUE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4/go.mod h1:0oxfLkpz3rQ/CHlx5hB7H69YUpFiI1tql6Q6Ne+1bCw= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 h1:ZsDKRLXGWHk8WdtyYMoGNO7bTudrvuKpDKgMVRlepGE= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.3/go.mod h1:zwySh8fpFyXp9yOr/KVzxOl8SRqgf/IDw5aUt9UKFcQ= github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/bep/clocks v0.5.0 h1:hhvKVGLPQWRVsBP/UB7ErrHYIO42gINVbvqxvYTPVps= @@ -137,8 +139,6 @@ github.com/bep/gowebp v0.3.0 h1:MhmMrcf88pUY7/PsEhMgEP0T6fDUnRTMpN8OclDrbrY= github.com/bep/gowebp v0.3.0/go.mod h1:ZhFodwdiFp8ehGJpF4LdPl6unxZm9lLFjxD3z2h2AgI= github.com/bep/helpers v0.4.0 h1:ab9veaAiWY4ST48Oxp5usaqivDmYdB744fz+tcZ3Ifs= github.com/bep/helpers v0.4.0/go.mod h1:/QpHdmcPagDw7+RjkLFCvnlUc8lQ5kg4KDrEkb2Yyco= -github.com/bep/imagemeta v0.7.6 h1:No64uhsEgUg/wz19yUC8BmHkFNMGhNu3X5puvsuvi2E= -github.com/bep/imagemeta v0.7.6/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= github.com/bep/imagemeta v0.8.0 h1:4lqI839akl6lR61D7hmvaw2LDOxiXFZ4D0VIyHyGpc4= github.com/bep/imagemeta v0.8.0/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= github.com/bep/lazycache v0.4.0 h1:X8yVyWNVupPd4e1jV7efi3zb7ZV/qcjKQgIQ5aPbkYI= @@ -291,8 +291,8 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE= -github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk= +github.com/google/go-replayers/grpcreplay v1.3.0 h1:1Keyy0m1sIpqstQmgz307zhiJ1pV4uIlFds5weTmxbo= +github.com/google/go-replayers/grpcreplay v1.3.0/go.mod h1:v6NgKtkijC0d3e3RW8il6Sy5sqRVUwoQa4mHOGEy8DI= github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk= github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -312,8 +312,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -324,8 +324,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -486,22 +486,22 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= -gocloud.dev v0.38.0 h1:SpxfaOc/Fp4PeO8ui7wRcCZV0EgXZ+IWcVSLn6ZMSw0= -gocloud.dev v0.38.0/go.mod h1:3XjKvd2E5iVNu/xFImRzjN0d/fkNHe4s0RiKidpEUMQ= +gocloud.dev v0.39.0 h1:EYABYGhAalPUaMrbSKOr5lejxoxvXj99nE8XFtsDgds= +gocloud.dev v0.39.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -610,8 +610,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -676,8 +676,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -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.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -701,8 +701,8 @@ golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -761,8 +761,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= +golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -782,8 +782,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.189.0 h1:equMo30LypAkdkLMBqfeIqtyAnlyig1JSZArl4XPwdI= -google.golang.org/api v0.189.0/go.mod h1:FLWGJKb0hb+pU2j+rJqwbnsF+ym+fQs73rbJ+KAUgy8= +google.golang.org/api v0.191.0 h1:cJcF09Z+4HAB2t5qTQM1ZtfL/PemsLFkcFG67qq2afk= +google.golang.org/api v0.191.0/go.mod h1:tD5dsFGxFza0hnQveGfVk9QQYKcfp+VzgRqyXFxE0+E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -827,12 +827,12 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20240722135656-d784300faade h1:lKFsS7wpngDgSCeFn7MoLy+wBDQZ1UQIJD4UNM1Qvkg= -google.golang.org/genproto v0.0.0-20240722135656-d784300faade/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade h1:oCRSWfwGXQsqlVdErcyTt4A93Y8fo0/9D4b1gnI++qo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 h1:CT2Thj5AuPV9phrYMtzX11k+XkzMGfRAet42PmoTATM= +google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988/go.mod h1:7uvplUBj4RjHAxIZ//98LzOvrQ04JBkaixRmCMI29hc= +google.golang.org/genproto/googleapis/api v0.0.0-20240812133136-8ffd90a71988 h1:+/tmTy5zAieooKIXfzDm9KiA3Bv6JBwriRN9LY+yayk= +google.golang.org/genproto/googleapis/api v0.0.0-20240812133136-8ffd90a71988/go.mod h1:4+X6GvPs+25wZKbQq9qyAXrwIRExv7w0Ea6MgZLZiDM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 h1:V71AcdLZr2p8dC9dbOIMCpqi4EmRl8wUwnJzXXLmbmc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -849,8 +849,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 01008ba51259e68191b14f8a4725d6116c0c2466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 17 Aug 2024 15:16:09 +0200 Subject: [PATCH 005/570] Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder See #12776 --- config/allconfig/allconfig.go | 3 + config/allconfig/alldecoders.go | 19 +++++ config/commonConfig.go | 15 ++++ docs/data/docs.yaml | 5 ++ hugolib/site.go | 9 +- .../page/pages_prev_next_integration_test.go | 82 +++++++++++++++++++ 6 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 resources/page/pages_prev_next_integration_test.go diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go index afa72fb11..802000f97 100644 --- a/config/allconfig/allconfig.go +++ b/config/allconfig/allconfig.go @@ -182,6 +182,9 @@ type Config struct { // Pagination configuration. Pagination config.Pagination `mapstructure:"-"` + // Page configuration. + Page config.PageConfig `mapstructure:"-"` + // Privacy configuration. Privacy privacy.Config `mapstructure:"-"` diff --git a/config/allconfig/alldecoders.go b/config/allconfig/alldecoders.go index c09aa0ff0..45cdd0de6 100644 --- a/config/allconfig/alldecoders.go +++ b/config/allconfig/alldecoders.go @@ -327,6 +327,25 @@ var allDecoderSetups = map[string]decodeWeight{ return err }, }, + "page": { + key: "page", + decode: func(d decodeWeight, p decodeConfig) error { + p.c.Page = config.PageConfig{ + NextPrevSortOrder: "desc", + NextPrevInSectionSortOrder: "desc", + } + if p.p.IsSet(d.key) { + if err := mapstructure.WeakDecode(p.p.Get(d.key), &p.c.Page); err != nil { + return err + } + } + + return nil + }, + getCompiler: func(c *Config) configCompiler { + return &c.Page + }, + }, "pagination": { key: "pagination", decode: func(d decodeWeight, p decodeConfig) error { diff --git a/config/commonConfig.go b/config/commonConfig.go index a615c51a7..9dea4a2fc 100644 --- a/config/commonConfig.go +++ b/config/commonConfig.go @@ -422,3 +422,18 @@ type Pagination struct { // Whether to disable generation of alias for the first pagination page. DisableAliases bool } + +// PageConfig configures the behavior of pages. +type PageConfig struct { + // Sort order for Page.Next and Page.Prev. Default "desc" (the default page sort order in Hugo). + NextPrevSortOrder string + + // Sort order for Page.NextInSection and Page.PrevInSection. Default "desc". + NextPrevInSectionSortOrder string +} + +func (c *PageConfig) CompileConfig(loggers.Logger) error { + c.NextPrevInSectionSortOrder = strings.ToLower(c.NextPrevInSectionSortOrder) + c.NextPrevSortOrder = strings.ToLower(c.NextPrevSortOrder) + return nil +} diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml index e399426b6..7ac76ee39 100644 --- a/docs/data/docs.yaml +++ b/docs/data/docs.yaml @@ -1600,6 +1600,9 @@ config: term: - html - rss + page: + nextPrevInSectionSortOrder: desc + nextPrevSortOrder: desc paginate: 0 paginatePath: "" pagination: @@ -1784,6 +1787,8 @@ config_helpers: _merge: shallow outputs: _merge: none + page: + _merge: none pagination: _merge: none params: diff --git a/hugolib/site.go b/hugolib/site.go index bbf110d1d..a93bbdbe6 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -117,6 +117,9 @@ func (s *Site) prepareInits() { s.init.prevNext = init.Branch(func(context.Context) (any, error) { regularPages := s.RegularPages() + if s.conf.Page.NextPrevSortOrder == "asc" { + regularPages = regularPages.Reverse() + } for i, p := range regularPages { np, ok := p.(nextPrevProvider) if !ok { @@ -181,7 +184,11 @@ func (s *Site) prepareInits() { ) for _, section := range sections { - setNextPrev(section.RegularPages()) + ps := section.RegularPages() + if s.conf.Page.NextPrevInSectionSortOrder == "asc" { + ps = ps.Reverse() + } + setNextPrev(ps) } return nil, nil diff --git a/resources/page/pages_prev_next_integration_test.go b/resources/page/pages_prev_next_integration_test.go new file mode 100644 index 000000000..d61d23cf0 --- /dev/null +++ b/resources/page/pages_prev_next_integration_test.go @@ -0,0 +1,82 @@ +// Copyright 2024 The Hugo Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package page_test + +import ( + "strings" + "testing" + + "github.com/gohugoio/hugo/hugolib" +) + +func TestNextPrevConfig(t *testing.T) { + filesTemplate := ` +-- hugo.toml -- +-- content/mysection/_index.md -- +-- content/mysection/p1.md -- +--- +title: "Page 1" +weight: 10 +--- +-- content/mysection/p2.md -- +--- +title: "Page 2" +weight: 20 +--- +-- content/mysection/p3.md -- +--- +title: "Page 3" +weight: 30 +--- +-- layouts/_default/single.html -- +{{ .Title }}|Next: {{ with .Next}}{{ .Title}}{{ end }}|Prev: {{ with .Prev}}{{ .Title}}{{ end }}|NextInSection: {{ with .NextInSection}}{{ .Title}}{{ end }}|PrevInSection: {{ with .PrevInSection}}{{ .Title}}{{ end }}| + +` + b := hugolib.Test(t, filesTemplate) + + b.AssertFileContent("public/mysection/p1/index.html", "Page 1|Next: |Prev: Page 2|NextInSection: |PrevInSection: Page 2|") + b.AssertFileContent("public/mysection/p2/index.html", "Page 2|Next: Page 1|Prev: Page 3|NextInSection: Page 1|PrevInSection: Page 3|") + b.AssertFileContent("public/mysection/p3/index.html", "Page 3|Next: Page 2|Prev: |NextInSection: Page 2|PrevInSection: |") + + files := strings.ReplaceAll(filesTemplate, "-- hugo.toml --", `-- hugo.toml -- +[page] +nextPrevSortOrder="aSc" +nextPrevInSectionSortOrder="asC" +`) + + b = hugolib.Test(t, files) + + b.AssertFileContent("public/mysection/p1/index.html", "Page 1|Next: Page 2|Prev: |NextInSection: Page 2|PrevInSection: |") + b.AssertFileContent("public/mysection/p2/index.html", "Page 2|Next: Page 3|Prev: Page 1|NextInSection: Page 3|PrevInSection: Page 1|") + b.AssertFileContent("public/mysection/p3/index.html", "Page 3|Next: |Prev: Page 2|NextInSection: |PrevInSection: Page 2|") + + files = strings.ReplaceAll(filesTemplate, "-- hugo.toml --", `-- hugo.toml -- +[page] +nextPrevSortOrder="aSc" +`) + + b = hugolib.Test(t, files) + + b.AssertFileContent("public/mysection/p1/index.html", "Page 1|Next: Page 2|Prev: |NextInSection: |PrevInSection: Page 2|") + b.AssertFileContent("public/mysection/p2/index.html", "Page 2|Next: Page 3|Prev: Page 1|NextInSection: Page 1|PrevInSection: Page 3|") + b.AssertFileContent("public/mysection/p3/index.html", "Page 3|Next: |Prev: Page 2|NextInSection: Page 2|PrevInSection: |") + + files = strings.ReplaceAll(filesTemplate, "-- hugo.toml --", `-- hugo.toml -- +[page] +nextPrevInSectionSortOrder="aSc" +`) + + b = hugolib.Test(t, files) + + b.AssertFileContent("public/mysection/p1/index.html", "Page 1|Next: |Prev: Page 2|NextInSection: Page 2|PrevInSection: |") +} From c9777473d1369f812d727a6c07dc57ad7be7bf62 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 17 Aug 2024 19:57:41 +0000 Subject: [PATCH 006/570] releaser: Bump versions for release of 0.133.0 [ci skip] --- common/hugo/version_current.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index a33ff5106..0603fa596 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -19,5 +19,5 @@ var CurrentVersion = Version{ Major: 0, Minor: 133, PatchLevel: 0, - Suffix: "-DEV", + Suffix: "", } From c054cba0423fa7e677506fcec67d702486dec01e Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 17 Aug 2024 20:11:05 +0000 Subject: [PATCH 007/570] releaser: Prepare repository for 0.134.0-DEV [ci skip] --- common/hugo/version_current.go | 4 ++-- hugoreleaser.env | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index 0603fa596..be502515a 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -17,7 +17,7 @@ package hugo // This should be the only one. var CurrentVersion = Version{ Major: 0, - Minor: 133, + Minor: 134, PatchLevel: 0, - Suffix: "", + Suffix: "-DEV", } diff --git a/hugoreleaser.env b/hugoreleaser.env index 9cca7015f..145cab866 100644 --- a/hugoreleaser.env +++ b/hugoreleaser.env @@ -1,7 +1,8 @@ # Release env. # These will be replaced by script before release. -HUGORELEASER_TAG=v0.132.2 -HUGORELEASER_COMMITISH=3fd26c70dff5934ec1802b9563530130ed1bca75 +HUGORELEASER_TAG=v0.133.0 +HUGORELEASER_COMMITISH=c9777473d1369f812d727a6c07dc57ad7be7bf62 + From 777534b2a46127ad0392562b4de56ba3ff70a810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 11:47:51 +0200 Subject: [PATCH 008/570] releaser: Rework the run conditions Closes #12753 --- .circleci/config.yml | 13 ++++++++++--- releaser/releaser.go | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff955936..52ce01f6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,9 +98,16 @@ workflows: release: jobs: - prepare_release: - filters: - branches: - only: /release-.*/ + when: + and: + - matches: + pattern: "^release-" + value: << pipeline.git.branch >> + - not: + - matches: + pattern: "NOCIRCLECI" + value: << pipeline.trigger_parameters.github_app.commit_message >> + - build_container1: requires: - prepare_release diff --git a/releaser/releaser.go b/releaser/releaser.go index f2244842a..1cc8413e9 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,7 +101,8 @@ func (r *ReleaseHandler) Run() error { return err } - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { + // About NOCIRCLECI, see issue #12753. + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { return err } From 73d32e7737082118a48adb8db3ff1ed7407f4d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 12:00:47 +0200 Subject: [PATCH 009/570] Revert "releaser: Rework the run conditions" This reverts commit 777534b2a46127ad0392562b4de56ba3ff70a810. Circle ci throws validation errors: ``` Config does not conform to schema: {:workflows {:release {:jobs [{:prepare_release (not (map? nil)), :when {:and disallowed-key}} nil nil nil]}}} ``` --- .circleci/config.yml | 13 +++---------- releaser/releaser.go | 3 +-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52ce01f6a..0ff955936 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,16 +98,9 @@ workflows: release: jobs: - prepare_release: - when: - and: - - matches: - pattern: "^release-" - value: << pipeline.git.branch >> - - not: - - matches: - pattern: "NOCIRCLECI" - value: << pipeline.trigger_parameters.github_app.commit_message >> - + filters: + branches: + only: /release-.*/ - build_container1: requires: - prepare_release diff --git a/releaser/releaser.go b/releaser/releaser.go index 1cc8413e9..f2244842a 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,8 +101,7 @@ func (r *ReleaseHandler) Run() error { return err } - // About NOCIRCLECI, see issue #12753. - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { return err } From 702b1e8b81c889f72207b5b8d0478c300c8ccf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 18:39:55 +0200 Subject: [PATCH 010/570] releaser: Rework the run conditions Now after actually reading the CircleCI docs... Closes #12753 --- .circleci/config.yml | 9 +++++++++ releaser/releaser.go | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff955936..3093b28d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,6 +96,15 @@ jobs: workflows: version: 2 release: + when: + and: + - matches: + pattern: "^release-" + value: << pipeline.git.branch >> + - not: + matches: + pattern: "NOCIRCLECI" + value: << pipeline.trigger_parameters.github_app.commit_message >> jobs: - prepare_release: filters: diff --git a/releaser/releaser.go b/releaser/releaser.go index f2244842a..1cc8413e9 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,7 +101,8 @@ func (r *ReleaseHandler) Run() error { return err } - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { + // About NOCIRCLECI, see issue #12753. + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { return err } From c8f850ae1734def05687b07213e124c2b585349d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 18:49:42 +0200 Subject: [PATCH 011/570] circleci: Upgrade to version 2.1 of the schema Updates #12753 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3093b28d4..e7ad970e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ defaults: &defaults - image: bepsays/ci-hugoreleaser:1.22300.20000 environment: &buildenv GOMODCACHE: /root/project/gomodcache -version: 2 +version: 2.1 jobs: prepare_release: <<: *defaults From 0e5a26057c69078faa4a533b75761cda352a2a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 19:12:02 +0200 Subject: [PATCH 012/570] Revert "circleci: Upgrade to version 2.1 of the schema" This reverts commit c8f850ae1734def05687b07213e124c2b585349d. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e7ad970e4..3093b28d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ defaults: &defaults - image: bepsays/ci-hugoreleaser:1.22300.20000 environment: &buildenv GOMODCACHE: /root/project/gomodcache -version: 2.1 +version: 2 jobs: prepare_release: <<: *defaults From 46484bff84c82136740479e6420a7f88e2b20e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 18 Aug 2024 19:12:03 +0200 Subject: [PATCH 013/570] Revert "releaser: Rework the run conditions" This reverts commit 702b1e8b81c889f72207b5b8d0478c300c8ccf3e. --- .circleci/config.yml | 9 --------- releaser/releaser.go | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3093b28d4..0ff955936 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,15 +96,6 @@ jobs: workflows: version: 2 release: - when: - and: - - matches: - pattern: "^release-" - value: << pipeline.git.branch >> - - not: - matches: - pattern: "NOCIRCLECI" - value: << pipeline.trigger_parameters.github_app.commit_message >> jobs: - prepare_release: filters: diff --git a/releaser/releaser.go b/releaser/releaser.go index 1cc8413e9..f2244842a 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,8 +101,7 @@ func (r *ReleaseHandler) Run() error { return err } - // About NOCIRCLECI, see issue #12753. - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { return err } From 7792392a6f6fda7b1654ba0517e78c62f0a8c905 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 21 Aug 2024 12:05:20 -0700 Subject: [PATCH 014/570] config: Fix pagination deprecation messages --- config/allconfig/allconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go index 802000f97..f6dfa7260 100644 --- a/config/allconfig/allconfig.go +++ b/config/allconfig/allconfig.go @@ -381,12 +381,12 @@ func (c *Config) CompileConfig(logger loggers.Logger) error { // Legacy paginate values. if c.Paginate != 0 { - hugo.Deprecate("site config key paginate", "Use paginator.pagerSize instead.", "v0.128.0") + hugo.Deprecate("site config key paginate", "Use pagination.pagerSize instead.", "v0.128.0") c.Pagination.PagerSize = c.Paginate } if c.PaginatePath != "" { - hugo.Deprecate("site config key paginatePath", "Use paginator.path instead.", "v0.128.0") + hugo.Deprecate("site config key paginatePath", "Use pagination.path instead.", "v0.128.0") c.Pagination.Path = c.PaginatePath } From e1becf1dfe31bec65eca585ac66a2d10f1651e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 24 Aug 2024 18:52:03 +0200 Subject: [PATCH 015/570] deps: Upgraded github.com/bep/imagemeta v0.8.0 => v0.8.1 Closes #12793 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 834322730..6c103ceb5 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/bep/golibsass v1.1.1 github.com/bep/gowebp v0.3.0 github.com/bep/helpers v0.4.0 - github.com/bep/imagemeta v0.8.0 + github.com/bep/imagemeta v0.8.1 github.com/bep/lazycache v0.4.0 github.com/bep/logg v0.4.0 github.com/bep/mclib v1.20400.20402 diff --git a/go.sum b/go.sum index a278f94bb..8117c41e0 100644 --- a/go.sum +++ b/go.sum @@ -141,6 +141,8 @@ github.com/bep/helpers v0.4.0 h1:ab9veaAiWY4ST48Oxp5usaqivDmYdB744fz+tcZ3Ifs= github.com/bep/helpers v0.4.0/go.mod h1:/QpHdmcPagDw7+RjkLFCvnlUc8lQ5kg4KDrEkb2Yyco= github.com/bep/imagemeta v0.8.0 h1:4lqI839akl6lR61D7hmvaw2LDOxiXFZ4D0VIyHyGpc4= github.com/bep/imagemeta v0.8.0/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= +github.com/bep/imagemeta v0.8.1 h1:tjZLPRftjxU7PTI87o5e5WKOFQ4S9S0engiP1OTpJTI= +github.com/bep/imagemeta v0.8.1/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= github.com/bep/lazycache v0.4.0 h1:X8yVyWNVupPd4e1jV7efi3zb7ZV/qcjKQgIQ5aPbkYI= github.com/bep/lazycache v0.4.0/go.mod h1:NmRm7Dexh3pmR1EignYR8PjO2cWybFQ68+QgY3VMCSc= github.com/bep/logg v0.4.0 h1:luAo5mO4ZkhA5M1iDVDqDqnBBnlHjmtZF6VAyTp+nCQ= From 5f667f8796fb051e110449dd8d775e947cc1801e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 25 Aug 2024 22:51:38 +0200 Subject: [PATCH 016/570] Fix missing method NameNormalized panic Closes #12795 --- hugolib/content_map_page.go | 2 +- resources/resource/resourcetypes.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index e3b29f186..c3f06a592 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -560,7 +560,7 @@ func (m *pageMap) getOrCreateResourcesForPage(ps *pageState) resource.Resources for _, r := range res2 { var found bool for _, r2 := range res { - if r2.(resource.NameNormalizedProvider).NameNormalized() == r.(resource.NameNormalizedProvider).NameNormalized() { + if resource.NameNormalizedOrName(r2) == resource.NameNormalizedOrName(r) { found = true break } diff --git a/resources/resource/resourcetypes.go b/resources/resource/resourcetypes.go index 8d982b00a..0fb87f371 100644 --- a/resources/resource/resourcetypes.go +++ b/resources/resource/resourcetypes.go @@ -298,3 +298,11 @@ func (r resourceTypesHolder) ResourceType() string { func NewResourceTypesProvider(mediaType media.Type, resourceType string) ResourceTypesProvider { return resourceTypesHolder{mediaType: mediaType, resourceType: resourceType} } + +// NameNormalizedOrName returns the normalized name if available, otherwise the name. +func NameNormalizedOrName(r Resource) string { + if nn, ok := r.(NameNormalizedProvider); ok { + return nn.NameNormalized() + } + return r.Name() +} From 445283a5932b4e0f5fc377478fa1351547ea0426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 26 Aug 2024 12:39:07 +0200 Subject: [PATCH 017/570] Adjust Circleci workflow to make the Docker images build Closes #12753 --- .circleci/build.yml | 120 +++++++++++++++++++++++++++++++++++++++ .circleci/config.yml | 132 +++++++------------------------------------ releaser/releaser.go | 3 +- 3 files changed, 143 insertions(+), 112 deletions(-) create mode 100644 .circleci/build.yml diff --git a/.circleci/build.yml b/.circleci/build.yml new file mode 100644 index 000000000..e3e0073f6 --- /dev/null +++ b/.circleci/build.yml @@ -0,0 +1,120 @@ +version: 2.1 + +# Passed from config.yml +parameters: + skip: + type: boolean + default: true + +defaults: &defaults + resource_class: large + docker: + - image: bepsays/ci-hugoreleaser:1.22300.20000 +environment: &buildenv + GOMODCACHE: /root/project/gomodcache +jobs: + prepare_release: + <<: *defaults + environment: &buildenv + GOMODCACHE: /root/project/gomodcache + steps: + - &remote-docker + setup_remote_docker: + version: 20.10.14 + - checkout: + path: hugo + - &git-config + run: + command: | + git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com" + git config --global user.name "hugoreleaser" + - run: + command: | + cd hugo + go mod download + go run -tags release main.go release --step 1 + - save_cache: + key: git-sha-{{ .Revision }} + paths: + - hugo + - gomodcache + build_container1: + <<: [*defaults] + environment: + <<: [*buildenv] + steps: + - &restore-cache + restore_cache: + key: git-sha-{{ .Revision }} + - run: + no_output_timeout: 20m + command: | + mkdir -p /tmp/files/dist1 + cd hugo + hugoreleaser build -paths "builds/container1/**" -workers 3 -dist /tmp/files/dist1 -chunks $CIRCLE_NODE_TOTAL -chunk-index $CIRCLE_NODE_INDEX + - &persist-workspace + persist_to_workspace: + root: /tmp/files + paths: + - dist1 + - dist2 + parallelism: 7 + build_container2: + <<: [*defaults] + environment: + <<: [*buildenv] + docker: + - image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000 + steps: + - *restore-cache + - &attach-workspace + attach_workspace: + at: /tmp/workspace + - run: + command: | + mkdir -p /tmp/files/dist2 + cd hugo + hugoreleaser build -paths "builds/container2/**" -workers 1 -dist /tmp/files/dist2 + - *persist-workspace + archive_and_release: + <<: [*defaults] + environment: + <<: [*buildenv] + steps: + - *restore-cache + - *attach-workspace + - *git-config + - run: + name: Add github.com to known hosts + command: ssh-keyscan github.com >> ~/.ssh/known_hosts + - run: + command: | + cp -a /tmp/workspace/dist1/. ./hugo/dist + cp -a /tmp/workspace/dist2/. ./hugo/dist + - run: + command: | + cd hugo + hugoreleaser archive + hugoreleaser release + go run -tags release main.go release --step 2 +workflows: + release: + when: + and: + - equal: [false, << pipeline.parameters.skip >>] + jobs: + - prepare_release: + filters: + branches: + only: /release-.*/ + - build_container1: + requires: + - prepare_release + - build_container2: + requires: + - prepare_release + - archive_and_release: + context: org-global + requires: + - build_container1 + - build_container2 diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff955936..588d3d894 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,117 +1,27 @@ -parameters: - -# v2: 11m. -defaults: &defaults - resource_class: large - docker: - - image: bepsays/ci-hugoreleaser:1.22300.20000 -environment: &buildenv - GOMODCACHE: /root/project/gomodcache -version: 2 +version: 2.1 +setup: true +orbs: + continuation: circleci/continuation@1 jobs: - prepare_release: - <<: *defaults - environment: &buildenv - GOMODCACHE: /root/project/gomodcache - steps: - - &remote-docker - setup_remote_docker: - version: 20.10.14 - - checkout: - path: hugo - - &git-config - run: - command: | - git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com" - git config --global user.name "hugoreleaser" - - run: - command: | - cd hugo - go mod download - go run -tags release main.go release --step 1 - - save_cache: - key: git-sha-{{ .Revision }} - paths: - - hugo - - gomodcache - build_container1: - <<: [*defaults] - environment: - <<: [*buildenv] - steps: - - &restore-cache - restore_cache: - key: git-sha-{{ .Revision }} - - run: - no_output_timeout: 20m - command: | - mkdir -p /tmp/files/dist1 - cd hugo - hugoreleaser build -paths "builds/container1/**" -workers 3 -dist /tmp/files/dist1 -chunks $CIRCLE_NODE_TOTAL -chunk-index $CIRCLE_NODE_INDEX - - &persist-workspace - persist_to_workspace: - root: /tmp/files - paths: - - dist1 - - dist2 - parallelism: 7 - build_container2: - <<: [*defaults] - environment: - <<: [*buildenv] + setup: docker: - - image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000 + - image: cimg/go:1.21 steps: - - *restore-cache - - &attach-workspace - attach_workspace: - at: /tmp/workspace + - checkout - run: command: | - mkdir -p /tmp/files/dist2 - cd hugo - hugoreleaser build -paths "builds/container2/**" -workers 1 -dist /tmp/files/dist2 - - *persist-workspace - archive_and_release: - <<: [*defaults] - environment: - <<: [*buildenv] - steps: - - *restore-cache - - *attach-workspace - - *git-config - - run: - name: Add github.com to known hosts - command: ssh-keyscan github.com >> ~/.ssh/known_hosts - - run: - command: | - cp -a /tmp/workspace/dist1/. ./hugo/dist - cp -a /tmp/workspace/dist2/. ./hugo/dist - - run: - command: | - cd hugo - hugoreleaser archive - hugoreleaser release - go run -tags release main.go release --step 2 + export SKIP=$(git log -n 1 $CIRCLE_SHA1 --pretty=%B | grep -q "NOCIRCLECI" && echo "true" || echo "false") + echo "{\"skip\": $SKIP}" >> set-up-params.json + - continuation/continue: + parameters: set-up-params.json + configuration_path: .circleci/build.yml + workflows: - version: 2 - release: - jobs: - - prepare_release: - filters: - branches: - only: /release-.*/ - - build_container1: - requires: - - prepare_release - - build_container2: - requires: - - prepare_release - - archive_and_release: - context: org-global - requires: - - build_container1 - - build_container2 - - - + configure: + when: + and: + - matches: + pattern: "^release.+" + value: << pipeline.git.branch >> + jobs: + - setup diff --git a/releaser/releaser.go b/releaser/releaser.go index f2244842a..953d33bdc 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,7 +101,8 @@ func (r *ReleaseHandler) Run() error { return err } - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { + // The reason we use NOCIRCLECI, see https://github.com/gohugoio/hugo/issues/12753 + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { return err } From 261d7a03ae1e3bb38c59fb88134c2b56fc9e6cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 26 Aug 2024 15:56:39 +0200 Subject: [PATCH 018/570] Revert "Adjust Circleci workflow to make the Docker images build" This reverts commit 445283a5932b4e0f5fc377478fa1351547ea0426. --- .circleci/build.yml | 120 -------------------------------------- .circleci/config.yml | 134 ++++++++++++++++++++++++++++++++++++------- releaser/releaser.go | 3 +- 3 files changed, 113 insertions(+), 144 deletions(-) delete mode 100644 .circleci/build.yml diff --git a/.circleci/build.yml b/.circleci/build.yml deleted file mode 100644 index e3e0073f6..000000000 --- a/.circleci/build.yml +++ /dev/null @@ -1,120 +0,0 @@ -version: 2.1 - -# Passed from config.yml -parameters: - skip: - type: boolean - default: true - -defaults: &defaults - resource_class: large - docker: - - image: bepsays/ci-hugoreleaser:1.22300.20000 -environment: &buildenv - GOMODCACHE: /root/project/gomodcache -jobs: - prepare_release: - <<: *defaults - environment: &buildenv - GOMODCACHE: /root/project/gomodcache - steps: - - &remote-docker - setup_remote_docker: - version: 20.10.14 - - checkout: - path: hugo - - &git-config - run: - command: | - git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com" - git config --global user.name "hugoreleaser" - - run: - command: | - cd hugo - go mod download - go run -tags release main.go release --step 1 - - save_cache: - key: git-sha-{{ .Revision }} - paths: - - hugo - - gomodcache - build_container1: - <<: [*defaults] - environment: - <<: [*buildenv] - steps: - - &restore-cache - restore_cache: - key: git-sha-{{ .Revision }} - - run: - no_output_timeout: 20m - command: | - mkdir -p /tmp/files/dist1 - cd hugo - hugoreleaser build -paths "builds/container1/**" -workers 3 -dist /tmp/files/dist1 -chunks $CIRCLE_NODE_TOTAL -chunk-index $CIRCLE_NODE_INDEX - - &persist-workspace - persist_to_workspace: - root: /tmp/files - paths: - - dist1 - - dist2 - parallelism: 7 - build_container2: - <<: [*defaults] - environment: - <<: [*buildenv] - docker: - - image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000 - steps: - - *restore-cache - - &attach-workspace - attach_workspace: - at: /tmp/workspace - - run: - command: | - mkdir -p /tmp/files/dist2 - cd hugo - hugoreleaser build -paths "builds/container2/**" -workers 1 -dist /tmp/files/dist2 - - *persist-workspace - archive_and_release: - <<: [*defaults] - environment: - <<: [*buildenv] - steps: - - *restore-cache - - *attach-workspace - - *git-config - - run: - name: Add github.com to known hosts - command: ssh-keyscan github.com >> ~/.ssh/known_hosts - - run: - command: | - cp -a /tmp/workspace/dist1/. ./hugo/dist - cp -a /tmp/workspace/dist2/. ./hugo/dist - - run: - command: | - cd hugo - hugoreleaser archive - hugoreleaser release - go run -tags release main.go release --step 2 -workflows: - release: - when: - and: - - equal: [false, << pipeline.parameters.skip >>] - jobs: - - prepare_release: - filters: - branches: - only: /release-.*/ - - build_container1: - requires: - - prepare_release - - build_container2: - requires: - - prepare_release - - archive_and_release: - context: org-global - requires: - - build_container1 - - build_container2 diff --git a/.circleci/config.yml b/.circleci/config.yml index 588d3d894..0ff955936 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,27 +1,117 @@ -version: 2.1 -setup: true -orbs: - continuation: circleci/continuation@1 +parameters: + +# v2: 11m. +defaults: &defaults + resource_class: large + docker: + - image: bepsays/ci-hugoreleaser:1.22300.20000 +environment: &buildenv + GOMODCACHE: /root/project/gomodcache +version: 2 jobs: - setup: - docker: - - image: cimg/go:1.21 + prepare_release: + <<: *defaults + environment: &buildenv + GOMODCACHE: /root/project/gomodcache steps: - - checkout + - &remote-docker + setup_remote_docker: + version: 20.10.14 + - checkout: + path: hugo + - &git-config + run: + command: | + git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com" + git config --global user.name "hugoreleaser" - run: command: | - export SKIP=$(git log -n 1 $CIRCLE_SHA1 --pretty=%B | grep -q "NOCIRCLECI" && echo "true" || echo "false") - echo "{\"skip\": $SKIP}" >> set-up-params.json - - continuation/continue: - parameters: set-up-params.json - configuration_path: .circleci/build.yml - + cd hugo + go mod download + go run -tags release main.go release --step 1 + - save_cache: + key: git-sha-{{ .Revision }} + paths: + - hugo + - gomodcache + build_container1: + <<: [*defaults] + environment: + <<: [*buildenv] + steps: + - &restore-cache + restore_cache: + key: git-sha-{{ .Revision }} + - run: + no_output_timeout: 20m + command: | + mkdir -p /tmp/files/dist1 + cd hugo + hugoreleaser build -paths "builds/container1/**" -workers 3 -dist /tmp/files/dist1 -chunks $CIRCLE_NODE_TOTAL -chunk-index $CIRCLE_NODE_INDEX + - &persist-workspace + persist_to_workspace: + root: /tmp/files + paths: + - dist1 + - dist2 + parallelism: 7 + build_container2: + <<: [*defaults] + environment: + <<: [*buildenv] + docker: + - image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000 + steps: + - *restore-cache + - &attach-workspace + attach_workspace: + at: /tmp/workspace + - run: + command: | + mkdir -p /tmp/files/dist2 + cd hugo + hugoreleaser build -paths "builds/container2/**" -workers 1 -dist /tmp/files/dist2 + - *persist-workspace + archive_and_release: + <<: [*defaults] + environment: + <<: [*buildenv] + steps: + - *restore-cache + - *attach-workspace + - *git-config + - run: + name: Add github.com to known hosts + command: ssh-keyscan github.com >> ~/.ssh/known_hosts + - run: + command: | + cp -a /tmp/workspace/dist1/. ./hugo/dist + cp -a /tmp/workspace/dist2/. ./hugo/dist + - run: + command: | + cd hugo + hugoreleaser archive + hugoreleaser release + go run -tags release main.go release --step 2 workflows: - configure: - when: - and: - - matches: - pattern: "^release.+" - value: << pipeline.git.branch >> - jobs: - - setup + version: 2 + release: + jobs: + - prepare_release: + filters: + branches: + only: /release-.*/ + - build_container1: + requires: + - prepare_release + - build_container2: + requires: + - prepare_release + - archive_and_release: + context: org-global + requires: + - build_container1 + - build_container2 + + + diff --git a/releaser/releaser.go b/releaser/releaser.go index 953d33bdc..f2244842a 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -101,8 +101,7 @@ func (r *ReleaseHandler) Run() error { return err } - // The reason we use NOCIRCLECI, see https://github.com/gohugoio/hugo/issues/12753 - if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\nNOCIRCLECI", commitPrefix, newVersion)); err != nil { + if _, err := r.git("commit", "-a", "-m", fmt.Sprintf("%s Bump versions for release of %s\n\n[ci skip]", commitPrefix, newVersion)); err != nil { return err } From 47d00202e7e61769ce4d14691e43b27852c9cce4 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Mon, 26 Aug 2024 13:58:46 +0000 Subject: [PATCH 019/570] releaser: Bump versions for release of 0.133.1 [ci skip] --- common/hugo/version_current.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index be502515a..8acc3341e 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -17,7 +17,7 @@ package hugo // This should be the only one. var CurrentVersion = Version{ Major: 0, - Minor: 134, - PatchLevel: 0, - Suffix: "-DEV", + Minor: 133, + PatchLevel: 1, + Suffix: "", } From aa0f66b290b4e736670eb7135c76eb4e80677691 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Mon, 26 Aug 2024 14:13:52 +0000 Subject: [PATCH 020/570] releaser: Prepare repository for 0.134.0-DEV [ci skip] --- common/hugo/version_current.go | 6 +++--- hugoreleaser.env | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index 8acc3341e..be502515a 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -17,7 +17,7 @@ package hugo // This should be the only one. var CurrentVersion = Version{ Major: 0, - Minor: 133, - PatchLevel: 1, - Suffix: "", + Minor: 134, + PatchLevel: 0, + Suffix: "-DEV", } diff --git a/hugoreleaser.env b/hugoreleaser.env index 145cab866..988c80653 100644 --- a/hugoreleaser.env +++ b/hugoreleaser.env @@ -1,7 +1,8 @@ # Release env. # These will be replaced by script before release. -HUGORELEASER_TAG=v0.133.0 -HUGORELEASER_COMMITISH=c9777473d1369f812d727a6c07dc57ad7be7bf62 +HUGORELEASER_TAG=v0.133.1 +HUGORELEASER_COMMITISH=47d00202e7e61769ce4d14691e43b27852c9cce4 + From 371246de25c258343ef7688945c7a2d9b471214a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 28 Aug 2024 08:17:16 +0200 Subject: [PATCH 021/570] hugolib: Add a test for overriding _internal templates --- hugolib/template_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hugolib/template_test.go b/hugolib/template_test.go index 1c60a88b3..a610b4d59 100644 --- a/hugolib/template_test.go +++ b/hugolib/template_test.go @@ -706,3 +706,17 @@ a: {{ $a }} b.AssertFileContent("public/index.html", `a: [a b c]`) } + +func TestOverrideInternalTemplate(t *testing.T) { + files := ` +-- hugo.toml -- +baseURL = "https://example.org" +-- layouts/index.html -- +{{ template "_internal/google_analytics_async.html" . }} +-- layouts/_internal/google_analytics_async.html -- +Overridden. +` + b := Test(t, files) + + b.AssertFileContent("public/index.html", "Overridden.") +} From 1ecd0596a3df62c6ad266e70d7cad51f8e916a08 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 26 Aug 2024 07:27:43 -0700 Subject: [PATCH 022/570] output: Fix docshelper template lookup order for AMP pages Fixes #12797 --- docs/data/docs.yaml | 14 +++++++------- output/docshelper.go | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml index 7ac76ee39..8d97c21e0 100644 --- a/docs/data/docs.yaml +++ b/docs/data/docs.yaml @@ -1865,7 +1865,7 @@ output: - layouts/_default/demolayout-baseof.html - layouts/_default/single-baseof.html - layouts/_default/baseof.html - - Example: AMP single page + - Example: AMP single page in "posts" section Kind: page OutputFormat: amp Suffix: html @@ -1874,17 +1874,17 @@ output: - layouts/posts/single.html - layouts/_default/single.amp.html - layouts/_default/single.html - - Example: AMP single page, French language + - Example: AMP single page in "posts" section, French language Kind: page - OutputFormat: html + OutputFormat: amp Suffix: html Template Lookup Order: - - layouts/posts/single.fr.html.html - - layouts/posts/single.html.html + - layouts/posts/single.fr.amp.html + - layouts/posts/single.amp.html - layouts/posts/single.fr.html - layouts/posts/single.html - - layouts/_default/single.fr.html.html - - layouts/_default/single.html.html + - layouts/_default/single.fr.amp.html + - layouts/_default/single.amp.html - layouts/_default/single.fr.html - layouts/_default/single.html - Example: Home page diff --git a/output/docshelper.go b/output/docshelper.go index f7f3b0c4a..0f2a0eff6 100644 --- a/output/docshelper.go +++ b/output/docshelper.go @@ -46,8 +46,8 @@ func createLayoutExamples() any { {"Base template for single page in \"posts\" section", layouts.LayoutDescriptor{Baseof: true, Kind: "page", Type: "posts", OutputFormatName: "html", Suffix: "html"}}, {"Single page in \"posts\" section with layout set to \"demolayout\"", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}}, {"Base template for single page in \"posts\" section with layout set to \"demolayout\"", layouts.LayoutDescriptor{Baseof: true, Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}}, - {"AMP single page", layouts.LayoutDescriptor{Kind: "page", Type: "posts", OutputFormatName: "amp", Suffix: "html"}}, - {"AMP single page, French language", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Lang: "fr", OutputFormatName: "html", Suffix: "html"}}, + {"AMP single page in \"posts\" section", layouts.LayoutDescriptor{Kind: "page", Type: "posts", OutputFormatName: "amp", Suffix: "html"}}, + {"AMP single page in \"posts\" section, French language", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Lang: "fr", OutputFormatName: "amp", Suffix: "html"}}, // Typeless pages get "page" as type {"Home page", layouts.LayoutDescriptor{Kind: "home", Type: "page", OutputFormatName: "html", Suffix: "html"}}, {"Base template for home page", layouts.LayoutDescriptor{Baseof: true, Kind: "home", Type: "page", OutputFormatName: "html", Suffix: "html"}}, From 4ded32d077d18c73537ce2679fb61bd6e6b466c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:38:16 +0000 Subject: [PATCH 023/570] build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3 Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/pelletier/go-toml/releases) - [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml) - [Commits](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.3) --- updated-dependencies: - dependency-name: github.com/pelletier/go-toml/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 6c103ceb5..02ec0efc8 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/niklasfasching/go-org v1.7.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 - github.com/pelletier/go-toml/v2 v2.2.2 + github.com/pelletier/go-toml/v2 v2.2.3 github.com/rogpeppe/go-internal v1.12.0 github.com/sanity-io/litter v1.5.5 github.com/spf13/afero v1.11.0 diff --git a/go.sum b/go.sum index 8117c41e0..89b6e2388 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,6 @@ github.com/bep/gowebp v0.3.0 h1:MhmMrcf88pUY7/PsEhMgEP0T6fDUnRTMpN8OclDrbrY= github.com/bep/gowebp v0.3.0/go.mod h1:ZhFodwdiFp8ehGJpF4LdPl6unxZm9lLFjxD3z2h2AgI= github.com/bep/helpers v0.4.0 h1:ab9veaAiWY4ST48Oxp5usaqivDmYdB744fz+tcZ3Ifs= github.com/bep/helpers v0.4.0/go.mod h1:/QpHdmcPagDw7+RjkLFCvnlUc8lQ5kg4KDrEkb2Yyco= -github.com/bep/imagemeta v0.8.0 h1:4lqI839akl6lR61D7hmvaw2LDOxiXFZ4D0VIyHyGpc4= -github.com/bep/imagemeta v0.8.0/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= github.com/bep/imagemeta v0.8.1 h1:tjZLPRftjxU7PTI87o5e5WKOFQ4S9S0engiP1OTpJTI= github.com/bep/imagemeta v0.8.1/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s= github.com/bep/lazycache v0.4.0 h1:X8yVyWNVupPd4e1jV7efi3zb7ZV/qcjKQgIQ5aPbkYI= @@ -402,8 +400,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= @@ -444,7 +442,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -453,7 +450,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tdewolff/minify/v2 v2.20.37 h1:Q97cx4STXCh1dlWDlNHZniE8BJ2EBL0+2b0n92BJQhw= @@ -463,8 +459,6 @@ github.com/tdewolff/parse/v2 v2.7.15/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo= github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8= -github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec h1:KeQseLFSWb9qjW4PSWxciTBk1hbG7KsVx3rs1hIQnbQ= -github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g= github.com/tetratelabs/wazero v1.8.0/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= From 12a28ef7738764d998c201060fce47097d96f48e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:45:03 +0000 Subject: [PATCH 024/570] build(deps): bump github.com/evanw/esbuild from 0.23.0 to 0.23.1 Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.23.0 to 0.23.1. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.23.0...v0.23.1) --- updated-dependencies: - dependency-name: github.com/evanw/esbuild dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 02ec0efc8..e75154289 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/cli/safeexec v1.0.1 github.com/disintegration/gift v1.2.1 github.com/dustin/go-humanize v1.0.1 - github.com/evanw/esbuild v0.23.0 + github.com/evanw/esbuild v0.23.1 github.com/fatih/color v1.17.0 github.com/fortytw2/leaktest v1.3.0 github.com/frankban/quicktest v1.14.6 diff --git a/go.sum b/go.sum index 89b6e2388..1426701dc 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanw/esbuild v0.23.0 h1:PLUwTn2pzQfIBRrMKcD3M0g1ALOKIHMDefdFCk7avwM= -github.com/evanw/esbuild v0.23.0/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48= +github.com/evanw/esbuild v0.23.1 h1:ociewhY6arjTarKLdrXfDTgy25oxhTZmzP8pfuBTfTA= +github.com/evanw/esbuild v0.23.1/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= From 2b5c335e933cbd8e4e8569f206add5ec1bccd8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 28 Aug 2024 14:35:24 +0200 Subject: [PATCH 025/570] deps: Upgrade github.com/bep/golibsass v1.1.1 => v1.2.0 Fixes #12649 --- common/hugo/hugo.go | 2 +- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go index 0589ac9a3..456968973 100644 --- a/common/hugo/hugo.go +++ b/common/hugo/hugo.go @@ -276,7 +276,7 @@ func GetDependencyListNonGo() []string { if IsExtended { deps = append( deps, - formatDep("github.com/sass/libsass", "3.6.5"), + formatDep("github.com/sass/libsass", "3.6.6"), formatDep("github.com/webmproject/libwebp", "v1.3.2"), ) } diff --git a/go.mod b/go.mod index e75154289..353f3b872 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/bep/goat v0.5.0 github.com/bep/godartsass v1.2.0 github.com/bep/godartsass/v2 v2.1.0 - github.com/bep/golibsass v1.1.1 + github.com/bep/golibsass v1.2.0 github.com/bep/gowebp v0.3.0 github.com/bep/helpers v0.4.0 github.com/bep/imagemeta v0.8.1 diff --git a/go.sum b/go.sum index 1426701dc..77c8f8849 100644 --- a/go.sum +++ b/go.sum @@ -135,6 +135,8 @@ github.com/bep/godartsass/v2 v2.1.0 h1:fq5Y1xYf4diu4tXABiekZUCA+5l/dmNjGKCeQwdy+ github.com/bep/godartsass/v2 v2.1.0/go.mod h1:AcP8QgC+OwOXEq6im0WgDRYK7scDsmZCEW62o1prQLo= github.com/bep/golibsass v1.1.1 h1:xkaet75ygImMYjM+FnHIT3xJn7H0xBA9UxSOJjk8Khw= github.com/bep/golibsass v1.1.1/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA= +github.com/bep/golibsass v1.2.0 h1:nyZUkKP/0psr8nT6GR2cnmt99xS93Ji82ZD9AgOK6VI= +github.com/bep/golibsass v1.2.0/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA= github.com/bep/gowebp v0.3.0 h1:MhmMrcf88pUY7/PsEhMgEP0T6fDUnRTMpN8OclDrbrY= github.com/bep/gowebp v0.3.0/go.mod h1:ZhFodwdiFp8ehGJpF4LdPl6unxZm9lLFjxD3z2h2AgI= github.com/bep/helpers v0.4.0 h1:ab9veaAiWY4ST48Oxp5usaqivDmYdB744fz+tcZ3Ifs= From 37609262dcddac6d3358412b10214111b4d4dc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 13 Aug 2024 15:49:56 +0200 Subject: [PATCH 026/570] Add Page.Contents with scope support Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types: Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`. Fixes #8680 Fixes #12761 Fixes #12778 Fixes #716 --- common/hugo/hugo.go | 25 + common/hugo/hugo_test.go | 14 + common/paths/pathparser.go | 4 +- common/types/types.go | 12 +- common/types/types_test.go | 22 + helpers/content.go | 74 --- helpers/content_test.go | 79 --- hugolib/page.go | 9 +- hugolib/page__content.go | 586 ++++++++++++++---- hugolib/page__meta.go | 2 +- hugolib/page__output.go | 5 +- hugolib/page__per_output.go | 464 ++++---------- hugolib/page_test.go | 204 +----- hugolib/shortcode_page.go | 4 + hugolib/shortcode_test.go | 31 +- resources/page/page.go | 10 +- resources/page/page_lazy_contentprovider.go | 11 + resources/page/page_markup.go | 344 ++++++++++ .../page/page_markup_integration_test.go | 337 ++++++++++ resources/page/page_markup_test.go | 151 +++++ resources/page/page_nop.go | 76 +++ resources/page/testhelpers_test.go | 8 + 22 files changed, 1614 insertions(+), 858 deletions(-) create mode 100644 resources/page/page_markup.go create mode 100644 resources/page/page_markup_integration_test.go create mode 100644 resources/page/page_markup_test.go diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go index 456968973..f21103940 100644 --- a/common/hugo/hugo.go +++ b/common/hugo/hugo.go @@ -14,6 +14,7 @@ package hugo import ( + "context" "fmt" "html/template" "os" @@ -29,6 +30,7 @@ import ( "github.com/mitchellh/mapstructure" "github.com/bep/godartsass/v2" + "github.com/gohugoio/hugo/common/hcontext" "github.com/gohugoio/hugo/common/hexec" "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/hugofs/files" @@ -69,6 +71,9 @@ type HugoInfo struct { conf ConfigProvider deps []*Dependency + + // Context gives access to some of the context scoped variables. + Context Context } // Version returns the current version as a comparable version string. @@ -127,6 +132,26 @@ func (i HugoInfo) IsMultilingual() bool { return i.conf.IsMultilingual() } +type contextKey string + +var markupScope = hcontext.NewContextDispatcher[string](contextKey("markupScope")) + +type Context struct{} + +func (c Context) MarkupScope(ctx context.Context) string { + return GetMarkupScope(ctx) +} + +// SetMarkupScope sets the markup scope in the context. +func SetMarkupScope(ctx context.Context, s string) context.Context { + return markupScope.Set(ctx, s) +} + +// GetMarkupScope gets the markup scope from the context. +func GetMarkupScope(ctx context.Context) string { + return markupScope.Get(ctx) +} + // ConfigProvider represents the config options that are relevant for HugoInfo. type ConfigProvider interface { Environment() string diff --git a/common/hugo/hugo_test.go b/common/hugo/hugo_test.go index 6e8b2620e..241d8c0ae 100644 --- a/common/hugo/hugo_test.go +++ b/common/hugo/hugo_test.go @@ -14,6 +14,7 @@ package hugo import ( + "context" "fmt" "testing" @@ -64,6 +65,19 @@ func TestDeprecationLogLevelFromVersion(t *testing.T) { c.Assert(deprecationLogLevelFromVersion(ver.String()), qt.Equals, logg.LevelError) } +func TestMarkupScope(t *testing.T) { + c := qt.New(t) + + conf := testConfig{environment: "production", workingDir: "/mywork", running: false} + info := NewInfo(conf, nil) + + ctx := context.Background() + + ctx = SetMarkupScope(ctx, "foo") + + c.Assert(info.Context.MarkupScope(ctx), qt.Equals, "foo") +} + type testConfig struct { environment string running bool diff --git a/common/paths/pathparser.go b/common/paths/pathparser.go index 5fa798fb0..94329fe7a 100644 --- a/common/paths/pathparser.go +++ b/common/paths/pathparser.go @@ -153,7 +153,7 @@ func (pp *PathParser) doParse(component, s string, p *Path) (*Path, error) { } else { high = len(p.s) } - id := types.LowHigh{Low: i + 1, High: high} + id := types.LowHigh[string]{Low: i + 1, High: high} if len(p.identifiers) == 0 { p.identifiers = append(p.identifiers, id) } else if len(p.identifiers) == 1 { @@ -260,7 +260,7 @@ type Path struct { component string bundleType PathType - identifiers []types.LowHigh + identifiers []types.LowHigh[string] posIdentifierLanguage int disabled bool diff --git a/common/types/types.go b/common/types/types.go index 322dfe592..d32391a88 100644 --- a/common/types/types.go +++ b/common/types/types.go @@ -107,12 +107,20 @@ func Unwrapv(v any) any { return v } -// LowHigh is typically used to represent a slice boundary. -type LowHigh struct { +// LowHigh represents a byte or slice boundary. +type LowHigh[S ~[]byte | string] struct { Low int High int } +func (l LowHigh[S]) IsZero() bool { + return l.Low < 0 || (l.Low == 0 && l.High == 0) +} + +func (l LowHigh[S]) Value(source S) S { + return source[l.Low:l.High] +} + // This is only used for debugging purposes. var InvocationCounter atomic.Int64 diff --git a/common/types/types_test.go b/common/types/types_test.go index 6f13ae834..795733047 100644 --- a/common/types/types_test.go +++ b/common/types/types_test.go @@ -27,3 +27,25 @@ func TestKeyValues(t *testing.T) { c.Assert(kv.KeyString(), qt.Equals, "key") c.Assert(kv.Values, qt.DeepEquals, []any{"a1", "a2"}) } + +func TestLowHigh(t *testing.T) { + c := qt.New(t) + + lh := LowHigh[string]{ + Low: 2, + High: 10, + } + + s := "abcdefghijklmnopqrstuvwxyz" + c.Assert(lh.IsZero(), qt.IsFalse) + c.Assert(lh.Value(s), qt.Equals, "cdefghij") + + lhb := LowHigh[[]byte]{ + Low: 2, + High: 10, + } + + sb := []byte(s) + c.Assert(lhb.IsZero(), qt.IsFalse) + c.Assert(lhb.Value(sb), qt.DeepEquals, []byte("cdefghij")) +} diff --git a/helpers/content.go b/helpers/content.go index 49283d526..9d74a3d31 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -22,7 +22,6 @@ import ( "html/template" "strings" "unicode" - "unicode/utf8" "github.com/gohugoio/hugo/common/hexec" "github.com/gohugoio/hugo/common/loggers" @@ -165,75 +164,6 @@ func TotalWords(s string) int { return n } -// TruncateWordsByRune truncates words by runes. -func (c *ContentSpec) TruncateWordsByRune(in []string) (string, bool) { - words := make([]string, len(in)) - copy(words, in) - - count := 0 - for index, word := range words { - if count >= c.Cfg.SummaryLength() { - return strings.Join(words[:index], " "), true - } - runeCount := utf8.RuneCountInString(word) - if len(word) == runeCount { - count++ - } else if count+runeCount < c.Cfg.SummaryLength() { - count += runeCount - } else { - for ri := range word { - if count >= c.Cfg.SummaryLength() { - truncatedWords := append(words[:index], word[:ri]) - return strings.Join(truncatedWords, " "), true - } - count++ - } - } - } - - return strings.Join(words, " "), false -} - -// TruncateWordsToWholeSentence takes content and truncates to whole sentence -// limited by max number of words. It also returns whether it is truncated. -func (c *ContentSpec) TruncateWordsToWholeSentence(s string) (string, bool) { - var ( - wordCount = 0 - lastWordIndex = -1 - ) - - for i, r := range s { - if unicode.IsSpace(r) { - wordCount++ - lastWordIndex = i - - if wordCount >= c.Cfg.SummaryLength() { - break - } - - } - } - - if lastWordIndex == -1 { - return s, false - } - - endIndex := -1 - - for j, r := range s[lastWordIndex:] { - if isEndOfSentence(r) { - endIndex = j + lastWordIndex + utf8.RuneLen(r) - break - } - } - - if endIndex == -1 { - return s, false - } - - return strings.TrimSpace(s[:endIndex]), endIndex < len(s) -} - // TrimShortHTML removes the outer tags from HTML input where (a) the opening // tag is present only once with the input, and (b) the opening and closing // tags wrap the input after white space removal. @@ -256,7 +186,3 @@ func (c *ContentSpec) TrimShortHTML(input []byte, markup string) []byte { } return input } - -func isEndOfSentence(r rune) bool { - return r == '.' || r == '?' || r == '!' || r == '"' || r == '\n' -} diff --git a/helpers/content_test.go b/helpers/content_test.go index 22d468191..dd7c5a4c5 100644 --- a/helpers/content_test.go +++ b/helpers/content_test.go @@ -20,7 +20,6 @@ import ( "testing" qt "github.com/frankban/quicktest" - "github.com/gohugoio/hugo/config" "github.com/gohugoio/hugo/helpers" ) @@ -66,84 +65,6 @@ func TestBytesToHTML(t *testing.T) { c.Assert(helpers.BytesToHTML([]byte("dobedobedo")), qt.Equals, template.HTML("dobedobedo")) } -var benchmarkTruncateString = strings.Repeat("This is a sentence about nothing.", 20) - -func BenchmarkTestTruncateWordsToWholeSentence(b *testing.B) { - c := newTestContentSpec(nil) - b.ResetTimer() - for i := 0; i < b.N; i++ { - c.TruncateWordsToWholeSentence(benchmarkTruncateString) - } -} - -func TestTruncateWordsToWholeSentence(t *testing.T) { - type test struct { - input, expected string - max int - truncated bool - } - data := []test{ - {"a b c", "a b c", 12, false}, - {"a b c", "a b c", 3, false}, - {"a", "a", 1, false}, - {"This is a sentence.", "This is a sentence.", 5, false}, - {"This is also a sentence!", "This is also a sentence!", 1, false}, - {"To be. Or not to be. That's the question.", "To be.", 1, true}, - {" \nThis is not a sentence\nAnd this is another", "This is not a sentence", 4, true}, - {"", "", 10, false}, - {"This... is a more difficult test?", "This... is a more difficult test?", 1, false}, - } - for i, d := range data { - cfg := config.New() - cfg.Set("summaryLength", d.max) - c := newTestContentSpec(cfg) - output, truncated := c.TruncateWordsToWholeSentence(d.input) - if d.expected != output { - t.Errorf("Test %d failed. Expected %q got %q", i, d.expected, output) - } - - if d.truncated != truncated { - t.Errorf("Test %d failed. Expected truncated=%t got %t", i, d.truncated, truncated) - } - } -} - -func TestTruncateWordsByRune(t *testing.T) { - type test struct { - input, expected string - max int - truncated bool - } - data := []test{ - {"", "", 1, false}, - {"a b c", "a b c", 12, false}, - {"a b c", "a b c", 3, false}, - {"a", "a", 1, false}, - {"Hello 中国", "", 0, true}, - {"这是中文,全中文。", "这是中文,", 5, true}, - {"Hello 中国", "Hello 中", 2, true}, - {"Hello 中国", "Hello 中国", 3, false}, - {"Hello中国 Good 好的", "Hello中国 Good 好", 9, true}, - {"This is a sentence.", "This is", 2, true}, - {"This is also a sentence!", "This", 1, true}, - {"To be. Or not to be. That's the question.", "To be. Or not", 4, true}, - {" \nThis is not a sentence\n ", "This is not", 3, true}, - } - for i, d := range data { - cfg := config.New() - cfg.Set("summaryLength", d.max) - c := newTestContentSpec(cfg) - output, truncated := c.TruncateWordsByRune(strings.Fields(d.input)) - if d.expected != output { - t.Errorf("Test %d failed. Expected %q got %q", i, d.expected, output) - } - - if d.truncated != truncated { - t.Errorf("Test %d failed. Expected truncated=%t got %t", i, d.truncated, truncated) - } - } -} - func TestExtractTOCNormalContent(t *testing.T) { content := []byte("