@nx/node 16.4.0-beta.1 → 16.4.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.
- package/package.json +8 -8
- package/src/generators/application/application.js +1 -1
- package/src/generators/application/schema.d.ts +2 -0
- package/src/generators/application/schema.json +8 -2
- package/src/migrations/update-14-7-6/update-webpack-executor.d.ts +1 -1
- package/src/migrations/update-14-7-6/update-webpack-executor.js +10 -12
- package/src/migrations/update-16-0-0/update-webpack-executor.d.ts +1 -1
- package/src/migrations/update-16-0-0/update-webpack-executor.js +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/node",
|
|
3
|
-
"version": "16.4.0-beta.
|
|
3
|
+
"version": "16.4.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nrwl/node": "16.4.0-beta.
|
|
35
|
-
"@nx/devkit": "16.4.0-beta.
|
|
36
|
-
"@nx/jest": "16.4.0-beta.
|
|
37
|
-
"@nx/js": "16.4.0-beta.
|
|
38
|
-
"@nx/linter": "16.4.0-beta.
|
|
39
|
-
"@nx/workspace": "16.4.0-beta.
|
|
34
|
+
"@nrwl/node": "16.4.0-beta.3",
|
|
35
|
+
"@nx/devkit": "16.4.0-beta.3",
|
|
36
|
+
"@nx/jest": "16.4.0-beta.3",
|
|
37
|
+
"@nx/js": "16.4.0-beta.3",
|
|
38
|
+
"@nx/linter": "16.4.0-beta.3",
|
|
39
|
+
"@nx/workspace": "16.4.0-beta.3",
|
|
40
40
|
"tslib": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"types": "./index.d.ts",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d7f500985ba56117bf17c133bf70d22e42a7af27"
|
|
47
47
|
}
|
|
@@ -222,7 +222,7 @@ function applicationGenerator(tree, schema) {
|
|
|
222
222
|
tasks.push(lintTask);
|
|
223
223
|
}
|
|
224
224
|
if (options.unitTestRunner === 'jest') {
|
|
225
|
-
const jestTask = yield (0, jest_1.jestProjectGenerator)(tree, Object.assign(Object.assign({}, options), { project: options.name, setupFile: 'none', skipSerializers: true, supportTsx: options.js, testEnvironment: 'node', compiler: 'tsc', skipFormat: true }));
|
|
225
|
+
const jestTask = yield (0, jest_1.jestProjectGenerator)(tree, Object.assign(Object.assign({}, options), { project: options.name, setupFile: 'none', skipSerializers: true, supportTsx: options.js, testEnvironment: 'node', compiler: options.swcJest ? 'swc' : 'tsc', skipFormat: true }));
|
|
226
226
|
tasks.push(jestTask);
|
|
227
227
|
}
|
|
228
228
|
else {
|
|
@@ -54,11 +54,17 @@
|
|
|
54
54
|
"description": "Frontend project that needs to access this application. This sets up proxy configuration.",
|
|
55
55
|
"x-priority": "important"
|
|
56
56
|
},
|
|
57
|
-
"
|
|
57
|
+
"swcJest": {
|
|
58
58
|
"type": "boolean",
|
|
59
|
-
"description": "Use `
|
|
59
|
+
"description": "Use `@swc/jest` instead `ts-jest` for faster test compilation.",
|
|
60
60
|
"default": false
|
|
61
61
|
},
|
|
62
|
+
"babelJest": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"description": "Use `babel` instead `ts-jest`.",
|
|
65
|
+
"default": false,
|
|
66
|
+
"x-deprecated": "Use --swcJest instead for faster compilation"
|
|
67
|
+
},
|
|
62
68
|
"pascalCaseFiles": {
|
|
63
69
|
"type": "boolean",
|
|
64
70
|
"description": "Use pascal case file names.",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
export default function update(
|
|
2
|
+
export default function update(tree: Tree): Promise<void>;
|
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
6
|
+
function update(tree) {
|
|
7
7
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
yield (0, devkit_1.formatFiles)(host);
|
|
8
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/node:webpack', (options, projectName, targetName) => {
|
|
9
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
10
|
+
projectConfig.targets[targetName].executor = '@nrwl/webpack:webpack';
|
|
11
|
+
projectConfig.targets[targetName].options.compiler = 'tsc';
|
|
12
|
+
projectConfig.targets[targetName].options.target = 'node';
|
|
13
|
+
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
|
|
14
|
+
});
|
|
15
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
18
16
|
});
|
|
19
17
|
}
|
|
20
18
|
exports.default = update;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
export default function update(
|
|
2
|
+
export default function update(tree: Tree): Promise<void>;
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
6
|
+
function update(tree) {
|
|
7
7
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
yield (0, devkit_1.formatFiles)(
|
|
8
|
+
const migrateProject = (options, projectName, targetName) => {
|
|
9
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
10
|
+
projectConfig.targets[targetName].executor = '@nx/webpack:webpack';
|
|
11
|
+
projectConfig.targets[targetName].options.compiler = 'tsc';
|
|
12
|
+
projectConfig.targets[targetName].options.target = 'node';
|
|
13
|
+
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
|
|
14
|
+
};
|
|
15
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/node:webpack', migrateProject);
|
|
16
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/node:webpack', migrateProject);
|
|
17
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
exports.default = update;
|