nx 19.6.0-canary.20240731-341f295 → 19.6.0-canary.20240803-bd7a2c9
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -12
- package/schemas/project-schema.json +40 -6
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +1 -0
- package/src/command-line/connect/connect-to-nx-cloud.d.ts +1 -1
- package/src/command-line/connect/connect-to-nx-cloud.js +3 -3
- package/src/command-line/migrate/migrate.js +14 -6
- package/src/config/nx-json.d.ts +4 -0
- package/src/core/graph/main.js +1 -1
- package/src/devkit-internals.d.ts +1 -1
- package/src/devkit-internals.js +2 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +2 -1
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +14 -12
- package/src/nx-cloud/utilities/get-cloud-options.d.ts +1 -1
- package/src/nx-cloud/utilities/get-cloud-options.js +3 -2
- package/src/project-graph/utils/project-configuration-utils.d.ts +1 -0
- package/src/project-graph/utils/project-configuration-utils.js +1 -0
- package/src/tasks-runner/cache.js +1 -1
- package/src/utils/git-utils.js +3 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.6.0-canary.
|
3
|
+
"version": "19.6.0-canary.20240803-bd7a2c9",
|
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": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"yargs-parser": "21.1.1",
|
72
72
|
"node-machine-id": "1.1.12",
|
73
73
|
"ora": "5.3.0",
|
74
|
-
"@nrwl/tao": "19.6.0-canary.
|
74
|
+
"@nrwl/tao": "19.6.0-canary.20240803-bd7a2c9"
|
75
75
|
},
|
76
76
|
"peerDependencies": {
|
77
77
|
"@swc-node/register": "^1.8.0",
|
@@ -86,16 +86,16 @@
|
|
86
86
|
}
|
87
87
|
},
|
88
88
|
"optionalDependencies": {
|
89
|
-
"@nx/nx-darwin-x64": "19.6.0-canary.
|
90
|
-
"@nx/nx-darwin-arm64": "19.6.0-canary.
|
91
|
-
"@nx/nx-linux-x64-gnu": "19.6.0-canary.
|
92
|
-
"@nx/nx-linux-x64-musl": "19.6.0-canary.
|
93
|
-
"@nx/nx-win32-x64-msvc": "19.6.0-canary.
|
94
|
-
"@nx/nx-linux-arm64-gnu": "19.6.0-canary.
|
95
|
-
"@nx/nx-linux-arm64-musl": "19.6.0-canary.
|
96
|
-
"@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.
|
97
|
-
"@nx/nx-win32-arm64-msvc": "19.6.0-canary.
|
98
|
-
"@nx/nx-freebsd-x64": "19.6.0-canary.
|
89
|
+
"@nx/nx-darwin-x64": "19.6.0-canary.20240803-bd7a2c9",
|
90
|
+
"@nx/nx-darwin-arm64": "19.6.0-canary.20240803-bd7a2c9",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.6.0-canary.20240803-bd7a2c9",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.6.0-canary.20240803-bd7a2c9",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.6.0-canary.20240803-bd7a2c9",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240803-bd7a2c9",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.6.0-canary.20240803-bd7a2c9",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240803-bd7a2c9",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240803-bd7a2c9",
|
98
|
+
"@nx/nx-freebsd-x64": "19.6.0-canary.20240803-bd7a2c9"
|
99
99
|
},
|
100
100
|
"nx-migrations": {
|
101
101
|
"migrations": "./migrations.json",
|
@@ -115,8 +115,12 @@
|
|
115
115
|
"required": ["target"],
|
116
116
|
"not": {
|
117
117
|
"anyOf": [
|
118
|
-
{
|
119
|
-
|
118
|
+
{
|
119
|
+
"required": ["projects"]
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"required": ["dependencies"]
|
123
|
+
}
|
120
124
|
]
|
121
125
|
}
|
122
126
|
}
|
@@ -138,6 +142,17 @@
|
|
138
142
|
"type": "boolean",
|
139
143
|
"default": true,
|
140
144
|
"description": "Whether this target can be run in parallel with other tasks"
|
145
|
+
},
|
146
|
+
"metadata": {
|
147
|
+
"type": "object",
|
148
|
+
"description": "Metadata about the target",
|
149
|
+
"properties": {
|
150
|
+
"description": {
|
151
|
+
"type": "string",
|
152
|
+
"description": "A description of the target"
|
153
|
+
}
|
154
|
+
},
|
155
|
+
"additionalProperties": true
|
141
156
|
}
|
142
157
|
}
|
143
158
|
}
|
@@ -154,6 +169,17 @@
|
|
154
169
|
"type": "string"
|
155
170
|
}
|
156
171
|
},
|
172
|
+
"metadata": {
|
173
|
+
"type": "object",
|
174
|
+
"description": "Metadata about the project.",
|
175
|
+
"properties": {
|
176
|
+
"description": {
|
177
|
+
"type": "string",
|
178
|
+
"description": "A description of the project."
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"additionalProperties": true
|
182
|
+
},
|
157
183
|
"release": {
|
158
184
|
"type": "object",
|
159
185
|
"description": "Configuration for the nx release commands.",
|
@@ -205,7 +231,9 @@
|
|
205
231
|
{
|
206
232
|
"type": "array",
|
207
233
|
"description": "The projects that the targets belong to.",
|
208
|
-
"items": {
|
234
|
+
"items": {
|
235
|
+
"type": "string"
|
236
|
+
}
|
209
237
|
}
|
210
238
|
]
|
211
239
|
},
|
@@ -229,8 +257,12 @@
|
|
229
257
|
"required": ["input"],
|
230
258
|
"not": {
|
231
259
|
"anyOf": [
|
232
|
-
{
|
233
|
-
|
260
|
+
{
|
261
|
+
"required": ["projects"]
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"required": ["dependencies"]
|
265
|
+
}
|
234
266
|
]
|
235
267
|
}
|
236
268
|
}
|
@@ -262,7 +294,9 @@
|
|
262
294
|
"properties": {
|
263
295
|
"externalDependencies": {
|
264
296
|
"type": "array",
|
265
|
-
"items": {
|
297
|
+
"items": {
|
298
|
+
"type": "string"
|
299
|
+
},
|
266
300
|
"description": "The list of external dependencies that our target depends on for `nx:run-commands` and community plugins."
|
267
301
|
}
|
268
302
|
},
|
package/src/adapter/compat.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"];
|
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"];
|
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", "neverConnectToCloud"];
|
package/src/adapter/compat.js
CHANGED
@@ -4,7 +4,7 @@ import { NxArgs } from '../../utils/command-line-utils';
|
|
4
4
|
import { MessageKey } from '../../utils/ab-testing';
|
5
5
|
export declare function onlyDefaultRunnerIsUsed(nxJson: NxJsonConfiguration): boolean;
|
6
6
|
export declare function connectToNxCloudIfExplicitlyAsked(opts: NxArgs): Promise<void>;
|
7
|
-
export declare function connectWorkspaceToCloud(options: ConnectToNxCloudOptions): Promise<string>;
|
7
|
+
export declare function connectWorkspaceToCloud(options: ConnectToNxCloudOptions, directory?: string): Promise<string>;
|
8
8
|
export declare function connectToNxCloudCommand(command?: string): Promise<boolean>;
|
9
9
|
export declare function connectExistingRepoToNxCloudPrompt(command?: string, key?: MessageKey): Promise<boolean>;
|
10
10
|
export declare function connectToNxCloudWithPrompt(command: string): Promise<void>;
|
@@ -46,11 +46,11 @@ async function connectToNxCloudIfExplicitlyAsked(opts) {
|
|
46
46
|
process.exit(0);
|
47
47
|
}
|
48
48
|
}
|
49
|
-
async function connectWorkspaceToCloud(options) {
|
50
|
-
const tree = new tree_1.FsTree(
|
49
|
+
async function connectWorkspaceToCloud(options, directory = workspace_root_1.workspaceRoot) {
|
50
|
+
const tree = new tree_1.FsTree(directory, false, 'connect-to-nx-cloud');
|
51
51
|
const accessToken = await (0, connect_to_nx_cloud_1.connectToNxCloud)(tree, options);
|
52
52
|
tree.lock();
|
53
|
-
(0, tree_1.flushChanges)(
|
53
|
+
(0, tree_1.flushChanges)(directory, tree.listChanges());
|
54
54
|
return accessToken;
|
55
55
|
}
|
56
56
|
async function connectToNxCloudCommand(command) {
|
@@ -910,31 +910,39 @@ async function executeMigrations(root, migrations, isVerbose, shouldCreateCommit
|
|
910
910
|
? -1
|
911
911
|
: 1;
|
912
912
|
});
|
913
|
+
logger_1.logger.info(`Running the following migrations:`);
|
914
|
+
sortedMigrations.forEach((m) => logger_1.logger.info(`- ${m.package}: ${m.name} (${m.description})`));
|
915
|
+
logger_1.logger.info(`---------------------------------------------------------\n`);
|
913
916
|
for (const m of sortedMigrations) {
|
917
|
+
logger_1.logger.info(`Running migration ${m.package}: ${m.name}`);
|
914
918
|
try {
|
915
919
|
const { collection, collectionPath } = readMigrationCollection(m.package, root);
|
916
920
|
if (!isAngularMigration(collection, collectionPath, m.name)) {
|
917
921
|
const changes = await runNxMigration(root, collectionPath, collection, m.name);
|
922
|
+
logger_1.logger.info(`Ran ${m.name} from ${m.package}`);
|
923
|
+
logger_1.logger.info(` ${m.description}\n`);
|
918
924
|
if (changes.length < 1) {
|
925
|
+
logger_1.logger.info(`No changes were made\n`);
|
919
926
|
migrationsWithNoChanges.push(m);
|
920
|
-
// If no changes are made, continue on without printing anything
|
921
927
|
continue;
|
922
928
|
}
|
923
|
-
logger_1.logger.info(
|
924
|
-
logger_1.logger.info(` ${m.description}\n`);
|
929
|
+
logger_1.logger.info('Changes:');
|
925
930
|
(0, tree_1.printChanges)(changes, ' ');
|
931
|
+
logger_1.logger.info('');
|
926
932
|
}
|
927
933
|
else {
|
928
934
|
const ngCliAdapter = await getNgCompatLayer();
|
929
935
|
const { madeChanges, loggingQueue } = await ngCliAdapter.runMigration(root, m.package, m.name, (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(await (0, project_graph_1.createProjectGraphAsync)()).projects, isVerbose);
|
936
|
+
logger_1.logger.info(`Ran ${m.name} from ${m.package}`);
|
937
|
+
logger_1.logger.info(` ${m.description}\n`);
|
930
938
|
if (!madeChanges) {
|
939
|
+
logger_1.logger.info(`No changes were made\n`);
|
931
940
|
migrationsWithNoChanges.push(m);
|
932
|
-
// If no changes are made, continue on without printing anything
|
933
941
|
continue;
|
934
942
|
}
|
935
|
-
logger_1.logger.info(
|
936
|
-
logger_1.logger.info(` ${m.description}\n`);
|
943
|
+
logger_1.logger.info('Changes:');
|
937
944
|
loggingQueue.forEach((log) => logger_1.logger.info(' ' + log));
|
945
|
+
logger_1.logger.info('');
|
938
946
|
}
|
939
947
|
if (shouldCreateCommits) {
|
940
948
|
installDepsIfChanged();
|
package/src/config/nx-json.d.ts
CHANGED
@@ -404,6 +404,10 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
404
404
|
* Set this to false to disable adding inference plugins when generating new projects
|
405
405
|
*/
|
406
406
|
useInferencePlugins?: boolean;
|
407
|
+
/**
|
408
|
+
* Set this to false to disable connection to Nx Cloud
|
409
|
+
*/
|
410
|
+
neverConnectToCloud?: boolean;
|
407
411
|
}
|
408
412
|
export type PluginConfiguration = string | ExpandedPluginConfiguration;
|
409
413
|
export type ExpandedPluginConfiguration<T = unknown> = {
|