common/hugo: Include non-go dependencies in go env output

Closes #15116

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Joe Mooring
2026-07-11 11:03:57 -07:00
committed by Bjørn Erik Pedersen
parent 984358f047
commit 89b8c32200
6 changed files with 45 additions and 6 deletions
+7 -2
View File
@@ -33,6 +33,7 @@ import (
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/common/version"
"github.com/gohugoio/hugo/hugofs/files"
"github.com/gohugoio/hugo/internal/warpc"
"github.com/spf13/afero"
@@ -211,7 +212,10 @@ func GetDependencyList() []string {
// GetDependencyListNonGo returns a list of non-Go dependencies.
func GetDependencyListNonGo() []string {
deps := []string{formatDep("github.com/webmproject/libwebp", "v1.6.0")} // via WASM. TODO(bep) get versions from the plugin setup.
var deps []string
for _, dep := range warpc.GetWASMDeps() {
deps = append(deps, formatDep(dep[0], dep[1]))
}
if IsExtended {
deps = append(
@@ -225,7 +229,8 @@ func GetDependencyListNonGo() []string {
if IsDartSassGeV2() {
dartSassPath = "github.com/sass/dart-sass"
}
deps = append(deps,
deps = append(
deps,
formatDep(dartSassPath+"/protocol", dartSass.ProtocolVersion),
formatDep(dartSassPath+"/compiler", dartSass.CompilerVersion),
formatDep(dartSassPath+"/implementation", dartSass.ImplementationVersion),
+7
View File
@@ -25,6 +25,13 @@ import (
"github.com/gohugoio/hugo/common/hugio"
)
// Keep in sync with genavif/Makefile.
const (
libavifVersion = "v1.4.1"
aomVersion = "v3.14.1"
dav1dVersion = "1.5.3"
)
var (
_ SourceProvider = AvifInput{}
_ DestinationProvider = AvifInput{}
+3
View File
@@ -17,6 +17,9 @@ import (
_ "embed"
)
// Keep in sync with js/package.json.
const katexVersion = "0.16.21"
//go:embed wasm/renderkatex.wasm
var katexWasm []byte
+17 -3
View File
@@ -48,6 +48,17 @@ const (
const currentVersion = 1
// GetWASMDeps returns version information for the C libraries bundled as WASM.
func GetWASMDeps() [][2]string {
return [][2]string{
{"aomedia.googlesource.com/aom", aomVersion},
{"code.videolan.org/videolan/dav1d", dav1dVersion},
{"github.com/AOMediaCodec/libavif", libavifVersion},
{"github.com/KaTeX/KaTeX", katexVersion},
{"github.com/webmproject/libwebp", libwebpVersion},
}
}
//go:embed wasm/quickjs.wasm
var quickjsWasm []byte
@@ -348,7 +359,8 @@ func (d *dispatcher[Q, R]) inputBlobs() error {
call.done()
}
return nil
}); err != nil {
},
); err != nil {
inputErr = err
break
}
@@ -384,7 +396,8 @@ func (d *dispatcher[Q, R]) inputJSON() error {
call.done()
}
return nil
}); err != nil {
},
); err != nil {
inputErr = err
break
}
@@ -679,7 +692,8 @@ func newDispatcher[Q, R any](opts Options) (*dispatcherPool[Q, R], error) {
if err != nil {
return toErr("quickjs", errBuff, err)
}
ctx = experimental.WithImportResolver(ctx,
ctx = experimental.WithImportResolver(
ctx,
func(name string) api.Module {
if name == opts.Runtime.Name {
return runtimeInstance
+3
View File
@@ -28,6 +28,9 @@ import (
"github.com/gohugoio/hugo/common/hugio"
)
// Keep in sync with genwebp/Makefile.
const libwebpVersion = "v1.6.0"
var (
_ SourceProvider = WebpInput{}
_ DestinationProvider = WebpInput{}
+8 -1
View File
@@ -1,5 +1,12 @@
# Test the hugo env command.
hugo env
stdout 'GOOS'
stdout 'GOARCH'
! stderr .
stdout 'GOVERSION'
stdout 'aomedia\.googlesource\.com/aom'
stdout 'code\.videolan\.org/videolan/dav1d'
stdout 'github\.com/AOMediaCodec/libavif'
stdout 'github\.com/KaTeX/KaTeX'
stdout 'github\.com/webmproject/libwebp'
! stderr .