nx 19.7.0-canary.20240904-f39b995 → 19.7.0-canary.20240906-a3c2db8
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -12
- 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 +2 -2
- 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 +6 -6
- 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 +1 -1
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.js +32 -33
- package/src/command-line/release/publish.js +3 -0
- package/src/command-line/release/utils/git.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/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 +25 -20
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +6 -41
- package/src/tasks-runner/cache.d.ts +2 -0
- package/src/tasks-runner/cache.js +15 -1
- package/src/tasks-runner/run-command.js +4 -1
- package/src/tasks-runner/task-orchestrator.js +1 -10
- package/src/utils/command-line-utils.d.ts +1 -0
@@ -19,7 +19,7 @@ exports.yargsResetCommand = {
|
|
19
19
|
type: 'boolean',
|
20
20
|
})
|
21
21
|
.option('onlyWorkspaceData', {
|
22
|
-
description: 'Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc)',
|
22
|
+
description: 'Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc).',
|
23
23
|
type: 'boolean',
|
24
24
|
}),
|
25
25
|
handler: async (argv) => (await Promise.resolve().then(() => require('./reset'))).resetHandler(argv),
|
@@ -27,7 +27,7 @@ exports.yargsRunCommand = {
|
|
27
27
|
exports.yargsNxInfixCommand = {
|
28
28
|
...exports.yargsRunCommand,
|
29
29
|
command: '$0 <target> [project] [_..]',
|
30
|
-
describe: 'Run a target for a project',
|
30
|
+
describe: 'Run a target for a project.',
|
31
31
|
handler: async (args) => {
|
32
32
|
const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
33
33
|
// Yargs parses <target> as 'undefined' if running just 'nx'
|
@@ -6,7 +6,7 @@ const shared_options_1 = require("../yargs-utils/shared-options");
|
|
6
6
|
const params_1 = require("../../utils/params");
|
7
7
|
exports.yargsRunManyCommand = {
|
8
8
|
command: 'run-many',
|
9
|
-
describe: 'Run target for multiple listed projects',
|
9
|
+
describe: 'Run target for multiple listed projects.',
|
10
10
|
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withRunManyOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs)))), 'run-many'),
|
11
11
|
handler: async (args) => {
|
12
12
|
const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
@@ -6,14 +6,14 @@ const shared_options_1 = require("../yargs-utils/shared-options");
|
|
6
6
|
const params_1 = require("../../utils/params");
|
7
7
|
exports.yargsShowCommand = {
|
8
8
|
command: 'show',
|
9
|
-
describe: 'Show information about the workspace (e.g., list of projects)',
|
9
|
+
describe: 'Show information about the workspace (e.g., list of projects).',
|
10
10
|
builder: (yargs) => yargs
|
11
11
|
.command(showProjectsCommand)
|
12
12
|
.command(showProjectCommand)
|
13
13
|
.demandCommand()
|
14
14
|
.option('json', {
|
15
15
|
type: 'boolean',
|
16
|
-
description: 'Output JSON',
|
16
|
+
description: 'Output JSON.',
|
17
17
|
})
|
18
18
|
.example('$0 show projects', 'Show a list of all projects in the workspace')
|
19
19
|
.example('$0 show projects --with-target serve', 'Show a list of all projects in the workspace that have a "serve" target')
|
@@ -25,11 +25,11 @@ exports.yargsShowCommand = {
|
|
25
25
|
};
|
26
26
|
const showProjectsCommand = {
|
27
27
|
command: 'projects',
|
28
|
-
describe: 'Show a list of projects in the workspace',
|
28
|
+
describe: 'Show a list of projects in the workspace.',
|
29
29
|
builder: (yargs) => (0, shared_options_1.withVerbose)((0, shared_options_1.withAffectedOptions)(yargs))
|
30
30
|
.option('affected', {
|
31
31
|
type: 'boolean',
|
32
|
-
description: 'Show only affected projects',
|
32
|
+
description: 'Show only affected projects.',
|
33
33
|
})
|
34
34
|
.option('projects', {
|
35
35
|
type: 'string',
|
@@ -40,17 +40,17 @@ const showProjectsCommand = {
|
|
40
40
|
.option('withTarget', {
|
41
41
|
type: 'string',
|
42
42
|
alias: ['t'],
|
43
|
-
description: 'Show only projects that have a specific target',
|
43
|
+
description: 'Show only projects that have a specific target.',
|
44
44
|
coerce: shared_options_1.parseCSV,
|
45
45
|
})
|
46
46
|
.option('type', {
|
47
47
|
type: 'string',
|
48
|
-
description: 'Select only projects of the given type',
|
48
|
+
description: 'Select only projects of the given type.',
|
49
49
|
choices: ['app', 'lib', 'e2e'],
|
50
50
|
})
|
51
51
|
.option('sep', {
|
52
52
|
type: 'string',
|
53
|
-
description: 'Outputs projects with the specified seperator',
|
53
|
+
description: 'Outputs projects with the specified seperator.',
|
54
54
|
})
|
55
55
|
.implies('untracked', 'affected')
|
56
56
|
.implies('uncommitted', 'affected')
|
@@ -79,15 +79,15 @@ const showProjectCommand = {
|
|
79
79
|
.positional('projectName', {
|
80
80
|
type: 'string',
|
81
81
|
alias: 'p',
|
82
|
-
description: 'Which project should be viewed
|
82
|
+
description: 'Which project should be viewed?.',
|
83
83
|
})
|
84
84
|
.option('web', {
|
85
85
|
type: 'boolean',
|
86
|
-
description: 'Show project details in the browser. (default when interactive)',
|
86
|
+
description: 'Show project details in the browser. (default when interactive).',
|
87
87
|
})
|
88
88
|
.option('open', {
|
89
89
|
type: 'boolean',
|
90
|
-
description: 'Set to false to prevent the browser from opening when using --web',
|
90
|
+
description: 'Set to false to prevent the browser from opening when using --web.',
|
91
91
|
implies: 'web',
|
92
92
|
})
|
93
93
|
.check((argv) => {
|
@@ -5,7 +5,7 @@ const documentation_1 = require("../yargs-utils/documentation");
|
|
5
5
|
const shared_options_1 = require("../yargs-utils/shared-options");
|
6
6
|
exports.yargsWatchCommand = {
|
7
7
|
command: 'watch',
|
8
|
-
describe: 'Watch for changes within projects, and execute commands',
|
8
|
+
describe: 'Watch for changes within projects, and execute commands.',
|
9
9
|
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)(withWatchOptions(yargs), 'watch'),
|
10
10
|
handler: async (args) => {
|
11
11
|
await Promise.resolve().then(() => require('./watch')).then((m) => m.watch(args));
|
@@ -3,7 +3,7 @@ interface ExcludeOptions {
|
|
3
3
|
exclude: string[];
|
4
4
|
}
|
5
5
|
export declare const defaultYargsParserConfiguration: Partial<ParserConfigurationOptions>;
|
6
|
-
export declare function withExcludeOption(yargs: Argv): Argv<ExcludeOptions>;
|
6
|
+
export declare function withExcludeOption<T>(yargs: Argv<T>): Argv<T & ExcludeOptions>;
|
7
7
|
export interface RunOptions {
|
8
8
|
exclude: string;
|
9
9
|
parallel: string;
|
@@ -20,6 +20,7 @@ export interface RunOptions {
|
|
20
20
|
batch: boolean;
|
21
21
|
useAgents: boolean;
|
22
22
|
excludeTaskDependencies: boolean;
|
23
|
+
skipSync: boolean;
|
23
24
|
}
|
24
25
|
export declare function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions>;
|
25
26
|
export declare function withTargetAndConfigurationOption(yargs: Argv, demandOption?: boolean): Argv<{
|
@@ -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.',
|
@@ -219,11 +224,11 @@ function withRunOneOptions(yargs) {
|
|
219
224
|
const res = withRunOptions(withOutputStyleOption(withConfiguration(yargs), allOutputStyles))
|
220
225
|
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
221
226
|
.option('project', {
|
222
|
-
describe: 'Target project',
|
227
|
+
describe: 'Target project.',
|
223
228
|
type: 'string',
|
224
229
|
})
|
225
230
|
.option('help', {
|
226
|
-
describe: 'Show Help',
|
231
|
+
describe: 'Show Help.',
|
227
232
|
type: 'boolean',
|
228
233
|
});
|
229
234
|
if (executorShouldShowHelp) {
|