Skip to content

Commit 47e85d3

Browse files
committed
fix: resolve CI failures in lint, build, typecheck, and tests
- Fix pnpm-workspace.yaml key sort order (eslint yaml/sort-keys) - Remove tsconfig.json paths override that broke module-builder build and wiped .nuxt/tsconfig.json aliases (#app, #site-config, etc.) - Inline createNitroRouteRuleMatcher (not in nuxtseo-shared/server), import withoutQuery from nuxtseo-shared/utils - Exclude devtools/ from root typecheck (separate workspace package) - Suppress excessive stack depth in dev-prerender.ts typed routes
1 parent 787a087 commit 47e85d3

File tree

4 files changed

+42
-24
lines changed

4 files changed

+42
-24
lines changed

pnpm-workspace.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
catalogMode: prefer
2+
cleanupUnusedCatalogs: true
3+
shellEmulator: true
4+
5+
trustPolicy: no-downgrade
6+
7+
trustPolicyExclude:
8+
- chokidar@4.0.3
9+
- eslint-import-resolver-typescript@3.10.1
10+
- undici-types@6.21.0
11+
- semver@6.3.1
12+
- koa@2.16.3
13+
- semver@5.7.2
14+
- '@nuxtjs/tailwindcss@7.0.0-beta.1'
15+
116
packages:
217
- playground
318
- devtools
19+
overrides:
20+
vite: npm:vite@8.0.1
421
catalog:
522
'@antfu/eslint-config': ^7.7.3
623
'@clack/prompts': ^1.1.0
@@ -90,13 +107,11 @@ catalog:
90107
vue-tsc: ^3.2.6
91108
wrangler: ^4.76.0
92109
yoga-wasm-web: ^0.3.3
93-
catalogMode: prefer
94110
catalogs:
95111
devtools:
96112
'@iconify-json/simple-icons': ^1.2.75
97113
json-editor-vue: ^0.18.1
98114
shiki: ^4.0.2
99-
cleanupUnusedCatalogs: true
100115
onlyBuiltDependencies:
101116
- '@parcel/watcher'
102117
- '@tailwindcss/oxide'
@@ -106,19 +121,4 @@ onlyBuiltDependencies:
106121
- sharp
107122
- unrs-resolver
108123
- vue-demi
109-
overrides:
110-
vite: npm:vite@8.0.1
111-
shellEmulator: true
112-
113-
trustPolicy: no-downgrade
114-
115-
trustPolicyExclude:
116-
- chokidar@4.0.3
117-
- eslint-import-resolver-typescript@3.10.1
118-
- undici-types@6.21.0
119-
- semver@6.3.1
120-
- koa@2.16.3
121-
- semver@5.7.2
122-
- '@nuxtjs/tailwindcss@7.0.0-beta.1'
123-
124124
trustPolicyIgnoreAfter: 262800

src/runtime/server/og-image/bindings/font-assets/dev-prerender.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export async function resolve(event: H3Event, font: FontConfig): Promise<Buffer>
105105
}
106106
}
107107
const fullPath = withBase(path, app.baseURL)
108+
// @ts-expect-error excessive stack depth from Nuxt typed routes
108109
const arrayBuffer = await event.$fetch(fullPath, {
109110
responseType: 'arrayBuffer',
110111
}) as ArrayBuffer

src/runtime/server/util/kit.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import type { H3Event } from 'h3'
2+
import type { NitroRouteRules } from 'nitropack'
23
import type { NuxtIslandResponse } from 'nuxt/app'
4+
import { defu } from 'defu'
5+
import { useRuntimeConfig } from 'nitropack/runtime'
36
import { hash } from 'ohash'
7+
import { createRouter as createRadixRouter, toRouteMatcher } from 'radix3'
8+
import { withoutBase, withoutTrailingSlash } from 'ufo'
49

5-
export { createNitroRouteRuleMatcher, withoutQuery } from 'nuxtseo-shared/server'
10+
export { withoutQuery } from 'nuxtseo-shared/utils'
611

712
export function fetchIsland(e: H3Event, component: string, props: Record<string, any>): Promise<NuxtIslandResponse> {
813
const hashId = hash([component, props]).replaceAll('_', '-')
@@ -12,3 +17,20 @@ export function fetchIsland(e: H3Event, component: string, props: Record<string,
1217
},
1318
})
1419
}
20+
21+
export function createNitroRouteRuleMatcher(): ((path: string) => NitroRouteRules) {
22+
const { nitro, app } = useRuntimeConfig()
23+
const _routeRulesMatcher = toRouteMatcher(
24+
createRadixRouter({
25+
routes: Object.fromEntries(
26+
Object.entries(nitro?.routeRules || {})
27+
.map(([path, rules]) => [withoutTrailingSlash(path), rules]),
28+
),
29+
}),
30+
)
31+
return (path: string) => {
32+
return defu({}, ..._routeRulesMatcher.matchAll(
33+
withoutBase(withoutTrailingSlash(path.split('?')[0]), app.baseURL),
34+
).reverse()) as NitroRouteRules
35+
}
36+
}

tsconfig.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
22
"extends": "./.nuxt/tsconfig.json",
3-
"compilerOptions": {
4-
"paths": {
5-
"#nuxtseo-shared/*": ["./node_modules/nuxtseo-shared/dist/runtime/*"]
6-
}
7-
},
8-
"exclude": ["test/**", "playground/**", "client/**"]
3+
"exclude": ["test/**", "playground/**", "client/**", "devtools/**"]
94
}

0 commit comments

Comments
 (0)