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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.0.0-canary.20250501-8f50358",
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-canary.20250501-8f50358",
87
- "@nx/nx-darwin-x64": "21.0.0-canary.20250501-8f50358",
88
- "@nx/nx-freebsd-x64": "21.0.0-canary.20250501-8f50358",
89
- "@nx/nx-linux-arm-gnueabihf": "21.0.0-canary.20250501-8f50358",
90
- "@nx/nx-linux-arm64-gnu": "21.0.0-canary.20250501-8f50358",
91
- "@nx/nx-linux-arm64-musl": "21.0.0-canary.20250501-8f50358",
92
- "@nx/nx-linux-x64-gnu": "21.0.0-canary.20250501-8f50358",
93
- "@nx/nx-linux-x64-musl": "21.0.0-canary.20250501-8f50358",
94
- "@nx/nx-win32-arm64-msvc": "21.0.0-canary.20250501-8f50358",
95
- "@nx/nx-win32-x64-msvc": "21.0.0-canary.20250501-8f50358"
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(v21): Stop sorting tsconfig paths by default, paths are now less common/important
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
- * le executed correctly.
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
- * le executed correctly.
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
- // If its a @nrwl scoped package, keep the version if there is no
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.options('tuiAutoExit', {
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: (value) => {
39
- if (value === 'true') {
40
- return true;
41
- }
42
- if (value === 'false') {
43
- return false;
44
- }
45
- const num = Number(value);
46
- if (!Number.isNaN(num)) {
47
- return num;
48
- }
49
- throw new Error(`Invalid value for --tui-auto-exit: ${value}`);
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
+ };