@nx/jest 16.5.0-beta.2 → 16.5.0

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/migrations.json CHANGED
@@ -95,6 +95,12 @@
95
95
  "version": "16.0.0-beta.1",
96
96
  "description": "Replace @nrwl/jest with @nx/jest",
97
97
  "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
98
+ },
99
+ "add-test-setup-to-inputs-ignore": {
100
+ "cli": "nx",
101
+ "version": "16.5.0-beta.2",
102
+ "description": "Add test-setup.ts to ignored files in production input",
103
+ "implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore"
98
104
  }
99
105
  },
100
106
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/jest",
3
- "version": "16.5.0-beta.2",
3
+ "version": "16.5.0",
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,9 +36,9 @@
36
36
  "dependencies": {
37
37
  "@jest/reporters": "^29.4.1",
38
38
  "@jest/test-result": "^29.4.1",
39
- "@nrwl/jest": "16.5.0-beta.2",
40
- "@nx/devkit": "16.5.0-beta.2",
41
- "@nx/js": "16.5.0-beta.2",
39
+ "@nrwl/jest": "16.5.0",
40
+ "@nx/devkit": "16.5.0",
41
+ "@nx/js": "16.5.0",
42
42
  "@phenomnomnominal/tsquery": "~5.0.1",
43
43
  "chalk": "^4.1.0",
44
44
  "dotenv": "~10.0.0",
@@ -53,5 +53,5 @@
53
53
  "access": "public"
54
54
  },
55
55
  "types": "./index.d.ts",
56
- "gitHead": "efdf140459e453c50f06cf287906c4bb3ac49d3d"
56
+ "gitHead": "eaebcc34f92db2200dab0bde2e2e1dde107a47bf"
57
57
  }
@@ -88,7 +88,9 @@ function addTestInputs(tree) {
88
88
  // Remove tsconfig.spec.json
89
89
  '!{projectRoot}/tsconfig.spec.json',
90
90
  // Remove jest.config.js/ts
91
- '!{projectRoot}/jest.config.[jt]s');
91
+ '!{projectRoot}/jest.config.[jt]s',
92
+ // Remove test-setup.js/ts
93
+ '!{projectRoot}/src/test-setup.[jt]s');
92
94
  // Dedupe and set
93
95
  nxJson.namedInputs.production = Array.from(new Set(productionFileSet));
94
96
  }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export declare function addTestSetupToIgnoredInputs(tree: Tree): Promise<void>;
3
+ export default addTestSetupToIgnoredInputs;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addTestSetupToIgnoredInputs = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ function addTestSetupToIgnoredInputs(tree) {
7
+ var _a;
8
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
+ const nxJson = (0, devkit_1.readNxJson)(tree);
10
+ if (!nxJson) {
11
+ return;
12
+ }
13
+ if (((_a = nxJson.namedInputs) === null || _a === void 0 ? void 0 : _a.production) &&
14
+ !nxJson.namedInputs.production.includes('!{projectRoot}/src/test-setup.[jt]s')) {
15
+ nxJson.namedInputs.production.push('!{projectRoot}/src/test-setup.[jt]s');
16
+ (0, devkit_1.updateNxJson)(tree, nxJson);
17
+ }
18
+ yield (0, devkit_1.formatFiles)(tree);
19
+ });
20
+ }
21
+ exports.addTestSetupToIgnoredInputs = addTestSetupToIgnoredInputs;
22
+ exports.default = addTestSetupToIgnoredInputs;