@nx/vitest 23.0.0-beta.22 → 23.0.0-beta.23
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateDependencies,
|
|
1
|
+
import { CreateDependencies, CreateNodes } from '@nx/devkit';
|
|
2
2
|
export interface VitestPluginOptions {
|
|
3
3
|
testTargetName?: string;
|
|
4
4
|
/**
|
|
@@ -20,5 +20,5 @@ export interface VitestPluginOptions {
|
|
|
20
20
|
* @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
|
|
21
21
|
*/
|
|
22
22
|
export declare const createDependencies: CreateDependencies;
|
|
23
|
-
export declare const createNodes:
|
|
24
|
-
export declare const createNodesV2:
|
|
23
|
+
export declare const createNodes: CreateNodes<VitestPluginOptions>;
|
|
24
|
+
export declare const createNodesV2: CreateNodes<VitestPluginOptions>;
|
|
@@ -215,8 +215,26 @@ async function testTarget(namedInputs, outputs, projectRoot, testMode = 'watch',
|
|
|
215
215
|
options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
|
|
216
216
|
cache: true,
|
|
217
217
|
inputs: [
|
|
218
|
+
// Vitest runs on Vite, which transforms a dependency's sources and
|
|
219
|
+
// resolves their TypeScript project references. When a dependency's root
|
|
220
|
+
// tsconfig references its tsconfig.spec.json / tsconfig.storybook.json,
|
|
221
|
+
// those files are read during resolution, yet the `production` named
|
|
222
|
+
// input excludes them (so `^production` does not cover them). When
|
|
223
|
+
// `production` is in use, declare them explicitly so the dependency's
|
|
224
|
+
// spec/storybook tsconfigs are tracked as inputs.
|
|
218
225
|
...('production' in namedInputs
|
|
219
|
-
? [
|
|
226
|
+
? [
|
|
227
|
+
'default',
|
|
228
|
+
'^production',
|
|
229
|
+
{
|
|
230
|
+
fileset: '{projectRoot}/tsconfig.spec.json',
|
|
231
|
+
dependencies: true,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
fileset: '{projectRoot}/tsconfig.storybook.json',
|
|
235
|
+
dependencies: true,
|
|
236
|
+
},
|
|
237
|
+
]
|
|
220
238
|
: ['default', '^default']),
|
|
221
239
|
...tsconfigInputs.map((f) => ({
|
|
222
240
|
json: `{workspaceRoot}/${f}`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/vitest",
|
|
3
3
|
"description": "The Nx Plugin for Vitest to enable fast unit testing with Vitest.",
|
|
4
|
-
"version": "23.0.0-beta.
|
|
4
|
+
"version": "23.0.0-beta.23",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"tslib": "^2.3.0",
|
|
74
74
|
"semver": "^7.6.3",
|
|
75
75
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
76
|
-
"@nx/devkit": "23.0.0-beta.
|
|
77
|
-
"@nx/js": "23.0.0-beta.
|
|
76
|
+
"@nx/devkit": "23.0.0-beta.23",
|
|
77
|
+
"@nx/js": "23.0.0-beta.23"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"vitest": "^3.0.0 || ^4.0.0",
|
|
81
81
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
82
|
-
"@nx/eslint": "23.0.0-beta.
|
|
82
|
+
"@nx/eslint": "23.0.0-beta.23"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"@nx/eslint": {
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"nx": "23.0.0-beta.
|
|
96
|
+
"nx": "23.0.0-beta.23"
|
|
97
97
|
}
|
|
98
98
|
}
|