Skip to content

Commit

Permalink
chore: update deps and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 9, 2024
1 parent 86feeff commit 4a751bc
Show file tree
Hide file tree
Showing 97 changed files with 2,474 additions and 3,560 deletions.
2 changes: 1 addition & 1 deletion docs/content/2.module/0.guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ export interface ClientFunctions {
And then in your module code:

```ts
import { defineNuxtModule } from '@nuxt/kit'
import { extendServerRpc, onDevToolsInitialized } from '@nuxt/devtools-kit'
import { defineNuxtModule } from '@nuxt/kit'
import type { ClientFunctions, ServerFunctions } from './rpc-types'

const RPC_NAMESPACE = 'my-module-rpc'
Expand Down
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"preview": "nuxi preview"
},
"dependencies": {
"@iconify-json/ph": "^1.1.14",
"@iconify-json/simple-icons": "^1.1.114",
"@iconify-json/ph": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.2",
"@nuxt/content": "^2.13.2",
"@nuxt/devtools": "^1.4.0",
"@nuxt/devtools": "^1.4.1",
"@nuxt/fonts": "^0.7.2",
"@nuxt/image": "1.7.0",
"@nuxt/image": "1.8.0",
"@nuxt/ui-pro": "^1.4.1",
"@nuxthq/studio": "^2.0.3",
"@nuxtjs/plausible": "^1.0.2",
"@vueuse/core": "^11.0.3",
"@vueuse/nuxt": "^11.0.3",
"nuxt": "^3.13.0",
"nuxt-og-image": "^3.0.0-rc.65"
"nuxt": "^3.13.1",
"nuxt-og-image": "^3.0.0-rc.66"
},
"resolutions": {
"@nuxt/ui": "2.15.2"
"@nuxt/ui": "2.18.4"
}
}
2,752 changes: 845 additions & 1,907 deletions docs/pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
* ```
*/
import { defineNuxtModule, logger } from '@nuxt/kit'
import { resolve } from 'pathe'
import { getPort } from 'get-port-please'
import { resolve } from 'pathe'
import { searchForWorkspaceRoot } from 'vite'
import { defaultOptions } from './packages/devtools/src/constant'
import type { ModuleOptions } from './packages/devtools/src/types'
import { packageDir } from './packages/devtools/src/dirs'
import { enableModule } from './packages/devtools/src/module-main'
import { startSubprocess } from './packages/devtools-kit/src/index'
import type { ModuleOptions } from './packages/devtools/src/types'

export type { ModuleOptions }

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "1.4.1",
"private": true,
"packageManager": "pnpm@9.9.0",
"packageManager": "pnpm@9.10.0",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt/devtools.git"
Expand All @@ -29,6 +29,7 @@
"@nuxt/devtools-ui-kit": "workspace:*",
"@nuxt/module-builder": "catalog:",
"@nuxt/schema": "catalog:",
"@opentelemetry/api": "catalog:",
"@types/markdown-it": "catalog:",
"@types/node": "catalog:",
"@types/which": "catalog:",
Expand All @@ -54,7 +55,7 @@
"vue-tsc": "catalog:"
},
"resolutions": {
"esbuild": "^0.21.5"
"esbuild": "^0.23.1"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
12 changes: 6 additions & 6 deletions packages/devtools-kit/src/_types/client-api.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type {} from '@nuxt/schema'
import type { Ref } from 'vue'
import type { AppConfig } from 'nuxt/schema'
import type { NuxtApp } from 'nuxt/app'
import type { Hookable } from 'hookable'
import type { BirpcReturn } from 'birpc'
import type { BuiltinLanguage } from 'shiki'
import type { Hookable } from 'hookable'
import type { NuxtApp } from 'nuxt/app'
import type { AppConfig } from 'nuxt/schema'
import type { $Fetch } from 'ofetch'
import type { ClientFunctions, ServerFunctions } from './rpc'
import type { BuiltinLanguage } from 'shiki'
import type { Ref } from 'vue'
import type { HookInfo, LoadingTimeMetric, PluginMetric, VueInspectorClient, VueInspectorData } from './integrations'
import type { ClientFunctions, ServerFunctions } from './rpc'
import type { TimelineMetrics } from './timeline-metrics'

export interface DevToolsFrameState {
Expand Down
12 changes: 6 additions & 6 deletions packages/devtools-kit/src/_types/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import './hooks'

export * from './custom-tabs'
export * from './terminals'
export * from './analyze-build'
export * from './client-api'
export * from './common'
export * from './custom-tabs'
export * from './integrations'
export * from './wizard'
export * from './options'
export * from './rpc'
export * from './server-ctx'
export * from './analyze-build'
export * from './options'
export * from './common'
export * from './terminals'
export * from './timeline-metrics'
export * from './wizard'
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/_types/integrations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RouteRecordNormalized } from 'vue-router'
import type { Import, UnimportMeta } from 'unimport'
import type { Component } from 'nuxt/schema'
import type { Import, UnimportMeta } from 'unimport'
import type { RouteRecordNormalized } from 'vue-router'

export interface HookInfo {
name: string
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/_types/options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { VitePluginInspectorOptions } from 'vite-plugin-vue-inspector'
import type { Import } from 'unimport'
import type { VitePluginInspectorOptions } from 'vite-plugin-vue-inspector'
import type { ModuleCustomTab } from './custom-tabs'
import type { ServerRouteInfo, ServerRouteInput, ServerTaskInfo } from './integrations'

Expand Down
8 changes: 4 additions & 4 deletions packages/devtools-kit/src/_types/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Component, NuxtApp, NuxtLayout, NuxtOptions, NuxtPage } from 'nuxt/schema'
import type { StorageMounts } from 'nitropack'
import type { Component, NuxtApp, NuxtLayout, NuxtOptions, NuxtPage } from 'nuxt/schema'
import type { StorageValue } from 'unstorage'
import type { ModuleOptions, NuxtDevToolsOptions } from './options'
import type { AnalyzeBuildsInfo } from './analyze-build'
import type { ModuleCustomTab } from './custom-tabs'
import type { AssetEntry, AssetInfo, AutoImportsWithMetadata, ComponentRelationship, HookInfo, ImageMeta, NpmCommandOptions, NpmCommandType, PackageUpdateInfo, ScannedNitroTasks, ServerRouteInfo } from './integrations'
import type { ModuleOptions, NuxtDevToolsOptions } from './options'
import type { InstallModuleReturn } from './server-ctx'
import type { TerminalAction, TerminalInfo } from './terminals'
import type { GetWizardArgs, WizardActions } from './wizard'
import type { AnalyzeBuildsInfo } from './analyze-build'
import type { InstallModuleReturn } from './server-ctx'

export interface ServerFunctions {
// Static RPCs (can be provide on production build in the future)
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/_types/server-ctx.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BirpcGroup } from 'birpc'
import type { Nuxt } from 'nuxt/schema'
import type { ClientFunctions, ServerFunctions } from './rpc'
import type { ModuleOptions } from './options'
import type { ClientFunctions, ServerFunctions } from './rpc'

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useNuxt } from '@nuxt/kit'
import type { BirpcGroup } from 'birpc'
import { execa } from 'execa'
import type { BirpcGroup } from 'birpc'
import type { ModuleCustomTab, NuxtDevtoolsInfo, NuxtDevtoolsServerContext, SubprocessOptions, TerminalState } from './types'

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/runtime/host-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Ref } from 'vue'
import { shallowRef } from 'vue'
import type { Ref } from 'vue'
import type { NuxtDevtoolsHostClient } from '../types'

let clientRef: Ref<NuxtDevtoolsHostClient | undefined> | undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/runtime/iframe-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Ref } from 'vue'
import { shallowRef, triggerRef } from 'vue'
import type { Ref } from 'vue'
import type { NuxtDevtoolsIframeClient } from '../types'

let clientRef: Ref<NuxtDevtoolsIframeClient | undefined> | undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineNuxtConfig } from 'nuxt/config'
import { createResolver } from 'nuxt/kit'
import '@unocss/nuxt'
import DevtoolsUIKit from '../src/module'
import '@unocss/nuxt'

const resolver = createResolver(import.meta.url)

Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-ui-kit/src/components/NDarkToggle.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed, nextTick } from 'vue'
import { useColorMode } from '@vueuse/core'
import { computed, nextTick } from 'vue'
const mode = useColorMode({
storageKey: 'nuxt-devtools-color-mode',
})
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/src/components/NDialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, nextTick, ref, watchEffect } from 'vue'
import { onClickOutside, useVModel } from '@vueuse/core'
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
import { computed, nextTick, ref, watchEffect } from 'vue'
const props = withDefaults(
defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/src/components/NDrawer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from 'vue'
import { onClickOutside, useElementSize } from '@vueuse/core'
import { ref } from 'vue'
const props = withDefaults(defineProps<{
modelValue?: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/src/components/NDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from 'vue'
import { onClickOutside, useVModel } from '@vueuse/core'
import { ref } from 'vue'
const props = withDefaults(defineProps<{
modelValue?: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/src/components/NNotification.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang='ts'>
import { ref } from 'vue'
import type { DevtoolsUiShowNotificationPosition } from '../composables/notification'
import { devtoolsUiProvideNotificationFn } from '../composables/notification'
import type { DevtoolsUiShowNotificationPosition } from '../composables/notification'
const show = ref(false)
const icon = ref<string>()
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/src/components/NSplitPane.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useLocalStorage } from '@vueuse/core'
import { Pane, Splitpanes } from 'splitpanes'
import { computed, ref } from 'vue'
import 'splitpanes/dist/splitpanes.css'
Expand Down
8 changes: 4 additions & 4 deletions packages/devtools-ui-kit/src/unocss.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import type { Preset, RuleContext } from '@unocss/core'
import type { UnocssNuxtOptions } from '@unocss/nuxt'
import type { Theme } from '@unocss/preset-uno'
import { parseColor } from '@unocss/preset-mini/utils'
import { theme as unoTheme } from '@unocss/preset-mini'
import { fonts } from '@unocss/preset-mini/rules'
import { parseColor } from '@unocss/preset-mini/utils'
import {
mergeDeep,
presetAttributify,
Expand All @@ -14,6 +11,9 @@ import {
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import type { Preset, RuleContext } from '@unocss/core'
import type { UnocssNuxtOptions } from '@unocss/nuxt'
import type { Theme } from '@unocss/preset-uno'

// @unocss-include

Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-wizard/src/builtin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import fsp from 'node:fs/promises'
import { relative } from 'node:path'
import { consola } from 'consola'
import { colors } from 'consola/utils'
import { parseModule } from 'magicast'
import { diffLines } from 'diff'
import { parseModule } from 'magicast'
import { join } from 'pathe'
import prompts from 'prompts'

Expand Down
6 changes: 3 additions & 3 deletions packages/devtools-wizard/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* Since Nuxt v3.4, Nuxt DevTools is shipped with Nuxt so we only using this for Nuxt below v3.4.
*/
import fs from 'node:fs'
import { readUser, writeUser } from 'rc9'
import globalDirs from 'global-directory'
import { resolve } from 'pathe'
import { consola } from 'consola'
import { execa } from 'execa'
import globalDirs from 'global-directory'
import { resolve } from 'pathe'
import { readUser, writeUser } from 'rc9'

const moduleName = '@nuxt/devtools'

Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-wizard/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { consola } from 'consola'
import { readPackageJSON } from 'pkg-types'
import { colors } from 'consola/utils'
import { readPackageJSON } from 'pkg-types'
import semver from 'semver'
import { name as moduleName, version } from '../package.json'

Expand Down
9 changes: 5 additions & 4 deletions packages/devtools/client/app.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<script setup lang="ts">
import { useEyeDropper } from '@vueuse/core'
import { splitScreenAvailable } from '~/composables/storage'
import { setupClientRPC } from './setup/client-rpc'
import { setupVueDevTools } from './setup/vue-devtools'
import 'floating-vue/dist/style.css'
import '@vue/devtools-applet/style.css'
import 'vanilla-jsoneditor/themes/jse-theme-dark.css'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import './styles/global.css'
import { useEyeDropper } from '@vueuse/core'
import { setupClientRPC } from './setup/client-rpc'
import { setupVueDevTools } from './setup/vue-devtools'
import { splitScreenAvailable } from '~/composables/storage'
if (import.meta.client)
import('./setup/unocss-runtime')
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/AssetDropZone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ useEventListener('drop', onDrop)
n="xs"
h-full flex-auto
:model-value="file.name"
@update:model-value="changeName(file, ($event.target as HTMLInputElement).value)"
@update:model-value="changeName(file, (($event as any).target as HTMLInputElement).value)"
/>
<NButton
n="red"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useRuntimeConfig } from '#imports'
import { formatTimeAgo } from '@vueuse/core'
import type { AnalyzeBuildMeta } from '../../src/types'
import { useRuntimeConfig } from '#imports'
const props = defineProps<{
current: AnalyzeBuildMeta
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/CodeDiff.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { diffLines } from 'diff'
import { unrefElement } from '@vueuse/core'
import { diffLines } from 'diff'
import type { BuiltinLanguage } from 'shiki'
const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/ComponentDetails.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import type { Component } from 'nuxt/schema'
import { pascalCase } from 'scule'
import type { Component } from 'nuxt/schema'
const props = defineProps<{
component: Component
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/ComponentName.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import type { Component } from 'nuxt/schema'
import { pascalCase } from 'scule'
import type { Component } from 'nuxt/schema'
const props = defineProps<{
component: Component
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools/client/components/ComponentsGraph.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { Component, NuxtLayout, NuxtPage } from 'nuxt/schema'
import type { Data, Node, Options } from 'vis-network'
import { Network } from 'vis-network'
import type { ComponentRelationship } from '~/../src/types'
import type { Component, NuxtLayout, NuxtPage } from 'nuxt/schema'
import type { Data, Node, Options } from 'vis-network'
const props = defineProps<{
components: Component[]
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/ComponentsList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import type { Component } from 'nuxt/schema'
import Fuse from 'fuse.js'
import type { Component } from 'nuxt/schema'
import type { ComponentRelationship, ComponentWithRelationships } from '../../types'
const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/ModuleInstallList.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import Fuse from 'fuse.js'
// @ts-expect-error missing types
import { RecycleScroller } from 'vue-virtual-scroller'
import Fuse from 'fuse.js'
import type { ModuleStaticInfo } from '../../src/types'
type SortingFunction<T> = (a: T, b: T) => number
Expand Down
Loading

0 comments on commit 4a751bc

Please sign in to comment.