nx 20.0.0 → 20.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/migrations.json CHANGED
@@ -57,6 +57,12 @@
57
57
  "version": "20.0.0-beta.7",
58
58
  "description": "Migration for v20.0.0-beta.7",
59
59
  "implementation": "./src/migrations/update-20-0-0/move-use-daemon-process"
60
+ },
61
+ "use-legacy-cache": {
62
+ "version": "20.0.1",
63
+ "description": "Set `useLegacyCache` to true for migrating workspaces",
64
+ "implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
65
+ "x-repair-skip": true
60
66
  }
61
67
  }
62
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
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": {
@@ -80,16 +80,16 @@
80
80
  }
81
81
  },
82
82
  "optionalDependencies": {
83
- "@nx/nx-darwin-x64": "20.0.0",
84
- "@nx/nx-darwin-arm64": "20.0.0",
85
- "@nx/nx-linux-x64-gnu": "20.0.0",
86
- "@nx/nx-linux-x64-musl": "20.0.0",
87
- "@nx/nx-win32-x64-msvc": "20.0.0",
88
- "@nx/nx-linux-arm64-gnu": "20.0.0",
89
- "@nx/nx-linux-arm64-musl": "20.0.0",
90
- "@nx/nx-linux-arm-gnueabihf": "20.0.0",
91
- "@nx/nx-win32-arm64-msvc": "20.0.0",
92
- "@nx/nx-freebsd-x64": "20.0.0"
83
+ "@nx/nx-darwin-x64": "20.0.1",
84
+ "@nx/nx-darwin-arm64": "20.0.1",
85
+ "@nx/nx-linux-x64-gnu": "20.0.1",
86
+ "@nx/nx-linux-x64-musl": "20.0.1",
87
+ "@nx/nx-win32-x64-msvc": "20.0.1",
88
+ "@nx/nx-linux-arm64-gnu": "20.0.1",
89
+ "@nx/nx-linux-arm64-musl": "20.0.1",
90
+ "@nx/nx-linux-arm-gnueabihf": "20.0.1",
91
+ "@nx/nx-win32-arm64-msvc": "20.0.1",
92
+ "@nx/nx-freebsd-x64": "20.0.1"
93
93
  },
94
94
  "nx-migrations": {
95
95
  "migrations": "./migrations.json",
@@ -1,2 +1,3 @@
1
1
  export declare function hashArray(content: string[]): string;
2
2
  export declare function hashObject(obj: object): string;
3
+ export declare function hashFile(filePath: string): string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hashArray = hashArray;
4
4
  exports.hashObject = hashObject;
5
+ exports.hashFile = hashFile;
5
6
  function hashArray(content) {
6
7
  // Import as needed. There is also an issue running unit tests in Nx repo if this is a top-level import.
7
8
  const { hashArray } = require('../native');
@@ -16,3 +17,7 @@ function hashObject(obj) {
16
17
  }
17
18
  return hashArray(parts);
18
19
  }
20
+ function hashFile(filePath) {
21
+ const { hashFile } = require('../native');
22
+ return hashFile(filePath);
23
+ }
@@ -0,0 +1,2 @@
1
+ import { Tree } from '../../generators/tree';
2
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const nx_json_1 = require("../../generators/utils/nx-json");
6
+ async function update(tree) {
7
+ const nxJson = (0, nx_json_1.readNxJson)(tree);
8
+ if (!nxJson) {
9
+ return;
10
+ }
11
+ // If workspaces had `enableDbCache` we can just delete the property as the db cache is enabled by default in nx v20
12
+ if (nxJson.enableDbCache) {
13
+ delete nxJson.enableDbCache;
14
+ }
15
+ else {
16
+ nxJson.useLegacyCache = true;
17
+ }
18
+ (0, nx_json_1.updateNxJson)(tree, nxJson);
19
+ await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
20
+ }
Binary file
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isNxCloudUsed = isNxCloudUsed;
4
4
  exports.getNxCloudUrl = getNxCloudUrl;
5
5
  function isNxCloudUsed(nxJson) {
6
+ if (process.env.NX_NO_CLOUD === 'true') {
7
+ return false;
8
+ }
9
+ if (nxJson.neverConnectToCloud) {
10
+ return true;
11
+ }
6
12
  return (!!process.env.NX_CLOUD_ACCESS_TOKEN ||
7
13
  !!nxJson.nxCloudAccessToken ||
8
14
  !!nxJson.nxCloudId ||