@nx/jest 16.5.1 → 16.6.0-beta.1
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/generators.json +6 -6
- package/index.d.ts +4 -1
- package/index.js +6 -3
- package/migrations.json +33 -0
- package/package.json +5 -5
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/{jest-project/jest-project.js → configuration/configuration.js} +5 -4
- package/src/generators/init/init.js +1 -1
- package/src/utils/versions.d.ts +3 -3
- package/src/utils/versions.js +3 -3
- package/src/generators/jest-project/jest-project.d.ts +0 -4
- /package/src/generators/{jest-project → configuration}/files/jest.config.ts__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/files/src/test-setup.ts__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/files/tsconfig.spec.json__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/files-angular/jest.config.ts__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/files-angular/src/test-setup.ts__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/files-angular/tsconfig.spec.json__tmpl__ +0 -0
- /package/src/generators/{jest-project → configuration}/lib/check-for-test-target.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/lib/check-for-test-target.js +0 -0
- /package/src/generators/{jest-project → configuration}/lib/create-files.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/lib/create-files.js +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-jestconfig.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-jestconfig.js +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-tsconfig.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-tsconfig.js +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-workspace.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/lib/update-workspace.js +0 -0
- /package/src/generators/{jest-project → configuration}/schema.d.ts +0 -0
- /package/src/generators/{jest-project → configuration}/schema.json +0 -0
package/generators.json
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"aliases": ["ng-add"],
|
|
10
10
|
"hidden": true
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
"factory": "./src/generators/
|
|
14
|
-
"schema": "./src/generators/
|
|
12
|
+
"configuration": {
|
|
13
|
+
"factory": "./src/generators/configuration/configuration#compat",
|
|
14
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
15
15
|
"description": "Add Jest configuration to a project.",
|
|
16
16
|
"hidden": true
|
|
17
17
|
}
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"aliases": ["ng-add"],
|
|
25
25
|
"hidden": true
|
|
26
26
|
},
|
|
27
|
-
"
|
|
28
|
-
"factory": "./src/generators/
|
|
29
|
-
"schema": "./src/generators/
|
|
27
|
+
"configuration": {
|
|
28
|
+
"factory": "./src/generators/configuration/configuration",
|
|
29
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
30
30
|
"description": "Add Jest configuration to a project.",
|
|
31
31
|
"hidden": true
|
|
32
32
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { configurationGenerator } from './src/generators/configuration/configuration';
|
|
2
|
+
export { configurationGenerator };
|
|
3
|
+
/** @deprecated Use `configurationGenerator` instead. */
|
|
4
|
+
export declare const jestProjectGenerator: typeof configurationGenerator;
|
|
1
5
|
export { addPropertyToJestConfig, removePropertyFromJestConfig, } from './src/utils/config/update-config';
|
|
2
6
|
export { jestConfigObjectAst } from './src/utils/config/functions';
|
|
3
|
-
export { jestProjectGenerator } from './src/generators/jest-project/jest-project';
|
|
4
7
|
export { jestInitGenerator } from './src/generators/init/init';
|
|
5
8
|
export { getJestProjects, getNestedJestProjects, } from './src/utils/config/get-jest-projects';
|
package/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNestedJestProjects = exports.getJestProjects = exports.jestInitGenerator = exports.
|
|
3
|
+
exports.getNestedJestProjects = exports.getJestProjects = exports.jestInitGenerator = exports.jestConfigObjectAst = exports.removePropertyFromJestConfig = exports.addPropertyToJestConfig = exports.jestProjectGenerator = exports.configurationGenerator = void 0;
|
|
4
|
+
const configuration_1 = require("./src/generators/configuration/configuration");
|
|
5
|
+
Object.defineProperty(exports, "configurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
|
|
6
|
+
// Exported for backwards compatibility in case a plugin is using the old name.
|
|
7
|
+
/** @deprecated Use `configurationGenerator` instead. */
|
|
8
|
+
exports.jestProjectGenerator = configuration_1.configurationGenerator;
|
|
4
9
|
var update_config_1 = require("./src/utils/config/update-config");
|
|
5
10
|
Object.defineProperty(exports, "addPropertyToJestConfig", { enumerable: true, get: function () { return update_config_1.addPropertyToJestConfig; } });
|
|
6
11
|
Object.defineProperty(exports, "removePropertyFromJestConfig", { enumerable: true, get: function () { return update_config_1.removePropertyFromJestConfig; } });
|
|
7
12
|
var functions_1 = require("./src/utils/config/functions");
|
|
8
13
|
Object.defineProperty(exports, "jestConfigObjectAst", { enumerable: true, get: function () { return functions_1.jestConfigObjectAst; } });
|
|
9
|
-
var jest_project_1 = require("./src/generators/jest-project/jest-project");
|
|
10
|
-
Object.defineProperty(exports, "jestProjectGenerator", { enumerable: true, get: function () { return jest_project_1.jestProjectGenerator; } });
|
|
11
14
|
var init_1 = require("./src/generators/init/init");
|
|
12
15
|
Object.defineProperty(exports, "jestInitGenerator", { enumerable: true, get: function () { return init_1.jestInitGenerator; } });
|
|
13
16
|
var get_jest_projects_1 = require("./src/utils/config/get-jest-projects");
|
package/migrations.json
CHANGED
|
@@ -285,6 +285,39 @@
|
|
|
285
285
|
"alwaysAddToPackageJson": false
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
+
},
|
|
289
|
+
"16.5.2": {
|
|
290
|
+
"version": "16.5.2-beta.0",
|
|
291
|
+
"packages": {
|
|
292
|
+
"jest": {
|
|
293
|
+
"version": "~29.6.1",
|
|
294
|
+
"alwaysAddToPackageJson": false
|
|
295
|
+
},
|
|
296
|
+
"@types/jest": {
|
|
297
|
+
"version": "~29.5.3",
|
|
298
|
+
"alwaysAddToPackageJson": false
|
|
299
|
+
},
|
|
300
|
+
"expect": {
|
|
301
|
+
"version": "~29.6.1",
|
|
302
|
+
"alwaysAddToPackageJson": false
|
|
303
|
+
},
|
|
304
|
+
"@jest/globals": {
|
|
305
|
+
"version": "~29.6.1",
|
|
306
|
+
"alwaysAddToPackageJson": false
|
|
307
|
+
},
|
|
308
|
+
"jest-jasmine2": {
|
|
309
|
+
"version": "~29.6.1",
|
|
310
|
+
"alwaysAddToPackageJson": false
|
|
311
|
+
},
|
|
312
|
+
"jest-environment-jsdom": {
|
|
313
|
+
"version": "~29.6.1",
|
|
314
|
+
"alwaysAddToPackageJson": false
|
|
315
|
+
},
|
|
316
|
+
"babel-jest": {
|
|
317
|
+
"version": "~29.6.1",
|
|
318
|
+
"alwaysAddToPackageJson": false
|
|
319
|
+
}
|
|
320
|
+
}
|
|
288
321
|
}
|
|
289
322
|
}
|
|
290
323
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/jest",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.6.0-beta.1",
|
|
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.
|
|
40
|
-
"@nx/devkit": "16.
|
|
41
|
-
"@nx/js": "16.
|
|
39
|
+
"@nrwl/jest": "16.6.0-beta.1",
|
|
40
|
+
"@nx/devkit": "16.6.0-beta.1",
|
|
41
|
+
"@nx/js": "16.6.0-beta.1",
|
|
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": "
|
|
56
|
+
"gitHead": "cf9f5cbe6a7ce3b916ec6505dc8488f669cbc52b"
|
|
57
57
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JestProjectSchema } from './schema';
|
|
2
|
+
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
3
|
+
export declare function configurationGenerator(tree: Tree, schema: JestProjectSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export default configurationGenerator;
|
|
5
|
+
export declare const compat: (generatorOptions: JestProjectSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.compat = exports.configurationGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const init_1 = require("../init/init");
|
|
6
6
|
const check_for_test_target_1 = require("./lib/check-for-test-target");
|
|
@@ -36,7 +36,7 @@ function normalizeOptions(tree, options) {
|
|
|
36
36
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
37
37
|
return Object.assign(Object.assign(Object.assign({}, schemaDefaults), options), { rootProject: project.root === '.' || project.root === '' });
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function configurationGenerator(tree, schema) {
|
|
40
40
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const options = normalizeOptions(tree, schema);
|
|
42
42
|
const installTask = yield (0, init_1.default)(tree, options);
|
|
@@ -50,5 +50,6 @@ function jestProjectGenerator(tree, schema) {
|
|
|
50
50
|
return installTask;
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
53
|
+
exports.configurationGenerator = configurationGenerator;
|
|
54
|
+
exports.default = configurationGenerator;
|
|
55
|
+
exports.compat = (0, devkit_1.convertNxGenerator)(configurationGenerator);
|
|
@@ -39,7 +39,7 @@ function createJestConfig(tree, options) {
|
|
|
39
39
|
addTestInputs(tree);
|
|
40
40
|
}
|
|
41
41
|
if (options.rootProject) {
|
|
42
|
-
// we don't want any config to be made because the `
|
|
42
|
+
// we don't want any config to be made because the `configurationGenerator` will do it.
|
|
43
43
|
// will copy the template config file
|
|
44
44
|
return;
|
|
45
45
|
}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const jestVersion = "^29.
|
|
3
|
-
export declare const babelJestVersion = "^29.
|
|
4
|
-
export declare const jestTypesVersion = "^29.
|
|
2
|
+
export declare const jestVersion = "^29.6.1";
|
|
3
|
+
export declare const babelJestVersion = "^29.6.1";
|
|
4
|
+
export declare const jestTypesVersion = "^29.5.3";
|
|
5
5
|
export declare const tsJestVersion = "^29.1.0";
|
|
6
6
|
export declare const tslibVersion = "^2.3.0";
|
|
7
7
|
export declare const swcJestVersion = "0.2.20";
|
package/src/utils/versions.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tsNodeVersion = exports.typesNodeVersion = exports.swcJestVersion = exports.tslibVersion = exports.tsJestVersion = exports.jestTypesVersion = exports.babelJestVersion = exports.jestVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.jestVersion = '^29.
|
|
6
|
-
exports.babelJestVersion = '^29.
|
|
7
|
-
exports.jestTypesVersion = '^29.
|
|
5
|
+
exports.jestVersion = '^29.6.1';
|
|
6
|
+
exports.babelJestVersion = '^29.6.1';
|
|
7
|
+
exports.jestTypesVersion = '^29.5.3';
|
|
8
8
|
exports.tsJestVersion = '^29.1.0';
|
|
9
9
|
exports.tslibVersion = '^2.3.0';
|
|
10
10
|
exports.swcJestVersion = '0.2.20';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { JestProjectSchema } from './schema';
|
|
2
|
-
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
3
|
-
export declare function jestProjectGenerator(tree: Tree, schema: JestProjectSchema): Promise<GeneratorCallback>;
|
|
4
|
-
export declare const jestProjectSchematic: (generatorOptions: JestProjectSchema) => (tree: any, context: any) => Promise<any>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/generators/{jest-project → configuration}/files-angular/src/test-setup.ts__tmpl__
RENAMED
|
File without changes
|
/package/src/generators/{jest-project → configuration}/files-angular/tsconfig.spec.json__tmpl__
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|