nx 21.3.0-canary.20250618-5c2fdc9 → 21.3.0-canary.20250619-29b14b1

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/bin/init-local.js CHANGED
@@ -14,6 +14,12 @@ const nx_console_prompt_1 = require("../src/utils/nx-console-prompt");
14
14
  async function initLocal(workspace) {
15
15
  process.env.NX_CLI_SET = 'true';
16
16
  try {
17
+ // In case Nx Cloud forcibly exits while the TUI is running, ensure the terminal is restored etc.
18
+ process.on('exit', (...args) => {
19
+ if (typeof globalThis.tuiOnProcessExit === 'function') {
20
+ globalThis.tuiOnProcessExit(...args);
21
+ }
22
+ });
17
23
  perf_hooks_1.performance.mark('init-local');
18
24
  if (workspace.type !== 'nx' && shouldDelegateToAngularCLI()) {
19
25
  console.warn((0, strip_indents_1.stripIndents) `Using Nx to run Angular CLI commands is deprecated and will be removed in a future version.
package/bin/nx.js CHANGED
@@ -17,12 +17,6 @@ const perf_hooks_1 = require("perf_hooks");
17
17
  const workspace_context_1 = require("../src/utils/workspace-context");
18
18
  const client_1 = require("../src/daemon/client/client");
19
19
  const db_connection_1 = require("../src/utils/db-connection");
20
- // In case Nx Cloud forcibly exits while the TUI is running, ensure the terminal is restored etc.
21
- process.on('exit', (...args) => {
22
- if (typeof globalThis.tuiOnProcessExit === 'function') {
23
- globalThis.tuiOnProcessExit(...args);
24
- }
25
- });
26
20
  async function main() {
27
21
  if (process.argv[2] !== 'report' &&
28
22
  process.argv[2] !== '--version' &&
@@ -71,7 +65,7 @@ async function main() {
71
65
  handleNoWorkspace(GLOBAL_NX_VERSION);
72
66
  }
73
67
  if (!localNx) {
74
- handleMissingLocalInstallation();
68
+ handleMissingLocalInstallation(workspace ? workspace.dir : null);
75
69
  }
76
70
  // this file is already in the local workspace
77
71
  if (isLocalInstall) {
@@ -138,9 +132,11 @@ function resolveNx(workspace) {
138
132
  paths: [workspace ? workspace.dir : globalsRoot],
139
133
  });
140
134
  }
141
- function handleMissingLocalInstallation() {
135
+ function handleMissingLocalInstallation(detectedWorkspaceRoot) {
142
136
  output_1.output.error({
143
- title: `Could not find Nx modules in this workspace.`,
137
+ title: detectedWorkspaceRoot
138
+ ? `Could not find Nx modules at "${detectedWorkspaceRoot}".`
139
+ : `Could not find Nx modules in this workspace.`,
144
140
  bodyLines: [`Have you run ${chalk.bold.white(`npm/yarn install`)}?`],
145
141
  });
146
142
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.3.0-canary.20250618-5c2fdc9",
3
+ "version": "21.3.0-canary.20250619-29b14b1",
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.3.0-canary.20250618-5c2fdc9",
87
- "@nx/nx-darwin-x64": "21.3.0-canary.20250618-5c2fdc9",
88
- "@nx/nx-freebsd-x64": "21.3.0-canary.20250618-5c2fdc9",
89
- "@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.20250618-5c2fdc9",
90
- "@nx/nx-linux-arm64-gnu": "21.3.0-canary.20250618-5c2fdc9",
91
- "@nx/nx-linux-arm64-musl": "21.3.0-canary.20250618-5c2fdc9",
92
- "@nx/nx-linux-x64-gnu": "21.3.0-canary.20250618-5c2fdc9",
93
- "@nx/nx-linux-x64-musl": "21.3.0-canary.20250618-5c2fdc9",
94
- "@nx/nx-win32-arm64-msvc": "21.3.0-canary.20250618-5c2fdc9",
95
- "@nx/nx-win32-x64-msvc": "21.3.0-canary.20250618-5c2fdc9"
86
+ "@nx/nx-darwin-arm64": "21.3.0-canary.20250619-29b14b1",
87
+ "@nx/nx-darwin-x64": "21.3.0-canary.20250619-29b14b1",
88
+ "@nx/nx-freebsd-x64": "21.3.0-canary.20250619-29b14b1",
89
+ "@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.20250619-29b14b1",
90
+ "@nx/nx-linux-arm64-gnu": "21.3.0-canary.20250619-29b14b1",
91
+ "@nx/nx-linux-arm64-musl": "21.3.0-canary.20250619-29b14b1",
92
+ "@nx/nx-linux-x64-gnu": "21.3.0-canary.20250619-29b14b1",
93
+ "@nx/nx-linux-x64-musl": "21.3.0-canary.20250619-29b14b1",
94
+ "@nx/nx-win32-arm64-msvc": "21.3.0-canary.20250619-29b14b1",
95
+ "@nx/nx-win32-x64-msvc": "21.3.0-canary.20250619-29b14b1"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
Binary file
@@ -12,6 +12,7 @@ export interface PackageManagerCommands {
12
12
  list: string;
13
13
  run: (script: string, args?: string) => string;
14
14
  getRegistryUrl?: string;
15
+ publish: (packageRoot: string, registry: string, registryConfigKey: string, tag: string) => string;
15
16
  }
16
17
  /**
17
18
  * Detects which package manager is used in the workspace based on the lock file.
@@ -102,18 +102,23 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
102
102
  getRegistryUrl: useBerry
103
103
  ? 'yarn config get npmRegistryServer'
104
104
  : 'yarn config get registry',
105
+ publish: (packageRoot, registry, registryConfigKey, tag) => `npm publish "${packageRoot}" --json --"${registryConfigKey}=${registry}" --tag=${tag}`,
105
106
  };
106
107
  },
107
108
  pnpm: () => {
108
- let modernPnpm, includeDoubleDashBeforeArgs;
109
+ let modernPnpm, includeDoubleDashBeforeArgs, allowRegistryConfigKey;
109
110
  try {
110
111
  const pnpmVersion = getPackageManagerVersion('pnpm', root);
111
112
  modernPnpm = (0, semver_1.gte)(pnpmVersion, '6.13.0');
112
113
  includeDoubleDashBeforeArgs = (0, semver_1.lt)(pnpmVersion, '7.0.0');
114
+ // Support for --@scope:registry was added in pnpm v10.5.0 and backported to v9.15.7.
115
+ // Versions >=10.0.0 and <10.5.0 do NOT support this CLI option.
116
+ allowRegistryConfigKey = (0, semver_1.satisfies)(pnpmVersion, '>=9.15.7 <10.0.0 || >=10.5.0');
113
117
  }
114
118
  catch {
115
119
  modernPnpm = true;
116
120
  includeDoubleDashBeforeArgs = true;
121
+ allowRegistryConfigKey = false;
117
122
  }
118
123
  const isPnpmWorkspace = (0, fs_1.existsSync)((0, path_1.join)(root, 'pnpm-workspace.yaml'));
119
124
  return {
@@ -132,6 +137,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
132
137
  : ''}`,
133
138
  list: 'pnpm ls --depth 100',
134
139
  getRegistryUrl: 'pnpm config get registry',
140
+ publish: (packageRoot, registry, registryConfigKey, tag) => `pnpm publish "${packageRoot}" --json --"${allowRegistryConfigKey ? registryConfigKey : 'registry'}=${registry}" --tag=${tag} --no-git-checks`,
135
141
  };
136
142
  },
137
143
  npm: () => {
@@ -149,6 +155,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
149
155
  run: (script, args) => `npm run ${script}${args ? ' -- ' + args : ''}`,
150
156
  list: 'npm ls',
151
157
  getRegistryUrl: 'npm config get registry',
158
+ publish: (packageRoot, registry, registryConfigKey, tag) => `npm publish "${packageRoot}" --json --"${registryConfigKey}=${registry}" --tag=${tag}`,
152
159
  };
153
160
  },
154
161
  bun: () => {
@@ -164,6 +171,8 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
164
171
  dlx: 'bunx',
165
172
  run: (script, args) => `bun run ${script} -- ${args}`,
166
173
  list: 'bun pm ls',
174
+ // Unlike npm, bun publish does not support a custom registryConfigKey option
175
+ publish: (packageRoot, registry, registryConfigKey, tag) => `bun publish --cwd="${packageRoot}" --json --registry="${registry}" --tag=${tag}`,
167
176
  };
168
177
  },
169
178
  };