@nx/jest 23.2.0-beta.2 → 23.2.0-beta.3
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.
|
@@ -5,7 +5,7 @@ Migrates the previously deprecated `skipSetupFile` option of the `@nx/jest:confi
|
|
|
5
5
|
- `skipSetupFile: true` becomes `setupFile: 'none'` (preserving the original behavior of skipping the setup file). Existing `setupFile` values are left untouched.
|
|
6
6
|
- `skipSetupFile: false` is dropped (it was a no-op).
|
|
7
7
|
|
|
8
|
-
Both flat (`@nx/jest:configuration`) and nested (`@nx/jest`
|
|
8
|
+
Both flat (`@nx/jest:configuration`) and nested (`@nx/jest` -> `configuration`) forms are handled.
|
|
9
9
|
|
|
10
10
|
#### Examples
|
|
11
11
|
|
|
@@ -88,4 +88,4 @@ Rewrite a per-project generator default:
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
The nested form (`@nx/jest`
|
|
91
|
+
The nested form (`@nx/jest` -> `configuration`) is handled the same way.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Migrates the previously deprecated `setupFile` option of the `@nx/jest:jest` executor. The setup file path is appended to the `setupFilesAfterEnv` array in the project's Jest configuration (using `<rootDir>/...` form), and the deprecated option is removed from `project.json` and `nx.json` target defaults.
|
|
4
4
|
|
|
5
|
-
If the
|
|
5
|
+
If the setup file cannot be migrated automatically (e.g. the Jest configuration cannot be parsed because it exports a factory function or assigns `setupFilesAfterEnv` to a non-array value, it sets `rootDir` to a non-literal value, or the target shares a Jest configuration with another target using a different setup file), the deprecated option is still removed and a warning is logged listing the affected targets so the setup file path can be moved manually.
|
|
6
6
|
|
|
7
7
|
#### Examples
|
|
8
8
|
|
|
@@ -135,7 +135,7 @@ Remove the option from a target default using the `@nx/jest:jest` executor:
|
|
|
135
135
|
}
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
Per-project paths don't make sense as workspace defaults, so the option is removed
|
|
138
|
+
Per-project paths don't make sense as workspace defaults, so the option is removed from `nx.json`. Base targets that inherited it don't lose their setup file: the inherited path is expanded and added to `setupFilesAfterEnv` in each project's Jest config, the same as if the target had declared the option itself. A warning is logged noting the removal from `nx.json`.
|
|
139
139
|
|
|
140
140
|
Remove the option from a target default entry matching on the `@nx/jest:jest` executor:
|
|
141
141
|
|
package/migrations.json
CHANGED
|
@@ -65,12 +65,14 @@
|
|
|
65
65
|
"migrate-jest-executor-setup-file": {
|
|
66
66
|
"version": "23.0.0-beta.22",
|
|
67
67
|
"description": "Migrate the deprecated `setupFile` option of the `@nx/jest:jest` executor: push the file path into `setupFilesAfterEnv` in the project's Jest config and remove the option from `project.json` and `nx.json` target defaults.",
|
|
68
|
-
"implementation": "./dist/src/migrations/update-23-0-0/migrate-jest-executor-setup-file"
|
|
68
|
+
"implementation": "./dist/src/migrations/update-23-0-0/migrate-jest-executor-setup-file",
|
|
69
|
+
"documentation": "./dist/src/migrations/update-23-0-0/migrate-jest-executor-setup-file.md"
|
|
69
70
|
},
|
|
70
71
|
"migrate-jest-configuration-skip-setup-file": {
|
|
71
72
|
"version": "23.0.0-beta.22",
|
|
72
73
|
"description": "Migrate the deprecated `skipSetupFile` option of the `@nx/jest:configuration` generator stored as a default in `nx.json` or per-project `project.json` to `setupFile: 'none'` (when `true`) or remove it (when `false`).",
|
|
73
|
-
"implementation": "./dist/src/migrations/update-23-0-0/migrate-jest-configuration-skip-setup-file"
|
|
74
|
+
"implementation": "./dist/src/migrations/update-23-0-0/migrate-jest-configuration-skip-setup-file",
|
|
75
|
+
"documentation": "./dist/src/migrations/update-23-0-0/migrate-jest-configuration-skip-setup-file.md"
|
|
74
76
|
},
|
|
75
77
|
"update-23-0-0-migrate-create-nodes-v2-import": {
|
|
76
78
|
"version": "23.0.0-beta.24",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/jest",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
"semver": "^7.6.3",
|
|
118
118
|
"tslib": "^2.3.0",
|
|
119
119
|
"yargs-parser": "21.1.1",
|
|
120
|
-
"@nx/devkit": "23.2.0-beta.
|
|
121
|
-
"@nx/js": "23.2.0-beta.
|
|
120
|
+
"@nx/devkit": "23.2.0-beta.3",
|
|
121
|
+
"@nx/js": "23.2.0-beta.3"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"nx": "23.2.0-beta.
|
|
124
|
+
"nx": "23.2.0-beta.3"
|
|
125
125
|
},
|
|
126
126
|
"publishConfig": {
|
|
127
127
|
"access": "public"
|