nx 19.5.4 → 19.5.6
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/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/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- 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.5.
|
3
|
+
"version": "19.5.6",
|
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.5.
|
74
|
+
"@nrwl/tao": "19.5.6"
|
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.5.
|
90
|
-
"@nx/nx-darwin-arm64": "19.5.
|
91
|
-
"@nx/nx-linux-x64-gnu": "19.5.
|
92
|
-
"@nx/nx-linux-x64-musl": "19.5.
|
93
|
-
"@nx/nx-win32-x64-msvc": "19.5.
|
94
|
-
"@nx/nx-linux-arm64-gnu": "19.5.
|
95
|
-
"@nx/nx-linux-arm64-musl": "19.5.
|
96
|
-
"@nx/nx-linux-arm-gnueabihf": "19.5.
|
97
|
-
"@nx/nx-win32-arm64-msvc": "19.5.
|
98
|
-
"@nx/nx-freebsd-x64": "19.5.
|
89
|
+
"@nx/nx-darwin-x64": "19.5.6",
|
90
|
+
"@nx/nx-darwin-arm64": "19.5.6",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.5.6",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.5.6",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.5.6",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.5.6",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.5.6",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.5.6",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.5.6",
|
98
|
+
"@nx/nx-freebsd-x64": "19.5.6"
|
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
|
},
|
@@ -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();
|