Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nuxtrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
setups.@nuxt/test-utils="4.0.3"
setups.@nuxt/test-utils="4.1.0"
5 changes: 3 additions & 2 deletions app/components/global/BlogPostWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { defineLink } from '@unhead/vue'
import type { RawBlogPostFrontmatter } from '#shared/schemas/blog'
import { generateBlogTID } from '#shared/utils/atproto'
import { posts } from '#blog/posts'
Expand All @@ -21,10 +22,10 @@ useSeoMeta({

useHead({
link: [
{
defineLink({
rel: 'site.standard.document',
href: `at://${NPMX_DEV_DID}/site.standard.document/${generateBlogTID(props.frontmatter.date, props.frontmatter.slug)}`,
},
}),
],
})

Expand Down
6 changes: 5 additions & 1 deletion app/pages/package-changelog/[[org]]/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const parsedRoute = computed(() => {

const packageName = org ? `${org}/${name}` : name

const version = 'version' in route.params ? route.params.version : null
// TODO: drop once nuxt emits child route names in `RouteRecordInfo` again. Since 4.5.2 the
// child arg is `never`, so `useRoute('changelog')` doesn't union in the `changelog-version`
// params and `version` widens to `unknown`.
// @ts-expect-error see above
const version: string | null = 'version' in route.params ? route.params.version : null

return { packageName, version }
})
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@nuxtjs/mdc": "0.22.2",
"better-sqlite3": "13.0.2",
"docus": "5.12.3",
"nuxt": "4.4.8",
"nuxt": "4.5.2",
"tailwindcss": "4.3.3"
}
}
13 changes: 1 addition & 12 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,7 @@ const config: KnipConfig = {
msw: {
entry: ['.storybook/.public/mockServiceWorker.js'],
},
ignoreDependencies: [
'@iconify-json/*',
'puppeteer',
'vite-plugin-pwa',
'@vueuse/shared',

/** Optional peer dependency of @nuxt/vite-builder for the rolldown-powered build */
'rolldown',

/** Used in test/e2e/helpers/ which is excluded from knip project scope */
'h3-next',
],
ignoreDependencies: ['@iconify-json/*', 'puppeteer', 'vite-plugin-pwa', '@vueuse/shared'],
ignoreUnresolved: ['#oauth/config'],
ignoreFiles: [
'app/components/Tooltip/Announce.vue',
Expand Down
16 changes: 9 additions & 7 deletions modules/security-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ export default defineNuxtModule({
].join('; ')

// CSP via <meta> tag — only present in HTML pages, not API responses.
nuxt.options.app.head ??= {}
const head = nuxt.options.app.head as { meta?: Array<Record<string, string>> }
head.meta ??= []
head.meta.push({
'http-equiv': 'Content-Security-Policy',
'content': csp,
})
if (!nuxt.options.test) {
nuxt.options.app.head ??= {}
const head = nuxt.options.app.head as { meta?: Array<Record<string, string>> }
head.meta ??= []
head.meta.push({
'http-equiv': 'Content-Security-Policy',
'content': csp,
})
}

// Other security headers via route rules (fine on all responses).
nuxt.options.routeRules ??= {}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"@nuxt/a11y": "1.0.0-alpha.1",
"@nuxt/fonts": "0.14.0",
"@nuxt/scripts": "1.3.2",
"@nuxt/test-utils": "4.0.3",
"@nuxt/test-utils": "4.1.0",
"@nuxtjs/color-mode": "4.0.1",
"@nuxtjs/html-validator": "2.1.0",
"@nuxtjs/i18n": "10.5.0",
"@nuxtjs/i18n": "10.6.0",
"@shikijs/langs": "4.4.1",
"@shikijs/markdown-exit": "4.4.1",
"@shikijs/themes": "4.4.1",
Expand All @@ -80,7 +80,7 @@
"@vueuse/core": "14.4.0",
"@vueuse/integrations": "14.4.0",
"@vueuse/nuxt": "14.4.0",
"@vueuse/router": "^14.2.1",
"@vueuse/router": "^14.4.0",
"@vueuse/shared": "14.4.0",
"algoliasearch": "5.56.0",
"defu": "6.1.7",
Expand All @@ -92,7 +92,7 @@
"ipaddr.js": "2.4.0",
"marked": "18.0.7",
"module-replacements": "3.1.0",
"nuxt": "4.4.8",
"nuxt": "4.5.2",
"nuxt-og-image": "6.7.5",
"ofetch": "1.5.1",
"ohash": "2.0.11",
Expand All @@ -111,7 +111,7 @@
"virtua": "0.50.0",
"vite-plugin-pwa": "1.3.0",
"vite-plus": "catalog:vite-plus",
"vue": "3.5.39",
"vue": "3.5.41",
"vue-data-ui": "3.23.1",
"vue-router": "5.2.0"
},
Expand Down
13 changes: 0 additions & 13 deletions patches/@nuxt__test-utils.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patches/@nuxt__test-utils@4.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/config.mjs b/dist/config.mjs
index 3d627e2a5febb492e4f8630c1301701c2770f4e2..5cacae1577070faebaa034e4eb665391c8833382 100644
--- a/dist/config.mjs
+++ b/dist/config.mjs
@@ -103,7 +103,7 @@ async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
optimizeDeps: { noDiscovery: true },
test: {
environmentOptions: {
- nuxtRuntimeConfig: applyEnv(structuredClone(options.nuxt.options.runtimeConfig), {
+ nuxtRuntimeConfig: applyEnv(JSON.parse(JSON.stringify(options.nuxt.options.runtimeConfig)), {
prefix: "NUXT_",
env: await setupDotenv(defu$1(loadNuxtOptions.dotenv, {
cwd: rootDir,
13 changes: 13 additions & 0 deletions patches/nuxt@4.5.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 0ef28fc..602e734 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -3203,7 +3203,7 @@ const publicPathTemplate = {
return [
"import { joinRelativeURL } from 'ufo'",
!nuxt.options.dev && "import { useRuntimeConfig } from 'nitropack/runtime'",
- nuxt.options.dev ? `const getAppConfig = () => (${JSON.stringify(nuxt.options.app)})` : "const getAppConfig = () => useRuntimeConfig().app",
+ nuxt.options.dev ? `const getAppConfig = () => (${JSON.stringify(nuxt.options.app)})` : "const getAppConfig = () => useRuntimeConfig()?.app ?? {}",
"export const baseURL = () => getAppConfig().baseURL",
"export const buildAssetsDir = () => getAppConfig().buildAssetsDir",
"export const buildAssetsURL = (...path) => joinRelativeURL(publicAssetsURL(), buildAssetsDir(), ...path)",
Loading
Loading