nx 19.0.0-beta.1 → 19.0.0-beta.10

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.
Files changed (99) hide show
  1. package/.eslintrc.json +1 -1
  2. package/migrations.json +2 -25
  3. package/package.json +12 -12
  4. package/src/command-line/add/add.js +17 -16
  5. package/src/command-line/affected/affected.js +1 -1
  6. package/src/command-line/graph/graph.d.ts +11 -1
  7. package/src/command-line/graph/graph.js +97 -13
  8. package/src/command-line/init/implementation/react/index.js +1 -1
  9. package/src/command-line/release/changelog.js +1 -1
  10. package/src/command-line/release/command-object.js +2 -2
  11. package/src/command-line/release/publish.js +1 -1
  12. package/src/command-line/report/report.js +1 -1
  13. package/src/command-line/run/run-one.js +1 -1
  14. package/src/command-line/run-many/run-many.js +1 -1
  15. package/src/command-line/yargs-utils/shared-options.js +1 -1
  16. package/src/config/nx-json.d.ts +2 -2
  17. package/src/config/to-project-name.d.ts +5 -0
  18. package/src/config/to-project-name.js +13 -0
  19. package/src/core/graph/index.html +1 -2
  20. package/src/core/graph/main.js +1 -1
  21. package/src/core/graph/runtime.js +1 -1
  22. package/src/core/graph/styles.css +2 -2
  23. package/src/core/graph/styles.js +1 -1
  24. package/src/daemon/client/client.d.ts +2 -2
  25. package/src/daemon/client/client.js +21 -6
  26. package/src/daemon/server/project-graph-incremental-recomputation.js +8 -8
  27. package/src/daemon/server/shutdown-utils.js +7 -2
  28. package/src/daemon/tmp-dir.js +2 -2
  29. package/src/devkit-exports.d.ts +1 -5
  30. package/src/devkit-exports.js +1 -7
  31. package/src/devkit-internals.d.ts +2 -0
  32. package/src/devkit-internals.js +5 -1
  33. package/src/executors/run-commands/run-commands.impl.d.ts +2 -0
  34. package/src/executors/run-commands/run-commands.impl.js +69 -23
  35. package/src/executors/run-commands/schema.json +19 -2
  36. package/src/executors/utils/convert-nx-executor.js +2 -1
  37. package/src/generators/testing-utils/create-tree-with-empty-workspace.js +7 -0
  38. package/src/generators/utils/project-configuration.js +3 -8
  39. package/src/hasher/task-hasher.d.ts +4 -4
  40. package/src/native/index.d.ts +1 -1
  41. package/src/plugins/js/lock-file/pnpm-parser.js +109 -67
  42. package/src/plugins/package-json-workspaces/create-nodes.d.ts +1 -0
  43. package/src/plugins/package-json-workspaces/create-nodes.js +25 -20
  44. package/src/plugins/project-json/build-nodes/project-json.js +2 -2
  45. package/src/project-graph/affected/locators/workspace-projects.js +3 -1
  46. package/src/project-graph/build-project-graph.d.ts +8 -18
  47. package/src/project-graph/build-project-graph.js +86 -57
  48. package/src/project-graph/error-types.d.ts +31 -3
  49. package/src/project-graph/error-types.js +74 -2
  50. package/src/project-graph/file-utils.d.ts +2 -3
  51. package/src/project-graph/file-utils.js +5 -9
  52. package/src/project-graph/plugins/internal-api.d.ts +3 -2
  53. package/src/project-graph/plugins/internal-api.js +3 -0
  54. package/src/project-graph/plugins/isolation/messaging.d.ts +26 -3
  55. package/src/project-graph/plugins/isolation/plugin-pool.js +23 -1
  56. package/src/project-graph/plugins/isolation/plugin-worker.js +21 -0
  57. package/src/project-graph/plugins/loader.js +14 -6
  58. package/src/project-graph/plugins/public-api.d.ts +11 -1
  59. package/src/project-graph/plugins/utils.d.ts +2 -2
  60. package/src/project-graph/plugins/utils.js +19 -24
  61. package/src/project-graph/project-graph.d.ts +3 -0
  62. package/src/project-graph/project-graph.js +8 -7
  63. package/src/project-graph/utils/find-project-for-path.js +2 -3
  64. package/src/project-graph/utils/normalize-project-nodes.d.ts +1 -1
  65. package/src/project-graph/utils/normalize-project-nodes.js +8 -14
  66. package/src/project-graph/utils/project-configuration-utils.d.ts +23 -6
  67. package/src/project-graph/utils/project-configuration-utils.js +43 -20
  68. package/src/tasks-runner/create-task-graph.js +0 -1
  69. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +5 -1
  70. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +4 -0
  71. package/src/tasks-runner/pseudo-terminal.d.ts +2 -1
  72. package/src/tasks-runner/pseudo-terminal.js +8 -2
  73. package/src/tasks-runner/run-command.js +4 -4
  74. package/src/tasks-runner/utils.js +17 -0
  75. package/src/utils/assert-workspace-validity.js +2 -1
  76. package/src/utils/command-line-utils.d.ts +1 -1
  77. package/src/utils/nx-plugin.deprecated.d.ts +1 -1
  78. package/src/utils/nx-plugin.deprecated.js +1 -1
  79. package/src/utils/params.js +4 -0
  80. package/src/utils/perf-logging.js +3 -1
  81. package/src/command-line/repair.d.ts +0 -4
  82. package/src/command-line/repair.js +0 -7
  83. package/src/command-line/run-many.d.ts +0 -4
  84. package/src/command-line/run-many.js +0 -7
  85. package/src/command-line/run-one.d.ts +0 -4
  86. package/src/command-line/run-one.js +0 -7
  87. package/src/command-line/run.d.ts +0 -4
  88. package/src/command-line/run.js +0 -7
  89. package/src/command-line/watch.d.ts +0 -4
  90. package/src/command-line/watch.js +0 -7
  91. package/src/config/workspaces.d.ts +0 -18
  92. package/src/config/workspaces.js +0 -35
  93. package/src/core/graph/3rdpartylicenses.txt +0 -785
  94. package/src/migrations/update-15-1-0/set-project-names.d.ts +0 -2
  95. package/src/migrations/update-15-1-0/set-project-names.js +0 -34
  96. package/src/migrations/update-15-8-2/update-nxw.d.ts +0 -2
  97. package/src/migrations/update-15-8-2/update-nxw.js +0 -7
  98. package/src/utils/typescript.d.ts +0 -1
  99. package/src/utils/typescript.js +0 -5
@@ -1,2 +0,0 @@
1
- import { Tree } from '../../generators/tree';
2
- export default function (tree: Tree): Promise<void>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const nx_json_1 = require("../../generators/utils/nx-json");
4
- const path_1 = require("path");
5
- const json_1 = require("../../generators/utils/json");
6
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
7
- const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-workspace-files");
8
- const internal_api_1 = require("../../project-graph/plugins/internal-api");
9
- async function default_1(tree) {
10
- const nxJson = (0, nx_json_1.readNxJson)(tree);
11
- const [plugins, cleanup] = await (0, internal_api_1.loadNxPlugins)(nxJson?.plugins ?? [], tree.root);
12
- const projectFiles = (0, retrieve_workspace_files_1.retrieveProjectConfigurationPaths)(tree.root, plugins);
13
- const projectJsons = projectFiles.filter((f) => f.endsWith('project.json'));
14
- for (let f of projectJsons) {
15
- const projectJson = (0, json_1.readJson)(tree, f);
16
- if (!projectJson.name) {
17
- projectJson.name = toProjectName((0, path_1.dirname)(f), nxJson);
18
- (0, json_1.writeJson)(tree, f, projectJson);
19
- }
20
- }
21
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
22
- cleanup();
23
- }
24
- exports.default = default_1;
25
- function toProjectName(directory, nxJson) {
26
- let { appsDir, libsDir } = nxJson?.workspaceLayout || {};
27
- appsDir ??= 'apps';
28
- libsDir ??= 'libs';
29
- const parts = directory.split(/[\/\\]/g);
30
- if ([appsDir, libsDir].includes(parts[0])) {
31
- parts.splice(0, 1);
32
- }
33
- return parts.join('-').toLowerCase();
34
- }
@@ -1,2 +0,0 @@
1
- import { Tree } from '../../generators/tree';
2
- export default function (tree: Tree): Promise<void>;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const update_nxw_1 = require("../../utils/update-nxw");
4
- async function default_1(tree) {
5
- (0, update_nxw_1.updateNxw)(tree);
6
- }
7
- exports.default = default_1;
@@ -1 +0,0 @@
1
- export * from '../plugins/js/utils/typescript';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- // TODO(v19): Nx Devkit 15 depends on this file. Remove this when we no longer support Nx Devkit 15
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("../plugins/js/utils/typescript"), exports);