Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: harlan-zw/nuxt-site-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.6
Choose a base ref
...
head repository: harlan-zw/nuxt-site-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.1.7
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Mar 18, 2025

  1. fix(stack): don't warn for localhost in development (#51)

    dargmuesli authored Mar 18, 2025
    Copy the full SHA
    d3e100d View commit details
  2. fix(stack): correct hostname check (#50)

    Co-authored-by: Harlan Wilton <harlan@harlanzw.com>
    dargmuesli and harlan-zw authored Mar 18, 2025
    Copy the full SHA
    f3dce0b View commit details

Commits on Mar 19, 2025

  1. chore: release v3.1.7

    harlan-zw committed Mar 19, 2025
    Copy the full SHA
    530bdee View commit details
Showing with 9 additions and 8 deletions.
  1. +3 −3 package.json
  2. +1 −1 packages/kit/package.json
  3. +1 −1 packages/module/package.json
  4. +1 −1 packages/site-config/package.json
  5. +3 −2 packages/site-config/src/stack.ts
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "nuxt-site-config-mono",
"type": "module",
"version": "3.1.6",
"version": "3.1.7",
"private": true,
"packageManager": "pnpm@10.6.2",
"packageManager": "pnpm@10.6.4",
"description": "Shared site configuration for Nuxt 3 modules.",
"license": "MIT",
"funding": "https://github.com/sponsors/harlan-zw",
@@ -40,7 +40,7 @@
"floating-vue": "5.2.2",
"nuxt": "^3.16.0",
"typescript": "5.6.3",
"vitest": "^3.0.8",
"vitest": "^3.0.9",
"vue-tsc": "^2.2.8"
},
"pnpm": {
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nuxt-site-config-kit",
"type": "module",
"version": "3.1.6",
"version": "3.1.7",
"description": "Shared site configuration build-time utilities for Nuxt 3 modules.",
"license": "MIT",
"funding": "https://github.com/sponsors/harlan-zw",
2 changes: 1 addition & 1 deletion packages/module/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nuxt-site-config",
"type": "module",
"version": "3.1.6",
"version": "3.1.7",
"description": "Shared site configuration for Nuxt 3 modules.",
"author": {
"name": "Harlan Wilton",
2 changes: 1 addition & 1 deletion packages/site-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "site-config-stack",
"type": "module",
"version": "3.1.6",
"version": "3.1.7",
"description": "Shared site configuration utilities.",
"license": "MIT",
"funding": "https://github.com/sponsors/harlan-zw",
5 changes: 3 additions & 2 deletions packages/site-config/src/stack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetSiteConfigOptions, SiteConfigInput, SiteConfigResolved, SiteConfigStack } from './type'
import { getQuery, hasProtocol, parseURL, withHttps } from 'ufo'
import { getQuery, hasProtocol, parseURL, withHttps, parseHost } from 'ufo'
import { toValue } from 'vue'

export function normalizeSiteConfig(config: SiteConfigResolved) {
@@ -32,6 +32,7 @@ export function validateSiteConfigStack(stack: SiteConfigStack) {
const val = resolved.url
const context = resolved._context?.url || 'unknown'
const url = parseURL(val)
const { hostname } = parseHost(url.host)
if (!url.host)
errors.push(`url "${val}" from ${context} is not absolute`)
else if (url.pathname && url.pathname !== '/')
@@ -40,7 +41,7 @@ export function validateSiteConfigStack(stack: SiteConfigStack) {
errors.push(`url "${val}" from ${context} should not contain a hash`)
else if (Object.keys(getQuery(val)).length > 0)
errors.push(`url "${val}" from ${context} should not contain a query`)
else if (url.host === 'localhost')
else if (hostname === 'localhost' && resolved.env !== 'development')
errors.push(`url "${val}" from ${context} should not be localhost`)
}
return errors