From f951a15232a297e43544df5078cce04bbc204f6e Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 11 Apr 2023 11:07:39 +0100 Subject: [PATCH] chore: upgrade to consola v3 (#20194) --- packages/kit/package.json | 2 +- packages/nuxi/package.json | 2 +- packages/nuxi/src/cli.ts | 10 +++++----- packages/test-utils/package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/kit/package.json b/packages/kit/package.json index 66397bfa8b..8994d9d6c5 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -22,7 +22,7 @@ "dependencies": { "@nuxt/schema": "workspace:../schema", "c12": "^1.2.0", - "consola": "^3.0.0-3", + "consola": "^3.0.1", "defu": "^6.1.2", "globby": "^13.1.3", "hash-sum": "^2.0.0", diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index 559e3721ee..1da97dc25d 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -29,7 +29,7 @@ "clear": "^0.1.0", "clipboardy": "^3.0.0", "colorette": "^2.0.19", - "consola": "^3.0.0-3", + "consola": "^3.0.1", "deep-object-diff": "^1.1.9", "destr": "^1.2.2", "execa": "^7.1.1", diff --git a/packages/nuxi/src/cli.ts b/packages/nuxi/src/cli.ts index ea56732bcb..0118ade73d 100755 --- a/packages/nuxi/src/cli.ts +++ b/packages/nuxi/src/cli.ts @@ -1,6 +1,6 @@ import mri from 'mri' import { red } from 'colorette' -import type { Consola } from 'consola' +import type { ConsolaReporter } from 'consola' import { consola } from 'consola' import { checkEngines } from './utils/engines' import type { Command, NuxtCommand } from './commands' @@ -45,8 +45,7 @@ consola.wrapAll() // Filter out unwanted logs // TODO: Use better API from consola for intercepting logs -// TODO: export type from Consola -const wrapReporter = (reporter: Consola['_reporters'][0]) => { +const wrapReporter = (reporter: ConsolaReporter) => ({ log (logObj, ctx) { if (!logObj.args || !logObj.args.length) { return } const msg = logObj.args[0] @@ -62,8 +61,9 @@ const wrapReporter = (reporter: Consola['_reporters'][0]) => consola.error('[unhandledRejection]', err)) process.on('uncaughtException', err => consola.error('[uncaughtException]', err)) diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index ba62cb2284..ed7e555c4f 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -24,7 +24,7 @@ "dependencies": { "@nuxt/kit": "workspace:../kit", "@nuxt/schema": "workspace:../schema", - "consola": "^3.0.0-3", + "consola": "^3.0.1", "defu": "^6.1.2", "execa": "^7.1.1", "get-port-please": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0fe492507b..b61298d565 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,8 +367,8 @@ importers: specifier: ^1.2.0 version: 1.2.0 consola: - specifier: ^3.0.0-3 - version: 3.0.0-3 + specifier: ^3.0.1 + version: 3.0.1 defu: specifier: ^6.1.2 version: 6.1.2 @@ -465,8 +465,8 @@ importers: specifier: ^2.0.19 version: 2.0.19 consola: - specifier: ^3.0.0-3 - version: 3.0.0-3 + specifier: ^3.0.1 + version: 3.0.1 deep-object-diff: specifier: ^1.1.9 version: 1.1.9 @@ -755,8 +755,8 @@ importers: specifier: workspace:* version: link:../schema consola: - specifier: ^3.0.0-3 - version: 3.0.0-3 + specifier: ^3.0.1 + version: 3.0.1 defu: specifier: ^6.1.2 version: 6.1.2 @@ -3800,8 +3800,8 @@ packages: /consola@2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} - /consola@3.0.0-3: - resolution: {integrity: sha512-3vhBx7Qw5LlF1/QnaeoQSSA5fOohGr9xtHkQ1RFbNlr6kOTwtVz0FvUPx6CdobrDDSP19cj0uWwPtf+/+VBKQA==} + /consola@3.0.1: + resolution: {integrity: sha512-08E7bC2N6gaFdzPU/qtBi4ulVvJitYnfrDdxEiwElC3jSNICbOvkcE+8N56EfIrBoxp37O9Qnn5ZZPElov83UQ==} /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}