Skip to content

Commit

Permalink
chore: bump deps and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 10, 2024
1 parent a792d16 commit 19b238b
Show file tree
Hide file tree
Showing 59 changed files with 2,573 additions and 2,169 deletions.
2 changes: 1 addition & 1 deletion crux-api/server/api/[domain]/crux/history.get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineCachedEventHandler } from '#imports'
import { getRouterParam } from 'h3'
import { fetchCrux } from '../../../app/services/crux'
import { defineCachedEventHandler } from '#imports'

export default defineCachedEventHandler(async (event) => {
const domain = getRouterParam(event, 'domain', { decode: true })
Expand Down
4 changes: 2 additions & 2 deletions crux-api/server/app/services/crux.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRuntimeConfig } from '#imports'
import { $fetch } from 'ofetch'
import { withHttps, withTrailingSlash } from 'ufo'
import type { FetchError } from 'ofetch'
import { $fetch } from 'ofetch'
import { useRuntimeConfig } from '#imports'

const cwvKeys = [
'largest_contentful_paint',
Expand Down
6 changes: 3 additions & 3 deletions docs/components/LighthouseThreeD.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import type { RendererPublicInterface } from 'troisjs'
import { AmbientLight, Camera, FbxModel, PointLight, Renderer, Scene } from 'troisjs'
import type { Group } from 'three'
import { useElementHover } from '@vueuse/core'
import { AmbientLight, Camera, FbxModel, PointLight, Renderer, Scene } from 'troisjs'
import { ref } from 'vue'
import type { Group } from 'three'
import type { RendererPublicInterface } from 'troisjs'
const rendererC = ref()
const lighthouseRef = ref()
Expand Down
4 changes: 2 additions & 2 deletions docs/components/OCodeBlock.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { BundledLanguage } from 'shiki'
import { computed } from 'vue'
import { useClipboard } from '@vueuse/core'
import { computed } from 'vue'
import type { BundledLanguage } from 'shiki'
import { loadShiki, renderCodeHighlight } from '../composables/shiki'
const props = withDefaults(
Expand Down
4 changes: 2 additions & 2 deletions docs/composables/shiki.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { BundledLanguage, Highlighter } from 'shiki'
import { useColorMode } from '#imports'
import { getHighlighter } from 'shiki'
import { computed, ref, unref } from 'vue'
import type { MaybeRef } from '@vueuse/core'
import { useColorMode } from '#imports'
import type { BundledLanguage, Highlighter } from 'shiki'

export const shiki = ref<Highlighter>()

Expand Down
2 changes: 1 addition & 1 deletion docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ export default defineNuxtConfig({
},

compatibilityDate: '2024-07-15',
})
})
24 changes: 12 additions & 12 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
"preview": "nuxi preview"
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.36",
"@iconify-json/heroicons": "^1.1.22",
"@iconify-json/logos": "^1.1.43",
"@iconify-json/noto": "^1.1.18",
"@iconify-json/ph": "^1.1.13",
"@iconify-json/simple-icons": "^1.1.109",
"@nuxt/content": "^2.13.1",
"@iconify-json/carbon": "^1.2.1",
"@iconify-json/heroicons": "^1.2.0",
"@iconify-json/logos": "^1.2.0",
"@iconify-json/noto": "^1.2.0",
"@iconify-json/ph": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.2",
"@nuxt/content": "^2.13.2",
"@nuxt/devtools": "1.3.9",
"@nuxt/ui": "^2.17.0",
"@nuxt/ui-pro": "^1.3.1",
"@nuxt/ui": "^2.18.4",
"@nuxt/ui-pro": "^1.4.1",
"@nuxtjs/seo": "2.0.0-rc.12",
"@vueuse/nuxt": "^10.11.0",
"nuxt": "^3.12.3",
"@vueuse/nuxt": "^11.0.3",
"nuxt": "^3.13.1",
"nuxt-icon": "^0.6.10",
"nuxt-lego": "^0.0.14",
"nuxt-lodash": "^2.5.3",
"three": "0.138.3",
"troisjs": "^0.3.4",
"typescript": "^5.5.3"
"typescript": "^5.6.2"
}
}
2 changes: 1 addition & 1 deletion docs/pages/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { withoutTrailingSlash } from 'ufo'
import { findPageHeadline, mapContentNavigation } from '#imports'
import { withoutTrailingSlash } from 'ufo'
const route = useRoute()
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.13.2",
"private": true,
"packageManager": "pnpm@9.5.0",
"packageManager": "pnpm@9.10.0",
"license": "MIT",
"scripts": {
"cli": "JITI_ESM_RESOLVE=1 node packages/cli/dist/cli.mjs",
Expand All @@ -22,13 +22,13 @@
"docs:serve": "npm -C docs run serve"
},
"devDependencies": {
"@antfu/eslint-config": "2.19.0",
"bumpp": "^9.4.1",
"eslint": "^9.7.0",
"typescript": "5.3.3",
"@antfu/eslint-config": "3.5.0",
"bumpp": "^9.5.2",
"eslint": "^9.10.0",
"typescript": "5.6.2",
"unbuild": "^2.0.0",
"vite": "^5.3.3",
"vitest": "^2.0.2"
"vite": "^5.4.3",
"vitest": "^2.0.5"
},
"pnpm": {
"packageExtensions": {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/ci.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { UserConfig } from '@unlighthouse/core'
import fs from 'fs-extra'
import { createUnlighthouse, generateClient, useLogger, useUnlighthouse } from '@unlighthouse/core'
import fs from 'fs-extra'
import { relative } from 'pathe'
import { isCI } from 'std-env'
import { handleError } from './errors'
import type { CiOptions } from './types'
import { pickOptions, validateHost, validateOptions } from './util'
import type { UserConfig } from '@unlighthouse/core'
import createCli from './createCli'
import { handleError } from './errors'
import { generateReportPayload, outputReport } from './reporters'
import { pickOptions, validateHost, validateOptions } from './util'
import type { ReporterConfig } from './reporters/types'
import type { CiOptions } from './types'

async function run() {
const startTime = new Date()
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createUnlighthouse, useLogger } from '@unlighthouse/core'
import { createServer } from '@unlighthouse/server'
import open from 'better-opn'
import createCli from './createCli'
import { pickOptions, validateHost, validateOptions } from './util'
import type { CliOptions } from './types'
import createCli from './createCli'

const cli = createCli()

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/reporters/csvExpanded.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { get } from 'lodash-es'
import type { UnlighthouseRouteReport } from '../types'
import { csvSimpleFormat } from './csvSimple'
import type { UnlighthouseRouteReport } from '../types'
import type { ReporterConfig } from './types'

export function reportCSVExpanded(reports: UnlighthouseRouteReport[], { columns }: ReporterConfig): string {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/reporters/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { join } from 'node:path'
import fse from 'fs-extra'
import type { ResolvedUserConfig, UnlighthouseRouteReport } from '@unlighthouse/core'
import { reportJsonSimple } from './jsonSimple'
import { reportJsonExpanded } from './jsonExpanded'
import type { ReportJsonExpanded, ReportJsonSimple, ReporterConfig } from './types'
import { reportCSVSimple } from './csvSimple'
import { reportCSVExpanded } from './csvExpanded'
import { reportCSVSimple } from './csvSimple'
import { reportJsonExpanded } from './jsonExpanded'
import { reportJsonSimple } from './jsonSimple'
import { reportLighthouseServer } from './lighthouseServer'
import type { ReporterConfig, ReportJsonExpanded, ReportJsonSimple } from './types'

export function generateReportPayload(reporter: 'lighthouseServer', reports: UnlighthouseRouteReport[], config?: ReporterConfig): Promise<void>
export function generateReportPayload(reporter: 'jsonExpanded', reports: UnlighthouseRouteReport[]): ReportJsonExpanded
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/reporters/lighthouseServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
getExternalBuildUrl,
} from '@lhci/utils/src/build-context.js'
import fs from 'fs-extra'
import type { UnlighthouseRouteReport } from '../types'
import { handleError } from '../errors'
import type { UnlighthouseRouteReport } from '../types'
import type { ReporterConfig } from './types'

export async function reportLighthouseServer(
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { URL } from 'node:url'
import type { ResolvedUserConfig, UserConfig } from '@unlighthouse/core'
import { pick } from 'lodash-es'
import { defu } from 'defu'
import { fetchUrlRaw, normaliseHost, useLogger } from '@unlighthouse/core'
import { defu } from 'defu'
import { pick } from 'lodash-es'
import type { ResolvedUserConfig, UserConfig } from '@unlighthouse/core'
import { handleError } from './errors'
import type { CiOptions, CliOptions } from './types'

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test/csv-reports.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe, expect, it } from 'vitest'
import type { UnlighthouseRouteReport } from '../src/types'
import { generateReportPayload } from '../src/reporters'
import { DefaultColumns } from '../../core/src/constants'
import { generateReportPayload } from '../src/reporters'
import _lighthouseReport from './__fixtures__/lighthouseReport.mjs'
import type { UnlighthouseRouteReport } from '../src/types'

const lighthouseReport = _lighthouseReport as any as UnlighthouseRouteReport[]

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/json-reports.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import type { UnlighthouseRouteReport } from '../src/types'
import { generateReportPayload } from '../src/reporters'
import _lighthouseReport from './__fixtures__/lighthouseReport.mjs'
import type { UnlighthouseRouteReport } from '../src/types'

const lighthouseReport = _lighthouseReport as any as UnlighthouseRouteReport[]

Expand Down
6 changes: 3 additions & 3 deletions packages/cli/test/lighthouseServer-reports.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, expect, it, vi } from 'vitest'
import fs from 'fs-extra'
import ApiClient from '@lhci/utils/src/api-client.js'
import type { UnlighthouseRouteReport } from '../src/types'
import fs from 'fs-extra'
import { describe, expect, it, vi } from 'vitest'
import { generateReportPayload } from '../src/reporters'
import _lighthouseReport from './__fixtures__/lighthouseReport.mjs'
import type { UnlighthouseRouteReport } from '../src/types'

const lighthouseReport = _lighthouseReport as any as UnlighthouseRouteReport[]

Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/Crux/Graph/CruxGraphCls.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { createChart } from 'lightweight-charts'
import dayjs from 'dayjs'
import { createChart } from 'lightweight-charts'
import { isDark } from '../../../logic'
import { useHumanFriendlyNumber } from '../../../logic/formatting'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/Crux/Graph/CruxGraphInp.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { createChart } from 'lightweight-charts'
import dayjs from 'dayjs'
import { createChart } from 'lightweight-charts'
import { isDark } from '../../../logic'
import { useHumanMs } from '../../../logic/formatting'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/Crux/Graph/CruxGraphLcp.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { createChart } from 'lightweight-charts'
import dayjs from 'dayjs'
import { createChart } from 'lightweight-charts'
import { isDark } from '../../../logic'
import { useHumanMs } from '../../../logic/formatting'
Expand Down
6 changes: 3 additions & 3 deletions packages/client/components/LighthouseThreeD.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import type { RendererPublicInterface } from 'troisjs'
import { AmbientLight, Camera, FbxModel, PointLight, Renderer, Scene } from 'troisjs'
import type { Group } from 'three'
import { useElementHover } from '@vueuse/core'
import { AmbientLight, Camera, FbxModel, PointLight, Renderer, Scene } from 'troisjs'
import { ref } from 'vue'
import type { Group } from 'three'
import type { RendererPublicInterface } from 'troisjs'
import { basePath, scanMeta } from '../logic'
const rendererC = ref()
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/Results/ResultsCell.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { UnlighthouseColumn, UnlighthouseRouteReport } from '@unlighthouse/core'
import { get } from 'lodash-es'
import type { UnlighthouseColumn, UnlighthouseRouteReport } from '@unlighthouse/core'
const props = defineProps<{
report: UnlighthouseRouteReport
Expand Down
6 changes: 3 additions & 3 deletions packages/client/logic/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './actions/rescanSite'
export * from './dark'
export * from './state'
export * from './fetch'
export * from './search'
export * from './state'
export * from './static'
export * from './util'
export * from './fetch'
export * from './actions/rescanSite'
2 changes: 1 addition & 1 deletion packages/client/logic/search.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useStorage } from '@vueuse/core'
import { computed } from 'vue'
import Fuse from 'fuse.js'
import { get, isEmpty, orderBy } from 'lodash-es'
import { computed } from 'vue'
import type { UnlighthouseRouteReport, UnlighthouseTaskStatus } from '@unlighthouse/core'
import { unlighthouseReports } from './state'
import { columns, groupRoutesKey } from './static'
Expand Down
8 changes: 4 additions & 4 deletions packages/client/logic/state.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { sum } from 'lodash-es'
import { computed, reactive } from 'vue'
import type { NormalisedRoute, ScanMeta, UnlighthouseRouteReport } from '@unlighthouse/core'
import { sum } from 'lodash-es'
import CellRouteName from '../components/Cell/CellRouteName.vue'
import CellScoresOverview from '../components/Cell/CellScoresOverview.vue'
import CellScoreSingle from '../components/Cell/CellScoreSingle.vue'
import { categories, columns, isStatic, wsUrl } from './static'
import { sorting } from './search'
import CellScoresOverview from '../components/Cell/CellScoresOverview.vue'
import { useFetch } from './fetch'
import { sorting } from './search'
import { categories, columns, isStatic, wsUrl } from './static'

export const activeTab = ref(0)

Expand Down
28 changes: 14 additions & 14 deletions packages/client/logic/static.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// pull out client accessible options
import MdiAccessibility from '~icons/mdi/accessibility'
import MdiCellphone from '~icons/mdi/cellphone'
import MdiSpeedometer from '~icons/mdi/speedometer'
import MdiThumbUp from '~icons/mdi/thumb-up'
import MdiViewDashboard from '~icons/mdi/view-dashboard'
import MdiWeb from '~icons/mdi/web'
import MdiWorld from '~icons/mdi/world'
import { startCase } from 'lodash-es'
import { $URL } from 'ufo'
import CellNetworkRequests from '../components/Cell/CellNetworkRequests.vue'
import CellImageIssues from '../components/Cell/CellImageIssues.vue'
import CellColorContrast from '../components/Cell/CellColorContrast.vue'
import CellMetaDescription from '../components/Cell/CellMetaDescription.vue'
import CellImage from '../components/Cell/CellImage.vue'
import CellImageIssues from '../components/Cell/CellImageIssues.vue'
import CellIndexable from '../components/Cell/CellIndexable.vue'
import CellLargestContentfulPaint from '../components/Cell/CellLargestContentfulPaint.vue'
import CellLayoutShift from '../components/Cell/CellLayoutShift.vue'
import CellMetaDescription from '../components/Cell/CellMetaDescription.vue'
import CellNetworkRequests from '../components/Cell/CellNetworkRequests.vue'
import CellScreenshotThumbnails from '../components/Cell/CellScreenshotThumbnails.vue'
import CellImage from '../components/Cell/CellImage.vue'
import CellTapTargets from '../components/Cell/CellTapTargets.vue'
import CellWebVitals from '../components/Cell/CellWebVitals.vue'
import CellLargestContentfulPaint from '../components/Cell/CellLargestContentfulPaint.vue'
import CellLayoutShift from '../components/Cell/CellLayoutShift.vue'
import MdiViewDashboard from '~icons/mdi/view-dashboard'
import MdiSpeedometer from '~icons/mdi/speedometer'
import MdiAccessibility from '~icons/mdi/accessibility'
import MdiThumbUp from '~icons/mdi/thumb-up'
import MdiWeb from '~icons/mdi/web'
import MdiCellphone from '~icons/mdi/cellphone'
import MdiWorld from '~icons/mdi/world'

const {
options: {
Expand All @@ -41,7 +41,7 @@ const {

export const isStatic = window.__unlighthouse_static

export { wsUrl, basePath, dynamicSampling, apiUrl, groupRoutesKey, lighthouseOptions, throttle, device }
export { apiUrl, basePath, device, dynamicSampling, groupRoutesKey, lighthouseOptions, throttle, wsUrl }

export const website = new $URL(site).origin

Expand Down
Loading

0 comments on commit 19b238b

Please sign in to comment.