@nx/jest 22.0.0-canary.20251006-738b06b → 22.0.0-canary.20251008-05ab516
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/jest",
|
|
3
|
-
"version": "22.0.0-canary.
|
|
3
|
+
"version": "22.0.0-canary.20251008-05ab516",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Jest contains executors and generators allowing your workspace to use the powerful Jest testing capabilities.",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@jest/reporters": "^30.0.2",
|
|
39
39
|
"@jest/test-result": "^30.0.2",
|
|
40
|
-
"@nx/devkit": "22.0.0-canary.
|
|
41
|
-
"@nx/js": "22.0.0-canary.
|
|
40
|
+
"@nx/devkit": "22.0.0-canary.20251008-05ab516",
|
|
41
|
+
"@nx/js": "22.0.0-canary.20251008-05ab516",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"identity-obj-proxy": "3.0.0",
|
|
44
44
|
"jest-config": "^30.0.2",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"yargs-parser": "21.1.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"nx": "22.0.0-canary.
|
|
55
|
+
"nx": "22.0.0-canary.20251008-05ab516"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
package/src/plugins/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
export interface JestPluginOptions {
|
|
3
3
|
targetName?: string;
|
|
4
4
|
ciTargetName?: string;
|
|
@@ -13,10 +13,6 @@ export interface JestPluginOptions {
|
|
|
13
13
|
*/
|
|
14
14
|
disableJestRuntime?: boolean;
|
|
15
15
|
}
|
|
16
|
+
export declare const createNodes: CreateNodesV2<JestPluginOptions>;
|
|
16
17
|
export declare const createNodesV2: CreateNodesV2<JestPluginOptions>;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated This is replaced with {@link createNodesV2}. Update your plugin to export its own `createNodesV2` function that wraps this one instead.
|
|
19
|
-
* This function will change to the v2 function in Nx 20.
|
|
20
|
-
*/
|
|
21
|
-
export declare const createNodes: CreateNodes<JestPluginOptions>;
|
|
22
18
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EASd,MAAM,YAAY,CAAC;AAsBpB,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAmBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAiFxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createNodesV2 = exports.createNodes = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
6
6
|
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
@@ -27,7 +27,7 @@ function writeTargetsToCache(cachePath, results) {
|
|
|
27
27
|
(0, devkit_1.writeJsonFile)(cachePath, results);
|
|
28
28
|
}
|
|
29
29
|
const jestConfigGlob = '**/jest.config.{cjs,mjs,js,cts,mts,ts}';
|
|
30
|
-
exports.
|
|
30
|
+
exports.createNodes = [
|
|
31
31
|
jestConfigGlob,
|
|
32
32
|
async (configFiles, options, context) => {
|
|
33
33
|
const optionsHash = (0, devkit_internals_1.hashObject)(options);
|
|
@@ -71,32 +71,7 @@ exports.createNodesV2 = [
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
];
|
|
74
|
-
|
|
75
|
-
* @deprecated This is replaced with {@link createNodesV2}. Update your plugin to export its own `createNodesV2` function that wraps this one instead.
|
|
76
|
-
* This function will change to the v2 function in Nx 20.
|
|
77
|
-
*/
|
|
78
|
-
exports.createNodes = [
|
|
79
|
-
jestConfigGlob,
|
|
80
|
-
async (configFilePath, options, context) => {
|
|
81
|
-
devkit_1.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will change to the createNodesV2 API.');
|
|
82
|
-
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
83
|
-
const isInPackageManagerWorkspaces = buildPackageJsonWorkspacesMatcher(context.workspaceRoot);
|
|
84
|
-
if (!checkIfConfigFileShouldBeProject(configFilePath, projectRoot, isInPackageManagerWorkspaces, context)) {
|
|
85
|
-
return {};
|
|
86
|
-
}
|
|
87
|
-
options = normalizeOptions(options);
|
|
88
|
-
const { targets, metadata } = await buildJestTargets(configFilePath, projectRoot, options, context, {});
|
|
89
|
-
return {
|
|
90
|
-
projects: {
|
|
91
|
-
[projectRoot]: {
|
|
92
|
-
root: projectRoot,
|
|
93
|
-
targets,
|
|
94
|
-
metadata,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
];
|
|
74
|
+
exports.createNodesV2 = exports.createNodes;
|
|
100
75
|
function buildPackageJsonWorkspacesMatcher(workspaceRoot) {
|
|
101
76
|
if (process.env.NX_INFER_ALL_PACKAGE_JSONS === 'true') {
|
|
102
77
|
return () => true;
|