site-config-stack 0.8.12 → 0.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -79,7 +79,7 @@ function resolveSitePath(pathOrUrl, options) {
79
79
  const origin = options.absolute ? options.siteUrl : "";
80
80
  const baseWithOrigin = options.withBase ? ufo.withBase(options.base, origin || "/") : origin;
81
81
  const resolvedUrl = ufo.withBase(path, baseWithOrigin);
82
- return fixSlashes(options.trailingSlash, resolvedUrl.trim());
82
+ return path === "/" ? ufo.withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
83
83
  }
84
84
  function fixSlashes(trailingSlash, pathOrUrl) {
85
85
  const parsed = ufo.parseURL(pathOrUrl);
package/dist/index.mjs CHANGED
@@ -77,7 +77,7 @@ function resolveSitePath(pathOrUrl, options) {
77
77
  const origin = options.absolute ? options.siteUrl : "";
78
78
  const baseWithOrigin = options.withBase ? withBase(options.base, origin || "/") : origin;
79
79
  const resolvedUrl = withBase(path, baseWithOrigin);
80
- return fixSlashes(options.trailingSlash, resolvedUrl.trim());
80
+ return path === "/" ? withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
81
81
  }
82
82
  function fixSlashes(trailingSlash, pathOrUrl) {
83
83
  const parsed = parseURL(pathOrUrl);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "site-config-stack",
3
3
  "type": "module",
4
- "version": "0.8.12",
4
+ "version": "0.8.13",
5
5
  "description": "Shared site configuration utilities.",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",