@nx/jest 21.4.0 → 21.4.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/package.json +4 -4
- package/plugins/resolver.js +2 -1
- package/src/executors/jest/schema.json +6 -0
- package/src/generators/configuration/lib/update-workspace.d.ts +2 -2
- package/src/generators/configuration/lib/update-workspace.d.ts.map +1 -1
- package/src/generators/configuration/lib/update-workspace.js +6 -1
- package/src/plugins/plugin.d.ts.map +1 -1
- package/src/plugins/plugin.js +3 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/jest",
|
|
3
|
-
"version": "21.4.
|
|
3
|
+
"version": "21.4.1",
|
|
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": "21.4.
|
|
41
|
-
"@nx/js": "21.4.
|
|
40
|
+
"@nx/devkit": "21.4.1",
|
|
41
|
+
"@nx/js": "21.4.1",
|
|
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": "21.4.
|
|
55
|
+
"nx": "21.4.1"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
package/plugins/resolver.js
CHANGED
|
@@ -9,7 +9,8 @@ const jestMajorVersion = Number((0, jest_1.getVersion)().split('.')[0]);
|
|
|
9
9
|
function getCompilerSetup(rootDir) {
|
|
10
10
|
const tsConfigPath = ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.spec.json') ||
|
|
11
11
|
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.test.json') ||
|
|
12
|
-
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.jest.json')
|
|
12
|
+
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.jest.json') ||
|
|
13
|
+
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.json');
|
|
13
14
|
if (!tsConfigPath) {
|
|
14
15
|
console.error(`Cannot locate a tsconfig.spec.json. Please create one at ${rootDir}/tsconfig.spec.json`);
|
|
15
16
|
}
|
|
@@ -59,6 +59,12 @@
|
|
|
59
59
|
"index": 0
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
+
"tsConfig": {
|
|
63
|
+
"description": "The path to the TypeScript configuration file, relative to the workspace root. Note this is only metadata used by Angular migrations. This executor does not use it.",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"x-completion-type": "file",
|
|
66
|
+
"x-completion-glob": "tsconfig.*.json"
|
|
67
|
+
},
|
|
62
68
|
"setupFile": {
|
|
63
69
|
"description": "The name of a setup file used by Jest.",
|
|
64
70
|
"type": "string",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { NormalizedJestProjectSchema } from '../schema';
|
|
3
3
|
export declare function updateWorkspace(tree: Tree, options: NormalizedJestProjectSchema): void;
|
|
4
4
|
//# sourceMappingURL=update-workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-workspace.d.ts","sourceRoot":"","sources":["../../../../../../../packages/jest/src/generators/configuration/lib/update-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"update-workspace.d.ts","sourceRoot":"","sources":["../../../../../../../packages/jest/src/generators/configuration/lib/update-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,IAAI,EAEV,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAE7D,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,2BAA2B,QAiCrC"}
|
|
@@ -15,8 +15,13 @@ function updateWorkspace(tree, options) {
|
|
|
15
15
|
: (0, devkit_1.joinPathFragments)('{workspaceRoot}', 'coverage', options.rootProject ? '{projectName}' : '{projectRoot}'),
|
|
16
16
|
],
|
|
17
17
|
options: {
|
|
18
|
-
jestConfig: (0, devkit_1.joinPathFragments)(
|
|
18
|
+
jestConfig: (0, devkit_1.joinPathFragments)(projectConfig.root, `jest.config.${options.js ? 'js' : 'ts'}`),
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
|
+
if (options.setupFile === 'angular') {
|
|
22
|
+
// We set the tsConfig in the target options so Angular migrations can discover it
|
|
23
|
+
projectConfig.targets[options.targetName].options.tsConfig =
|
|
24
|
+
(0, devkit_1.joinPathFragments)(projectConfig.root, 'tsconfig.spec.json');
|
|
25
|
+
}
|
|
21
26
|
(0, devkit_1.updateProjectConfiguration)(tree, options.project, projectConfig);
|
|
22
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAIX,aAAa,EAUd,MAAM,YAAY,CAAC;AAqBpB,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;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAIX,aAAa,EAUd,MAAM,YAAY,CAAC;AAqBpB,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,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAiF1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,iBAAiB,CA4CtD,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -18,7 +18,9 @@ const installation_directory_1 = require("nx/src/utils/installation-directory");
|
|
|
18
18
|
const semver_1 = require("semver");
|
|
19
19
|
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
20
20
|
function readTargetsCache(cachePath) {
|
|
21
|
-
return
|
|
21
|
+
return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, fs_1.existsSync)(cachePath)
|
|
22
|
+
? (0, devkit_1.readJsonFile)(cachePath)
|
|
23
|
+
: {};
|
|
22
24
|
}
|
|
23
25
|
function writeTargetsToCache(cachePath, results) {
|
|
24
26
|
(0, devkit_1.writeJsonFile)(cachePath, results);
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export declare const jestTypesVersion = "^30.0.0";
|
|
|
5
5
|
export declare const tsJestVersion = "^29.4.0";
|
|
6
6
|
export declare const tslibVersion = "^2.3.0";
|
|
7
7
|
export declare const swcJestVersion = "~0.2.38";
|
|
8
|
-
export declare const typesNodeVersion = "
|
|
8
|
+
export declare const typesNodeVersion = "20.19.9";
|
|
9
9
|
export declare const tsNodeVersion = "10.9.1";
|
|
10
10
|
//# sourceMappingURL=versions.d.ts.map
|
package/src/utils/versions.js
CHANGED