nx 18.2.0-canary.20240319-55f31cf → 18.2.0-canary.20240320-64b2396
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 +12 -12
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +1 -0
- package/src/command-line/add/add.js +1 -1
- package/src/command-line/init/init-v2.js +27 -20
- package/src/config/workspace-json-project-json.d.ts +4 -0
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/executors/run-commands/run-commands.impl.js +5 -1
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +89 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "18.2.0-canary.
|
3
|
+
"version": "18.2.0-canary.20240320-64b2396",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"yargs-parser": "21.1.1",
|
67
67
|
"node-machine-id": "1.1.12",
|
68
68
|
"ora": "5.3.0",
|
69
|
-
"@nrwl/tao": "18.2.0-canary.
|
69
|
+
"@nrwl/tao": "18.2.0-canary.20240320-64b2396"
|
70
70
|
},
|
71
71
|
"peerDependencies": {
|
72
72
|
"@swc-node/register": "^1.8.0",
|
@@ -81,16 +81,16 @@
|
|
81
81
|
}
|
82
82
|
},
|
83
83
|
"optionalDependencies": {
|
84
|
-
"@nx/nx-darwin-x64": "18.2.0-canary.
|
85
|
-
"@nx/nx-darwin-arm64": "18.2.0-canary.
|
86
|
-
"@nx/nx-linux-x64-gnu": "18.2.0-canary.
|
87
|
-
"@nx/nx-linux-x64-musl": "18.2.0-canary.
|
88
|
-
"@nx/nx-win32-x64-msvc": "18.2.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "18.2.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "18.2.0-canary.
|
91
|
-
"@nx/nx-linux-arm-gnueabihf": "18.2.0-canary.
|
92
|
-
"@nx/nx-win32-arm64-msvc": "18.2.0-canary.
|
93
|
-
"@nx/nx-freebsd-x64": "18.2.0-canary.
|
84
|
+
"@nx/nx-darwin-x64": "18.2.0-canary.20240320-64b2396",
|
85
|
+
"@nx/nx-darwin-arm64": "18.2.0-canary.20240320-64b2396",
|
86
|
+
"@nx/nx-linux-x64-gnu": "18.2.0-canary.20240320-64b2396",
|
87
|
+
"@nx/nx-linux-x64-musl": "18.2.0-canary.20240320-64b2396",
|
88
|
+
"@nx/nx-win32-x64-msvc": "18.2.0-canary.20240320-64b2396",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "18.2.0-canary.20240320-64b2396",
|
90
|
+
"@nx/nx-linux-arm64-musl": "18.2.0-canary.20240320-64b2396",
|
91
|
+
"@nx/nx-linux-arm-gnueabihf": "18.2.0-canary.20240320-64b2396",
|
92
|
+
"@nx/nx-win32-arm64-msvc": "18.2.0-canary.20240320-64b2396",
|
93
|
+
"@nx/nx-freebsd-x64": "18.2.0-canary.20240320-64b2396"
|
94
94
|
},
|
95
95
|
"nx-migrations": {
|
96
96
|
"migrations": "./migrations.json",
|
package/src/adapter/compat.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts"];
|
1
|
+
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"];
|
2
2
|
export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins"];
|
package/src/adapter/compat.js
CHANGED
@@ -55,7 +55,7 @@ async function installPackage(pkgName, version) {
|
|
55
55
|
nxJson.installation.plugins[pkgName] = version;
|
56
56
|
(0, fileutils_1.writeJsonFile)('nx.json', nxJson);
|
57
57
|
try {
|
58
|
-
await (0, child_process_2.runNxAsync)('');
|
58
|
+
await (0, child_process_2.runNxAsync)('--help');
|
59
59
|
}
|
60
60
|
catch (e) {
|
61
61
|
// revert adding the plugin to nx.json
|
@@ -32,6 +32,12 @@ async function initHandler(options) {
|
|
32
32
|
console.log('Setting Nx up installation in `.nx`. You can run Nx commands like: `./nx.bat --help`');
|
33
33
|
}
|
34
34
|
(0, add_nx_scripts_1.generateDotNxSetup)(version);
|
35
|
+
const { plugins } = await detectPlugins();
|
36
|
+
plugins.forEach((plugin) => {
|
37
|
+
(0, child_process_2.execSync)(`./nx add ${plugin}`, {
|
38
|
+
stdio: 'inherit',
|
39
|
+
});
|
40
|
+
});
|
35
41
|
// invokes the wrapper, thus invoking the initial installation process
|
36
42
|
(0, child_process_1.runNxSync)('--version', { stdio: 'ignore' });
|
37
43
|
return;
|
@@ -146,6 +152,9 @@ async function detectPlugins() {
|
|
146
152
|
}
|
147
153
|
}
|
148
154
|
}
|
155
|
+
if ((0, fs_1.existsSync)('gradlew') || (0, fs_1.existsSync)('gradlew.bat')) {
|
156
|
+
detectedPlugins.add('@nx/gradle');
|
157
|
+
}
|
149
158
|
const plugins = Array.from(detectedPlugins);
|
150
159
|
if (plugins.length === 0)
|
151
160
|
return undefined;
|
@@ -166,24 +175,22 @@ async function detectPlugins() {
|
|
166
175
|
]).then((r) => r.plugins);
|
167
176
|
if (pluginsToInstall?.length === 0)
|
168
177
|
return undefined;
|
169
|
-
const updatePackageScripts =
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
updatePackageScripts,
|
188
|
-
};
|
178
|
+
const updatePackageScripts = (0, fs_1.existsSync)('package.json') &&
|
179
|
+
(await (0, enquirer_1.prompt)([
|
180
|
+
{
|
181
|
+
name: 'updatePackageScripts',
|
182
|
+
type: 'autocomplete',
|
183
|
+
message: `Do you want to start using Nx in your package.json scripts?`,
|
184
|
+
choices: [
|
185
|
+
{
|
186
|
+
name: 'Yes',
|
187
|
+
},
|
188
|
+
{
|
189
|
+
name: 'No',
|
190
|
+
},
|
191
|
+
],
|
192
|
+
initial: 0,
|
193
|
+
},
|
194
|
+
]).then((r) => r.updatePackageScripts === 'Yes'));
|
195
|
+
return { plugins: pluginsToInstall, updatePackageScripts };
|
189
196
|
}
|
@@ -99,6 +99,10 @@ export interface ProjectConfiguration {
|
|
99
99
|
release?: {
|
100
100
|
version?: Pick<NxReleaseVersionConfiguration, 'generator' | 'generatorOptions'>;
|
101
101
|
};
|
102
|
+
metadata?: {
|
103
|
+
technologies?: string[];
|
104
|
+
targetGroups?: Record<string, string[]>;
|
105
|
+
};
|
102
106
|
}
|
103
107
|
export interface TargetDependencyConfig {
|
104
108
|
/**
|