nx 21.3.0-canary.20250711-be6d35b → 21.3.0-canary.20250715-cf994df

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.
@@ -8,7 +8,7 @@ export declare class ExternalObject<T> {
8
8
  }
9
9
  }
10
10
  export declare class AppLifeCycle {
11
- constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string)
11
+ constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string, taskGraph: TaskGraph)
12
12
  startCommand(threadCount?: number | undefined | null): void
13
13
  scheduleTask(task: Task): void
14
14
  startTasks(tasks: Array<Task>, metadata: object): void
@@ -322,6 +322,7 @@ export interface TaskGraph {
322
322
  roots: Array<string>
323
323
  tasks: Record<string, Task>
324
324
  dependencies: Record<string, Array<string>>
325
+ continuousDependencies: Record<string, Array<string>>
325
326
  }
326
327
 
327
328
  export interface TaskResult {
Binary file
@@ -24,7 +24,7 @@ export declare function registerTsProject(tsConfigPath: string): () => void;
24
24
  */
25
25
  export declare function registerTsProject(path: string, configFilename: string): any;
26
26
  export declare function getSwcTranspiler(compilerOptions: CompilerOptions): (...args: unknown[]) => unknown;
27
- export declare function getTsNodeTranspiler(compilerOptions: CompilerOptions, tsNodeOptions?: TsConfigOptions): (...args: unknown[]) => unknown;
27
+ export declare function getTsNodeTranspiler(compilerOptions: CompilerOptions, tsNodeOptions?: TsConfigOptions, preferTsNode?: boolean): (...args: unknown[]) => unknown;
28
28
  export declare function getTranspiler(compilerOptions: CompilerOptions, tsConfigRaw?: unknown): () => (...args: unknown[]) => unknown;
29
29
  /**
30
30
  * Register ts-node or swc-node given a set of compiler options.
@@ -91,7 +91,7 @@ function getSwcTranspiler(compilerOptions) {
91
91
  const cleanupFn = register(compilerOptions);
92
92
  return typeof cleanupFn === 'function' ? cleanupFn : () => { };
93
93
  }
94
- function getTsNodeTranspiler(compilerOptions, tsNodeOptions) {
94
+ function getTsNodeTranspiler(compilerOptions, tsNodeOptions, preferTsNode) {
95
95
  const { register } = require('ts-node');
96
96
  // ts-node doesn't provide a cleanup method
97
97
  const service = register({
@@ -106,7 +106,7 @@ function getTsNodeTranspiler(compilerOptions, tsNodeOptions) {
106
106
  });
107
107
  const { transpiler, swc } = service.options;
108
108
  // Don't warn if a faster transpiler is enabled
109
- if (!transpiler && !swc) {
109
+ if (!transpiler && !swc && !preferTsNode) {
110
110
  warnTsNodeUsage();
111
111
  }
112
112
  return () => {
@@ -170,6 +170,14 @@ function getTranspiler(compilerOptions, tsConfigRaw) {
170
170
  compilerOptions.target = ts.ScriptTarget.ES2021;
171
171
  compilerOptions.inlineSourceMap = true;
172
172
  compilerOptions.skipLibCheck = true;
173
+ // These options are different per project, and since they are not needed for transpilation, we can remove them so we have more cache hits.
174
+ compilerOptions.outDir = undefined;
175
+ compilerOptions.outFile = undefined;
176
+ compilerOptions.declaration = undefined;
177
+ compilerOptions.declarationMap = undefined;
178
+ compilerOptions.composite = undefined;
179
+ compilerOptions.tsBuildInfoFile = undefined;
180
+ delete compilerOptions.strict;
173
181
  let _getTranspiler;
174
182
  let registrationKey = JSON.stringify(compilerOptions);
175
183
  let tsNodeOptions;
@@ -193,7 +201,7 @@ function getTranspiler(compilerOptions, tsConfigRaw) {
193
201
  return registrationEntry.cleanup;
194
202
  }
195
203
  if (_getTranspiler) {
196
- const transpilerCleanup = _getTranspiler(compilerOptions, tsNodeOptions);
204
+ const transpilerCleanup = _getTranspiler(compilerOptions, tsNodeOptions, preferTsNode);
197
205
  const currRegistrationEntry = {
198
206
  refCount: 1,
199
207
  cleanup: () => {
@@ -128,7 +128,7 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
128
128
  const lifeCycles = [tsLifeCycle];
129
129
  // Only run the TUI if there are tasks to run
130
130
  if (tasks.length > 0) {
131
- appLifeCycle = new AppLifeCycle(tasks, initiatingTasks.map((t) => t.id), isRunOne ? 0 /* RunMode.RunOne */ : 1 /* RunMode.RunMany */, pinnedTasks, nxArgs ?? {}, nxJson.tui ?? {}, titleText, workspace_root_1.workspaceRoot);
131
+ appLifeCycle = new AppLifeCycle(tasks, initiatingTasks.map((t) => t.id), isRunOne ? 0 /* RunMode.RunOne */ : 1 /* RunMode.RunMany */, pinnedTasks, nxArgs ?? {}, nxJson.tui ?? {}, titleText, workspace_root_1.workspaceRoot, taskGraph);
132
132
  lifeCycles.unshift(appLifeCycle);
133
133
  /**
134
134
  * Patch stdout.write and stderr.write methods to pass Nx Cloud client logs to the TUI via the lifecycle