site-config-stack 1.0.8 → 1.0.9

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
@@ -60,7 +60,7 @@ function resolveSitePath(pathOrUrl, options) {
60
60
  const origin = options.absolute ? options.siteUrl : "";
61
61
  const baseWithOrigin = options.withBase ? ufo.withBase(base, origin || "/") : origin;
62
62
  const resolvedUrl = ufo.withBase(path, baseWithOrigin);
63
- return path === "/" ? ufo.withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
63
+ return path === "/" && !options.withBase ? ufo.withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
64
64
  }
65
65
  function fixSlashes(trailingSlash, pathOrUrl) {
66
66
  const $url = ufo.parseURL(pathOrUrl);
package/dist/index.mjs CHANGED
@@ -58,7 +58,7 @@ function resolveSitePath(pathOrUrl, options) {
58
58
  const origin = options.absolute ? options.siteUrl : "";
59
59
  const baseWithOrigin = options.withBase ? withBase(base, origin || "/") : origin;
60
60
  const resolvedUrl = withBase(path, baseWithOrigin);
61
- return path === "/" ? withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
61
+ return path === "/" && !options.withBase ? withTrailingSlash(resolvedUrl) : fixSlashes(options.trailingSlash, resolvedUrl);
62
62
  }
63
63
  function fixSlashes(trailingSlash, pathOrUrl) {
64
64
  const $url = parseURL(pathOrUrl);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "site-config-stack",
3
3
  "type": "module",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "description": "Shared site configuration utilities.",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -30,7 +30,7 @@
30
30
  "@nuxt/kit": "^3.6.5",
31
31
  "defu": "^6.1.2",
32
32
  "pkg-types": "^1.0.3",
33
- "ufo": "^1.1.2"
33
+ "ufo": "^1.2.0"
34
34
  },
35
35
  "scripts": {
36
36
  "lint": "eslint . --fix",