@nuxt/test-utils 3.19.0 → 3.19.1
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.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vite from 'vite';
|
|
2
|
+
import { UserConfig } from 'vite';
|
|
2
3
|
import { NuxtConfig, Nuxt } from '@nuxt/schema';
|
|
3
4
|
import { InlineConfig } from 'vitest/node';
|
|
4
5
|
import { TestProjectInlineConfiguration } from 'vitest/config';
|
|
5
6
|
import { DotenvOptions } from 'c12';
|
|
6
|
-
import { UserConfig } from 'vite';
|
|
7
7
|
|
|
8
8
|
interface GetVitestConfigOptions {
|
|
9
9
|
nuxt: Nuxt;
|
|
@@ -19,7 +19,7 @@ declare function getVitestConfigFromNuxt(options?: GetVitestConfigOptions, loadN
|
|
|
19
19
|
declare function defineVitestProject(config: TestProjectInlineConfiguration): Promise<TestProjectInlineConfiguration>;
|
|
20
20
|
declare function defineVitestConfig(config?: UserConfig & {
|
|
21
21
|
test?: InlineConfig;
|
|
22
|
-
}):
|
|
22
|
+
}): vite.UserConfigFnPromise;
|
|
23
23
|
interface NuxtEnvironmentOptions {
|
|
24
24
|
rootDir?: string;
|
|
25
25
|
/**
|
package/dist/config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process$1 from 'node:process';
|
|
2
|
-
import { defineConfig } from '
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
3
|
import { setupDotenv } from 'c12';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import { createResolver, findPath, loadNuxt, buildNuxt } from '@nuxt/kit';
|
|
@@ -82,7 +82,11 @@ async function startNuxtAndGetViteConfig(rootDir = process$1.cwd(), options = {}
|
|
|
82
82
|
const excludedPlugins = [
|
|
83
83
|
"nuxt:import-protection",
|
|
84
84
|
"nuxt:import-conditions",
|
|
85
|
-
"
|
|
85
|
+
"nuxt:devtools:rpc",
|
|
86
|
+
"nuxt:devtools:config-retriever",
|
|
87
|
+
"vite-plugin-checker",
|
|
88
|
+
"vite-plugin-inspect",
|
|
89
|
+
"vite-plugin-vue-tracer"
|
|
86
90
|
];
|
|
87
91
|
async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
88
92
|
const { rootDir = process$1.cwd(), ..._overrides } = loadNuxtOptions.overrides || {};
|
|
@@ -96,12 +100,19 @@ async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
102
|
options.viteConfig.plugins = (options.viteConfig.plugins || []).filter((p) => !p || !("name" in p) || !excludedPlugins.includes(p.name));
|
|
103
|
+
const resolver = createResolver(import.meta.url);
|
|
99
104
|
const resolvedConfig = defu(
|
|
100
105
|
// overrides
|
|
101
106
|
{
|
|
102
107
|
define: {
|
|
103
108
|
"process.env.NODE_ENV": '"test"'
|
|
104
109
|
},
|
|
110
|
+
resolve: {
|
|
111
|
+
alias: {
|
|
112
|
+
"@vue/devtools-kit": resolver.resolve("./runtime/mocks/vue-devtools"),
|
|
113
|
+
"@vue/devtools-core": resolver.resolve("./runtime/mocks/vue-devtools")
|
|
114
|
+
}
|
|
115
|
+
},
|
|
105
116
|
optimizeDeps: {
|
|
106
117
|
noDiscovery: true
|
|
107
118
|
},
|
|
@@ -198,7 +209,6 @@ async function getVitestConfigFromNuxt(options, loadNuxtOptions = {}) {
|
|
|
198
209
|
if (!Array.isArray(resolvedConfig.test.setupFiles)) {
|
|
199
210
|
resolvedConfig.test.setupFiles = [resolvedConfig.test.setupFiles].filter(Boolean);
|
|
200
211
|
}
|
|
201
|
-
const resolver = createResolver(import.meta.url);
|
|
202
212
|
const entryPath = resolver.resolve("./runtime/entry");
|
|
203
213
|
resolvedConfig.test.setupFiles.unshift(await findPath(entryPath) ?? entryPath);
|
|
204
214
|
return resolvedConfig;
|
package/dist/module.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/test-utils",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/test-utils.git"
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"dev:prepare": "nuxi prepare && unbuild --stub && pnpm -r dev:prepare"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@nuxt/kit": "^3.17.
|
|
67
|
-
"@nuxt/schema": "^3.17.
|
|
68
|
-
"c12": "^3.0.
|
|
66
|
+
"@nuxt/kit": "^3.17.4",
|
|
67
|
+
"@nuxt/schema": "^3.17.4",
|
|
68
|
+
"c12": "^3.0.4",
|
|
69
69
|
"consola": "^3.4.2",
|
|
70
70
|
"defu": "^6.1.4",
|
|
71
71
|
"destr": "^2.0.5",
|
|
@@ -85,39 +85,39 @@
|
|
|
85
85
|
"std-env": "^3.9.0",
|
|
86
86
|
"tinyexec": "^1.0.1",
|
|
87
87
|
"ufo": "^1.6.1",
|
|
88
|
-
"unplugin": "^2.3.
|
|
88
|
+
"unplugin": "^2.3.4",
|
|
89
89
|
"vite": "^6.3.5",
|
|
90
90
|
"vitest-environment-nuxt": "^1.0.1",
|
|
91
|
-
"vue": "^3.5.
|
|
91
|
+
"vue": "^3.5.14"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@cucumber/cucumber": "11.
|
|
94
|
+
"@cucumber/cucumber": "11.3.0",
|
|
95
95
|
"@jest/globals": "29.7.0",
|
|
96
|
-
"@nuxt/devtools-kit": "2.4.
|
|
97
|
-
"@nuxt/eslint-config": "1.
|
|
96
|
+
"@nuxt/devtools-kit": "2.4.1",
|
|
97
|
+
"@nuxt/eslint-config": "1.4.0",
|
|
98
98
|
"@playwright/test": "1.52.0",
|
|
99
99
|
"@testing-library/vue": "8.1.0",
|
|
100
100
|
"@types/bun": "1.2.13",
|
|
101
101
|
"@types/estree": "1.0.7",
|
|
102
102
|
"@types/jsdom": "21.1.7",
|
|
103
|
-
"@types/node": "22.15.
|
|
103
|
+
"@types/node": "22.15.19",
|
|
104
104
|
"@types/semver": "7.7.0",
|
|
105
105
|
"@vue/test-utils": "2.4.6",
|
|
106
106
|
"changelogen": "0.6.1",
|
|
107
107
|
"compatx": "0.2.0",
|
|
108
|
-
"eslint": "9.
|
|
108
|
+
"eslint": "9.27.0",
|
|
109
109
|
"installed-check": "9.3.0",
|
|
110
|
-
"knip": "5.
|
|
111
|
-
"nitropack": "2.11.
|
|
112
|
-
"nuxt": "3.17.
|
|
113
|
-
"pkg-pr-new": "0.0.
|
|
110
|
+
"knip": "5.56.0",
|
|
111
|
+
"nitropack": "2.11.12",
|
|
112
|
+
"nuxt": "3.17.4",
|
|
113
|
+
"pkg-pr-new": "0.0.50",
|
|
114
114
|
"playwright-core": "1.52.0",
|
|
115
|
-
"rollup": "4.
|
|
115
|
+
"rollup": "4.41.0",
|
|
116
116
|
"semver": "7.7.2",
|
|
117
117
|
"typescript": "5.8.3",
|
|
118
118
|
"unbuild": "latest",
|
|
119
119
|
"unimport": "5.0.1",
|
|
120
|
-
"vitest": "3.1.
|
|
120
|
+
"vitest": "3.1.4",
|
|
121
121
|
"vue-router": "4.5.1",
|
|
122
122
|
"vue-tsc": "2.2.10"
|
|
123
123
|
},
|
|
@@ -165,21 +165,20 @@
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
"resolutions": {
|
|
168
|
-
"@cucumber/cucumber": "11.
|
|
169
|
-
"@nuxt/
|
|
170
|
-
"@nuxt/
|
|
171
|
-
"@nuxt/schema": "^3.17.3",
|
|
168
|
+
"@cucumber/cucumber": "11.3.0",
|
|
169
|
+
"@nuxt/kit": "^3.17.4",
|
|
170
|
+
"@nuxt/schema": "^3.17.4",
|
|
172
171
|
"@nuxt/test-utils": "workspace:*",
|
|
173
|
-
"rollup": "4.
|
|
172
|
+
"rollup": "4.41.0",
|
|
174
173
|
"vite": "^6.3.5",
|
|
175
|
-
"vite-node": "3.1.
|
|
176
|
-
"vitest": "3.1.
|
|
177
|
-
"vue": "^3.5.
|
|
174
|
+
"vite-node": "3.1.4",
|
|
175
|
+
"vitest": "3.1.4",
|
|
176
|
+
"vue": "^3.5.14"
|
|
178
177
|
},
|
|
179
178
|
"engines": {
|
|
180
179
|
"node": "^18.20.5 || ^20.9.0 || ^22.0.0 || >=23.0.0"
|
|
181
180
|
},
|
|
182
|
-
"packageManager": "pnpm@10.
|
|
181
|
+
"packageManager": "pnpm@10.11.0",
|
|
183
182
|
"pnpm": {
|
|
184
183
|
"onlyBuiltDependencies": [
|
|
185
184
|
"better-sqlite3"
|