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
package/migrations.json CHANGED
@@ -1,29 +1,5 @@
1
1
  {
2
2
  "generators": {
3
- "15.0.0-migrate-to-inputs": {
4
- "cli": "nx",
5
- "version": "15.0.0-beta.1",
6
- "description": "Replace implicitDependencies with namedInputs + target inputs",
7
- "implementation": "./src/migrations/update-15-0-0/migrate-to-inputs"
8
- },
9
- "15.0.0-prefix-outputs": {
10
- "cli": "nx",
11
- "version": "15.0.0-beta.1",
12
- "description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
13
- "implementation": "./src/migrations/update-15-0-0/prefix-outputs"
14
- },
15
- "15.1.0-set-project-names": {
16
- "cli": "nx",
17
- "version": "15.0.12-beta.1",
18
- "description": "Set project names in project.json files",
19
- "implementation": "./src/migrations/update-15-1-0/set-project-names"
20
- },
21
- "15.8.2-update-nx-wrapper": {
22
- "cli": "nx",
23
- "version": "15.8.2-beta.0",
24
- "description": "Updates the nx wrapper.",
25
- "implementation": "./src/migrations/update-15-8-2/update-nxw"
26
- },
27
3
  "16.0.0-remove-nrwl-cli": {
28
4
  "cli": "nx",
29
5
  "version": "16.0.0-beta.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "19.0.0-canary.20240430-458f2cc",
3
+ "version": "19.0.0-canary.20240502-5ded713",
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": "19.0.0-canary.20240430-458f2cc"
69
+ "@nrwl/tao": "19.0.0-canary.20240502-5ded713"
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": "19.0.0-canary.20240430-458f2cc",
85
- "@nx/nx-darwin-arm64": "19.0.0-canary.20240430-458f2cc",
86
- "@nx/nx-linux-x64-gnu": "19.0.0-canary.20240430-458f2cc",
87
- "@nx/nx-linux-x64-musl": "19.0.0-canary.20240430-458f2cc",
88
- "@nx/nx-win32-x64-msvc": "19.0.0-canary.20240430-458f2cc",
89
- "@nx/nx-linux-arm64-gnu": "19.0.0-canary.20240430-458f2cc",
90
- "@nx/nx-linux-arm64-musl": "19.0.0-canary.20240430-458f2cc",
91
- "@nx/nx-linux-arm-gnueabihf": "19.0.0-canary.20240430-458f2cc",
92
- "@nx/nx-win32-arm64-msvc": "19.0.0-canary.20240430-458f2cc",
93
- "@nx/nx-freebsd-x64": "19.0.0-canary.20240430-458f2cc"
84
+ "@nx/nx-darwin-x64": "19.0.0-canary.20240502-5ded713",
85
+ "@nx/nx-darwin-arm64": "19.0.0-canary.20240502-5ded713",
86
+ "@nx/nx-linux-x64-gnu": "19.0.0-canary.20240502-5ded713",
87
+ "@nx/nx-linux-x64-musl": "19.0.0-canary.20240502-5ded713",
88
+ "@nx/nx-win32-x64-msvc": "19.0.0-canary.20240502-5ded713",
89
+ "@nx/nx-linux-arm64-gnu": "19.0.0-canary.20240502-5ded713",
90
+ "@nx/nx-linux-arm64-musl": "19.0.0-canary.20240502-5ded713",
91
+ "@nx/nx-linux-arm-gnueabihf": "19.0.0-canary.20240502-5ded713",
92
+ "@nx/nx-win32-arm64-msvc": "19.0.0-canary.20240502-5ded713",
93
+ "@nx/nx-freebsd-x64": "19.0.0-canary.20240502-5ded713"
94
94
  },
95
95
  "nx-migrations": {
96
96
  "migrations": "./migrations.json",
@@ -23,15 +23,16 @@ function addHandler(options) {
23
23
  return (0, params_1.handleErrors)(isVerbose, async () => {
24
24
  output_1.output.addNewline();
25
25
  const [pkgName, version] = parsePackageSpecifier(options.packageSpecifier);
26
- await installPackage(pkgName, version);
27
- await initializePlugin(pkgName, options);
26
+ const nxJson = (0, nx_json_1.readNxJson)();
27
+ await installPackage(pkgName, version, nxJson);
28
+ await initializePlugin(pkgName, options, nxJson);
28
29
  output_1.output.success({
29
30
  title: `Package ${pkgName} added successfully.`,
30
31
  });
31
32
  });
32
33
  }
33
34
  exports.addHandler = addHandler;
34
- async function installPackage(pkgName, version) {
35
+ async function installPackage(pkgName, version, nxJson) {
35
36
  const spinner = ora(`Installing ${pkgName}@${version}...`);
36
37
  spinner.start();
37
38
  if ((0, fs_1.existsSync)('package.json')) {
@@ -50,7 +51,6 @@ async function installPackage(pkgName, version) {
50
51
  }));
51
52
  }
52
53
  else {
53
- const nxJson = (0, nx_json_1.readNxJson)();
54
54
  nxJson.installation.plugins ??= {};
55
55
  nxJson.installation.plugins[pkgName] = version;
56
56
  (0, fileutils_1.writeJsonFile)('nx.json', nxJson);
@@ -72,7 +72,7 @@ async function installPackage(pkgName, version) {
72
72
  }
73
73
  spinner.succeed();
74
74
  }
75
- async function initializePlugin(pkgName, options) {
75
+ async function initializePlugin(pkgName, options, nxJson) {
76
76
  const capabilities = await (0, plugins_1.getPluginCapabilities)(workspace_root_1.workspaceRoot, pkgName, {});
77
77
  const generators = capabilities?.generators;
78
78
  if (!generators) {
@@ -91,19 +91,20 @@ async function initializePlugin(pkgName, options) {
91
91
  const spinner = ora(`Initializing ${pkgName}...`);
92
92
  spinner.start();
93
93
  try {
94
- let updatePackageScripts;
95
- if (options.updatePackageScripts !== undefined) {
96
- updatePackageScripts = options.updatePackageScripts;
94
+ const args = [];
95
+ if (coreNxPlugins.includes(pkgName)) {
96
+ args.push(`--keepExistingVersions`);
97
+ if (options.updatePackageScripts ||
98
+ (options.updatePackageScripts === undefined &&
99
+ nxJson.useInferencePlugins !== false &&
100
+ process.env.NX_ADD_PLUGINS !== 'false')) {
101
+ args.push(`--updatePackageScripts`);
102
+ }
97
103
  }
98
- else {
99
- updatePackageScripts =
100
- (0, nx_json_1.readNxJson)().useInferencePlugins !== false &&
101
- process.env.NX_ADD_PLUGINS !== 'false' &&
102
- coreNxPlugins.includes(pkgName);
104
+ if (options.__overrides_unparsed__.length) {
105
+ args.push(...options.__overrides_unparsed__);
103
106
  }
104
- await (0, child_process_2.runNxAsync)(`g ${pkgName}:${initGenerator} --keepExistingVersions${updatePackageScripts ? ' --updatePackageScripts' : ''}${options.__overrides_unparsed__.length
105
- ? ' ' + options.__overrides_unparsed__.join(' ')
106
- : ''}`, {
107
+ await (0, child_process_2.runNxAsync)(`g ${pkgName}:${initGenerator} ${args.join(' ')}`, {
107
108
  silent: !options.verbose,
108
109
  });
109
110
  }
@@ -53,7 +53,7 @@ async function affected(command, args, extraTargetDependencies = {}) {
53
53
  const projectNames = projectsWithTarget.map((t) => t.name);
54
54
  const file = (0, command_line_utils_1.readGraphFileFromGraphArg)(nxArgs);
55
55
  return await (0, graph_1.generateGraph)({
56
- watch: false,
56
+ watch: true,
57
57
  open: true,
58
58
  view: 'tasks',
59
59
  targets: nxArgs.targets,
@@ -1,10 +1,18 @@
1
1
  import { ProjectFileMap, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
2
2
  import { TaskGraph } from '../../config/task-graph';
3
+ export interface GraphError {
4
+ message: string;
5
+ stack: string;
6
+ cause: unknown;
7
+ name: string;
8
+ pluginName: string;
9
+ fileName?: string;
10
+ }
3
11
  export interface ProjectGraphClientResponse {
4
12
  hash: string;
5
13
  projects: ProjectGraphProjectNode[];
6
14
  dependencies: Record<string, ProjectGraphDependency[]>;
7
- fileMap: ProjectFileMap;
15
+ fileMap?: ProjectFileMap;
8
16
  layout: {
9
17
  appsDir: string;
10
18
  libsDir: string;
@@ -13,6 +21,8 @@ export interface ProjectGraphClientResponse {
13
21
  focus: string;
14
22
  groupByFolder: boolean;
15
23
  exclude: string[];
24
+ isPartial: boolean;
25
+ errors?: GraphError[];
16
26
  }
17
27
  export interface TaskGraphClientResponse {
18
28
  taskGraphs: Record<string, TaskGraph>;
@@ -25,8 +25,9 @@ const native_1 = require("../../native");
25
25
  const transform_objects_1 = require("../../native/transform-objects");
26
26
  const affected_1 = require("../affected/affected");
27
27
  const nx_deps_cache_1 = require("../../project-graph/nx-deps-cache");
28
- const task_hasher_1 = require("../../hasher/task-hasher");
29
28
  const create_task_hasher_1 = require("../../hasher/create-task-hasher");
29
+ const task_hasher_1 = require("../../hasher/task-hasher");
30
+ const error_types_1 = require("../../project-graph/error-types");
30
31
  // maps file extention to MIME types
31
32
  const mimeType = {
32
33
  '.ico': 'image/x-icon',
@@ -156,9 +157,29 @@ async function generateGraph(args, affectedProjects) {
156
157
  const target = Array.isArray(args.targets && args.targets.length >= 1)
157
158
  ? args.targets[0]
158
159
  : args.targets;
159
- const { projectGraph: rawGraph, sourceMaps } = await (0, project_graph_1.createProjectGraphAndSourceMapsAsync)({
160
- exitOnError: true,
161
- });
160
+ let rawGraph;
161
+ let sourceMaps;
162
+ let isPartial = false;
163
+ try {
164
+ const projectGraphAndSourceMaps = await (0, project_graph_1.createProjectGraphAndSourceMapsAsync)({
165
+ exitOnError: false,
166
+ });
167
+ rawGraph = projectGraphAndSourceMaps.projectGraph;
168
+ sourceMaps = projectGraphAndSourceMaps.sourceMaps;
169
+ }
170
+ catch (e) {
171
+ if (e instanceof error_types_1.ProjectGraphError) {
172
+ output_1.output.warn({
173
+ title: 'Failed to process project graph. Showing partial graph.',
174
+ });
175
+ rawGraph = e.getPartialProjectGraph();
176
+ sourceMaps = e.getPartialSourcemaps();
177
+ isPartial = true;
178
+ }
179
+ if (!rawGraph) {
180
+ (0, project_graph_1.handleProjectGraphError)({ exitOnError: true }, e);
181
+ }
182
+ }
162
183
  let prunedGraph = (0, operators_1.pruneExternalNodes)(rawGraph);
163
184
  const projects = Object.values(prunedGraph.nodes);
164
185
  projects.sort((a, b) => {
@@ -295,7 +316,7 @@ async function generateGraph(args, affectedProjects) {
295
316
  }
296
317
  }
297
318
  exports.generateGraph = generateGraph;
298
- async function startServer(html, environmentJs, host, port = 4211, watchForchanges = false, affected = [], focus = null, groupByFolder = false, exclude = []) {
319
+ async function startServer(html, environmentJs, host, port = 4211, watchForchanges = true, affected = [], focus = null, groupByFolder = false, exclude = []) {
299
320
  let unregisterFileWatcher;
300
321
  if (watchForchanges) {
301
322
  unregisterFileWatcher = await createFileWatcher();
@@ -395,6 +416,8 @@ let currentProjectGraphClientResponse = {
395
416
  focus: null,
396
417
  groupByFolder: false,
397
418
  exclude: [],
419
+ isPartial: false,
420
+ errors: [],
398
421
  };
399
422
  let currentSourceMapsClientResponse = {};
400
423
  function debounce(fn, time) {
@@ -407,7 +430,11 @@ function debounce(fn, time) {
407
430
  };
408
431
  }
409
432
  function createFileWatcher() {
410
- return client_1.daemonClient.registerFileWatcher({ watchProjects: 'all', includeGlobalWorkspaceFiles: true }, debounce(async (error, changes) => {
433
+ return client_1.daemonClient.registerFileWatcher({
434
+ watchProjects: 'all',
435
+ includeGlobalWorkspaceFiles: true,
436
+ allowPartialGraph: true,
437
+ }, debounce(async (error, changes) => {
411
438
  if (error === 'closed') {
412
439
  output_1.output.error({ title: `Watch error: Daemon closed the connection` });
413
440
  process.exit(1);
@@ -433,16 +460,42 @@ function createFileWatcher() {
433
460
  }
434
461
  async function createProjectGraphAndSourceMapClientResponse(affected = []) {
435
462
  perf_hooks_1.performance.mark('project graph watch calculation:start');
436
- const { projectGraph, sourceMaps } = await (0, project_graph_1.createProjectGraphAndSourceMapsAsync)({ exitOnError: true });
463
+ let projectGraph;
464
+ let sourceMaps;
465
+ let isPartial = false;
466
+ let errors;
467
+ try {
468
+ const projectGraphAndSourceMaps = await (0, project_graph_1.createProjectGraphAndSourceMapsAsync)({ exitOnError: false });
469
+ projectGraph = projectGraphAndSourceMaps.projectGraph;
470
+ sourceMaps = projectGraphAndSourceMaps.sourceMaps;
471
+ }
472
+ catch (e) {
473
+ if (e instanceof error_types_1.ProjectGraphError) {
474
+ projectGraph = e.getPartialProjectGraph();
475
+ sourceMaps = e.getPartialSourcemaps();
476
+ errors = e.getErrors().map((e) => ({
477
+ message: e.message,
478
+ stack: e.stack,
479
+ cause: e.cause,
480
+ name: e.name,
481
+ pluginName: e.pluginName,
482
+ fileName: e.file ?? e.cause?.errors?.[0]?.location?.file,
483
+ }));
484
+ isPartial = true;
485
+ }
486
+ if (!projectGraph) {
487
+ (0, project_graph_1.handleProjectGraphError)({ exitOnError: true }, e);
488
+ }
489
+ }
437
490
  let graph = (0, operators_1.pruneExternalNodes)(projectGraph);
438
- let fileMap = (0, nx_deps_cache_1.readFileMapCache)().fileMap.projectFileMap;
491
+ let fileMap = (0, nx_deps_cache_1.readFileMapCache)()?.fileMap.projectFileMap;
439
492
  perf_hooks_1.performance.mark('project graph watch calculation:end');
440
493
  perf_hooks_1.performance.mark('project graph response generation:start');
441
494
  const layout = (0, configuration_1.workspaceLayout)();
442
495
  const projects = Object.values(graph.nodes);
443
496
  const dependencies = graph.dependencies;
444
497
  const hasher = (0, crypto_1.createHash)('sha256');
445
- hasher.update(JSON.stringify({ layout, projects, dependencies, sourceMaps }));
498
+ hasher.update(JSON.stringify({ layout, projects, dependencies, sourceMaps, errors }));
446
499
  const hash = hasher.digest('hex');
447
500
  perf_hooks_1.performance.mark('project graph response generation:end');
448
501
  perf_hooks_1.performance.measure('project graph watch calculation', 'project graph watch calculation:start', 'project graph watch calculation:end');
@@ -456,17 +509,24 @@ async function createProjectGraphAndSourceMapClientResponse(affected = []) {
456
509
  dependencies,
457
510
  affected,
458
511
  fileMap,
512
+ isPartial,
513
+ errors,
459
514
  },
460
515
  sourceMapResponse: sourceMaps,
461
516
  };
462
517
  }
463
518
  async function createTaskGraphClientResponse(pruneExternal = false) {
464
519
  let graph;
465
- if (pruneExternal) {
466
- graph = (0, operators_1.pruneExternalNodes)(await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true }));
520
+ try {
521
+ graph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: false });
467
522
  }
468
- else {
469
- graph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true });
523
+ catch (e) {
524
+ if (e instanceof error_types_1.ProjectGraphError) {
525
+ graph = e.getPartialProjectGraph();
526
+ }
527
+ }
528
+ if (pruneExternal) {
529
+ graph = (0, operators_1.pruneExternalNodes)(graph);
470
530
  }
471
531
  const nxJson = (0, configuration_1.readNxJson)();
472
532
  perf_hooks_1.performance.mark('task graph generation:start');
@@ -16,7 +16,6 @@ const is_ci_1 = require("../../utils/is-ci");
16
16
  const output_1 = require("../../utils/output");
17
17
  const params_1 = require("../../utils/params");
18
18
  const path_1 = require("../../utils/path");
19
- const typescript_1 = require("../../utils/typescript");
20
19
  const workspace_root_1 = require("../../utils/workspace-root");
21
20
  const config_1 = require("./config/config");
22
21
  const filter_release_groups_1 = require("./config/filter-release-groups");
@@ -27,6 +26,7 @@ const markdown_1 = require("./utils/markdown");
27
26
  const print_changes_1 = require("./utils/print-changes");
28
27
  const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
29
28
  const shared_1 = require("./utils/shared");
29
+ const typescript_1 = require("../../plugins/js/utils/typescript");
30
30
  const releaseChangelogCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => releaseChangelog(args));
31
31
  exports.releaseChangelogCLIHandler = releaseChangelogCLIHandler;
32
32
  /**
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsReleaseCommand = void 0;
4
4
  const yargs_1 = require("yargs");
5
- const file_utils_1 = require("../../project-graph/file-utils");
6
5
  const logger_1 = require("../../utils/logger");
7
6
  const shared_options_1 = require("../yargs-utils/shared-options");
7
+ const nx_json_1 = require("../../config/nx-json");
8
8
  exports.yargsReleaseCommand = {
9
9
  command: 'release',
10
10
  describe: 'Orchestrate versioning and publishing of applications and libraries',
@@ -46,7 +46,7 @@ exports.yargsReleaseCommand = {
46
46
  if (argv.groups && argv.projects) {
47
47
  throw new Error('The --projects and --groups options are mutually exclusive, please use one or the other.');
48
48
  }
49
- const nxJson = (0, file_utils_1.readNxJson)();
49
+ const nxJson = (0, nx_json_1.readNxJson)();
50
50
  if (argv.groups?.length) {
51
51
  for (const group of argv.groups) {
52
52
  if (!nxJson.release?.groups?.[group]) {
@@ -106,7 +106,7 @@ async function runPublishOnProjects(args, projectGraph, nxJson, projectNames, sh
106
106
  .map((t) => t.name)
107
107
  .filter((projectName) => (0, project_graph_utils_1.projectHasTarget)(projectGraph.nodes[projectName], requiredTargetName));
108
108
  await (0, graph_1.generateGraph)({
109
- watch: false,
109
+ watch: true,
110
110
  all: false,
111
111
  open: true,
112
112
  view: 'tasks',
@@ -197,7 +197,7 @@ function findRegisteredPluginsBeingUsed(nxJson) {
197
197
  exports.findRegisteredPluginsBeingUsed = findRegisteredPluginsBeingUsed;
198
198
  function findInstalledPackagesWeCareAbout() {
199
199
  const packagesWeMayCareAbout = {};
200
- // TODO (v19): Remove workaround for hiding @nrwl packages when matching @nx package is found.
200
+ // TODO (v20): Remove workaround for hiding @nrwl packages when matching @nx package is found.
201
201
  const packageChangeMap = {
202
202
  '@nrwl/nx-plugin': '@nx/plugin',
203
203
  '@nx/plugin': '@nrwl/nx-plugin',
@@ -38,7 +38,7 @@ async function runOne(cwd, args, extraTargetDependencies = {}, extraOptions = {
38
38
  const projectNames = projects.map((t) => t.name);
39
39
  const file = (0, command_line_utils_1.readGraphFileFromGraphArg)(nxArgs);
40
40
  return await (0, graph_1.generateGraph)({
41
- watch: false,
41
+ watch: true,
42
42
  open: true,
43
43
  view: 'tasks',
44
44
  targets: nxArgs.targets,
@@ -29,7 +29,7 @@ async function runMany(args, extraTargetDependencies = {}, extraOptions = { excl
29
29
  const file = (0, command_line_utils_1.readGraphFileFromGraphArg)(nxArgs);
30
30
  const projectNames = projects.map((t) => t.name);
31
31
  return await (0, graph_1.generateGraph)({
32
- watch: false,
32
+ watch: true,
33
33
  open: true,
34
34
  view: 'tasks',
35
35
  all: nxArgs.all,
@@ -249,7 +249,7 @@ function withDepGraphOptions(yargs) {
249
249
  .option('watch', {
250
250
  describe: 'Watch for changes to project graph and update in-browser',
251
251
  type: 'boolean',
252
- default: false,
252
+ default: true,
253
253
  })
254
254
  .option('open', {
255
255
  describe: 'Open the project graph in the browser.',
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Pulled from toFileName in names from @nx/devkit.
3
+ * Todo: Should refactor, not duplicate.
4
+ */
5
+ export declare function toProjectName(fileName: string): string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toProjectName = void 0;
4
+ const path_1 = require("path");
5
+ /**
6
+ * Pulled from toFileName in names from @nx/devkit.
7
+ * Todo: Should refactor, not duplicate.
8
+ */
9
+ function toProjectName(fileName) {
10
+ const parts = (0, path_1.dirname)(fileName).split(/[\/\\]/g);
11
+ return parts[parts.length - 1].toLowerCase();
12
+ }
13
+ exports.toProjectName = toProjectName;