@nx/jest 23.0.0-beta.5 → 23.0.0-beta.6

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": "23.0.0-beta.5",
3
+ "version": "23.0.0-beta.6",
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": {
@@ -38,8 +38,8 @@
38
38
  "dependencies": {
39
39
  "@jest/reporters": "^30.0.2",
40
40
  "@jest/test-result": "^30.0.2",
41
- "@nx/devkit": "23.0.0-beta.5",
42
- "@nx/js": "23.0.0-beta.5",
41
+ "@nx/devkit": "23.0.0-beta.6",
42
+ "@nx/js": "23.0.0-beta.6",
43
43
  "@phenomnomnominal/tsquery": "~6.1.4",
44
44
  "identity-obj-proxy": "3.0.0",
45
45
  "jest-config": "^30.0.2",
@@ -53,7 +53,7 @@
53
53
  "yargs-parser": "21.1.1"
54
54
  },
55
55
  "devDependencies": {
56
- "nx": "23.0.0-beta.5"
56
+ "nx": "23.0.0-beta.6"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAepB,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,iBA0BlE;AA8DD,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAOpB,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,iBA0BlE;AA8DD,eAAe,iBAAiB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToInferred = convertToInferred;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
6
- const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
7
6
  const jest_config_1 = require("jest-config");
8
7
  const node_path_1 = require("node:path");
9
8
  const plugin_1 = require("../../plugins/plugin");
@@ -11,7 +10,7 @@ const config_file_1 = require("../../utils/config/config-file");
11
10
  const versions_1 = require("../../utils/versions");
12
11
  async function convertToInferred(tree, options) {
13
12
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
14
- const migratedProjects = await (0, executor_to_plugin_migrator_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/jest/plugin', plugin_1.createNodesV2, { targetName: 'test' }, [
13
+ const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/jest/plugin', plugin_1.createNodesV2, { targetName: 'test' }, [
15
14
  {
16
15
  executors: ['@nx/jest:jest', '@nrwl/jest:jest'],
17
16
  postTargetTransformer,
@@ -19,7 +18,7 @@ async function convertToInferred(tree, options) {
19
18
  },
20
19
  ], options.project);
21
20
  if (migratedProjects.size === 0) {
22
- throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
21
+ throw new internal_1.NoTargetsToMigrateError();
23
22
  }
24
23
  if (!options.skipFormat) {
25
24
  await (0, devkit_1.formatFiles)(tree);
@@ -49,7 +48,7 @@ async function postTargetTransformer(target, tree, projectDetails, inferredTarge
49
48
  }
50
49
  }
51
50
  if (target.outputs) {
52
- (0, plugin_migration_utils_1.processTargetOutputs)(target, [], inferredTarget, {
51
+ (0, internal_1.processTargetOutputs)(target, [], inferredTarget, {
53
52
  projectName: projectDetails.projectName,
54
53
  projectRoot: projectDetails.root,
55
54
  });
@@ -68,11 +67,11 @@ async function updateOptionsObject(tree, targetOptions, projectRoot, workspaceRo
68
67
  async function updateConfigurationObject(tree, targetOptions, projectRoot, workspaceRoot, defaultJestConfigPath) {
69
68
  const jestConfigPath = targetOptions.jestConfig ?? defaultJestConfigPath;
70
69
  if (targetOptions.jestConfig) {
71
- targetOptions.config = (0, plugin_migration_utils_1.toProjectRelativePath)(targetOptions.jestConfig, projectRoot);
70
+ targetOptions.config = (0, internal_1.toProjectRelativePath)(targetOptions.jestConfig, projectRoot);
72
71
  delete targetOptions.jestConfig;
73
72
  }
74
73
  else if (targetOptions.config) {
75
- targetOptions.config = (0, plugin_migration_utils_1.toProjectRelativePath)(targetOptions.config, projectRoot);
74
+ targetOptions.config = (0, internal_1.toProjectRelativePath)(targetOptions.config, projectRoot);
76
75
  }
77
76
  await updateOptions(tree, targetOptions, projectRoot, workspaceRoot, jestConfigPath);
78
77
  }
@@ -127,7 +126,7 @@ async function updateOptions(tree, targetOptions, projectRoot, workspaceRoot, je
127
126
  // the executor accepts a comma-separated string, while jest accepts a space-separated string
128
127
  const parsedSourceFiles = targetOptions.findRelatedTests
129
128
  .split(',')
130
- .map((s) => (0, plugin_migration_utils_1.toProjectRelativePath)(s.trim(), projectRoot))
129
+ .map((s) => (0, internal_1.toProjectRelativePath)(s.trim(), projectRoot))
131
130
  .join(' ');
132
131
  targetOptions.args = [`--findRelatedTests ${parsedSourceFiles}`];
133
132
  delete targetOptions.findRelatedTests;
@@ -151,11 +150,11 @@ async function updateOptions(tree, targetOptions, projectRoot, workspaceRoot, je
151
150
  }
152
151
  if ('outputFile' in targetOptions) {
153
152
  // update the output file to be relative to the project root
154
- targetOptions.outputFile = (0, plugin_migration_utils_1.toProjectRelativePath)(targetOptions.outputFile, projectRoot);
153
+ targetOptions.outputFile = (0, internal_1.toProjectRelativePath)(targetOptions.outputFile, projectRoot);
155
154
  }
156
155
  if ('coverageDirectory' in targetOptions) {
157
156
  // update the coverage directory to be relative to the project root
158
- targetOptions.coverageDirectory = (0, plugin_migration_utils_1.toProjectRelativePath)(targetOptions.coverageDirectory, projectRoot);
157
+ targetOptions.coverageDirectory = (0, internal_1.toProjectRelativePath)(targetOptions.coverageDirectory, projectRoot);
159
158
  }
160
159
  }
161
160
  async function processSetupFiles(setupFile, setupFilesAfterEnv, projectRoot, workspaceRoot, jestConfigPath) {
@@ -167,11 +166,11 @@ async function processSetupFiles(setupFile, setupFilesAfterEnv, projectRoot, wor
167
166
  if (jestConfigPath) {
168
167
  const jestConfig = await (0, jest_config_1.readConfig)({ setupFilesAfterEnv }, (0, node_path_1.join)(workspaceRoot, jestConfigPath));
169
168
  if (jestConfig.projectConfig.setupFilesAfterEnv) {
170
- configSetupFilesAfterEnv.push(...jestConfig.projectConfig.setupFilesAfterEnv.map((file) => (0, plugin_migration_utils_1.toProjectRelativePath)(file, projectRoot)));
169
+ configSetupFilesAfterEnv.push(...jestConfig.projectConfig.setupFilesAfterEnv.map((file) => (0, internal_1.toProjectRelativePath)(file, projectRoot)));
171
170
  }
172
171
  }
173
172
  if (!configSetupFilesAfterEnv.length) {
174
- return [(0, plugin_migration_utils_1.toProjectRelativePath)(setupFile, projectRoot)];
173
+ return [(0, internal_1.toProjectRelativePath)(setupFile, projectRoot)];
175
174
  }
176
175
  if (isSetupFileInConfig(configSetupFilesAfterEnv, setupFile, projectRoot, workspaceRoot)) {
177
176
  // the setupFile is already included in the setupFilesAfterEnv
@@ -179,7 +178,7 @@ async function processSetupFiles(setupFile, setupFilesAfterEnv, projectRoot, wor
179
178
  }
180
179
  return [
181
180
  ...configSetupFilesAfterEnv,
182
- (0, plugin_migration_utils_1.toProjectRelativePath)(setupFile, projectRoot),
181
+ (0, internal_1.toProjectRelativePath)(setupFile, projectRoot),
183
182
  ];
184
183
  }
185
184
  function isSetupFileInConfig(setupFilesAfterEnv, setupFile, projectRoot, workspaceRoot) {
@@ -187,7 +186,7 @@ function isSetupFileInConfig(setupFilesAfterEnv, setupFile, projectRoot, workspa
187
186
  ? node_path_1.posix.join(workspaceRoot, projectRoot, f.slice('<rootDir>'.length))
188
187
  : node_path_1.posix.join(workspaceRoot, projectRoot, f);
189
188
  const normalizedSetupFiles = new Set(setupFilesAfterEnv.map(normalizePath));
190
- return normalizedSetupFiles.has(normalizePath((0, plugin_migration_utils_1.toProjectRelativePath)(setupFile, projectRoot)));
189
+ return normalizedSetupFiles.has(normalizePath((0, internal_1.toProjectRelativePath)(setupFile, projectRoot)));
191
190
  }
192
191
  function toProjectRelativeRegexPath(path, projectRoot) {
193
192
  if (projectRoot === '.') {
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAuE/C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,8BAEpE;AAED,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA2C5B;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAWpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAuE/C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,8BAEpE;AAED,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA2C5B;AAED,eAAe,iBAAiB,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jestInitGenerator = jestInitGenerator;
4
4
  exports.jestInitGeneratorInternal = jestInitGeneratorInternal;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
7
7
  const plugin_1 = require("../../plugins/plugin");
8
8
  const config_file_1 = require("../../utils/config/config-file");
9
9
  const versions_1 = require("../../utils/versions");
@@ -73,7 +73,7 @@ async function jestInitGeneratorInternal(tree, options) {
73
73
  if (!tree.exists(`jest.preset.${presetExt}`)) {
74
74
  updateProductionFileSet(tree);
75
75
  if (options.addPlugin) {
76
- await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/jest/plugin', plugin_1.createNodesV2, {
76
+ await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/jest/plugin', plugin_1.createNodesV2, {
77
77
  targetName: ['test', 'jest:test', 'jest-test'],
78
78
  }, options.updatePackageScripts);
79
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remove-tsconfig-option-from-jest-executor.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAKpB,yBAA+B,IAAI,EAAE,IAAI,iBA8DxC"}
1
+ {"version":3,"file":"remove-tsconfig-option-from-jest-executor.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAIpB,yBAA+B,IAAI,EAAE,IAAI,iBA8DxC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const EXECUTOR_TO_MIGRATE = '@nx/jest:jest';
7
7
  async function default_1(tree) {
8
8
  // update options from project configs
9
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, EXECUTOR_TO_MIGRATE, (options, project, target, configuration) => {
9
+ (0, internal_1.forEachExecutorOptions)(tree, EXECUTOR_TO_MIGRATE, (options, project, target, configuration) => {
10
10
  if (options.tsConfig === undefined) {
11
11
  return;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rename-test-path-pattern.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/migrations/update-21-3-0/rename-test-path-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAKpB,yBAA+B,IAAI,EAAE,IAAI,iBA6CxC"}
1
+ {"version":3,"file":"rename-test-path-pattern.d.ts","sourceRoot":"","sources":["../../../../../../packages/jest/src/migrations/update-21-3-0/rename-test-path-pattern.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,yBAA+B,IAAI,EAAE,IAAI,iBA6CxC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  // migration for https://github.com/jestjs/jest/commit/41133b526d2c17bc9758f90d6026b25301cf0552
7
7
  async function default_1(tree) {
8
8
  // update options from project configs
9
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/jest:jest', (_, project, target, configuration) => {
9
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/jest:jest', (_, project, target, configuration) => {
10
10
  const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, project);
11
11
  const config = configuration
12
12
  ? projectConfiguration.targets[target].configurations[configuration]
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EAUd,MAAM,YAAY,CAAC;AAiCpB,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;IAC7B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAwBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CA8IxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/jest/src/plugins/plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,aAAa,EAQd,MAAM,YAAY,CAAC;AA2BpB,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;IAC7B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAWD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAmJxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodesV2 = exports.createNodes = void 0;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
6
- const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
7
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
8
6
  const minimatch_1 = require("minimatch");
9
7
  const node_fs_1 = require("node:fs");
10
8
  const node_path_1 = require("node:path");
@@ -16,24 +14,16 @@ const installation_directory_1 = require("nx/src/utils/installation-directory");
16
14
  const plugins_1 = require("nx/src/utils/plugins");
17
15
  const workspace_context_1 = require("nx/src/utils/workspace-context");
18
16
  const js_1 = require("@nx/js");
19
- const internal_1 = require("@nx/js/src/internal");
17
+ const internal_2 = require("@nx/js/src/internal");
20
18
  const versions_1 = require("../utils/versions");
21
19
  const REPORTER_BUILTINS = new Set(['default', 'github-actions', 'summary']);
22
- function readTargetsCache(cachePath) {
23
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, node_fs_1.existsSync)(cachePath)
24
- ? (0, devkit_1.readJsonFile)(cachePath)
25
- : {};
26
- }
27
- function writeTargetsToCache(cachePath, results) {
28
- (0, devkit_1.writeJsonFile)(cachePath, results);
29
- }
30
20
  const jestConfigGlob = '**/jest.config.{cjs,mjs,js,cts,mts,ts}';
31
21
  exports.createNodes = [
32
22
  jestConfigGlob,
33
23
  async (configFiles, options, context) => {
34
24
  const optionsHash = (0, devkit_internals_1.hashObject)(options);
35
25
  const cachePath = (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `jest-${optionsHash}.hash`);
36
- const targetsCache = readTargetsCache(cachePath);
26
+ const targetsCache = new internal_1.PluginCache(cachePath);
37
27
  // Cache jest preset(s) to avoid penalties of module load times. Most of jest configs will use the same preset.
38
28
  const presetCache = {};
39
29
  // Cache tsconfig reads + isolatedModules resolution. Many projects share
@@ -70,10 +60,10 @@ exports.createNodes = [
70
60
  const projectRoot = projectRoots[i];
71
61
  const absConfigFilePath = (0, node_path_1.resolve)(context.workspaceRoot, configFilePath);
72
62
  if (!requireCacheCleared && require.cache[absConfigFilePath]) {
73
- (0, config_utils_1.clearRequireCache)();
63
+ (0, internal_1.clearRequireCache)();
74
64
  requireCacheCleared = true;
75
65
  }
76
- const rawConfig = await (0, config_utils_1.loadConfigFile)(absConfigFilePath, [
66
+ const rawConfig = await (0, internal_1.loadConfigFile)(absConfigFilePath, [
77
67
  'tsconfig.spec.json',
78
68
  'tsconfig.test.json',
79
69
  'tsconfig.jest.json',
@@ -87,7 +77,7 @@ exports.createNodes = [
87
77
  });
88
78
  return { rawConfig, externalFiles, needsDtsInputs };
89
79
  }));
90
- const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, options, context, loadedConfigs.map(({ externalFiles }) => [
80
+ const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, options, context, loadedConfigs.map(({ externalFiles }) => [
91
81
  lockFilePattern,
92
82
  ...externalFiles,
93
83
  ]));
@@ -96,8 +86,10 @@ exports.createNodes = [
96
86
  const projectRoot = projectRoots[idx];
97
87
  const hash = hashes[idx];
98
88
  const { rawConfig, needsDtsInputs } = loadedConfigs[idx];
99
- targetsCache[hash] ??= await buildJestTargets(rawConfig, needsDtsInputs, configFilePath, projectRoot, options, context, presetCache, pmc);
100
- const { targets, metadata } = targetsCache[hash];
89
+ if (!targetsCache.has(hash)) {
90
+ targetsCache.set(hash, await buildJestTargets(rawConfig, needsDtsInputs, configFilePath, projectRoot, options, context, presetCache, pmc));
91
+ }
92
+ const { targets, metadata } = targetsCache.get(hash);
101
93
  return {
102
94
  projects: {
103
95
  [projectRoot]: {
@@ -110,7 +102,7 @@ exports.createNodes = [
110
102
  }, validConfigFiles, options, context);
111
103
  }
112
104
  finally {
113
- writeTargetsToCache(cachePath, targetsCache);
105
+ targetsCache.writeToDisk();
114
106
  }
115
107
  },
116
108
  ];
@@ -149,7 +141,7 @@ function checkIfConfigFileShouldBeProject(configFilePath, projectRoot, isInPacka
149
141
  async function buildJestTargets(rawConfig, needsDtsInputs, configFilePath, projectRoot, options, context, presetCache, pmc) {
150
142
  const absConfigFilePath = (0, node_path_1.resolve)(context.workspaceRoot, configFilePath);
151
143
  const targets = {};
152
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
144
+ const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
153
145
  const tsNodeCompilerOptions = JSON.stringify({
154
146
  moduleResolution: 'node10',
155
147
  module: 'commonjs',
@@ -721,7 +713,7 @@ async function loadPresetConfig(rawConfig, rootDir, presetCache) {
721
713
  }
722
714
  try {
723
715
  if (!presetCache[presetPath]) {
724
- presetCache[presetPath] = (0, config_utils_1.loadConfigFile)(presetPath);
716
+ presetCache[presetPath] = (0, internal_1.loadConfigFile)(presetPath);
725
717
  }
726
718
  return (await presetCache[presetPath]);
727
719
  }
@@ -885,7 +877,7 @@ function resolveIsolatedModules(tsconfigPath, jsonCache, resultCache) {
885
877
  return cached;
886
878
  let value;
887
879
  const visitedFiles = new Set();
888
- (0, internal_1.walkTsconfigExtendsChain)(tsconfigPath, (absPath, rawJson) => {
880
+ (0, internal_2.walkTsconfigExtendsChain)(tsconfigPath, (absPath, rawJson) => {
889
881
  visitedFiles.add(absPath);
890
882
  const opts = rawJson?.compilerOptions;
891
883
  if (opts?.isolatedModules !== undefined) {