nx 21.0.0-canary.20250501-8f50358 → 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/package.json +14 -11
- package/src/command-line/format/command-object.js +1 -1
- package/src/command-line/nx-commands.d.ts +1 -1
- package/src/command-line/nx-commands.js +1 -1
- package/src/command-line/report/report.js +1 -29
- package/src/command-line/yargs-utils/shared-options.js +27 -14
- package/src/core/graph/main.js +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/native/index.d.ts +2 -2
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/forked-process-task-runner.js +1 -0
- package/src/tasks-runner/is-tui-enabled.js +13 -7
- package/src/tasks-runner/pseudo-terminal.d.ts +2 -1
- package/src/tasks-runner/pseudo-terminal.js +2 -2
- package/src/utils/ignore.d.ts +0 -6
- package/src/utils/ignore.js +0 -63
- package/src/utils/params.js +22 -16
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.0.0-
|
3
|
+
"version": "21.0.0-rc.0",
|
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": {
|
@@ -83,16 +83,16 @@
|
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"optionalDependencies": {
|
86
|
-
"@nx/nx-darwin-arm64": "21.0.0-
|
87
|
-
"@nx/nx-darwin-x64": "21.0.0-
|
88
|
-
"@nx/nx-freebsd-x64": "21.0.0-
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.0.0-
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.0.0-
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.0.0-
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.0.0-
|
93
|
-
"@nx/nx-linux-x64-musl": "21.0.0-
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.0.0-
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.0.0-
|
86
|
+
"@nx/nx-darwin-arm64": "21.0.0-rc.0",
|
87
|
+
"@nx/nx-darwin-x64": "21.0.0-rc.0",
|
88
|
+
"@nx/nx-freebsd-x64": "21.0.0-rc.0",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.0.0-rc.0",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.0.0-rc.0",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.0.0-rc.0",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.0.0-rc.0",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.0.0-rc.0",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.0.0-rc.0",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.0.0-rc.0"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
@@ -165,6 +165,9 @@
|
|
165
165
|
"x86_64-unknown-freebsd"
|
166
166
|
]
|
167
167
|
},
|
168
|
+
"engines": {
|
169
|
+
"node": "^20.19.0 || ^22.12.0"
|
170
|
+
},
|
168
171
|
"types": "./bin/nx.d.ts",
|
169
172
|
"main": "./bin/nx.js",
|
170
173
|
"type": "commonjs",
|
@@ -40,7 +40,7 @@ function withFormatOptions(yargs) {
|
|
40
40
|
describe: `Ensure the workspace's tsconfig compilerOptions.paths are sorted. Warning: This will cause comments in the tsconfig to be lost.`,
|
41
41
|
type: 'boolean',
|
42
42
|
/**
|
43
|
-
* TODO(
|
43
|
+
* TODO(v22): Stop sorting tsconfig paths by default, paths are now less common/important
|
44
44
|
* in Nx workspace setups, and the sorting causes comments to be lost.
|
45
45
|
*/
|
46
46
|
default: true,
|
@@ -5,6 +5,6 @@ export declare const parserConfiguration: Partial<yargs.ParserConfigurationOptio
|
|
5
5
|
* parse it. The CLI will consume it and call the `.argv` to bootstrapped
|
6
6
|
* the CLI. These command declarations needs to be in a different file
|
7
7
|
* from the `.argv` call, so the object and it's relative scripts can
|
8
|
-
*
|
8
|
+
* be executed correctly.
|
9
9
|
*/
|
10
10
|
export declare const commandsObject: yargs.Argv<unknown>;
|
@@ -40,7 +40,7 @@ exports.parserConfiguration = {
|
|
40
40
|
* parse it. The CLI will consume it and call the `.argv` to bootstrapped
|
41
41
|
* the CLI. These command declarations needs to be in a different file
|
42
42
|
* from the `.argv` call, so the object and it's relative scripts can
|
43
|
-
*
|
43
|
+
* be executed correctly.
|
44
44
|
*/
|
45
45
|
exports.commandsObject = yargs
|
46
46
|
.parserConfiguration(exports.parserConfiguration)
|
@@ -290,38 +290,10 @@ function findRegisteredPluginsBeingUsed(nxJson) {
|
|
290
290
|
function findInstalledPackagesWeCareAbout() {
|
291
291
|
const packagesWeMayCareAbout = {};
|
292
292
|
// TODO (v20): Remove workaround for hiding @nrwl packages when matching @nx package is found.
|
293
|
-
const packageChangeMap = {
|
294
|
-
'@nrwl/nx-plugin': '@nx/plugin',
|
295
|
-
'@nx/plugin': '@nrwl/nx-plugin',
|
296
|
-
'@nrwl/eslint-plugin-nx': '@nx/eslint-plugin',
|
297
|
-
'@nx/eslint-plugin': '@nrwl/eslint-plugin-nx',
|
298
|
-
'@nrwl/nx-cloud': 'nx-cloud',
|
299
|
-
};
|
300
293
|
for (const pkg of exports.packagesWeCareAbout) {
|
301
294
|
const v = readPackageVersion(pkg);
|
302
295
|
if (v) {
|
303
|
-
|
304
|
-
// corresponding @nx scoped package, or it has a different version.
|
305
|
-
if (pkg.startsWith('@nrwl/')) {
|
306
|
-
const otherPackage = packageChangeMap[pkg] ?? pkg.replace('@nrwl/', '@nx/');
|
307
|
-
const otherVersion = packagesWeMayCareAbout[otherPackage];
|
308
|
-
if (!otherVersion || v !== otherVersion) {
|
309
|
-
packagesWeMayCareAbout[pkg] = v;
|
310
|
-
}
|
311
|
-
// If its a @nx scoped package, always keep the version, and
|
312
|
-
// remove the corresponding @nrwl scoped package if it exists.
|
313
|
-
}
|
314
|
-
else if (pkg.startsWith('@nx/')) {
|
315
|
-
const otherPackage = packageChangeMap[pkg] ?? pkg.replace('@nx/', '@nrwl/');
|
316
|
-
const otherVersion = packagesWeMayCareAbout[otherPackage];
|
317
|
-
if (otherVersion && v === otherVersion) {
|
318
|
-
delete packagesWeMayCareAbout[otherPackage];
|
319
|
-
}
|
320
|
-
packagesWeMayCareAbout[pkg] = v;
|
321
|
-
}
|
322
|
-
else {
|
323
|
-
packagesWeMayCareAbout[pkg] = v;
|
324
|
-
}
|
296
|
+
packagesWeMayCareAbout[pkg] = v;
|
325
297
|
}
|
326
298
|
}
|
327
299
|
return Object.entries(packagesWeMayCareAbout).map(([pkg, version]) => ({
|
@@ -32,22 +32,22 @@ function withExcludeOption(yargs) {
|
|
32
32
|
});
|
33
33
|
}
|
34
34
|
function withTuiOptions(yargs) {
|
35
|
-
return yargs
|
35
|
+
return yargs
|
36
|
+
.options('tuiAutoExit', {
|
36
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.',
|
37
38
|
type: 'string',
|
38
|
-
coerce: (
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
},
|
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
|
+
}
|
51
51
|
});
|
52
52
|
}
|
53
53
|
function withRunOptions(yargs) {
|
@@ -316,3 +316,16 @@ function readParallelFromArgsAndEnv(args) {
|
|
316
316
|
return Number(args['parallel']);
|
317
317
|
}
|
318
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
|
+
};
|