@nx/jest 22.6.4 → 22.6.5

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.6.4",
3
+ "version": "22.6.5",
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.6.4",
41
- "@nx/js": "22.6.4",
40
+ "@nx/devkit": "22.6.5",
41
+ "@nx/js": "22.6.5",
42
42
  "@phenomnomnominal/tsquery": "~6.1.4",
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.6.4"
55
+ "nx": "22.6.5"
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,EAGL,aAAa,EASd,MAAM,YAAY,CAAC;AA6BpB,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;AAmBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAiFxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
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;AA4BpB,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;AAmBD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAsFxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
@@ -16,7 +16,6 @@ const installation_directory_1 = require("nx/src/utils/installation-directory");
16
16
  const plugins_1 = require("nx/src/utils/plugins");
17
17
  const workspace_context_1 = require("nx/src/utils/workspace-context");
18
18
  const versions_1 = require("../utils/versions");
19
- const pmc = (0, devkit_1.getPackageManagerCommand)();
20
19
  const REPORTER_BUILTINS = new Set(['default', 'github-actions', 'summary']);
21
20
  function readTargetsCache(cachePath) {
22
21
  return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, node_fs_1.existsSync)(cachePath)
@@ -37,6 +36,7 @@ exports.createNodes = [
37
36
  const presetCache = {};
38
37
  const isInPackageManagerWorkspaces = buildPackageJsonWorkspacesMatcher(context.workspaceRoot);
39
38
  options = normalizeOptions(options);
39
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
40
40
  const { roots: projectRoots, configFiles: validConfigFiles } = configFiles.reduce((acc, configFile) => {
41
41
  const potentialRoot = (0, node_path_1.dirname)(configFile);
42
42
  if (checkIfConfigFileShouldBeProject(configFile, potentialRoot, isInPackageManagerWorkspaces, context)) {
@@ -53,7 +53,7 @@ exports.createNodes = [
53
53
  return await (0, devkit_1.createNodesFromFiles)(async (configFilePath, options, context, idx) => {
54
54
  const projectRoot = projectRoots[idx];
55
55
  const hash = hashes[idx];
56
- targetsCache[hash] ??= await buildJestTargets(configFilePath, projectRoot, options, context, presetCache);
56
+ targetsCache[hash] ??= await buildJestTargets(configFilePath, projectRoot, options, context, presetCache, pmc);
57
57
  const { targets, metadata } = targetsCache[hash];
58
58
  return {
59
59
  projects: {
@@ -103,7 +103,7 @@ function checkIfConfigFileShouldBeProject(configFilePath, projectRoot, isInPacka
103
103
  }
104
104
  return true;
105
105
  }
106
- async function buildJestTargets(configFilePath, projectRoot, options, context, presetCache) {
106
+ async function buildJestTargets(configFilePath, projectRoot, options, context, presetCache, pmc) {
107
107
  const absConfigFilePath = (0, node_path_1.resolve)(context.workspaceRoot, configFilePath);
108
108
  if (require.cache[absConfigFilePath])
109
109
  (0, config_utils_1.clearRequireCache)();