nx 18.1.0-canary.20240221-abc0cf8 → 18.1.0-canary.20240222-5d6abe4

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": "18.1.0-canary.20240221-abc0cf8",
3
+ "version": "18.1.0-canary.20240222-5d6abe4",
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": {
@@ -66,7 +66,7 @@
66
66
  "yargs-parser": "21.1.1",
67
67
  "node-machine-id": "1.1.12",
68
68
  "ora": "5.3.0",
69
- "@nrwl/tao": "18.1.0-canary.20240221-abc0cf8"
69
+ "@nrwl/tao": "18.1.0-canary.20240222-5d6abe4"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@swc-node/register": "^1.8.0",
@@ -81,16 +81,16 @@
81
81
  }
82
82
  },
83
83
  "optionalDependencies": {
84
- "@nx/nx-darwin-x64": "18.1.0-canary.20240221-abc0cf8",
85
- "@nx/nx-darwin-arm64": "18.1.0-canary.20240221-abc0cf8",
86
- "@nx/nx-linux-x64-gnu": "18.1.0-canary.20240221-abc0cf8",
87
- "@nx/nx-linux-x64-musl": "18.1.0-canary.20240221-abc0cf8",
88
- "@nx/nx-win32-x64-msvc": "18.1.0-canary.20240221-abc0cf8",
89
- "@nx/nx-linux-arm64-gnu": "18.1.0-canary.20240221-abc0cf8",
90
- "@nx/nx-linux-arm64-musl": "18.1.0-canary.20240221-abc0cf8",
91
- "@nx/nx-linux-arm-gnueabihf": "18.1.0-canary.20240221-abc0cf8",
92
- "@nx/nx-win32-arm64-msvc": "18.1.0-canary.20240221-abc0cf8",
93
- "@nx/nx-freebsd-x64": "18.1.0-canary.20240221-abc0cf8"
84
+ "@nx/nx-darwin-x64": "18.1.0-canary.20240222-5d6abe4",
85
+ "@nx/nx-darwin-arm64": "18.1.0-canary.20240222-5d6abe4",
86
+ "@nx/nx-linux-x64-gnu": "18.1.0-canary.20240222-5d6abe4",
87
+ "@nx/nx-linux-x64-musl": "18.1.0-canary.20240222-5d6abe4",
88
+ "@nx/nx-win32-x64-msvc": "18.1.0-canary.20240222-5d6abe4",
89
+ "@nx/nx-linux-arm64-gnu": "18.1.0-canary.20240222-5d6abe4",
90
+ "@nx/nx-linux-arm64-musl": "18.1.0-canary.20240222-5d6abe4",
91
+ "@nx/nx-linux-arm-gnueabihf": "18.1.0-canary.20240222-5d6abe4",
92
+ "@nx/nx-win32-arm64-msvc": "18.1.0-canary.20240222-5d6abe4",
93
+ "@nx/nx-freebsd-x64": "18.1.0-canary.20240222-5d6abe4"
94
94
  },
95
95
  "nx-migrations": {
96
96
  "migrations": "./migrations.json",
@@ -126,6 +126,7 @@
126
126
  "@nrwl/next",
127
127
  "@nx/node",
128
128
  "@nrwl/node",
129
+ "@nx/nuxt",
129
130
  "@nx/playwright",
130
131
  "@nx/plugin",
131
132
  "@nrwl/nx-plugin",
@@ -266,7 +266,7 @@ async function generateGraph(args, affectedProjects) {
266
266
  const { app, url } = await startServer(html, environmentJs, args.host || '127.0.0.1', args.port || 4211, args.watch, affectedProjects, args.focus, args.groupByFolder, args.exclude);
267
267
  url.pathname = args.view;
268
268
  if (args.focus) {
269
- url.pathname += '/' + args.focus;
269
+ url.pathname += '/' + encodeURIComponent(args.focus);
270
270
  }
271
271
  if (target) {
272
272
  url.pathname += '/' + target;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shouldCreateGitHubRelease = exports.releaseChangelog = exports.releaseChangelogCLIHandler = void 0;
4
4
  const chalk = require("chalk");
5
+ const enquirer_1 = require("enquirer");
5
6
  const node_fs_1 = require("node:fs");
6
7
  const semver_1 = require("semver");
7
8
  const tmp_1 = require("tmp");
@@ -10,6 +11,7 @@ const tree_1 = require("../../generators/tree");
10
11
  const register_1 = require("../../plugins/js/utils/register");
11
12
  const project_graph_1 = require("../../project-graph/project-graph");
12
13
  const utils_1 = require("../../tasks-runner/utils");
14
+ const is_ci_1 = require("../../utils/is-ci");
13
15
  const output_1 = require("../../utils/output");
14
16
  const params_1 = require("../../utils/params");
15
17
  const path_1 = require("../../utils/path");
@@ -302,6 +304,25 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
302
304
  `No changes were detected for any changelog files, so no changelog entries will be generated.`,
303
305
  ],
304
306
  });
307
+ if (!postGitTasks.length) {
308
+ // no GitHub releases to create so we can just exit
309
+ return;
310
+ }
311
+ if ((0, is_ci_1.isCI)()) {
312
+ output_1.output.warn({
313
+ title: `Skipped GitHub release creation because no changes were detected for any changelog files.`,
314
+ });
315
+ return;
316
+ }
317
+ // prompt the user to see if they want to create a GitHub release anyway
318
+ // we know that the user has configured GitHub releases because we have postGitTasks
319
+ const shouldCreateGitHubReleaseAnyway = await promptForGitHubRelease();
320
+ if (!shouldCreateGitHubReleaseAnyway) {
321
+ return;
322
+ }
323
+ for (const postGitTask of postGitTasks) {
324
+ await postGitTask(latestCommit);
325
+ }
305
326
  return;
306
327
  }
307
328
  // Generate a new commit for the changes, if configured to do so
@@ -600,3 +621,19 @@ function shouldCreateGitHubRelease(changelogConfig, createReleaseArg = undefined
600
621
  return (changelogConfig || {}).createRelease === 'github';
601
622
  }
602
623
  exports.shouldCreateGitHubRelease = shouldCreateGitHubRelease;
624
+ async function promptForGitHubRelease() {
625
+ try {
626
+ const result = await (0, enquirer_1.prompt)([
627
+ {
628
+ name: 'confirmation',
629
+ message: 'Do you want to create a GitHub release anyway?',
630
+ type: 'confirm',
631
+ },
632
+ ]);
633
+ return result.confirmation;
634
+ }
635
+ catch (e) {
636
+ // Handle the case where the user exits the prompt with ctrl+c
637
+ return false;
638
+ }
639
+ }
@@ -9,6 +9,7 @@ const utils_1 = require("./utils");
9
9
  const tasks_schedule_1 = require("./tasks-schedule");
10
10
  const hash_task_1 = require("../hasher/hash-task");
11
11
  const task_env_1 = require("./task-env");
12
+ const os = require("os");
12
13
  class TaskOrchestrator {
13
14
  // endregion internal state
14
15
  constructor(hasher, initiatingProject, projectGraph, taskGraph, options, bail, daemon) {
@@ -216,8 +217,10 @@ class TaskOrchestrator {
216
217
  }
217
218
  async runTaskInForkedProcess(task, env, pipeOutput, temporaryOutputPath, streamOutput) {
218
219
  try {
220
+ let usePtyFork = process.env.NX_NATIVE_COMMAND_RUNNER !== 'false' &&
221
+ supportedPtyPlatform();
219
222
  // execution
220
- const { code, terminalOutput } = process.env.NX_NATIVE_COMMAND_RUNNER !== 'false'
223
+ const { code, terminalOutput } = usePtyFork
221
224
  ? await this.forkedProcessTaskRunner.forkProcess(task, {
222
225
  temporaryOutputPath,
223
226
  streamOutput,
@@ -373,3 +376,22 @@ class TaskOrchestrator {
373
376
  }
374
377
  }
375
378
  exports.TaskOrchestrator = TaskOrchestrator;
379
+ function supportedPtyPlatform() {
380
+ if (process.platform !== 'win32') {
381
+ return true;
382
+ }
383
+ let windowsVersion = os.release().split('.');
384
+ let windowsBuild = windowsVersion[2];
385
+ if (!windowsBuild) {
386
+ return false;
387
+ }
388
+ // Mininum supported Windows version:
389
+ // https://en.wikipedia.org/wiki/Windows_10,_version_1809
390
+ // https://learn.microsoft.com/en-us/windows/console/createpseudoconsole#requirements
391
+ if (+windowsBuild < 17763) {
392
+ return false;
393
+ }
394
+ else {
395
+ return true;
396
+ }
397
+ }
@@ -53,6 +53,10 @@ function fetchCorePlugins() {
53
53
  name: '@nx/node',
54
54
  capabilities: 'executors,generators',
55
55
  },
56
+ {
57
+ name: '@nx/nuxt',
58
+ capabilities: 'generators',
59
+ },
56
60
  {
57
61
  name: 'nx',
58
62
  capabilities: 'executors',