nx 21.0.0-beta.7 → 21.0.0-beta.8

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 (32) hide show
  1. package/package.json +11 -11
  2. package/schemas/project-schema.json +5 -0
  3. package/src/command-line/run/executor-utils.d.ts +6 -1
  4. package/src/command-line/run/executor-utils.js +10 -1
  5. package/src/command-line/run/run.js +1 -1
  6. package/src/config/misc-interfaces.d.ts +1 -0
  7. package/src/core/graph/main.js +1 -1
  8. package/src/core/graph/styles.css +1 -1
  9. package/src/devkit-internals.d.ts +1 -1
  10. package/src/devkit-internals.js +2 -1
  11. package/src/native/nx.wasm32-wasi.wasm +0 -0
  12. package/src/plugins/package-json/create-nodes.js +1 -1
  13. package/src/project-graph/plugins/public-api.d.ts +1 -1
  14. package/src/project-graph/utils/project-configuration-utils.d.ts +2 -2
  15. package/src/project-graph/utils/project-configuration-utils.js +29 -10
  16. package/src/tasks-runner/batch/run-batch.js +1 -1
  17. package/src/tasks-runner/create-task-graph.d.ts +0 -1
  18. package/src/tasks-runner/create-task-graph.js +0 -1
  19. package/src/tasks-runner/init-tasks-runner.d.ts +1 -1
  20. package/src/tasks-runner/init-tasks-runner.js +8 -2
  21. package/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +2 -0
  22. package/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +8 -5
  23. package/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +5 -0
  24. package/src/tasks-runner/life-cycles/task-history-life-cycle.js +29 -4
  25. package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +2 -0
  26. package/src/tasks-runner/run-command.d.ts +1 -0
  27. package/src/tasks-runner/run-command.js +4 -6
  28. package/src/tasks-runner/task-orchestrator.d.ts +2 -1
  29. package/src/tasks-runner/task-orchestrator.js +9 -6
  30. package/src/tasks-runner/utils.js +1 -1
  31. package/src/utils/package-json.d.ts +1 -1
  32. package/src/utils/package-json.js +16 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.0.0-beta.7",
3
+ "version": "21.0.0-beta.8",
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": {
@@ -83,16 +83,16 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@nx/nx-darwin-arm64": "21.0.0-beta.7",
87
- "@nx/nx-darwin-x64": "21.0.0-beta.7",
88
- "@nx/nx-freebsd-x64": "21.0.0-beta.7",
89
- "@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.7",
90
- "@nx/nx-linux-arm64-gnu": "21.0.0-beta.7",
91
- "@nx/nx-linux-arm64-musl": "21.0.0-beta.7",
92
- "@nx/nx-linux-x64-gnu": "21.0.0-beta.7",
93
- "@nx/nx-linux-x64-musl": "21.0.0-beta.7",
94
- "@nx/nx-win32-arm64-msvc": "21.0.0-beta.7",
95
- "@nx/nx-win32-x64-msvc": "21.0.0-beta.7"
86
+ "@nx/nx-darwin-arm64": "21.0.0-beta.8",
87
+ "@nx/nx-darwin-x64": "21.0.0-beta.8",
88
+ "@nx/nx-freebsd-x64": "21.0.0-beta.8",
89
+ "@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.8",
90
+ "@nx/nx-linux-arm64-gnu": "21.0.0-beta.8",
91
+ "@nx/nx-linux-arm64-musl": "21.0.0-beta.8",
92
+ "@nx/nx-linux-x64-gnu": "21.0.0-beta.8",
93
+ "@nx/nx-linux-x64-musl": "21.0.0-beta.8",
94
+ "@nx/nx-win32-arm64-msvc": "21.0.0-beta.8",
95
+ "@nx/nx-win32-x64-msvc": "21.0.0-beta.8"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -138,6 +138,11 @@
138
138
  "type": "boolean",
139
139
  "description": "Specifies if the given target should be cacheable"
140
140
  },
141
+ "continuous": {
142
+ "type": "boolean",
143
+ "default": false,
144
+ "description": "Whether this target runs continuously until stopped"
145
+ },
141
146
  "parallelism": {
142
147
  "type": "boolean",
143
148
  "default": true,
@@ -1,7 +1,12 @@
1
1
  import { ExecutorConfig } from '../../config/misc-interfaces';
2
2
  import { ProjectConfiguration } from '../../config/workspace-json-project-json';
3
3
  export declare function normalizeExecutorSchema(schema: Partial<ExecutorConfig['schema']>): ExecutorConfig['schema'];
4
- export declare function getExecutorInformation(nodeModule: string, executor: string, root: string, projects: Record<string, ProjectConfiguration>): ExecutorConfig & {
4
+ export declare function parseExecutor(executorString: string): [module: string, name: string];
5
+ export declare function getExecutorInformation(nodeModule: string, executor: string, root: string,
6
+ /**
7
+ * A map of projects keyed by project name
8
+ */
9
+ projects: Record<string, ProjectConfiguration>): ExecutorConfig & {
5
10
  isNgCompat: boolean;
6
11
  isNxExecutor: boolean;
7
12
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeExecutorSchema = normalizeExecutorSchema;
4
+ exports.parseExecutor = parseExecutor;
4
5
  exports.getExecutorInformation = getExecutorInformation;
5
6
  const path_1 = require("path");
6
7
  const plugins_1 = require("../../project-graph/plugins");
@@ -12,6 +13,7 @@ function normalizeExecutorSchema(schema) {
12
13
  return {
13
14
  version,
14
15
  outputCapture: schema.outputCapture ?? version < 2 ? 'direct-nodejs' : 'pipe',
16
+ continuous: schema.continuous ?? false,
15
17
  properties: !schema.properties || typeof schema.properties !== 'object'
16
18
  ? {}
17
19
  : schema.properties,
@@ -21,8 +23,15 @@ function normalizeExecutorSchema(schema) {
21
23
  function cacheKey(nodeModule, executor, root) {
22
24
  return `${root}:${nodeModule}:${executor}`;
23
25
  }
26
+ function parseExecutor(executorString) {
27
+ return executorString.split(':');
28
+ }
24
29
  const cachedExecutorInformation = {};
25
- function getExecutorInformation(nodeModule, executor, root, projects) {
30
+ function getExecutorInformation(nodeModule, executor, root,
31
+ /**
32
+ * A map of projects keyed by project name
33
+ */
34
+ projects) {
26
35
  try {
27
36
  const key = cacheKey(nodeModule, executor, root);
28
37
  if (cachedExecutorInformation[key])
@@ -45,7 +45,7 @@ async function parseExecutorAndTarget({ project, target }, root, projectsConfigu
45
45
  if (!targetConfig) {
46
46
  throw new Error(`Cannot find target '${target}' for project '${project}'`);
47
47
  }
48
- const [nodeModule, executor] = targetConfig.executor.split(':');
48
+ const [nodeModule, executor] = (0, executor_utils_1.parseExecutor)(targetConfig.executor);
49
49
  const { schema, implementationFactory } = (0, executor_utils_1.getExecutorInformation)(nodeModule, executor, root, projectsConfigurations.projects);
50
50
  return { executor, implementationFactory, nodeModule, schema, targetConfig };
51
51
  }
@@ -93,6 +93,7 @@ export interface ExecutorConfig {
93
93
  schema: {
94
94
  version?: number;
95
95
  outputCapture?: OutputCaptureMethod;
96
+ continuous?: boolean;
96
97
  } & Schema;
97
98
  hasherFactory?: () => CustomHasher;
98
99
  implementationFactory: () => Executor;