Skip to content

Commit 6b1fc84

Browse files
committed
Merge branch 'main' into feat/debug-page
2 parents b861724 + 38779d3 commit 6b1fc84

File tree

11 files changed

+320
-1038
lines changed

11 files changed

+320
-1038
lines changed

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- run: corepack enable
1615
- uses: pnpm/action-setup@v4
1716
- uses: actions/setup-node@v4
1817
with:
19-
node-version: 18
18+
node-version: lts/*
2019
cache: pnpm
20+
- run: corepack enable
2121
- run: pnpm install
2222
- run: pnpm lint --fix
2323
- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
- run: corepack enable
2019
- uses: pnpm/action-setup@v4
2120
- uses: actions/setup-node@v4
2221
with:
23-
node-version: 18
22+
node-version: lts/*
2423
cache: pnpm
24+
- run: corepack enable
2525
- run: pnpm install
2626
- run: pnpm lint
2727
- run: pnpm build

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@nuxt/devtools": "^1.7.0",
1616
"@nuxt/fonts": "^0.10.3",
1717
"@nuxt/image": "1.8.0",
18-
"@nuxt/ui-pro": "^1.6.0",
18+
"@nuxt/ui-pro": "^1.7.0",
1919
"@nuxthq/studio": "^2.2.1",
2020
"@nuxtjs/plausible": "^1.2.0",
2121
"@vueuse/core": "^12.4.0",

docs/pnpm-lock.yaml

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/devtools-kit/src/_types/integrations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export interface InstalledModuleInfo {
127127
isUninstallable: boolean
128128
info?: ModuleStaticInfo
129129
entryPath?: string
130+
timings?: Record<string, number | undefined>
130131
meta?: {
131132
name?: string
132133
}

packages/devtools/client/components/DurationDisplay.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const units = computed(() => {
4343

4444
<template>
4545
<div :class="getLatencyColor(duration)">
46+
<slot name="before" />
4647
{{ units[0] }}<span ml-1 text-xs op50>{{ units[1] }}</span>
48+
<slot name="after" />
4749
</div>
4850
</template>

packages/devtools/client/components/ModuleItemBase.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,32 @@ const openInEditor = useOpenInEditor()
9393
<slot name="items" />
9494

9595
<div v-if="data.stats" flex="~ gap-4 items-center">
96-
<div flex="~ gap-1 items-center" op50>
96+
<div flex="~ gap-2 items-center" op50>
9797
<NIcon icon="carbon-star" text-lg />
9898
<span>
9999
{{ data.stats.stars }}
100100
</span>
101101
</div>
102-
<div flex="~ gap-1 items-center" op50>
102+
<div flex="~ gap-2 items-center" op50>
103103
<NIcon icon="carbon-download" text-lg />
104104
<span>
105105
{{ data.stats.downloads }}
106106
</span>
107107
</div>
108108
</div>
109+
110+
<div v-if="mod.timings?.setup">
111+
<DurationDisplay
112+
title="Module Setup Time"
113+
flex="~ items-center"
114+
:duration="mod.timings.setup * 1000"
115+
:factor="0.5"
116+
>
117+
<template #before>
118+
<NIcon icon="carbon-time" mr2 text-lg op50 />
119+
</template>
120+
</DurationDisplay>
121+
</div>
109122
</div>
110123
<div flex="~ col" items-end>
111124
<div

packages/devtools/client/composables/rpc.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const rpc = createBirpc<ServerFunctions, ClientFunctions>(clientFunctions
3333
return fn
3434
if (!name.includes(':'))
3535
return
36-
const [namespace, fnName] = name.split(':')
36+
const [namespace, fnName] = name.split(':') as [string, string]
3737
return extendedRpcMap.get(namespace)?.[fnName]
3838
},
3939
onError(error, name) {
@@ -43,8 +43,11 @@ export const rpc = createBirpc<ServerFunctions, ClientFunctions>(clientFunctions
4343
})
4444

4545
async function connectVite() {
46-
let base = window.parent?.__NUXT__?.config?.app?.baseURL ?? '/'
47-
const buildAssetsDir = window.parent?.__NUXT__?.config?.app.buildAssetsDir.replace(/^\/|\/$/g, '') ?? '_nuxt'
46+
const appConfig = window.parent?.__NUXT__?.config?.app
47+
?? window.parent?.useNuxtApp?.()?.payload?.config?.app // Nuxt 4 removes __NUXT__
48+
49+
let base = appConfig?.baseURL ?? '/'
50+
const buildAssetsDir = appConfig?.buildAssetsDir?.replace(/^\/|\/$/g, '') ?? '_nuxt'
4851
if (base && !base.endsWith('/'))
4952
base += '/'
5053
const current = window.location.href.replace(/\/__nuxt_devtools__\/client\/.*$/, '/')

packages/devtools/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"ws": "catalog:"
8585
},
8686
"devDependencies": {
87-
"@discoveryjs/cli": "^2.12.1",
88-
"@discoveryjs/discovery": "1.0.0-beta.92",
87+
"@discoveryjs/cli": "catalog:",
88+
"@discoveryjs/discovery": "catalog:",
8989
"@iconify-json/bxl": "catalog:",
9090
"@iconify-json/carbon": "catalog:",
9191
"@iconify-json/logos": "catalog:",
@@ -96,6 +96,7 @@
9696
"@nuxt/devtools": "workspace:*",
9797
"@nuxt/test-utils": "catalog:",
9898
"@parcel/watcher": "catalog:",
99+
"@shikijs/langs-precompiled": "catalog:",
99100
"@types/markdown-it-link-attributes": "catalog:",
100101
"@unocss/nuxt": "catalog:",
101102
"@unocss/preset-icons": "catalog:",
@@ -119,7 +120,7 @@
119120
"ofetch": "catalog:",
120121
"quicktype-core": "catalog:",
121122
"shiki": "catalog:",
122-
"shiki-codegen": "^1.27.0",
123+
"shiki-codegen": "catalog:",
123124
"theme-vitesse": "catalog:",
124125
"unocss": "catalog:",
125126
"unplugin-vue-markdown": "catalog:",

0 commit comments

Comments
 (0)