nx 20.1.0-canary.20241015-1badac8 → 20.1.0-canary.20241017-c902036
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +6 -0
- package/package.json +11 -11
- package/schemas/nx-schema.json +4 -0
- package/src/command-line/release/plan.js +1 -1
- package/src/config/nx-json.d.ts +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/hasher/file-hasher.d.ts +1 -0
- package/src/hasher/file-hasher.js +5 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/utils/nx-cloud-utils.js +6 -0
@@ -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,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 ||
|