@nx/node 20.0.0-canary.20241002-1d10a19 → 20.0.0-canary.20241003-84a5c7a
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +1 -26
- package/package.json +5 -5
- package/src/generators/application/application.js +2 -0
- package/src/generators/init/init.js +2 -0
- package/src/generators/library/library.js +3 -1
- package/src/migrations/update-16-0-0/update-webpack-executor.d.ts +0 -2
- package/src/migrations/update-16-0-0/update-webpack-executor.js +0 -17
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
- package/src/migrations/update-16-3-1/update-webpack-executor.d.ts +0 -2
- package/src/migrations/update-16-3-1/update-webpack-executor.js +0 -17
- package/src/migrations/update-16-4-0/replace-node-executor.d.ts +0 -2
- package/src/migrations/update-16-4-0/replace-node-executor.js +0 -14
package/migrations.json
CHANGED
@@ -1,30 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"generators": {
|
3
|
-
"update-16-0-0-add-nx-packages": {
|
4
|
-
"cli": "nx",
|
5
|
-
"version": "16.0.0-beta.1",
|
6
|
-
"description": "Replace @nrwl/node with @nx/node",
|
7
|
-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
8
|
-
},
|
9
|
-
"update-16-0-0-update-executor": {
|
10
|
-
"cli": "nx",
|
11
|
-
"version": "16.0.0-beta.5",
|
12
|
-
"description": "Replace @nrwl/node:webpack with @nx/node:webpack",
|
13
|
-
"implementation": "./src/migrations/update-16-0-0/update-webpack-executor"
|
14
|
-
},
|
15
|
-
"update-16-3-1-update-executor": {
|
16
|
-
"cli": "nx",
|
17
|
-
"version": "16.3.1-beta.0",
|
18
|
-
"description": "Replace @nrwl/node:webpack and @nx/node:webpack with @nx/webpack:webpack for all project targets",
|
19
|
-
"implementation": "./src/migrations/update-16-3-1/update-webpack-executor"
|
20
|
-
},
|
21
|
-
"update-16-4-0-replace-node-executor": {
|
22
|
-
"cli": "nx",
|
23
|
-
"version": "16.4.0-beta.8",
|
24
|
-
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
|
25
|
-
"implementation": "./src/migrations/update-16-4-0/replace-node-executor"
|
26
|
-
}
|
27
|
-
},
|
2
|
+
"generators": {},
|
28
3
|
"packageJsonUpdates": {
|
29
4
|
"17.3.0": {
|
30
5
|
"version": "17.3.0-beta.3",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/node",
|
3
|
-
"version": "20.0.0-canary.
|
3
|
+
"version": "20.0.0-canary.20241003-84a5c7a",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
|
6
6
|
"repository": {
|
@@ -32,10 +32,10 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"tslib": "^2.3.0",
|
35
|
-
"@nx/devkit": "20.0.0-canary.
|
36
|
-
"@nx/jest": "20.0.0-canary.
|
37
|
-
"@nx/js": "20.0.0-canary.
|
38
|
-
"@nx/eslint": "20.0.0-canary.
|
35
|
+
"@nx/devkit": "20.0.0-canary.20241003-84a5c7a",
|
36
|
+
"@nx/jest": "20.0.0-canary.20241003-84a5c7a",
|
37
|
+
"@nx/js": "20.0.0-canary.20241003-84a5c7a",
|
38
|
+
"@nx/eslint": "20.0.0-canary.20241003-84a5c7a"
|
39
39
|
},
|
40
40
|
"publishConfig": {
|
41
41
|
"access": "public"
|
@@ -7,6 +7,7 @@ const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
8
8
|
const jest_1 = require("@nx/jest");
|
9
9
|
const js_1 = require("@nx/js");
|
10
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
10
11
|
const versions_1 = require("@nx/js/src/utils/versions");
|
11
12
|
const eslint_1 = require("@nx/eslint");
|
12
13
|
const path_1 = require("path");
|
@@ -276,6 +277,7 @@ async function applicationGenerator(tree, schema) {
|
|
276
277
|
});
|
277
278
|
}
|
278
279
|
async function applicationGeneratorInternal(tree, schema) {
|
280
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'node', 'application');
|
279
281
|
const options = await normalizeOptions(tree, schema);
|
280
282
|
const tasks = [];
|
281
283
|
if (options.framework === 'nest') {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.initGenerator = initGenerator;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
5
6
|
const versions_1 = require("../../utils/versions");
|
6
7
|
function updateDependencies(tree, options) {
|
7
8
|
const tasks = [];
|
@@ -10,6 +11,7 @@ function updateDependencies(tree, options) {
|
|
10
11
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
11
12
|
}
|
12
13
|
async function initGenerator(tree, options) {
|
14
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'node', 'init');
|
13
15
|
let installTask = () => { };
|
14
16
|
if (!options.skipPackageJson) {
|
15
17
|
installTask = updateDependencies(tree, options);
|
@@ -7,6 +7,7 @@ const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project
|
|
7
7
|
const js_1 = require("@nx/js");
|
8
8
|
const add_swc_config_1 = require("@nx/js/src/utils/swc/add-swc-config");
|
9
9
|
const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
|
10
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
10
11
|
const path_1 = require("path");
|
11
12
|
const versions_1 = require("../../utils/versions");
|
12
13
|
const init_1 = require("../init/init");
|
@@ -18,6 +19,7 @@ async function libraryGenerator(tree, schema) {
|
|
18
19
|
});
|
19
20
|
}
|
20
21
|
async function libraryGeneratorInternal(tree, schema) {
|
22
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'node', 'library');
|
21
23
|
const options = await normalizeOptions(tree, schema);
|
22
24
|
const tasks = [
|
23
25
|
await (0, init_1.initGenerator)(tree, {
|
@@ -30,7 +32,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
30
32
|
}
|
31
33
|
const libraryInstall = await (0, js_1.libraryGenerator)(tree, {
|
32
34
|
...options,
|
33
|
-
bundler: schema.buildable ? 'tsc' : 'none',
|
35
|
+
bundler: schema.buildable || schema.publishable ? 'tsc' : 'none',
|
34
36
|
includeBabelRc: schema.babelJest,
|
35
37
|
importPath: options.importPath,
|
36
38
|
testEnvironment: 'node',
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = update;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
6
|
-
async function update(tree) {
|
7
|
-
const migrateProject = (options, projectName, targetName) => {
|
8
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
9
|
-
projectConfig.targets[targetName].executor = '@nx/webpack:webpack';
|
10
|
-
projectConfig.targets[targetName].options.compiler = 'tsc';
|
11
|
-
projectConfig.targets[targetName].options.target = 'node';
|
12
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
|
13
|
-
};
|
14
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/node:webpack', migrateProject);
|
15
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/node:webpack', migrateProject);
|
16
|
-
await (0, devkit_1.formatFiles)(tree);
|
17
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = replacePackage;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
6
|
-
async function replacePackage(tree) {
|
7
|
-
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/node', '@nx/node');
|
8
|
-
await (0, devkit_1.formatFiles)(tree);
|
9
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = update;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
6
|
-
async function update(tree) {
|
7
|
-
const migrateProject = (options, projectName, targetName) => {
|
8
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
9
|
-
projectConfig.targets[targetName].executor = '@nx/webpack:webpack';
|
10
|
-
projectConfig.targets[targetName].options.compiler = 'tsc';
|
11
|
-
projectConfig.targets[targetName].options.target = 'node';
|
12
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
|
13
|
-
};
|
14
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/node:webpack', migrateProject);
|
15
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/node:webpack', migrateProject);
|
16
|
-
await (0, devkit_1.formatFiles)(tree);
|
17
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = update;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
6
|
-
async function update(tree) {
|
7
|
-
const migrateProject = (_options, projectName, targetName) => {
|
8
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
9
|
-
projectConfig.targets[targetName].executor = '@nx/js:node';
|
10
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
|
11
|
-
};
|
12
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/node:node', migrateProject);
|
13
|
-
await (0, devkit_1.formatFiles)(tree);
|
14
|
-
}
|