@nx/jest 19.0.0-beta.1 → 19.0.0-beta.2

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": "19.0.0-beta.1",
3
+ "version": "19.0.0-beta.2",
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": {
@@ -36,8 +36,8 @@
36
36
  "dependencies": {
37
37
  "@jest/reporters": "^29.4.1",
38
38
  "@jest/test-result": "^29.4.1",
39
- "@nx/devkit": "19.0.0-beta.1",
40
- "@nx/js": "19.0.0-beta.1",
39
+ "@nx/devkit": "19.0.0-beta.2",
40
+ "@nx/js": "19.0.0-beta.2",
41
41
  "@phenomnomnominal/tsquery": "~5.0.1",
42
42
  "chalk": "^4.1.0",
43
43
  "identity-obj-proxy": "3.0.0",
@@ -48,7 +48,7 @@
48
48
  "resolve.exports": "1.1.0",
49
49
  "tslib": "^2.3.0",
50
50
  "yargs-parser": "21.1.1",
51
- "@nrwl/jest": "19.0.0-beta.1"
51
+ "@nrwl/jest": "19.0.0-beta.2"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"
@@ -8,6 +8,7 @@ const fs_1 = require("fs");
8
8
  const jest_config_1 = require("jest-config");
9
9
  const cache_directory_1 = require("nx/src/utils/cache-directory");
10
10
  const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
11
+ const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
11
12
  const package_json_workspaces_1 = require("nx/src/plugins/package-json-workspaces");
12
13
  const globs_1 = require("nx/src/utils/globs");
13
14
  const minimatch_1 = require("minimatch");
@@ -67,19 +68,10 @@ exports.createNodes = [
67
68
  };
68
69
  },
69
70
  ];
70
- const jestValidatePath = (0, path_1.dirname)(require.resolve('jest-validate/package.json', {
71
- paths: [(0, path_1.dirname)(require.resolve('jest-config'))],
72
- }));
73
71
  async function buildJestTargets(configFilePath, projectRoot, options, context) {
74
72
  const absConfigFilePath = (0, path_1.resolve)(context.workspaceRoot, configFilePath);
75
73
  if (require.cache[absConfigFilePath]) {
76
- for (const k of Object.keys(require.cache)) {
77
- // Only delete the cache outside of jest-validate
78
- // jest-validate has a Symbol which is important for jest config validation which breaks if the require cache is broken
79
- if ((0, path_1.relative)(jestValidatePath, k).startsWith('../')) {
80
- delete require.cache[k];
81
- }
82
- }
74
+ (0, config_utils_1.clearRequireCache)();
83
75
  }
84
76
  const config = await (0, jest_config_1.readConfig)({
85
77
  _: [],