Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxi): replace lazyHandle to defineLazyHandler #8049

Merged
merged 2 commits into from
Oct 9, 2022
Merged
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
1 change: 1 addition & 0 deletions packages/nuxi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"execa": "^6.1.0",
"flat": "^5.0.2",
"giget": "^0.1.7",
"h3": "^0.7.21",
"jiti": "^1.16.0",
"listhen": "^0.3.4",
"mlly": "^0.5.16",
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxi/src/commands/analyze.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { promises as fsp } from 'node:fs'
import { join, resolve } from 'pathe'
import { createApp, lazyHandle } from 'h3'
import { createApp, defineLazyHandler } from 'h3'
import { listen } from 'listhen'
import { writeTypes } from '../utils/prepare'
import { loadKit } from '../utils/kit'
Expand Down Expand Up @@ -37,7 +37,7 @@ export default defineNuxtCommand({

const app = createApp()

const serveFile = (filePath: string) => lazyHandle(async () => {
const serveFile = (filePath: string) => defineLazyHandler(async () => {
const contents = await fsp.readFile(filePath, 'utf-8')
return (_req, res) => { res.end(contents) }
})
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10470,6 +10470,7 @@ __metadata:
flat: ^5.0.2
fsevents: ~2.3.2
giget: ^0.1.7
h3: ^0.7.21
jiti: ^1.16.0
listhen: ^0.3.4
mlly: ^0.5.16
Expand Down