@nx/jest 0.0.0-pr-32117-ebf1c19 → 0.0.0-pr-32111-2ec6a92
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/src/plugins/plugin.d.ts.map +1 -1
- package/src/plugins/plugin.js +3 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/jest",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-32111-2ec6a92",
|
|
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": "0.0.0-pr-
|
|
41
|
-
"@nx/js": "0.0.0-pr-
|
|
40
|
+
"@nx/devkit": "0.0.0-pr-32111-2ec6a92",
|
|
41
|
+
"@nx/js": "0.0.0-pr-32111-2ec6a92",
|
|
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": "0.0.0-pr-
|
|
55
|
+
"nx": "0.0.0-pr-32111-2ec6a92"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
@@ -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;
|
|
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;AAoBpB,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;AAiBD,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
|
@@ -15,7 +15,6 @@ const path_1 = require("path");
|
|
|
15
15
|
const workspace_context_1 = require("nx/src/utils/workspace-context");
|
|
16
16
|
const node_path_1 = require("node:path");
|
|
17
17
|
const installation_directory_1 = require("nx/src/utils/installation-directory");
|
|
18
|
-
const semver_1 = require("semver");
|
|
19
18
|
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
20
19
|
function readTargetsCache(cachePath) {
|
|
21
20
|
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
@@ -144,26 +143,13 @@ async function buildJestTargets(configFilePath, projectRoot, options, context, p
|
|
|
144
143
|
module: 'commonjs',
|
|
145
144
|
customConditions: null,
|
|
146
145
|
});
|
|
147
|
-
// Jest 30 + Node.js 24 can't parse TS configs with imports.
|
|
148
|
-
// This flag does not exist in Node 20/22.
|
|
149
|
-
// https://github.com/jestjs/jest/issues/15682
|
|
150
|
-
const nodeVersion = (0, semver_1.major)(process.version);
|
|
151
|
-
const env = {
|
|
152
|
-
TS_NODE_COMPILER_OPTIONS: tsNodeCompilerOptions,
|
|
153
|
-
};
|
|
154
|
-
if (nodeVersion >= 24) {
|
|
155
|
-
const currentOptions = process.env.NODE_OPTIONS || '';
|
|
156
|
-
if (!currentOptions.includes('--no-experimental-strip-types')) {
|
|
157
|
-
env.NODE_OPTIONS = (currentOptions + ' --no-experimental-strip-types').trim();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
146
|
const target = (targets[options.targetName] = {
|
|
161
147
|
command: 'jest',
|
|
162
148
|
options: {
|
|
163
149
|
cwd: projectRoot,
|
|
164
150
|
// Jest registers ts-node with module CJS https://github.com/SimenB/jest/blob/v29.6.4/packages/jest-config/src/readConfigFileAndSetRootDir.ts#L117-L119
|
|
165
151
|
// We want to support of ESM via 'module':'nodenext', we need to override the resolution until Jest supports it.
|
|
166
|
-
env,
|
|
152
|
+
env: { TS_NODE_COMPILER_OPTIONS: tsNodeCompilerOptions },
|
|
167
153
|
},
|
|
168
154
|
metadata: {
|
|
169
155
|
technologies: ['jest'],
|
|
@@ -222,7 +208,7 @@ async function buildJestTargets(configFilePath, projectRoot, options, context, p
|
|
|
222
208
|
outputs,
|
|
223
209
|
options: {
|
|
224
210
|
cwd: projectRoot,
|
|
225
|
-
env,
|
|
211
|
+
env: { TS_NODE_COMPILER_OPTIONS: tsNodeCompilerOptions },
|
|
226
212
|
},
|
|
227
213
|
metadata: {
|
|
228
214
|
technologies: ['jest'],
|
|
@@ -338,7 +324,7 @@ async function buildJestTargets(configFilePath, projectRoot, options, context, p
|
|
|
338
324
|
outputs,
|
|
339
325
|
options: {
|
|
340
326
|
cwd: projectRoot,
|
|
341
|
-
env,
|
|
327
|
+
env: { TS_NODE_COMPILER_OPTIONS: tsNodeCompilerOptions },
|
|
342
328
|
},
|
|
343
329
|
metadata: {
|
|
344
330
|
technologies: ['jest'],
|