diff --git a/package.json b/package.json index 88005d6b0d..0e2fa09c9a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "c12": "^1.2.0", "chalk": "^5.2.0", "chokidar": "^3.5.3", - "consola": "^2.15.3", + "consola": "^3.0.0-4", "cookie-es": "^0.5.0", "defu": "^6.1.2", "destr": "^1.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 380951b0c7..3cf8c73610 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ importers: specifier: ^3.5.3 version: 3.5.3 consola: - specifier: ^2.15.3 - version: 2.15.3 + specifier: ^3.0.0-4 + version: 3.0.0-4 cookie-es: specifier: ^0.5.0 version: 0.5.0 @@ -2020,6 +2020,11 @@ packages: /consola@2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + dev: true + + /consola@3.0.0-4: + resolution: {integrity: sha512-hVsQab7WQE97Wy8h0gL3WN8eVYMV2t3d4PCFz0OnjJBY7xpkiFlADFaCKSuLoCjLm23X3fVkHj3DAKKWqnluhg==} + dev: false /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} diff --git a/src/nitro.ts b/src/nitro.ts index c97b03d784..afca9eea95 100644 --- a/src/nitro.ts +++ b/src/nitro.ts @@ -2,8 +2,8 @@ import { existsSync } from "node:fs"; import { resolve } from "pathe"; import { createHooks, createDebugger } from "hookable"; import { createUnimport } from "unimport"; -import defu from "defu"; -import consola from "consola"; +import { defu } from "defu"; +import { consola } from "consola"; import type { NitroConfig, Nitro } from "./types"; import { loadOptions } from "./options"; import { scanPlugins } from "./scan"; diff --git a/src/rollup/plugins/automock.ts b/src/rollup/plugins/automock.ts index 519f172972..a02ba74490 100644 --- a/src/rollup/plugins/automock.ts +++ b/src/rollup/plugins/automock.ts @@ -1,4 +1,4 @@ -import consola from "consola"; +import { consola } from "consola"; const internalRegex = /^\.|\?|\.[cm]?js$|.ts$|.json$/; diff --git a/src/rollup/plugins/externals-legacy.ts b/src/rollup/plugins/externals-legacy.ts index 787f6c9c15..06d248fe35 100644 --- a/src/rollup/plugins/externals-legacy.ts +++ b/src/rollup/plugins/externals-legacy.ts @@ -1,6 +1,6 @@ import { existsSync, promises as fsp } from "node:fs"; import { resolve, dirname, normalize, join, isAbsolute } from "pathe"; -import consola from "consola"; +import { consola } from "consola"; import { nodeFileTrace, NodeFileTraceOptions } from "@vercel/nft"; import type { Plugin } from "rollup"; import { resolvePath, isValidNodeImport, normalizeid } from "mlly"; diff --git a/src/types/nitro.ts b/src/types/nitro.ts index 24957f2172..5890267110 100644 --- a/src/types/nitro.ts +++ b/src/types/nitro.ts @@ -4,7 +4,7 @@ import type { Unimport } from "unimport"; import type { UnimportPluginOptions } from "unimport/unplugin"; import type { PluginVisualizerOptions } from "rollup-plugin-visualizer"; import type { NestedHooks, Hookable } from "hookable"; -import type { Consola, LogLevel } from "consola"; +import type { ConsolaInstance, LogLevel } from "consola"; import type { WatchOptions } from "chokidar"; import type { RollupCommonJSOptions } from "@rollup/plugin-commonjs"; import type { RollupWasmOptions } from "@rollup/plugin-wasm"; @@ -30,7 +30,7 @@ export interface Nitro { vfs: Record; hooks: Hookable; unimport?: Unimport; - logger: Consola; + logger: ConsolaInstance; storage: Storage; close: () => Promise; diff --git a/src/utils/index.ts b/src/utils/index.ts index 5e04f1ef36..27e24255ff 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -3,7 +3,7 @@ import fsp from "node:fs/promises"; import { existsSync, readFileSync } from "node:fs"; import { relative, dirname, resolve } from "pathe"; import jiti from "jiti"; -import consola from "consola"; +import { consola } from "consola"; import chalk from "chalk"; import { getProperty } from "dot-prop"; import { provider } from "std-env";