Repository: gohugoio/hugo
Pull request #11629 (2023-10-30 08:32:52)

build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.9 to 0.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google/go-cmp/releases">github.com/google/go-cmp's releases</a>.</em></p>
<blockquote>
<h2>v0.6.0</h2>
<p>New API:</p>
<ul>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/340">#340</a>) Add <code>cmpopts.EquateComparable</code></li>
</ul>
<p>Documentation changes:</p>
<ul>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/337">#337</a>) Use of hotlinking of Go identifiers</li>
</ul>
<p>Build changes:</p>
<ul>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/325">#325</a>) Remove purego fallbacks</li>
</ul>
<p>Testing changes:</p>
<ul>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/322">#322</a>) Run tests for Go 1.20 version</li>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/332">#332</a>) Pin GitHub action versions</li>
<li>(<a href="https://redirect.github.com/google/go-cmp/issues/327">#327</a>) set workflow permission to read-only</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/google/go-cmp/commit/c3ad8435e7bef96af35732bc0789e5a2278c6d5f"><code>c3ad843</code></a> Add cmpopts.EquateComparable (<a href="https://redirect.github.com/google/go-cmp/issues/340">#340</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/e250a55e913727afa4a4ccf87d716232288d9b5f"><code>e250a55</code></a> Use of hotlinking of Go identifiers (<a href="https://redirect.github.com/google/go-cmp/issues/337">#337</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/8a3e8dd7458e5d9ba6b4317a4b1423b4910d4014"><code>8a3e8dd</code></a> set workflow permission to read-only (<a href="https://redirect.github.com/google/go-cmp/issues/327">#327</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/8cea5de50d284888e0abcdab4c2c65b6e73acb32"><code>8cea5de</code></a> Pin GitHub action versions (<a href="https://redirect.github.com/google/go-cmp/issues/332">#332</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/3bb304a85447513e496f9784afc52189e5bf41e9"><code>3bb304a</code></a> Run tests for Go 1.20 version (<a href="https://redirect.github.com/google/go-cmp/issues/322">#322</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/571a56ba783fe6ec6c9f3aa12166e8e33652e4c5"><code>571a56b</code></a> Remove purego fallbacks (<a href="https://redirect.github.com/google/go-cmp/issues/325">#325</a>)</li>
<li>See full diff in <a href="https://github.com/google/go-cmp/compare/v0.5.9...v0.6.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/go-cmp&package-manager=go_modules&previous-version=0.5.9&new-version=0.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/go.mod b/go.mod
index b722d211c..a5f87f0d3 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/gohugoio/hugo
 require (
 	github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69
 	github.com/PuerkitoBio/purell v1.1.1
-	github.com/alecthomas/chroma/v2 v2.9.1
+	github.com/alecthomas/chroma/v2 v2.10.0
 	github.com/armon/go-radix v1.0.0
 	github.com/aws/aws-sdk-go v1.45.14
 	github.com/bep/clocks v0.5.0
@@ -38,7 +38,7 @@ require (
 	github.com/gohugoio/locales v0.14.0
 	github.com/gohugoio/localescompressed v1.0.1
 	github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95
-	github.com/google/go-cmp v0.5.9
+	github.com/google/go-cmp v0.6.0
 	github.com/gorilla/websocket v1.5.0
 	github.com/hairyhenderson/go-codeowners v0.4.0
 	github.com/jdkato/prose v1.2.1
diff --git a/go.sum b/go.sum
index 5974fd353..881363d98 100644
--- a/go.sum
+++ b/go.sum
@@ -71,8 +71,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
 github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
-github.com/alecthomas/chroma/v2 v2.9.1 h1:0O3lTQh9FxazJ4BYE/MOi/vDGuHn7B+6Bu902N2UZvU=
-github.com/alecthomas/chroma/v2 v2.9.1/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
+github.com/alecthomas/chroma/v2 v2.10.0 h1:T2iQOCCt4pRmRMfL55gTodMtc7cU0y7lc1Jb8/mK/64=
+github.com/alecthomas/chroma/v2 v2.10.0/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
 github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
@@ -275,8 +275,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
 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/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk=
 github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index 127b0e296..ac59e01c7 100644
--- a/hugolib/site_new.go
+++ b/hugolib/site_new.go
@@ -417,8 +417,8 @@ func (s *Site) Hugo() hugo.HugoInfo {
 }
 
 // Returns the BaseURL for this Site.
-func (s *Site) BaseURL() template.URL {
-	return template.URL(s.conf.C.BaseURL.WithPath)
+func (s *Site) BaseURL() string {
+	return s.conf.C.BaseURL.WithPath
 }
 
 // Returns the last modification date of the content.
diff --git a/resources/page/pagination.go b/resources/page/pagination.go
index a4605fa8e..9113b6062 100644
--- a/resources/page/pagination.go
+++ b/resources/page/pagination.go
@@ -16,7 +16,6 @@ package page
 import (
 	"errors"
 	"fmt"
-	"html/template"
 	"math"
 	"reflect"
 
@@ -71,8 +70,8 @@ func (p *Pager) PageNumber() int {
 }
 
 // URL returns the URL to the current page.
-func (p *Pager) URL() template.HTML {
-	return template.HTML(p.paginationURLFactory(p.PageNumber()))
+func (p *Pager) URL() string {
+	return p.paginationURLFactory(p.PageNumber())
 }
 
 // Pages returns the Pages on this page.
diff --git a/resources/page/site.go b/resources/page/site.go
index ba2759a06..0480ce674 100644
--- a/resources/page/site.go
+++ b/resources/page/site.go
@@ -82,7 +82,7 @@ type Site interface {
 	Hugo() hugo.HugoInfo
 
 	// Returns the BaseURL for this Site.
-	BaseURL() template.URL
+	BaseURL() string
 
 	// Returns a taxonomy map.
 	Taxonomies() TaxonomyList
@@ -172,6 +172,7 @@ func (s *siteWrapper) Social() map[string]string {
 func (s *siteWrapper) Author() map[string]interface{} {
 	return s.s.Author()
 }
+
 func (s *siteWrapper) Authors() AuthorList {
 	return AuthorList{}
 }
@@ -250,7 +251,7 @@ func (s *siteWrapper) Hugo() hugo.HugoInfo {
 	return s.s.Hugo()
 }
 
-func (s *siteWrapper) BaseURL() template.URL {
+func (s *siteWrapper) BaseURL() string {
 	return s.s.BaseURL()
 }
 
@@ -319,6 +320,7 @@ type testSite struct {
 func (s testSite) Author() map[string]interface{} {
 	return nil
 }
+
 func (s testSite) Authors() AuthorList {
 	return AuthorList{}
 }
@@ -421,7 +423,7 @@ func (t testSite) Taxonomies() TaxonomyList {
 	return nil
 }
 
-func (t testSite) BaseURL() template.URL {
+func (t testSite) BaseURL() string {
 	return ""
 }
 


Test patch:
diff --git a/resources/page/pagination_test.go b/resources/page/pagination_test.go
index 1e115d62b..487b36adb 100644
--- a/resources/page/pagination_test.go
+++ b/resources/page/pagination_test.go
@@ -16,7 +16,6 @@ package page
 import (
 	"context"
 	"fmt"
-	"html/template"
 	"testing"
 
 	qt "github.com/frankban/quicktest"
@@ -119,7 +118,7 @@ func doTestPages(t *testing.T, paginator *Paginator) {
 	c.Assert(paginator.TotalPages(), qt.Equals, 5)
 
 	first := paginatorPages[0]
-	c.Assert(first.URL(), qt.Equals, template.HTML("page/1/"))
+	c.Assert(first.URL(), qt.Equals, "page/1/")
 	c.Assert(first.First(), qt.Equals, first)
 	c.Assert(first.HasNext(), qt.Equals, true)
 	c.Assert(first.Next(), qt.Equals, paginatorPages[1])
@@ -134,7 +133,7 @@ func doTestPages(t *testing.T, paginator *Paginator) {
 	c.Assert(third.Prev(), qt.Equals, paginatorPages[1])
 
 	last := paginatorPages[4]
-	c.Assert(last.URL(), qt.Equals, template.HTML("page/5/"))
+	c.Assert(last.URL(), qt.Equals, "page/5/")
 	c.Assert(last.Last(), qt.Equals, last)
 	c.Assert(last.HasNext(), qt.Equals, false)
 	c.Assert(last.Next(), qt.IsNil)