nx 20.7.1 → 20.7.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "20.7.1",
3
+ "version": "20.7.2",
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": {
@@ -82,16 +82,16 @@
82
82
  }
83
83
  },
84
84
  "optionalDependencies": {
85
- "@nx/nx-darwin-arm64": "20.7.1",
86
- "@nx/nx-darwin-x64": "20.7.1",
87
- "@nx/nx-freebsd-x64": "20.7.1",
88
- "@nx/nx-linux-arm-gnueabihf": "20.7.1",
89
- "@nx/nx-linux-arm64-gnu": "20.7.1",
90
- "@nx/nx-linux-arm64-musl": "20.7.1",
91
- "@nx/nx-linux-x64-gnu": "20.7.1",
92
- "@nx/nx-linux-x64-musl": "20.7.1",
93
- "@nx/nx-win32-arm64-msvc": "20.7.1",
94
- "@nx/nx-win32-x64-msvc": "20.7.1"
85
+ "@nx/nx-darwin-arm64": "20.7.2",
86
+ "@nx/nx-darwin-x64": "20.7.2",
87
+ "@nx/nx-freebsd-x64": "20.7.2",
88
+ "@nx/nx-linux-arm-gnueabihf": "20.7.2",
89
+ "@nx/nx-linux-arm64-gnu": "20.7.2",
90
+ "@nx/nx-linux-arm64-musl": "20.7.2",
91
+ "@nx/nx-linux-x64-gnu": "20.7.2",
92
+ "@nx/nx-linux-x64-musl": "20.7.2",
93
+ "@nx/nx-win32-arm64-msvc": "20.7.2",
94
+ "@nx/nx-win32-x64-msvc": "20.7.2"
95
95
  },
96
96
  "nx-migrations": {
97
97
  "migrations": "./migrations.json",
@@ -25,7 +25,7 @@ export declare class FileLock {
25
25
  export declare class HashPlanner {
26
26
  constructor(nxJson: NxJson, projectGraph: ExternalObject<ProjectGraph>)
27
27
  getPlans(taskIds: Array<string>, taskGraph: TaskGraph): Record<string, string[]>
28
- getPlansReference(taskIds: Array<string>, taskGraph: TaskGraph): JsExternal
28
+ getPlansReference(taskIds: Array<string>, taskGraph: TaskGraph): ExternalObject<Record<string, Array<HashInstruction>>>
29
29
  }
30
30
 
31
31
  export declare class ImportResult {
@@ -116,11 +116,11 @@ export interface CachedResult {
116
116
  size?: number
117
117
  }
118
118
 
119
- export declare export function closeDbConnection(connection: ExternalObject<NxDbConnection>): void
119
+ export declare export declare function closeDbConnection(connection: ExternalObject<NxDbConnection>): void
120
120
 
121
- export declare export function connectToNxDb(cacheDir: string, nxVersion: string, dbName?: string | undefined | null): ExternalObject<NxDbConnection>
121
+ export declare export declare function connectToNxDb(cacheDir: string, nxVersion: string, dbName?: string | undefined | null): ExternalObject<NxDbConnection>
122
122
 
123
- export declare export function copy(src: string, dest: string): number
123
+ export declare export declare function copy(src: string, dest: string): number
124
124
 
125
125
  export interface DepsOutputsInput {
126
126
  dependentTasksOutputFiles: string
@@ -137,7 +137,7 @@ export declare const enum EventType {
137
137
  create = 'create'
138
138
  }
139
139
 
140
- export declare export function expandOutputs(directory: string, entries: Array<string>): Array<string>
140
+ export declare export declare function expandOutputs(directory: string, entries: Array<string>): Array<string>
141
141
 
142
142
  export interface ExternalDependenciesInput {
143
143
  externalDependencies: Array<string>
@@ -163,21 +163,21 @@ export interface FileSetInput {
163
163
  fileset: string
164
164
  }
165
165
 
166
- export declare export function findImports(projectFileMap: Record<string, Array<string>>): Array<ImportResult>
166
+ export declare export declare function findImports(projectFileMap: Record<string, Array<string>>): Array<ImportResult>
167
167
 
168
- export declare export function getBinaryTarget(): string
168
+ export declare export declare function getBinaryTarget(): string
169
169
 
170
- export declare export function getDefaultMaxCacheSize(cachePath: string): number
170
+ export declare export declare function getDefaultMaxCacheSize(cachePath: string): number
171
171
 
172
172
  /**
173
173
  * Expands the given outputs into a list of existing files.
174
174
  * This is used when hashing outputs
175
175
  */
176
- export declare export function getFilesForOutputs(directory: string, entries: Array<string>): Array<string>
176
+ export declare export declare function getFilesForOutputs(directory: string, entries: Array<string>): Array<string>
177
177
 
178
- export declare export function getTransformableOutputs(outputs: Array<string>): Array<string>
178
+ export declare export declare function getTransformableOutputs(outputs: Array<string>): Array<string>
179
179
 
180
- export declare export function hashArray(input: Array<string | undefined | null>): string
180
+ export declare export declare function hashArray(input: Array<string | undefined | null>): string
181
181
 
182
182
  export interface HashDetails {
183
183
  value: string
@@ -195,7 +195,7 @@ export interface HasherOptions {
195
195
  selectivelyHashTsConfig: boolean
196
196
  }
197
197
 
198
- export declare export function hashFile(file: string): string | null
198
+ export declare export declare function hashFile(file: string): string | null
199
199
 
200
200
  export interface InputsInput {
201
201
  input: string
@@ -235,7 +235,7 @@ export interface ProjectGraph {
235
235
  externalNodes: Record<string, ExternalNode>
236
236
  }
237
237
 
238
- export declare export function remove(src: string): void
238
+ export declare export declare function remove(src: string): void
239
239
 
240
240
  export interface RuntimeInput {
241
241
  runtime: string
@@ -277,20 +277,20 @@ export interface TaskTarget {
277
277
  configuration?: string
278
278
  }
279
279
 
280
- export declare export function testOnlyTransferFileMap(projectFiles: Record<string, Array<FileData>>, nonProjectFiles: Array<FileData>): NxWorkspaceFilesExternals
280
+ export declare export declare function testOnlyTransferFileMap(projectFiles: Record<string, Array<FileData>>, nonProjectFiles: Array<FileData>): NxWorkspaceFilesExternals
281
281
 
282
282
  /**
283
283
  * Transfer the project graph from the JS world to the Rust world, so that we can pass the project graph via memory quicker
284
284
  * This wont be needed once the project graph is created in Rust
285
285
  */
286
- export declare export function transferProjectGraph(projectGraph: ProjectGraph): ExternalObject<ProjectGraph>
286
+ export declare export declare function transferProjectGraph(projectGraph: ProjectGraph): ExternalObject<ProjectGraph>
287
287
 
288
288
  export interface UpdatedWorkspaceFiles {
289
289
  fileMap: FileMap
290
290
  externalReferences: NxWorkspaceFilesExternals
291
291
  }
292
292
 
293
- export declare export function validateOutputs(outputs: Array<string>): void
293
+ export declare export declare function validateOutputs(outputs: Array<string>): void
294
294
 
295
295
  export interface WatchEvent {
296
296
  path: string
Binary file
@@ -146,7 +146,7 @@ async function runCommandForTasks(projectsToRun, currentProjectGraph, { nxJson }
146
146
  }
147
147
  async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, projectNames, nxArgs, overrides, extraTargetDependencies, extraOptions) {
148
148
  let taskGraph = createTaskGraphAndRunValidations(projectGraph, extraTargetDependencies ?? {}, projectNames, nxArgs, overrides, extraOptions);
149
- if (nxArgs.skipSync) {
149
+ if (nxArgs.skipSync || (0, is_ci_1.isCI)()) {
150
150
  return { projectGraph, taskGraph };
151
151
  }
152
152
  // collect unique syncGenerators from the tasks
@@ -166,9 +166,8 @@ async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, project
166
166
  const outOfSyncTitle = 'The workspace is out of sync';
167
167
  const resultBodyLines = (0, sync_generators_1.getSyncGeneratorSuccessResultsMessageLines)(results);
168
168
  const fixMessage = 'Make sure to run `nx sync` to apply the identified changes or set `sync.applyChanges` to `true` in your `nx.json` to apply them automatically when running tasks in interactive environments.';
169
- const willErrorOnCiMessage = 'This will result in an error in CI.';
170
- if ((0, is_ci_1.isCI)() || !process.stdout.isTTY) {
171
- // If the user is running in CI or is running in a non-TTY environment we
169
+ if (!process.stdout.isTTY) {
170
+ // If the user is running a non-TTY environment we
172
171
  // throw an error to stop the execution of the tasks.
173
172
  if (areAllResultsFailures) {
174
173
  output_1.output.error({
@@ -216,7 +215,6 @@ async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, project
216
215
  ...resultBodyLines,
217
216
  '',
218
217
  'Your workspace is set to not apply the identified changes automatically (`sync.applyChanges` is set to `false` in your `nx.json`).',
219
- willErrorOnCiMessage,
220
218
  fixMessage,
221
219
  ],
222
220
  });
@@ -235,10 +233,12 @@ async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, project
235
233
  title: outOfSyncTitle,
236
234
  bodyLines: [
237
235
  ...resultBodyLines,
238
- '',
239
- nxJson.sync?.applyChanges === true
240
- ? 'Proceeding to sync the identified changes automatically (`sync.applyChanges` is set to `true` in your `nx.json`).'
241
- : willErrorOnCiMessage,
236
+ ...(nxJson.sync?.applyChanges === true
237
+ ? [
238
+ '',
239
+ 'Proceeding to sync the identified changes automatically (`sync.applyChanges` is set to `true` in your `nx.json`).',
240
+ ]
241
+ : []),
242
242
  ],
243
243
  });
244
244
  const applyChanges = nxJson.sync?.applyChanges === true ||