@nuxt/test-utils-nightly 3.21.0-20251204-130449-b6179fd → 3.21.1-20251209-140740-e669811
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/config.mjs +13 -39
- package/dist/e2e.mjs +6 -2
- package/dist/module.mjs +8 -5
- package/dist/playwright.mjs +6 -2
- package/dist/runtime/global-setup.mjs +3 -4
- package/dist/runtime-utils/index.mjs +35 -6
- package/dist/shared/{test-utils-nightly.C0HvikGn.mjs → test-utils-nightly.DqnRFuuO.mjs} +8 -7
- package/dist/shared/test-utils-nightly.G1ew4kEe.mjs +67 -0
- package/package.json +27 -27
package/dist/config.mjs
CHANGED
|
@@ -1,42 +1,16 @@
|
|
|
1
|
-
import process
|
|
1
|
+
import process from 'node:process';
|
|
2
2
|
import { defineConfig } from 'vite';
|
|
3
3
|
import { setupDotenv } from 'c12';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
|
-
import { createResolver, findPath
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { createResolver, findPath } from '@nuxt/kit';
|
|
6
|
+
import { a as applyEnv, l as loadKit } from './shared/test-utils-nightly.G1ew4kEe.mjs';
|
|
7
|
+
import 'destr';
|
|
8
|
+
import 'scule';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
import 'exsolve';
|
|
8
11
|
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
const envKey = snakeCase(key).toUpperCase();
|
|
12
|
-
return destr(
|
|
13
|
-
env[opts.prefix + envKey] ?? env[opts.altPrefix + envKey]
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
function _isObject(input) {
|
|
17
|
-
return typeof input === "object" && !Array.isArray(input);
|
|
18
|
-
}
|
|
19
|
-
function applyEnv(obj, opts, parentKey = "") {
|
|
20
|
-
for (const key in obj) {
|
|
21
|
-
const subKey = parentKey ? `${parentKey}_${key}` : key;
|
|
22
|
-
const envValue = getEnv(subKey, opts);
|
|
23
|
-
if (_isObject(obj[key])) {
|
|
24
|
-
if (_isObject(envValue)) {
|
|
25
|
-
obj[key] = { ...obj[key], ...envValue };
|
|
26
|
-
applyEnv(obj[key], opts, subKey);
|
|
27
|
-
} else if (envValue === void 0) {
|
|
28
|
-
applyEnv(obj[key], opts, subKey);
|
|
29
|
-
} else {
|
|
30
|
-
obj[key] = envValue ?? obj[key];
|
|
31
|
-
}
|
|
32
|
-
} else {
|
|
33
|
-
obj[key] = envValue ?? obj[key];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return obj;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async function startNuxtAndGetViteConfig(rootDir = process$1.cwd(), options = {}) {
|
|
12
|
+
async function startNuxtAndGetViteConfig(rootDir = process.cwd(), options = {}) {
|
|
13
|
+
const { buildNuxt, loadNuxt } = await loadKit(rootDir);
|
|
40
14
|
const nuxt = await loadNuxt({
|
|
41
15
|
cwd: rootDir,
|
|
42
16
|
dev: false,
|
|
@@ -89,7 +63,7 @@ const excludedPlugins = [
|
|
|
89
63
|
"vite-plugin-vue-tracer"
|
|
90
64
|
];
|
|
91
65
|
async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
92
|
-
const { rootDir = process
|
|
66
|
+
const { rootDir = process.cwd(), ..._overrides } = loadNuxtOptions.overrides || {};
|
|
93
67
|
if (!options) {
|
|
94
68
|
options = await startNuxtAndGetViteConfig(rootDir, {
|
|
95
69
|
dotenv: loadNuxtOptions.dotenv,
|
|
@@ -117,7 +91,7 @@ async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
|
117
91
|
noDiscovery: true
|
|
118
92
|
},
|
|
119
93
|
test: {
|
|
120
|
-
dir: process
|
|
94
|
+
dir: process.cwd(),
|
|
121
95
|
environmentOptions: {
|
|
122
96
|
nuxtRuntimeConfig: applyEnv(structuredClone(options.nuxt.options.runtimeConfig), {
|
|
123
97
|
prefix: "NUXT_",
|
|
@@ -214,14 +188,14 @@ async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
|
214
188
|
return resolvedConfig;
|
|
215
189
|
}
|
|
216
190
|
async function defineVitestProject(config) {
|
|
217
|
-
if (process
|
|
191
|
+
if (process.env.__NUXT_VITEST_RESOLVED__) return config;
|
|
218
192
|
const resolvedConfig = await resolveConfig(config);
|
|
219
193
|
resolvedConfig.test.environment = "nuxt";
|
|
220
194
|
return resolvedConfig;
|
|
221
195
|
}
|
|
222
196
|
function defineVitestConfig(config = {}) {
|
|
223
197
|
return defineConfig(async () => {
|
|
224
|
-
if (process
|
|
198
|
+
if (process.env.__NUXT_VITEST_RESOLVED__) return config;
|
|
225
199
|
const resolvedConfig = await resolveConfig(config);
|
|
226
200
|
if (resolvedConfig.test.browser?.enabled) {
|
|
227
201
|
return resolvedConfig;
|
package/dist/e2e.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as buildFixture, c as createBrowser, a as createPage, d as createTest, g as getBrowser, l as loadFixture, e as setup, s as setupMaps, w as waitForHydration } from './shared/test-utils-nightly.
|
|
1
|
+
export { b as buildFixture, c as createBrowser, a as createPage, d as createTest, g as getBrowser, l as loadFixture, e as setup, s as setupMaps, w as waitForHydration } from './shared/test-utils-nightly.DqnRFuuO.mjs';
|
|
2
2
|
import { u as useTestContext } from './shared/test-utils-nightly.CtwoJP76.mjs';
|
|
3
3
|
export { $ as $fetch, c as createTestContext, e as exposeContextToEnv, f as fetch, i as isDev, r as recoverContextFromEnv, s as setTestContext, a as startServer, b as stopServer, d as url } from './shared/test-utils-nightly.CtwoJP76.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
@@ -7,7 +7,11 @@ import { distDir } from '#dirs';
|
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'defu';
|
|
10
|
-
import '
|
|
10
|
+
import './shared/test-utils-nightly.G1ew4kEe.mjs';
|
|
11
|
+
import 'destr';
|
|
12
|
+
import 'scule';
|
|
13
|
+
import 'node:url';
|
|
14
|
+
import 'exsolve';
|
|
11
15
|
import 'tinyexec';
|
|
12
16
|
import 'get-port-please';
|
|
13
17
|
import 'ofetch';
|
package/dist/module.mjs
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { pathToFileURL } from 'node:url';
|
|
2
|
-
import {
|
|
2
|
+
import { resolveIgnorePatterns, defineNuxtModule, createResolver, resolvePath, importModule, logger } from '@nuxt/kit';
|
|
3
3
|
import { getPort } from 'get-port-please';
|
|
4
4
|
import { h } from 'vue';
|
|
5
5
|
import { debounce } from 'perfect-debounce';
|
|
6
6
|
import { isCI } from 'std-env';
|
|
7
7
|
import { defu } from 'defu';
|
|
8
|
+
import { extname, join, dirname, relative } from 'pathe';
|
|
8
9
|
import { getVitestConfigFromNuxt } from './config.mjs';
|
|
9
10
|
import { walk } from 'estree-walker';
|
|
10
11
|
import MagicString from 'magic-string';
|
|
11
12
|
import { createUnplugin } from 'unplugin';
|
|
13
|
+
import { l as loadKit } from './shared/test-utils-nightly.G1ew4kEe.mjs';
|
|
12
14
|
import { readFileSync } from 'node:fs';
|
|
13
|
-
import { extname, join, dirname, relative } from 'pathe';
|
|
14
15
|
import 'node:process';
|
|
15
16
|
import 'vite';
|
|
16
17
|
import 'c12';
|
|
17
18
|
import 'destr';
|
|
18
19
|
import 'scule';
|
|
20
|
+
import 'exsolve';
|
|
19
21
|
|
|
20
22
|
const PLUGIN_NAME$1 = "nuxt:vitest:mock-transform";
|
|
21
23
|
const HELPER_MOCK_IMPORT = "mockNuxtImport";
|
|
@@ -262,8 +264,8 @@ function endOf(node) {
|
|
|
262
264
|
return "range" in node && node.range ? node.range[1] : "end" in node ? node.end : void 0;
|
|
263
265
|
}
|
|
264
266
|
|
|
265
|
-
function setupImportMocking() {
|
|
266
|
-
const
|
|
267
|
+
async function setupImportMocking(nuxt) {
|
|
268
|
+
const { addVitePlugin } = await loadKit(nuxt.options.rootDir);
|
|
267
269
|
const ctx = {
|
|
268
270
|
components: [],
|
|
269
271
|
imports: []
|
|
@@ -328,8 +330,9 @@ const module$1 = defineNuxtModule({
|
|
|
328
330
|
},
|
|
329
331
|
async setup(options, nuxt) {
|
|
330
332
|
if (nuxt.options.test || nuxt.options.dev) {
|
|
331
|
-
setupImportMocking();
|
|
333
|
+
await setupImportMocking(nuxt);
|
|
332
334
|
}
|
|
335
|
+
const { addVitePlugin } = await loadKit(nuxt.options.rootDir);
|
|
333
336
|
const resolver = createResolver(import.meta.url);
|
|
334
337
|
addVitePlugin(NuxtRootStubPlugin.vite({
|
|
335
338
|
entry: await resolvePath("#app/entry", { alias: nuxt.options.alias }),
|
package/dist/playwright.mjs
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import defu from 'defu';
|
|
2
2
|
import { test as test$1 } from '@playwright/test';
|
|
3
3
|
export { expect } from '@playwright/test';
|
|
4
|
-
import { w as waitForHydration, d as createTest } from './shared/test-utils-nightly.
|
|
4
|
+
import { w as waitForHydration, d as createTest } from './shared/test-utils-nightly.DqnRFuuO.mjs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'ufo';
|
|
7
7
|
import 'std-env';
|
|
8
8
|
import 'consola';
|
|
9
9
|
import 'node:fs';
|
|
10
|
-
import '
|
|
10
|
+
import 'destr';
|
|
11
|
+
import 'scule';
|
|
12
|
+
import 'node:url';
|
|
13
|
+
import 'exsolve';
|
|
11
14
|
import { d as url } from './shared/test-utils-nightly.CtwoJP76.mjs';
|
|
12
15
|
import 'pathe';
|
|
13
16
|
import '#dirs';
|
|
17
|
+
import './shared/test-utils-nightly.G1ew4kEe.mjs';
|
|
14
18
|
import 'tinyexec';
|
|
15
19
|
import 'get-port-please';
|
|
16
20
|
import 'ofetch';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { consola } from "consola";
|
|
2
2
|
import { createTest, exposeContextToEnv } from "@nuxt/test-utils/e2e";
|
|
3
|
-
const kit = _kit.default || _kit;
|
|
4
3
|
const options = JSON.parse(process.env.NUXT_TEST_OPTIONS || "{}");
|
|
5
4
|
const hooks = createTest(options);
|
|
6
5
|
export const setup = async () => {
|
|
7
|
-
|
|
6
|
+
consola.info("Building Nuxt app...");
|
|
8
7
|
await hooks.beforeAll();
|
|
9
8
|
exposeContextToEnv();
|
|
10
|
-
|
|
9
|
+
consola.info("Running tests...");
|
|
11
10
|
};
|
|
12
11
|
export const teardown = async () => {
|
|
13
12
|
await hooks.afterAll();
|
|
@@ -2,7 +2,7 @@ import { defineEventHandler } from 'h3';
|
|
|
2
2
|
import { mount } from '@vue/test-utils';
|
|
3
3
|
import { reactive, h as h$1, Suspense, nextTick, getCurrentInstance, effectScope, defineComponent as defineComponent$1 } from 'vue';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
|
-
import { defineComponent, useRouter, h, tryUseNuxtApp } from '#imports';
|
|
5
|
+
import { defineComponent, useRouter, h, tryUseNuxtApp, onErrorCaptured } from '#imports';
|
|
6
6
|
import NuxtRoot from '#build/root-component.mjs';
|
|
7
7
|
|
|
8
8
|
const endpointRegistry = {};
|
|
@@ -143,7 +143,8 @@ async function mountSuspended(component, options) {
|
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
return new Promise(
|
|
146
|
-
(resolve) => {
|
|
146
|
+
(resolve, reject) => {
|
|
147
|
+
let isMountSettled = false;
|
|
147
148
|
const vm = mount(
|
|
148
149
|
{
|
|
149
150
|
__cssModules: componentRest.__cssModules,
|
|
@@ -152,29 +153,43 @@ async function mountSuspended(component, options) {
|
|
|
152
153
|
patchInstanceAppContext();
|
|
153
154
|
wrappedInstance = getCurrentInstance();
|
|
154
155
|
setupContext = ctx;
|
|
156
|
+
let nuxtRootSetupResult;
|
|
155
157
|
if (options?.scoped) {
|
|
156
158
|
const scope = effectScope();
|
|
157
159
|
globalThis.__cleanup ||= [];
|
|
158
160
|
globalThis.__cleanup.push(() => {
|
|
159
161
|
scope.stop();
|
|
160
162
|
});
|
|
161
|
-
|
|
163
|
+
nuxtRootSetupResult = scope.run(() => NuxtRoot.setup(props2, {
|
|
162
164
|
...ctx,
|
|
163
165
|
expose: () => {
|
|
164
166
|
}
|
|
165
167
|
}));
|
|
166
168
|
} else {
|
|
167
|
-
|
|
169
|
+
nuxtRootSetupResult = NuxtRoot.setup(props2, {
|
|
168
170
|
...ctx,
|
|
169
171
|
expose: () => {
|
|
170
172
|
}
|
|
171
173
|
});
|
|
172
174
|
}
|
|
175
|
+
onErrorCaptured((error, ...args) => {
|
|
176
|
+
if (isMountSettled) return;
|
|
177
|
+
isMountSettled = true;
|
|
178
|
+
try {
|
|
179
|
+
wrappedInstance?.appContext.config.errorHandler?.(error, ...args);
|
|
180
|
+
reject(error);
|
|
181
|
+
} catch (error2) {
|
|
182
|
+
reject(error2);
|
|
183
|
+
}
|
|
184
|
+
return false;
|
|
185
|
+
});
|
|
186
|
+
return nuxtRootSetupResult;
|
|
173
187
|
},
|
|
174
188
|
render: () => h$1(
|
|
175
189
|
Suspense,
|
|
176
190
|
{
|
|
177
191
|
onResolve: () => nextTick().then(() => {
|
|
192
|
+
isMountSettled = true;
|
|
178
193
|
vm.setupState = setupState;
|
|
179
194
|
vm.__setProps = (props2) => {
|
|
180
195
|
Object.assign(setProps, props2);
|
|
@@ -323,7 +338,8 @@ async function renderSuspended(component, options) {
|
|
|
323
338
|
return h$1("div", { id: WRAPPER_EL_ID }, this.$slots.default?.());
|
|
324
339
|
}
|
|
325
340
|
});
|
|
326
|
-
return new Promise((resolve) => {
|
|
341
|
+
return new Promise((resolve, reject) => {
|
|
342
|
+
let isMountSettled = false;
|
|
327
343
|
const utils = renderFromTestingLibrary(
|
|
328
344
|
{
|
|
329
345
|
__cssModules: componentRest.__cssModules,
|
|
@@ -337,10 +353,22 @@ async function renderSuspended(component, options) {
|
|
|
337
353
|
window.__cleanup.push(() => {
|
|
338
354
|
scope.stop();
|
|
339
355
|
});
|
|
340
|
-
|
|
356
|
+
const nuxtRootSetupResult = scope.run(() => NuxtRoot.setup(props2, {
|
|
341
357
|
...ctx,
|
|
342
358
|
expose: () => ({})
|
|
343
359
|
}));
|
|
360
|
+
onErrorCaptured((error, ...args) => {
|
|
361
|
+
if (isMountSettled) return;
|
|
362
|
+
isMountSettled = true;
|
|
363
|
+
try {
|
|
364
|
+
wrappedInstance?.appContext.config.errorHandler?.(error, ...args);
|
|
365
|
+
reject(error);
|
|
366
|
+
} catch (error2) {
|
|
367
|
+
reject(error2);
|
|
368
|
+
}
|
|
369
|
+
return false;
|
|
370
|
+
});
|
|
371
|
+
return nuxtRootSetupResult;
|
|
344
372
|
},
|
|
345
373
|
render: () => (
|
|
346
374
|
// See discussions in https://github.com/testing-library/vue-testing-library/issues/230
|
|
@@ -354,6 +382,7 @@ async function renderSuspended(component, options) {
|
|
|
354
382
|
Suspense,
|
|
355
383
|
{
|
|
356
384
|
onResolve: () => nextTick().then(() => {
|
|
385
|
+
isMountSettled = true;
|
|
357
386
|
utils.setupState = setupState;
|
|
358
387
|
utils.rerender = async (props2) => {
|
|
359
388
|
Object.assign(setProps, props2);
|
|
@@ -2,7 +2,7 @@ import { u as useTestContext, d as url, c as createTestContext, a as startServer
|
|
|
2
2
|
import { existsSync, promises } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
|
-
import
|
|
5
|
+
import { l as loadKit } from './test-utils-nightly.G1ew4kEe.mjs';
|
|
6
6
|
|
|
7
7
|
async function createBrowser() {
|
|
8
8
|
const ctx = useTestContext();
|
|
@@ -57,7 +57,6 @@ async function waitForHydration(page, url2, waitUntil) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const kit = _kit.default || _kit;
|
|
61
60
|
const isNuxtApp = (dir) => {
|
|
62
61
|
return existsSync(dir) && (existsSync(resolve(dir, "pages")) || existsSync(resolve(dir, "nuxt.config.js")) || existsSync(resolve(dir, "nuxt.config.mjs")) || existsSync(resolve(dir, "nuxt.config.cjs")) || existsSync(resolve(dir, "nuxt.config.ts")) || existsSync(resolve(dir, ".config", "nuxt.js")) || existsSync(resolve(dir, ".config", "nuxt.mjs")) || existsSync(resolve(dir, ".config", "nuxt.cjs")) || existsSync(resolve(dir, ".config", "nuxt.ts")));
|
|
63
62
|
};
|
|
@@ -91,7 +90,8 @@ async function loadFixture() {
|
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
92
|
if (ctx.options.build) {
|
|
94
|
-
|
|
93
|
+
const { loadNuxt } = await loadKit(ctx.options.rootDir);
|
|
94
|
+
ctx.nuxt = await loadNuxt({
|
|
95
95
|
cwd: ctx.options.rootDir,
|
|
96
96
|
dev: ctx.options.dev,
|
|
97
97
|
overrides: ctx.options.nuxtConfig,
|
|
@@ -107,10 +107,11 @@ async function loadFixture() {
|
|
|
107
107
|
}
|
|
108
108
|
async function buildFixture() {
|
|
109
109
|
const ctx = useTestContext();
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
const { buildNuxt, logger } = await loadKit(ctx.options.rootDir);
|
|
111
|
+
const prevLevel = logger.level;
|
|
112
|
+
logger.level = ctx.options.logLevel;
|
|
113
|
+
await buildNuxt(ctx.nuxt);
|
|
114
|
+
logger.level = prevLevel;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
async function setupBun(hooks) {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import destr from 'destr';
|
|
2
|
+
import { snakeCase } from 'scule';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { resolveModulePath } from 'exsolve';
|
|
5
|
+
|
|
6
|
+
function getEnv(key, opts) {
|
|
7
|
+
const env = opts.env ?? process.env;
|
|
8
|
+
const envKey = snakeCase(key).toUpperCase();
|
|
9
|
+
return destr(
|
|
10
|
+
env[opts.prefix + envKey] ?? env[opts.altPrefix + envKey]
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function _isObject(input) {
|
|
14
|
+
return typeof input === "object" && !Array.isArray(input);
|
|
15
|
+
}
|
|
16
|
+
function applyEnv(obj, opts, parentKey = "") {
|
|
17
|
+
for (const key in obj) {
|
|
18
|
+
const subKey = parentKey ? `${parentKey}_${key}` : key;
|
|
19
|
+
const envValue = getEnv(subKey, opts);
|
|
20
|
+
if (_isObject(obj[key])) {
|
|
21
|
+
if (_isObject(envValue)) {
|
|
22
|
+
obj[key] = { ...obj[key], ...envValue };
|
|
23
|
+
applyEnv(obj[key], opts, subKey);
|
|
24
|
+
} else if (envValue === void 0) {
|
|
25
|
+
applyEnv(obj[key], opts, subKey);
|
|
26
|
+
} else {
|
|
27
|
+
obj[key] = envValue ?? obj[key];
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
obj[key] = envValue ?? obj[key];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return obj;
|
|
34
|
+
}
|
|
35
|
+
async function loadKit(rootDir) {
|
|
36
|
+
try {
|
|
37
|
+
const kitPath = resolveModulePath("@nuxt/kit", { from: tryResolveNuxt(rootDir) || rootDir });
|
|
38
|
+
let kit = await import(pathToFileURL(kitPath).href);
|
|
39
|
+
if (!kit.writeTypes) {
|
|
40
|
+
kit = {
|
|
41
|
+
...kit,
|
|
42
|
+
writeTypes: () => {
|
|
43
|
+
throw new Error("`writeTypes` is not available in this version of `@nuxt/kit`. Please upgrade to v3.7 or newer.");
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return kit;
|
|
48
|
+
} catch (e) {
|
|
49
|
+
if (e.toString().includes("Cannot find module '@nuxt/kit'")) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
"nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt` v3+ or `@nuxt/bridge` first."
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
throw e;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function tryResolveNuxt(rootDir) {
|
|
58
|
+
for (const pkg of ["nuxt-nightly", "nuxt", "nuxt3", "nuxt-edge"]) {
|
|
59
|
+
const path = resolveModulePath(pkg, { from: rootDir, try: true });
|
|
60
|
+
if (path) {
|
|
61
|
+
return path;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { applyEnv as a, loadKit as l };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/test-utils-nightly",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.1-20251209-140740-e669811",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/test-utils.git"
|
|
@@ -67,19 +67,20 @@
|
|
|
67
67
|
"dev:prepare": "nuxt prepare && unbuild --stub && pnpm -r dev:prepare"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@nuxt/kit": "^
|
|
71
|
-
"c12": "^3.3.
|
|
70
|
+
"@nuxt/kit": "^3.20.1",
|
|
71
|
+
"c12": "^3.3.2",
|
|
72
72
|
"consola": "^3.4.2",
|
|
73
73
|
"defu": "^6.1.4",
|
|
74
74
|
"destr": "^2.0.5",
|
|
75
75
|
"estree-walker": "^3.0.3",
|
|
76
|
+
"exsolve": "^1.0.8",
|
|
76
77
|
"fake-indexeddb": "^6.2.5",
|
|
77
78
|
"get-port-please": "^3.2.0",
|
|
78
79
|
"h3": "^1.15.4",
|
|
79
80
|
"local-pkg": "^1.1.2",
|
|
80
81
|
"magic-string": "^0.30.21",
|
|
81
82
|
"node-fetch-native": "^1.6.7",
|
|
82
|
-
"node-mock-http": "^1.0.
|
|
83
|
+
"node-mock-http": "^1.0.4",
|
|
83
84
|
"ofetch": "^1.5.1",
|
|
84
85
|
"pathe": "^2.0.3",
|
|
85
86
|
"perfect-debounce": "^2.0.0",
|
|
@@ -88,19 +89,19 @@
|
|
|
88
89
|
"std-env": "^3.10.0",
|
|
89
90
|
"tinyexec": "^1.0.2",
|
|
90
91
|
"ufo": "^1.6.1",
|
|
91
|
-
"unplugin": "^2.3.
|
|
92
|
+
"unplugin": "^2.3.11",
|
|
92
93
|
"vitest-environment-nuxt": "^1.0.1",
|
|
93
|
-
"vue": "^3.5.
|
|
94
|
+
"vue": "^3.5.25"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
|
-
"@cucumber/cucumber": "12.
|
|
97
|
+
"@cucumber/cucumber": "12.3.0",
|
|
97
98
|
"@jest/globals": "30.2.0",
|
|
98
99
|
"@nuxt/devtools-kit": "2.7.0",
|
|
99
|
-
"@nuxt/eslint-config": "1.
|
|
100
|
-
"@nuxt/schema": "4.1
|
|
101
|
-
"@playwright/test": "1.
|
|
100
|
+
"@nuxt/eslint-config": "1.11.0",
|
|
101
|
+
"@nuxt/schema": "4.2.1",
|
|
102
|
+
"@playwright/test": "1.57.0",
|
|
102
103
|
"@testing-library/vue": "8.1.0",
|
|
103
|
-
"@types/bun": "1.3.
|
|
104
|
+
"@types/bun": "1.3.4",
|
|
104
105
|
"@types/estree": "1.0.8",
|
|
105
106
|
"@types/jsdom": "27.0.0",
|
|
106
107
|
"@types/node": "latest",
|
|
@@ -110,20 +111,20 @@
|
|
|
110
111
|
"compatx": "0.2.0",
|
|
111
112
|
"eslint": "9.39.1",
|
|
112
113
|
"installed-check": "9.3.0",
|
|
113
|
-
"knip": "5.
|
|
114
|
+
"knip": "5.72.0",
|
|
114
115
|
"nitropack": "2.12.9",
|
|
115
|
-
"nuxt": "4.1
|
|
116
|
-
"pkg-pr-new": "0.0.
|
|
117
|
-
"playwright-core": "1.
|
|
118
|
-
"rollup": "4.53.
|
|
116
|
+
"nuxt": "4.2.1",
|
|
117
|
+
"pkg-pr-new": "0.0.62",
|
|
118
|
+
"playwright-core": "1.57.0",
|
|
119
|
+
"rollup": "4.53.3",
|
|
119
120
|
"semver": "7.7.3",
|
|
120
121
|
"typescript": "5.9.3",
|
|
121
122
|
"unbuild": "latest",
|
|
122
123
|
"unimport": "5.5.0",
|
|
123
|
-
"vite": "7.2.
|
|
124
|
+
"vite": "7.2.7",
|
|
124
125
|
"vitest": "3.2.4",
|
|
125
126
|
"vue-router": "4.6.3",
|
|
126
|
-
"vue-tsc": "3.1.
|
|
127
|
+
"vue-tsc": "3.1.7"
|
|
127
128
|
},
|
|
128
129
|
"peerDependencies": {
|
|
129
130
|
"@cucumber/cucumber": "^10.3.1 || >=11.0.0",
|
|
@@ -169,19 +170,18 @@
|
|
|
169
170
|
}
|
|
170
171
|
},
|
|
171
172
|
"resolutions": {
|
|
172
|
-
"@cucumber/cucumber": "12.
|
|
173
|
-
"@nuxt/
|
|
174
|
-
"@nuxt/schema": "4.1.3",
|
|
173
|
+
"@cucumber/cucumber": "12.3.0",
|
|
174
|
+
"@nuxt/schema": "4.2.1",
|
|
175
175
|
"@nuxt/test-utils": "workspace:*",
|
|
176
|
-
"@types/node": "
|
|
177
|
-
"rollup": "4.53.
|
|
178
|
-
"vite": "7.2.
|
|
179
|
-
"vite-node": "
|
|
176
|
+
"@types/node": "24.10.1",
|
|
177
|
+
"rollup": "4.53.3",
|
|
178
|
+
"vite": "7.2.7",
|
|
179
|
+
"vite-node": "5.2.0",
|
|
180
180
|
"vitest": "3.2.4",
|
|
181
|
-
"vue": "^3.5.
|
|
181
|
+
"vue": "^3.5.25"
|
|
182
182
|
},
|
|
183
183
|
"engines": {
|
|
184
184
|
"node": "^20.0.0 || ^22.0.0 || >=24.0.0"
|
|
185
185
|
},
|
|
186
|
-
"packageManager": "pnpm@10.
|
|
186
|
+
"packageManager": "pnpm@10.25.0"
|
|
187
187
|
}
|