nx 21.0.0-canary.20250430-07b881d → 21.0.0-rc.0
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/migrations.json +10 -5
- package/package.json +14 -11
- package/release/changelog-renderer/index.d.ts +7 -7
- package/release/changelog-renderer/index.js +12 -31
- package/schemas/nx-schema.json +3 -3
- package/src/command-line/format/command-object.js +1 -1
- package/src/command-line/migrate/migrate-ui-api.d.ts +2 -1
- package/src/command-line/migrate/migrate-ui-api.js +4 -3
- package/src/command-line/nx-commands.d.ts +1 -1
- package/src/command-line/nx-commands.js +1 -1
- package/src/command-line/release/changelog.d.ts +3 -2
- package/src/command-line/release/changelog.js +57 -70
- package/src/command-line/release/command-object.d.ts +1 -1
- package/src/command-line/release/config/config.d.ts +8 -1
- package/src/command-line/release/config/config.js +18 -11
- package/src/command-line/release/release.js +30 -18
- package/src/command-line/release/utils/git.d.ts +1 -0
- package/src/command-line/release/utils/git.js +27 -8
- package/src/command-line/release/utils/remote-release-clients/github.d.ts +57 -0
- package/src/command-line/release/utils/remote-release-clients/github.js +309 -0
- package/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +62 -0
- package/src/command-line/release/utils/remote-release-clients/gitlab.js +271 -0
- package/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +111 -0
- package/src/command-line/release/utils/remote-release-clients/remote-release-client.js +136 -0
- package/src/command-line/report/report.js +1 -29
- package/src/command-line/yargs-utils/shared-options.d.ts +1 -1
- package/src/command-line/yargs-utils/shared-options.js +49 -17
- package/src/config/nx-json.d.ts +8 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/daemon/server/watcher.js +0 -6
- package/src/executors/run-commands/running-tasks.js +15 -5
- package/src/generators/utils/nx-json.d.ts +1 -2
- package/src/generators/utils/nx-json.js +6 -12
- package/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +2 -0
- package/src/migrations/update-21-0-0/release-changelog-config-changes.js +38 -0
- package/src/native/index.d.ts +8 -3
- package/src/native/native-bindings.js +1 -0
- package/src/native/native-file-cache-location.js +2 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/project-graph/plugins/get-plugins.js +19 -14
- package/src/tasks-runner/forked-process-task-runner.js +1 -0
- package/src/tasks-runner/is-tui-enabled.d.ts +16 -1
- package/src/tasks-runner/is-tui-enabled.js +48 -30
- package/src/tasks-runner/pseudo-terminal.d.ts +2 -1
- package/src/tasks-runner/pseudo-terminal.js +2 -2
- package/src/tasks-runner/run-command.js +3 -3
- package/src/tasks-runner/running-tasks/node-child-process.d.ts +1 -0
- package/src/tasks-runner/running-tasks/node-child-process.js +7 -0
- package/src/tasks-runner/task-orchestrator.js +6 -3
- package/src/utils/ignore.d.ts +0 -6
- package/src/utils/ignore.js +0 -63
- package/src/utils/is-ci.d.ts +1 -1
- package/src/utils/is-ci.js +4 -1
- package/src/utils/package-manager.d.ts +1 -0
- package/src/utils/package-manager.js +29 -16
- package/src/utils/params.js +22 -16
- package/src/command-line/release/utils/github.d.ts +0 -32
- package/src/command-line/release/utils/github.js +0 -326
@@ -15,6 +15,8 @@ exports.withOutputStyleOption = withOutputStyleOption;
|
|
15
15
|
exports.withRunOneOptions = withRunOneOptions;
|
16
16
|
exports.parseCSV = parseCSV;
|
17
17
|
exports.readParallelFromArgsAndEnv = readParallelFromArgsAndEnv;
|
18
|
+
const nx_json_1 = require("../../config/nx-json");
|
19
|
+
const is_tui_enabled_1 = require("../../tasks-runner/is-tui-enabled");
|
18
20
|
exports.defaultYargsParserConfiguration = {
|
19
21
|
'strip-dashed': true,
|
20
22
|
'unknown-options-as-args': true,
|
@@ -30,22 +32,22 @@ function withExcludeOption(yargs) {
|
|
30
32
|
});
|
31
33
|
}
|
32
34
|
function withTuiOptions(yargs) {
|
33
|
-
return yargs
|
35
|
+
return yargs
|
36
|
+
.options('tuiAutoExit', {
|
34
37
|
describe: 'Whether or not to exit the TUI automatically after all tasks finish, and after how long. If set to `true`, the TUI will exit immediately. If set to `false` the TUI will not automatically exit. If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.',
|
35
38
|
type: 'string',
|
36
|
-
coerce: (
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
},
|
39
|
+
coerce: (v) => coerceTuiAutoExit(v),
|
40
|
+
})
|
41
|
+
.middleware((args) => {
|
42
|
+
if (args.tuiAutoExit !== undefined) {
|
43
|
+
process.env.NX_TUI_AUTO_EXIT = args.tuiAutoExit.toString();
|
44
|
+
}
|
45
|
+
else if (process.env.NX_TUI_AUTO_EXIT) {
|
46
|
+
args.tuiAutoExit = coerceTuiAutoExit(process.env.NX_TUI_AUTO_EXIT
|
47
|
+
// have to cast here because yarg's typings do not account for the
|
48
|
+
// coercion function
|
49
|
+
);
|
50
|
+
}
|
49
51
|
});
|
50
52
|
}
|
51
53
|
function withRunOptions(yargs) {
|
@@ -229,23 +231,40 @@ function withOverrides(args, commandLevel = 1) {
|
|
229
231
|
};
|
230
232
|
}
|
231
233
|
const allOutputStyles = [
|
234
|
+
'tui',
|
232
235
|
'dynamic',
|
236
|
+
'dynamic-legacy',
|
233
237
|
'static',
|
234
238
|
'stream',
|
235
239
|
'stream-without-prefixes',
|
236
240
|
'compact',
|
237
241
|
];
|
238
242
|
function withOutputStyleOption(yargs, choices = [
|
243
|
+
'dynamic-legacy',
|
239
244
|
'dynamic',
|
245
|
+
'tui',
|
240
246
|
'static',
|
241
247
|
'stream',
|
242
248
|
'stream-without-prefixes',
|
243
249
|
]) {
|
244
|
-
return yargs
|
245
|
-
|
250
|
+
return yargs
|
251
|
+
.option('output-style', {
|
252
|
+
describe: `Defines how Nx emits outputs tasks logs. **tui**: enables the Nx Terminal UI, recommended for local development environments. **dynamic-legacy**: use dynamic-legacy 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 for local development environments where tui is not supported. **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.`,
|
246
253
|
type: 'string',
|
247
254
|
choices,
|
248
|
-
})
|
255
|
+
})
|
256
|
+
.middleware([
|
257
|
+
(args) => {
|
258
|
+
const useTui = (0, is_tui_enabled_1.shouldUseTui)((0, nx_json_1.readNxJson)(), args);
|
259
|
+
if (useTui) {
|
260
|
+
// We have to set both of these because `check` runs after the normalization that
|
261
|
+
// handles the kebab-case'd args -> camelCase'd args translation.
|
262
|
+
args['output-style'] = 'tui';
|
263
|
+
args.outputStyle = 'tui';
|
264
|
+
}
|
265
|
+
process.env.NX_TUI = useTui.toString();
|
266
|
+
},
|
267
|
+
]);
|
249
268
|
}
|
250
269
|
function withRunOneOptions(yargs) {
|
251
270
|
const executorShouldShowHelp = !(process.argv[2] === 'run' && process.argv[3] === '--help');
|
@@ -297,3 +316,16 @@ function readParallelFromArgsAndEnv(args) {
|
|
297
316
|
return Number(args['parallel']);
|
298
317
|
}
|
299
318
|
}
|
319
|
+
const coerceTuiAutoExit = (value) => {
|
320
|
+
if (value === 'true') {
|
321
|
+
return true;
|
322
|
+
}
|
323
|
+
if (value === 'false') {
|
324
|
+
return false;
|
325
|
+
}
|
326
|
+
const num = Number(value);
|
327
|
+
if (!Number.isNaN(num)) {
|
328
|
+
return num;
|
329
|
+
}
|
330
|
+
throw new Error(`Invalid value for --tui-auto-exit: ${value}`);
|
331
|
+
};
|
package/src/config/nx-json.d.ts
CHANGED
@@ -165,13 +165,20 @@ export interface NxReleaseChangelogConfiguration {
|
|
165
165
|
* NOTE: if createRelease is set on a group of projects, it will cause the default releaseTagPattern of
|
166
166
|
* "{projectName}@{version}" to be used for those projects, even when versioning everything together.
|
167
167
|
*/
|
168
|
-
createRelease?: false | 'github' | {
|
168
|
+
createRelease?: false | 'github' | 'gitlab' | {
|
169
169
|
provider: 'github-enterprise-server';
|
170
170
|
hostname: string;
|
171
171
|
/**
|
172
172
|
* If not set, this will default to `https://${hostname}/api/v3`
|
173
173
|
*/
|
174
174
|
apiBaseUrl?: string;
|
175
|
+
} | {
|
176
|
+
provider: 'gitlab';
|
177
|
+
hostname: string;
|
178
|
+
/**
|
179
|
+
* If not set, this will default to `https://${hostname}/api/v4`
|
180
|
+
*/
|
181
|
+
apiBaseUrl?: string;
|
175
182
|
};
|
176
183
|
/**
|
177
184
|
* This can either be set to a string value that will be written to the changelog file(s)
|