nx 19.0.0-canary.20240430-458f2cc → 19.0.0-canary.20240502-5ded713

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 (59) hide show
  1. package/migrations.json +0 -24
  2. package/package.json +12 -12
  3. package/src/command-line/add/add.js +17 -16
  4. package/src/command-line/affected/affected.js +1 -1
  5. package/src/command-line/graph/graph.d.ts +11 -1
  6. package/src/command-line/graph/graph.js +73 -13
  7. package/src/command-line/release/changelog.js +1 -1
  8. package/src/command-line/release/command-object.js +2 -2
  9. package/src/command-line/release/publish.js +1 -1
  10. package/src/command-line/report/report.js +1 -1
  11. package/src/command-line/run/run-one.js +1 -1
  12. package/src/command-line/run-many/run-many.js +1 -1
  13. package/src/command-line/yargs-utils/shared-options.js +1 -1
  14. package/src/config/to-project-name.d.ts +5 -0
  15. package/src/config/to-project-name.js +13 -0
  16. package/src/core/graph/main.js +1 -1
  17. package/src/core/graph/styles.css +2 -2
  18. package/src/daemon/client/client.d.ts +1 -0
  19. package/src/daemon/client/client.js +11 -1
  20. package/src/daemon/server/project-graph-incremental-recomputation.js +1 -1
  21. package/src/devkit-exports.d.ts +0 -4
  22. package/src/devkit-exports.js +1 -7
  23. package/src/hasher/task-hasher.d.ts +4 -4
  24. package/src/plugins/package-json-workspaces/create-nodes.js +2 -2
  25. package/src/plugins/project-json/build-nodes/project-json.js +2 -2
  26. package/src/project-graph/error-types.d.ts +1 -1
  27. package/src/project-graph/file-utils.d.ts +2 -3
  28. package/src/project-graph/file-utils.js +4 -8
  29. package/src/project-graph/plugins/loader.js +1 -1
  30. package/src/project-graph/plugins/utils.js +6 -5
  31. package/src/project-graph/project-graph.d.ts +3 -0
  32. package/src/project-graph/project-graph.js +2 -1
  33. package/src/project-graph/utils/normalize-project-nodes.js +0 -6
  34. package/src/project-graph/utils/project-configuration-utils.d.ts +2 -1
  35. package/src/project-graph/utils/project-configuration-utils.js +17 -6
  36. package/src/tasks-runner/create-task-graph.js +0 -1
  37. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -1
  38. package/src/tasks-runner/run-command.js +4 -4
  39. package/src/tasks-runner/utils.js +17 -0
  40. package/src/utils/nx-plugin.deprecated.d.ts +1 -1
  41. package/src/utils/nx-plugin.deprecated.js +1 -1
  42. package/src/command-line/repair.d.ts +0 -4
  43. package/src/command-line/repair.js +0 -7
  44. package/src/command-line/run-many.d.ts +0 -4
  45. package/src/command-line/run-many.js +0 -7
  46. package/src/command-line/run-one.d.ts +0 -4
  47. package/src/command-line/run-one.js +0 -7
  48. package/src/command-line/run.d.ts +0 -4
  49. package/src/command-line/run.js +0 -7
  50. package/src/command-line/watch.d.ts +0 -4
  51. package/src/command-line/watch.js +0 -7
  52. package/src/config/workspaces.d.ts +0 -18
  53. package/src/config/workspaces.js +0 -35
  54. package/src/migrations/update-15-1-0/set-project-names.d.ts +0 -2
  55. package/src/migrations/update-15-1-0/set-project-names.js +0 -34
  56. package/src/migrations/update-15-8-2/update-nxw.d.ts +0 -2
  57. package/src/migrations/update-15-8-2/update-nxw.js +0 -7
  58. package/src/utils/typescript.d.ts +0 -1
  59. package/src/utils/typescript.js +0 -5
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
3
- */
4
- export * from './repair/repair';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
6
- */
7
- tslib_1.__exportStar(require("./repair/repair"), exports);
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
3
- */
4
- export * from './run-many/run-many';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
6
- */
7
- tslib_1.__exportStar(require("./run-many/run-many"), exports);
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
3
- */
4
- export * from './run/run-one';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
6
- */
7
- tslib_1.__exportStar(require("./run/run-one"), exports);
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
3
- */
4
- export * from './run/run';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
6
- */
7
- tslib_1.__exportStar(require("./run/run"), exports);
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
3
- */
4
- export * from './watch/watch';
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /**
5
- * @deprecated(v17) This file has moved. The reexport will be removed in Nx 17.
6
- */
7
- tslib_1.__exportStar(require("./watch/watch"), exports);
@@ -1,18 +0,0 @@
1
- import type { NxJsonConfiguration } from './nx-json';
2
- import { ProjectsConfigurations } from './workspace-json-project-json';
3
- /**
4
- * @deprecated This will be removed in v19. Use {@link readProjectsConfigurationFromProjectGraph} instead.
5
- */
6
- export declare class Workspaces {
7
- private root;
8
- constructor(root: string);
9
- /**
10
- * @deprecated Use {@link readProjectsConfigurationFromProjectGraph} instead.
11
- */
12
- readWorkspaceConfiguration(): ProjectsConfigurations & NxJsonConfiguration;
13
- }
14
- /**
15
- * Pulled from toFileName in names from @nx/devkit.
16
- * Todo: Should refactor, not duplicate.
17
- */
18
- export declare function toProjectName(fileName: string): string;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toProjectName = exports.Workspaces = void 0;
4
- const path_1 = require("path");
5
- const project_graph_1 = require("../project-graph/project-graph");
6
- const nx_json_1 = require("./nx-json");
7
- // TODO(v19): remove this class
8
- /**
9
- * @deprecated This will be removed in v19. Use {@link readProjectsConfigurationFromProjectGraph} instead.
10
- */
11
- class Workspaces {
12
- constructor(root) {
13
- this.root = root;
14
- }
15
- /**
16
- * @deprecated Use {@link readProjectsConfigurationFromProjectGraph} instead.
17
- */
18
- readWorkspaceConfiguration() {
19
- const nxJson = (0, nx_json_1.readNxJson)(this.root);
20
- return {
21
- ...(0, project_graph_1.readProjectsConfigurationFromProjectGraph)((0, project_graph_1.readCachedProjectGraph)()),
22
- ...nxJson,
23
- };
24
- }
25
- }
26
- exports.Workspaces = Workspaces;
27
- /**
28
- * Pulled from toFileName in names from @nx/devkit.
29
- * Todo: Should refactor, not duplicate.
30
- */
31
- function toProjectName(fileName) {
32
- const parts = (0, path_1.dirname)(fileName).split(/[\/\\]/g);
33
- return parts[parts.length - 1].toLowerCase();
34
- }
35
- exports.toProjectName = toProjectName;
@@ -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);