v0.152.2

gohugoio/hugov0.152.2Oct 24, 2025by bep

AI Summary

A bug fix release restoring support for absolute paths in project mounts, specifically handling the 'node_modules' case.

Key Highlights

  • Restored support for absolute paths in project mounts (e.g., ../../node_modules).
  • Added special handling for node_modules in module/theme mounts (tries local first).

Full Release Notes

In `v0.152.0` we tightened the source validation for [file mounts](https://gohugo.io/configuration/module/#mounts). We always said that _project mounts can mount with absolute file/directorynames, modules/themes are restricted to relative_. In `v0.152.0` we narrowed module/themes mounts to be local, which made the setup in the bug report listed below fail:

```toml
[[module.mounts]]
source = '../../node_modules/bootstrap'
target = 'assets/vendor/bootstrap'
```

One part of this is security. But the construct above is _usually_ very odd (the project uses files in a theme/module, not the other way around) and not very portable. But the example above demonstrates a valid exception, that we now have added support for in a portable way. The above example now works as it did before `v0.152.0`, but going forward you can also write:

```toml
[[module.mounts]]
source = 'node_modules/bootstrap'
target = 'assets/vendor/bootstrap'
```

We now have the `node_modules` as a special case: For themes/modules we first check if the mounted source exists locally, if not we try relative to the project root.

## What's Changed

* deps: Update github.com/tdewolff/minify v2.24.4 => v2.24.5 1c8c21e45 @jmooring #14086 
* hugofs: Make node_modules a "special case" mount 809ebe01f @bep #14089 
* github: Fix typo in stale PR message 08a0679a8 @jordelver