@nuxt/kit 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Configuration, WebpackPluginInstance } from 'webpack';
5
5
  import { UserConfig, Plugin } from 'vite';
6
6
  import * as unctx_index from 'unctx/index';
7
7
  import { NitroRouteConfig, NitroEventHandler, NitroDevEventHandler, Nitro } from 'nitropack';
8
- import * as consola from 'consola';
8
+ import * as consola_dist_consola_b98e8215 from 'consola/dist/consola-b98e8215';
9
9
  import { genSafeVariableName } from 'knitwork';
10
10
 
11
11
  /**
@@ -302,8 +302,8 @@ declare function updateTemplates(options?: {
302
302
  filter?: (template: ResolvedNuxtTemplate<any>) => boolean;
303
303
  }): Promise<any>;
304
304
 
305
- declare const logger: consola.Consola;
306
- declare function useLogger(scope?: string): consola.Consola;
305
+ declare const logger: consola_dist_consola_b98e8215.a;
306
+ declare function useLogger(tag?: string): consola_dist_consola_b98e8215.a;
307
307
 
308
308
  /** @deprecated Do not use CJS utils */
309
309
  interface ResolveModuleOptions {
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { performance } from 'node:perf_hooks';
3
3
  import { defu } from 'defu';
4
4
  import { applyDefaults } from 'untyped';
5
5
  import { dirname, normalize, join, relative, isAbsolute, resolve, basename, parse } from 'pathe';
6
- import consola from 'consola';
6
+ import { consola } from 'consola';
7
7
  import { getContext } from 'unctx';
8
8
  import satisfies from 'semver/functions/satisfies.js';
9
9
  import lodashTemplate from 'lodash.template';
@@ -21,8 +21,8 @@ import { kebabCase, pascalCase } from 'scule';
21
21
  import hash from 'hash-sum';
22
22
 
23
23
  const logger = consola;
24
- function useLogger(scope) {
25
- return scope ? logger.withScope(scope) : logger;
24
+ function useLogger(tag) {
25
+ return tag ? logger.withTag(tag) : logger;
26
26
  }
27
27
 
28
28
  const nuxtCtx = getContext("nuxt");
@@ -449,7 +449,7 @@ async function resolveFiles(path, pattern, opts = {}) {
449
449
  async function installModule(moduleToInstall, _inlineOptions, _nuxt) {
450
450
  const nuxt = useNuxt();
451
451
  const { nuxtModule, inlineOptions } = await normalizeModule(moduleToInstall, _inlineOptions);
452
- const res = await nuxtModule(inlineOptions, nuxt) ?? {};
452
+ const res = (isNuxt2() ? await nuxtModule.call(nuxt.moduleContainer, inlineOptions, nuxt) : await nuxtModule(inlineOptions, nuxt)) ?? {};
453
453
  if (res === false) {
454
454
  return;
455
455
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/kit",
3
- "version": "3.3.2",
3
+ "version": "3.4.0",
4
4
  "repository": "nuxt/nuxt",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,9 +17,8 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@nuxt/schema": "3.3.2",
21
20
  "c12": "^1.2.0",
22
- "consola": "^2.15.3",
21
+ "consola": "^3.0.1",
23
22
  "defu": "^6.1.2",
24
23
  "globby": "^13.1.3",
25
24
  "hash-sum": "^2.0.0",
@@ -31,10 +30,11 @@
31
30
  "pathe": "^1.1.0",
32
31
  "pkg-types": "^1.0.2",
33
32
  "scule": "^1.0.0",
34
- "semver": "^7.3.8",
35
- "unctx": "^2.1.2",
36
- "unimport": "^3.0.4",
37
- "untyped": "^1.2.2"
33
+ "semver": "^7.4.0",
34
+ "unctx": "^2.2.0",
35
+ "unimport": "^3.0.6",
36
+ "untyped": "^1.3.2",
37
+ "@nuxt/schema": "3.4.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/lodash.template": "^4.5.1",