nx 20.0.1 → 20.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/bin/nx.js +2 -2
  2. package/package.json +11 -11
  3. package/schemas/nx-schema.json +4 -0
  4. package/src/command-line/activate-powerpack/activate-powerpack.js +1 -1
  5. package/src/command-line/add/add.js +1 -1
  6. package/src/command-line/connect/view-logs.js +1 -1
  7. package/src/command-line/exec/exec.js +3 -3
  8. package/src/command-line/format/format.js +3 -3
  9. package/src/command-line/graph/graph.js +1 -1
  10. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -1
  11. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +2 -2
  12. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +1 -1
  13. package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
  14. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -1
  15. package/src/command-line/init/implementation/react/index.js +6 -6
  16. package/src/command-line/init/implementation/utils.js +9 -5
  17. package/src/command-line/init/init-v1.js +1 -1
  18. package/src/command-line/init/init-v2.js +1 -1
  19. package/src/command-line/migrate/command-object.js +4 -4
  20. package/src/command-line/migrate/migrate.js +1 -1
  21. package/src/command-line/release/config/version-plans.js +1 -1
  22. package/src/command-line/release/plan.js +1 -1
  23. package/src/command-line/release/utils/exec-command.js +1 -1
  24. package/src/command-line/release/utils/github.js +1 -1
  25. package/src/command-line/release/utils/launch-editor.js +2 -2
  26. package/src/command-line/release/version.js +1 -1
  27. package/src/command-line/run/run.js +1 -1
  28. package/src/command-line/watch/watch.js +1 -1
  29. package/src/config/nx-json.d.ts +1 -1
  30. package/src/core/graph/main.js +1 -1
  31. package/src/daemon/client/client.js +1 -1
  32. package/src/daemon/client/generate-help-output.js +1 -1
  33. package/src/executors/run-commands/run-commands.impl.js +1 -1
  34. package/src/executors/run-script/run-script.impl.js +1 -1
  35. package/src/native/nx.wasm32-wasi.wasm +0 -0
  36. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -1
  37. package/src/plugins/js/index.js +2 -2
  38. package/src/project-graph/file-utils.js +1 -1
  39. package/src/tasks-runner/cache.js +1 -1
  40. package/src/utils/ab-testing.js +1 -1
  41. package/src/utils/command-line-utils.js +3 -3
  42. package/src/utils/default-base.js +1 -1
  43. package/src/utils/git-utils.index-filter.js +2 -2
  44. package/src/utils/git-utils.js +4 -4
  45. package/src/utils/git-utils.tree-filter.js +1 -1
  46. package/src/utils/nx-cloud-utils.js +1 -4
@@ -416,7 +416,7 @@ class DaemonClient {
416
416
  cwd: workspace_root_1.workspaceRoot,
417
417
  stdio: ['ignore', this._out.fd, this._err.fd],
418
418
  detached: true,
419
- windowsHide: true,
419
+ windowsHide: false,
420
420
  shell: false,
421
421
  env: {
422
422
  ...process.env,
@@ -11,7 +11,7 @@ function generateDaemonHelpOutput() {
11
11
  */
12
12
  const res = (0, child_process_1.spawnSync)(process.execPath, ['./exec-is-server-available.js'], {
13
13
  cwd: __dirname,
14
- windowsHide: true,
14
+ windowsHide: false,
15
15
  });
16
16
  const isServerAvailable = res?.stdout?.toString().trim().indexOf('true') > -1;
17
17
  if (!isServerAvailable) {
@@ -220,7 +220,7 @@ function nodeProcess(commandConfig, cwd, env, readyWhenStatus, streamOutput = tr
220
220
  maxBuffer: exports.LARGE_BUFFER,
221
221
  env,
222
222
  cwd,
223
- windowsHide: true,
223
+ windowsHide: false,
224
224
  });
225
225
  childProcesses.add(childProcess);
226
226
  childProcess.stdout.on('data', (data) => {
@@ -35,7 +35,7 @@ function nodeProcess(command, cwd, env) {
35
35
  stdio: ['inherit', 'inherit', 'inherit'],
36
36
  cwd,
37
37
  env,
38
- windowsHide: true,
38
+ windowsHide: false,
39
39
  });
40
40
  }
41
41
  async function ptyProcess(command, cwd, env) {
Binary file
@@ -32,7 +32,7 @@ function getRootPackageName(tree) {
32
32
  }
33
33
  function getNxInitDate() {
34
34
  try {
35
- const nxInitIso = (0, child_process_1.execSync)('git log --diff-filter=A --follow --format=%aI -- nx.json | tail -1', { stdio: 'pipe', windowsHide: true })
35
+ const nxInitIso = (0, child_process_1.execSync)('git log --diff-filter=A --follow --format=%aI -- nx.json | tail -1', { stdio: 'pipe', windowsHide: false })
36
36
  .toString()
37
37
  .trim();
38
38
  const nxInitDate = new Date(nxInitIso);
@@ -34,7 +34,7 @@ exports.createNodes = [
34
34
  ? (0, fs_1.readFileSync)(lockFilePath).toString()
35
35
  : (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
36
36
  maxBuffer: 1024 * 1024 * 10,
37
- windowsHide: true,
37
+ windowsHide: false,
38
38
  }).toString();
39
39
  const lockFileHash = getLockFileHash(lockFileContents);
40
40
  if (!lockFileNeedsReprocessing(lockFileHash)) {
@@ -64,7 +64,7 @@ const createDependencies = (_, ctx) => {
64
64
  ? (0, fs_1.readFileSync)(lockFilePath).toString()
65
65
  : (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
66
66
  maxBuffer: 1024 * 1024 * 10,
67
- windowsHide: true,
67
+ windowsHide: false,
68
68
  }).toString();
69
69
  const lockFileHash = getLockFileHash(lockFileContents);
70
70
  if (!lockFileNeedsReprocessing(lockFileHash)) {
@@ -91,7 +91,7 @@ function defaultReadFileAtRevision(file, revision) {
91
91
  : (0, child_process_1.execSync)(`git show ${revision}:${filePathInGitRepository}`, {
92
92
  maxBuffer: exports.TEN_MEGABYTES,
93
93
  stdio: ['pipe', 'pipe', 'ignore'],
94
- windowsHide: true,
94
+ windowsHide: false,
95
95
  })
96
96
  .toString()
97
97
  .trim();
@@ -187,7 +187,7 @@ class Cache {
187
187
  stdio: 'ignore',
188
188
  detached: true,
189
189
  shell: false,
190
- windowsHide: true,
190
+ windowsHide: false,
191
191
  });
192
192
  p.unref();
193
193
  }
@@ -99,7 +99,7 @@ function shouldRecordStats() {
99
99
  try {
100
100
  const stdout = (0, node_child_process_1.execSync)(pmc.getRegistryUrl, {
101
101
  encoding: 'utf-8',
102
- windowsHide: true,
102
+ windowsHide: false,
103
103
  });
104
104
  const url = new URL(stdout.trim());
105
105
  // don't record stats when testing locally
@@ -213,7 +213,7 @@ function getMergeBase(base, head = 'HEAD') {
213
213
  maxBuffer: file_utils_1.TEN_MEGABYTES,
214
214
  cwd: workspace_root_1.workspaceRoot,
215
215
  stdio: 'pipe',
216
- windowsHide: true,
216
+ windowsHide: false,
217
217
  })
218
218
  .toString()
219
219
  .trim();
@@ -224,7 +224,7 @@ function getMergeBase(base, head = 'HEAD') {
224
224
  maxBuffer: file_utils_1.TEN_MEGABYTES,
225
225
  cwd: workspace_root_1.workspaceRoot,
226
226
  stdio: 'pipe',
227
- windowsHide: true,
227
+ windowsHide: false,
228
228
  })
229
229
  .toString()
230
230
  .trim();
@@ -241,7 +241,7 @@ function parseGitOutput(command) {
241
241
  return (0, child_process_1.execSync)(command, {
242
242
  maxBuffer: file_utils_1.TEN_MEGABYTES,
243
243
  cwd: workspace_root_1.workspaceRoot,
244
- windowsHide: true,
244
+ windowsHide: false,
245
245
  })
246
246
  .toString('utf-8')
247
247
  .split('\n')
@@ -6,7 +6,7 @@ function deduceDefaultBase() {
6
6
  const nxDefaultBase = 'main';
7
7
  try {
8
8
  return ((0, child_process_1.execSync)('git config --get init.defaultBranch', {
9
- windowsHide: true,
9
+ windowsHide: false,
10
10
  })
11
11
  .toString()
12
12
  .trim() || nxDefaultBase);
@@ -9,10 +9,10 @@ try {
9
9
  const { execSync } = require('child_process');
10
10
  // NOTE: Using env vars because Windows PowerShell has its own handling of quotes (") messes up quotes in args, even if escaped.
11
11
  const src = process.env.NX_IMPORT_SOURCE;
12
- execSync('git read-tree --empty', { stdio: 'inherit', windowsHide: true });
12
+ execSync('git read-tree --empty', { stdio: 'inherit', windowsHide: false });
13
13
  execSync(`git reset ${process.env.GIT_COMMIT} -- "${src}"`, {
14
14
  stdio: 'inherit',
15
- windowsHide: true,
15
+ windowsHide: false,
16
16
  });
17
17
  }
18
18
  catch (error) {
@@ -36,7 +36,7 @@ class GitRepository {
36
36
  getGitRootPath(cwd) {
37
37
  return (0, child_process_1.execSync)('git rev-parse --show-toplevel', {
38
38
  cwd,
39
- windowsHide: true,
39
+ windowsHide: false,
40
40
  })
41
41
  .toString()
42
42
  .trim();
@@ -177,7 +177,7 @@ function getGithubSlugOrNull() {
177
177
  try {
178
178
  const gitRemote = (0, child_process_1.execSync)('git remote -v', {
179
179
  stdio: 'pipe',
180
- windowsHide: true,
180
+ windowsHide: false,
181
181
  }).toString();
182
182
  // If there are no remotes, we default to github
183
183
  if (!gitRemote || gitRemote.length === 0) {
@@ -228,7 +228,7 @@ function commitChanges(commitMessage, directory) {
228
228
  stdio: 'pipe',
229
229
  input: commitMessage,
230
230
  cwd: directory,
231
- windowsHide: true,
231
+ windowsHide: false,
232
232
  });
233
233
  }
234
234
  catch (err) {
@@ -250,7 +250,7 @@ function getLatestCommitSha() {
250
250
  return (0, child_process_1.execSync)('git rev-parse HEAD', {
251
251
  encoding: 'utf8',
252
252
  stdio: 'pipe',
253
- windowsHide: true,
253
+ windowsHide: false,
254
254
  }).trim();
255
255
  }
256
256
  catch {
@@ -15,7 +15,7 @@ try {
15
15
  const src = process.env.NX_IMPORT_SOURCE;
16
16
  const dest = process.env.NX_IMPORT_DESTINATION;
17
17
  const files = execSync(`git ls-files -z ${src}`, {
18
- windowsHide: true,
18
+ windowsHide: false,
19
19
  })
20
20
  .toString()
21
21
  .trim()
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isNxCloudUsed = isNxCloudUsed;
4
4
  exports.getNxCloudUrl = getNxCloudUrl;
5
5
  function isNxCloudUsed(nxJson) {
6
- if (process.env.NX_NO_CLOUD === 'true') {
6
+ if (process.env.NX_NO_CLOUD === 'true' || nxJson.neverConnectToCloud) {
7
7
  return false;
8
8
  }
9
- if (nxJson.neverConnectToCloud) {
10
- return true;
11
- }
12
9
  return (!!process.env.NX_CLOUD_ACCESS_TOKEN ||
13
10
  !!nxJson.nxCloudAccessToken ||
14
11
  !!nxJson.nxCloudId ||