@nx/devkit 16.8.0-beta.1 → 16.8.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/devkit",
|
|
3
|
-
"version": "16.8.0-beta.
|
|
3
|
+
"version": "16.8.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://nx.dev",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nrwl/devkit": "16.8.0-beta.
|
|
31
|
+
"@nrwl/devkit": "16.8.0-beta.3",
|
|
32
32
|
"ejs": "^3.1.7",
|
|
33
33
|
"enquirer": "~2.3.6",
|
|
34
34
|
"ignore": "^5.0.4",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"migrations": "./migrations.json"
|
|
47
47
|
},
|
|
48
48
|
"type": "commonjs",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "dcd48165a485bc8db57a1fb02b96a0772de3b7e9"
|
|
50
50
|
}
|
|
@@ -4,7 +4,7 @@ export type ProjectNameAndRootFormat = 'as-provided' | 'derived';
|
|
|
4
4
|
export type ProjectGenerationOptions = {
|
|
5
5
|
name: string;
|
|
6
6
|
projectType: ProjectType;
|
|
7
|
-
callingGenerator: string;
|
|
7
|
+
callingGenerator: string | null;
|
|
8
8
|
directory?: string;
|
|
9
9
|
importPath?: string;
|
|
10
10
|
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
@@ -6,7 +6,7 @@ const enquirer_1 = require("enquirer");
|
|
|
6
6
|
const nx_1 = require("../../nx");
|
|
7
7
|
const get_workspace_layout_1 = require("../utils/get-workspace-layout");
|
|
8
8
|
const names_1 = require("../utils/names");
|
|
9
|
-
const { joinPathFragments, normalizePath, logger, readJson, readNxJson, updateNxJson, } = (0, nx_1.requireNx)();
|
|
9
|
+
const { joinPathFragments, normalizePath, logger, readJson, readNxJson, updateNxJson, stripIndents, } = (0, nx_1.requireNx)();
|
|
10
10
|
function determineProjectNameAndRootOptions(tree, options) {
|
|
11
11
|
var _a;
|
|
12
12
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -71,7 +71,9 @@ function determineFormat(tree, formats, callingGenerator) {
|
|
|
71
71
|
],
|
|
72
72
|
initial: 'as-provided',
|
|
73
73
|
}).then(({ format }) => format === asProvidedSelectedValue ? 'as-provided' : 'derived');
|
|
74
|
-
const deprecationWarning =
|
|
74
|
+
const deprecationWarning = stripIndents `
|
|
75
|
+
In Nx 18, generating projects will no longer derive the name and root.
|
|
76
|
+
Please provide the exact project name and root in the future.`;
|
|
75
77
|
if (result === 'as-provided' && callingGenerator) {
|
|
76
78
|
const { saveDefault } = yield (0, enquirer_1.prompt)({
|
|
77
79
|
type: 'confirm',
|
|
@@ -91,7 +93,8 @@ function determineFormat(tree, formats, callingGenerator) {
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
else {
|
|
94
|
-
|
|
96
|
+
const example = `Example: nx g ${callingGenerator} ${formats[result].projectName} --directory ${formats[result].projectRoot}`;
|
|
97
|
+
logger.warn(deprecationWarning + '\n' + example);
|
|
95
98
|
}
|
|
96
99
|
return result;
|
|
97
100
|
});
|