nx 19.7.0-beta.2 → 19.7.0-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -12
- package/release/changelog-renderer/index.d.ts +1 -1
- package/release/changelog-renderer/index.js +46 -11
- package/schemas/nx-schema.json +12 -0
- package/src/command-line/add/command-object.js +2 -2
- package/src/command-line/affected/command-object.js +1 -1
- package/src/command-line/connect/command-object.js +11 -4
- package/src/command-line/connect/connect-to-nx-cloud.d.ts +3 -1
- package/src/command-line/connect/connect-to-nx-cloud.js +7 -4
- package/src/command-line/daemon/command-object.js +1 -1
- package/src/command-line/deprecated/command-objects.js +2 -2
- package/src/command-line/exec/command-object.js +1 -1
- package/src/command-line/format/command-object.js +4 -4
- package/src/command-line/generate/command-object.js +4 -4
- package/src/command-line/graph/command-object.js +6 -6
- package/src/command-line/import/command-object.js +9 -5
- package/src/command-line/import/import.d.ts +4 -0
- package/src/command-line/import/import.js +147 -12
- package/src/command-line/import/utils/prepare-source-repo.d.ts +1 -1
- package/src/command-line/import/utils/prepare-source-repo.js +31 -85
- package/src/command-line/list/command-object.js +1 -1
- package/src/command-line/login/command-object.js +1 -1
- package/src/command-line/logout/command-object.js +1 -1
- package/src/command-line/migrate/command-object.js +9 -9
- package/src/command-line/new/command-object.js +2 -2
- package/src/command-line/release/changelog.js +53 -12
- package/src/command-line/release/command-object.d.ts +2 -0
- package/src/command-line/release/command-object.js +37 -33
- package/src/command-line/release/config/version-plans.d.ts +14 -1
- package/src/command-line/release/config/version-plans.js +33 -1
- package/src/command-line/release/index.d.ts +6 -4
- package/src/command-line/release/plan-check.js +8 -61
- package/src/command-line/release/plan.js +131 -37
- package/src/command-line/release/publish.js +3 -0
- package/src/command-line/release/release.js +1 -1
- package/src/command-line/release/utils/get-touched-projects-for-group.d.ts +7 -0
- package/src/command-line/release/utils/get-touched-projects-for-group.js +78 -0
- package/src/command-line/release/utils/git.d.ts +1 -1
- package/src/command-line/release/utils/git.js +46 -19
- package/src/command-line/release/version.js +1 -1
- package/src/command-line/report/command-object.js +1 -1
- package/src/command-line/reset/command-object.js +1 -1
- package/src/command-line/run/command-object.js +1 -1
- package/src/command-line/run-many/command-object.js +1 -1
- package/src/command-line/show/command-object.js +10 -10
- package/src/command-line/sync/sync.js +12 -1
- package/src/command-line/watch/command-object.js +1 -1
- package/src/command-line/yargs-utils/shared-options.d.ts +2 -1
- package/src/command-line/yargs-utils/shared-options.js +26 -29
- package/src/config/nx-json.d.ts +5 -1
- package/src/core/graph/main.js +1 -1
- package/src/daemon/server/sync-generators.d.ts +4 -0
- package/src/daemon/server/sync-generators.js +183 -55
- 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 +25 -23
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +4 -0
- package/src/nx-cloud/update-manager.d.ts +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +8 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +1 -1
- package/src/tasks-runner/cache.d.ts +2 -0
- package/src/tasks-runner/cache.js +17 -3
- package/src/tasks-runner/run-command.js +5 -11
- package/src/tasks-runner/task-orchestrator.js +1 -10
- package/src/utils/command-line-utils.d.ts +1 -0
- package/src/utils/git-utils.d.ts +7 -10
- package/src/utils/git-utils.js +61 -44
- package/src/utils/sync-generators.d.ts +8 -5
- package/src/utils/sync-generators.js +27 -5
- package/src/utils/squash.d.ts +0 -1
- package/src/utils/squash.js +0 -12
@@ -22,7 +22,7 @@ exports.defaultYargsParserConfiguration = {
|
|
22
22
|
};
|
23
23
|
function withExcludeOption(yargs) {
|
24
24
|
return yargs.option('exclude', {
|
25
|
-
describe: 'Exclude certain projects from being processed',
|
25
|
+
describe: 'Exclude certain projects from being processed.',
|
26
26
|
type: 'string',
|
27
27
|
coerce: parseCSV,
|
28
28
|
});
|
@@ -30,7 +30,7 @@ function withExcludeOption(yargs) {
|
|
30
30
|
function withRunOptions(yargs) {
|
31
31
|
return withVerbose(withExcludeOption(yargs))
|
32
32
|
.option('parallel', {
|
33
|
-
describe: 'Max number of parallel processes [default is 3]',
|
33
|
+
describe: 'Max number of parallel processes [default is 3].',
|
34
34
|
type: 'string',
|
35
35
|
})
|
36
36
|
.option('maxParallel', {
|
@@ -38,11 +38,11 @@ function withRunOptions(yargs) {
|
|
38
38
|
hidden: true,
|
39
39
|
})
|
40
40
|
.options('runner', {
|
41
|
-
describe: 'This is the name of the tasks runner configured in nx.json',
|
41
|
+
describe: 'This is the name of the tasks runner configured in nx.json.',
|
42
42
|
type: 'string',
|
43
43
|
})
|
44
44
|
.option('prod', {
|
45
|
-
describe: 'Use the production configuration',
|
45
|
+
describe: 'Use the production configuration.',
|
46
46
|
type: 'boolean',
|
47
47
|
default: false,
|
48
48
|
hidden: true,
|
@@ -61,24 +61,29 @@ function withRunOptions(yargs) {
|
|
61
61
|
: value,
|
62
62
|
})
|
63
63
|
.option('nxBail', {
|
64
|
-
describe: 'Stop command execution after the first failed task',
|
64
|
+
describe: 'Stop command execution after the first failed task.',
|
65
65
|
type: 'boolean',
|
66
66
|
default: false,
|
67
67
|
})
|
68
68
|
.option('nxIgnoreCycles', {
|
69
|
-
describe: 'Ignore cycles in the task graph',
|
69
|
+
describe: 'Ignore cycles in the task graph.',
|
70
70
|
type: 'boolean',
|
71
71
|
default: false,
|
72
72
|
})
|
73
73
|
.options('skipNxCache', {
|
74
|
-
describe: 'Rerun the tasks even when the results are available in the cache',
|
74
|
+
describe: 'Rerun the tasks even when the results are available in the cache.',
|
75
75
|
type: 'boolean',
|
76
76
|
default: false,
|
77
77
|
})
|
78
78
|
.options('excludeTaskDependencies', {
|
79
|
-
describe: 'Skips running dependent tasks first',
|
79
|
+
describe: 'Skips running dependent tasks first.',
|
80
80
|
type: 'boolean',
|
81
81
|
default: false,
|
82
|
+
})
|
83
|
+
.option('skipSync', {
|
84
|
+
type: 'boolean',
|
85
|
+
// TODO(leo): add description and make it visible once it is stable
|
86
|
+
hidden: true,
|
82
87
|
})
|
83
88
|
.options('cloud', {
|
84
89
|
type: 'boolean',
|
@@ -96,7 +101,7 @@ function withRunOptions(yargs) {
|
|
96
101
|
}
|
97
102
|
function withTargetAndConfigurationOption(yargs, demandOption = true) {
|
98
103
|
return withConfiguration(yargs).option('targets', {
|
99
|
-
describe: 'Tasks to run for affected projects',
|
104
|
+
describe: 'Tasks to run for affected projects.',
|
100
105
|
type: 'string',
|
101
106
|
alias: ['target', 't'],
|
102
107
|
requiresArg: true,
|
@@ -107,7 +112,7 @@ function withTargetAndConfigurationOption(yargs, demandOption = true) {
|
|
107
112
|
}
|
108
113
|
function withConfiguration(yargs) {
|
109
114
|
return yargs.options('configuration', {
|
110
|
-
describe: 'This is the configuration to use when performing tasks on projects',
|
115
|
+
describe: 'This is the configuration to use when performing tasks on projects.',
|
111
116
|
type: 'string',
|
112
117
|
alias: 'c',
|
113
118
|
});
|
@@ -115,7 +120,7 @@ function withConfiguration(yargs) {
|
|
115
120
|
function withVerbose(yargs) {
|
116
121
|
return yargs
|
117
122
|
.option('verbose', {
|
118
|
-
describe: 'Prints additional information about the commands (e.g., stack traces)',
|
123
|
+
describe: 'Prints additional information about the commands (e.g., stack traces).',
|
119
124
|
type: 'boolean',
|
120
125
|
})
|
121
126
|
.middleware((args) => {
|
@@ -127,7 +132,7 @@ function withVerbose(yargs) {
|
|
127
132
|
function withBatch(yargs) {
|
128
133
|
return yargs.options('batch', {
|
129
134
|
type: 'boolean',
|
130
|
-
describe: 'Run task(s) in batches for executors which support batches',
|
135
|
+
describe: 'Run task(s) in batches for executors which support batches.',
|
131
136
|
coerce: (v) => {
|
132
137
|
return v || process.env.NX_BATCH_MODE === 'true';
|
133
138
|
},
|
@@ -138,26 +143,26 @@ function withAffectedOptions(yargs) {
|
|
138
143
|
return withExcludeOption(yargs)
|
139
144
|
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
140
145
|
.option('files', {
|
141
|
-
describe: 'Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces',
|
146
|
+
describe: 'Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces.',
|
142
147
|
type: 'string',
|
143
148
|
requiresArg: true,
|
144
149
|
coerce: parseCSV,
|
145
150
|
})
|
146
151
|
.option('uncommitted', {
|
147
|
-
describe: 'Uncommitted changes',
|
152
|
+
describe: 'Uncommitted changes.',
|
148
153
|
type: 'boolean',
|
149
154
|
})
|
150
155
|
.option('untracked', {
|
151
|
-
describe: 'Untracked changes',
|
156
|
+
describe: 'Untracked changes.',
|
152
157
|
type: 'boolean',
|
153
158
|
})
|
154
159
|
.option('base', {
|
155
|
-
describe: 'Base of the current branch (usually main)',
|
160
|
+
describe: 'Base of the current branch (usually main).',
|
156
161
|
type: 'string',
|
157
162
|
requiresArg: true,
|
158
163
|
})
|
159
164
|
.option('head', {
|
160
|
-
describe: 'Latest commit of the current branch (usually HEAD)',
|
165
|
+
describe: 'Latest commit of the current branch (usually HEAD).',
|
161
166
|
type: 'string',
|
162
167
|
requiresArg: true,
|
163
168
|
})
|
@@ -178,7 +183,7 @@ function withRunManyOptions(yargs) {
|
|
178
183
|
type: 'string',
|
179
184
|
alias: 'p',
|
180
185
|
coerce: parseCSV,
|
181
|
-
describe: 'Projects to run. (comma/space delimited project names and/or patterns)',
|
186
|
+
describe: 'Projects to run. (comma/space delimited project names and/or patterns).',
|
182
187
|
})
|
183
188
|
.option('all', {
|
184
189
|
describe: '[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required.',
|
@@ -209,15 +214,7 @@ function withOutputStyleOption(yargs, choices = [
|
|
209
214
|
'stream-without-prefixes',
|
210
215
|
]) {
|
211
216
|
return yargs.option('output-style', {
|
212
|
-
describe: `Defines how Nx emits outputs tasks logs
|
213
|
-
|
214
|
-
| option | description |
|
215
|
-
| --- | --- |
|
216
|
-
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
|
217
|
-
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
|
218
|
-
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
|
219
|
-
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
|
220
|
-
`,
|
217
|
+
describe: `Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output.`,
|
221
218
|
type: 'string',
|
222
219
|
choices,
|
223
220
|
});
|
@@ -227,11 +224,11 @@ function withRunOneOptions(yargs) {
|
|
227
224
|
const res = withRunOptions(withOutputStyleOption(withConfiguration(yargs), allOutputStyles))
|
228
225
|
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
229
226
|
.option('project', {
|
230
|
-
describe: 'Target project',
|
227
|
+
describe: 'Target project.',
|
231
228
|
type: 'string',
|
232
229
|
})
|
233
230
|
.option('help', {
|
234
|
-
describe: 'Show Help',
|
231
|
+
describe: 'Show Help.',
|
235
232
|
type: 'boolean',
|
236
233
|
});
|
237
234
|
if (executorShouldShowHelp) {
|
package/src/config/nx-json.d.ts
CHANGED
@@ -286,11 +286,15 @@ export interface NxSyncConfiguration {
|
|
286
286
|
};
|
287
287
|
/**
|
288
288
|
* Whether to automatically apply sync generator changes when running tasks.
|
289
|
-
* If not set, the user will be prompted.
|
289
|
+
* If not set, the user will be prompted in interactive mode.
|
290
290
|
* If set to `true`, the user will not be prompted and the changes will be applied.
|
291
291
|
* If set to `false`, the user will not be prompted and the changes will not be applied.
|
292
292
|
*/
|
293
293
|
applyChanges?: boolean;
|
294
|
+
/**
|
295
|
+
* List of registered task sync generators to disable.
|
296
|
+
*/
|
297
|
+
disabledTaskSyncGenerators?: string[];
|
294
298
|
}
|
295
299
|
/**
|
296
300
|
* Nx.json configuration
|