nx 23.2.0-beta.2 → 23.2.0-beta.3
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/dist/bin/nx.js +1 -0
- package/dist/src/analytics/analytics.js +9 -7
- package/dist/src/command-line/graph/graph.d.ts +1 -0
- package/dist/src/command-line/graph/graph.js +15 -6
- package/dist/src/command-line/migrate/migrate.js +16 -1
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +1 -1
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +1 -1
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +1 -1
- package/dist/src/config/nx-json.d.ts +4 -2
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/native/index.d.ts +2 -2
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +12 -4
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +1 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +16 -2
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +5 -8
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +11 -14
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +12 -5
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +21 -7
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +1 -1
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +26 -27
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +50 -8
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +16 -3
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +15 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +42 -6
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +15 -12
- package/dist/src/project-graph/utils/project-configuration-utils.js +79 -99
- package/dist/src/tasks-runner/task-env.d.ts +9 -0
- package/dist/src/tasks-runner/task-env.js +26 -2
- package/dist/src/tasks-runner/task-orchestrator.js +2 -6
- package/dist/src/utils/analytics-prompt.d.ts +0 -6
- package/dist/src/utils/analytics-prompt.js +0 -51
- package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
- package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
- package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
- package/dist/src/utils/catalog/bun-manager.js +130 -0
- package/dist/src/utils/catalog/index.d.ts +1 -1
- package/dist/src/utils/catalog/index.js +1 -1
- package/dist/src/utils/catalog/manager-factory.js +3 -0
- package/dist/src/utils/catalog/manager-utils.d.ts +8 -1
- package/dist/src/utils/catalog/manager-utils.js +9 -4
- package/dist/src/utils/catalog/manager.d.ts +13 -1
- package/dist/src/utils/catalog/manager.js +30 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +2 -1
- package/dist/src/utils/catalog/pnpm-manager.js +3 -0
- package/dist/src/utils/catalog/types.d.ts +4 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +6 -2
- package/dist/src/utils/catalog/yarn-manager.js +23 -32
- package/dist/src/utils/git-utils.d.ts +15 -0
- package/dist/src/utils/git-utils.js +64 -6
- package/dist/src/utils/package-manager.d.ts +3 -1
- package/dist/src/utils/package-manager.js +22 -2
- package/dist/src/utils/workspace-id.d.ts +20 -0
- package/dist/src/utils/workspace-id.js +54 -0
- package/package.json +20 -15
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateWorkspaceId = generateWorkspaceId;
|
|
4
|
+
exports.deriveRepoKey = deriveRepoKey;
|
|
5
|
+
exports.computeRepoKey = computeRepoKey;
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
const git_utils_1 = require("./git-utils");
|
|
8
|
+
/**
|
|
9
|
+
* The workspace's analytics identity: the Nx Cloud id when the workspace has
|
|
10
|
+
* one (most stable — it survives repo moves and renames), else the repo key.
|
|
11
|
+
* Null when neither is available, in which case nothing is reported.
|
|
12
|
+
*/
|
|
13
|
+
function generateWorkspaceId(root, nxJson) {
|
|
14
|
+
const nxCloudId = nxJson?.nxCloudId ?? nxJson?.nxCloudAccessToken;
|
|
15
|
+
if (nxCloudId) {
|
|
16
|
+
return nxCloudId;
|
|
17
|
+
}
|
|
18
|
+
return deriveRepoKey(root);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Derive the stable, unsalted key identifying this workspace in the
|
|
22
|
+
* repoTelemetry registry: `sha256(<repo identity> + '#' + <workspace path
|
|
23
|
+
* relative to the git root>)`.
|
|
24
|
+
*
|
|
25
|
+
* The repo identity is the normalized `domain/slug` from the git remote
|
|
26
|
+
* (protocol-independent: ssh, https, and token-authenticated URLs of the
|
|
27
|
+
* same repo produce the same key), falling back to the first-commit SHA
|
|
28
|
+
* when no remote exists. Returns null when no identity is derivable — not
|
|
29
|
+
* a git repository, or a shallow clone without a remote.
|
|
30
|
+
*/
|
|
31
|
+
function deriveRepoKey(directory) {
|
|
32
|
+
const identity = getRepoIdentity(directory);
|
|
33
|
+
if (!identity) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return computeRepoKey(identity, (0, git_utils_1.getGitRootRelativePath)(directory) ?? '');
|
|
37
|
+
}
|
|
38
|
+
function computeRepoKey(identity, relativePath) {
|
|
39
|
+
return (0, crypto_1.createHash)('sha256')
|
|
40
|
+
.update(`${identity}#${relativePath}`)
|
|
41
|
+
.digest('hex');
|
|
42
|
+
}
|
|
43
|
+
function getRepoIdentity(directory) {
|
|
44
|
+
const remote = (0, git_utils_1.getVcsRemoteInfo)(directory);
|
|
45
|
+
if (remote) {
|
|
46
|
+
// Hosts route case-insensitively and hold one canonical casing, so a
|
|
47
|
+
// hand-typed remote must key the same as the canonical one the claim
|
|
48
|
+
// flow derives from the host's API.
|
|
49
|
+
return `${remote.domain}/${remote.slug}`.toLowerCase().replace(/\/+$/, '');
|
|
50
|
+
}
|
|
51
|
+
// Without a remote the first commit is the only stable identity, and a
|
|
52
|
+
// shallow clone doesn't have a real one.
|
|
53
|
+
return (0, git_utils_1.isShallowRepository)(directory) ? null : (0, git_utils_1.getFirstCommitSha)(directory);
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"bl": "4.1.0",
|
|
68
68
|
"brace-expansion": "5.0.6",
|
|
69
69
|
"buffer": "5.7.1",
|
|
70
|
+
"bundle-name": "4.1.0",
|
|
70
71
|
"call-bind-apply-helpers": "1.0.2",
|
|
71
72
|
"chalk": "4.1.2",
|
|
72
73
|
"cli-cursor": "3.1.0",
|
|
@@ -77,8 +78,10 @@
|
|
|
77
78
|
"color-name": "1.1.4",
|
|
78
79
|
"combined-stream": "1.0.8",
|
|
79
80
|
"debug": "4.4.3",
|
|
81
|
+
"default-browser": "5.2.1",
|
|
82
|
+
"default-browser-id": "5.0.0",
|
|
80
83
|
"defaults": "1.0.4",
|
|
81
|
-
"define-lazy-prop": "
|
|
84
|
+
"define-lazy-prop": "3.0.0",
|
|
82
85
|
"delayed-stream": "1.0.0",
|
|
83
86
|
"dotenv": "16.4.7",
|
|
84
87
|
"dotenv-expand": "12.0.3",
|
|
@@ -111,11 +114,12 @@
|
|
|
111
114
|
"ieee754": "1.2.1",
|
|
112
115
|
"ignore": "7.0.5",
|
|
113
116
|
"inherits": "2.0.4",
|
|
114
|
-
"is-docker": "
|
|
117
|
+
"is-docker": "3.0.0",
|
|
115
118
|
"is-fullwidth-code-point": "3.0.0",
|
|
119
|
+
"is-inside-container": "1.0.0",
|
|
116
120
|
"is-interactive": "1.0.0",
|
|
117
121
|
"is-unicode-supported": "0.1.0",
|
|
118
|
-
"is-wsl": "
|
|
122
|
+
"is-wsl": "3.1.0",
|
|
119
123
|
"isexe": "2.0.0",
|
|
120
124
|
"json5": "2.2.3",
|
|
121
125
|
"jsonc-parser": "3.3.1",
|
|
@@ -131,7 +135,7 @@
|
|
|
131
135
|
"npm-run-path": "4.0.1",
|
|
132
136
|
"once": "1.4.0",
|
|
133
137
|
"onetime": "5.1.2",
|
|
134
|
-
"open": "
|
|
138
|
+
"open": "10.1.0",
|
|
135
139
|
"ora": "5.4.1",
|
|
136
140
|
"path-key": "3.1.1",
|
|
137
141
|
"picocolors": "1.1.1",
|
|
@@ -140,6 +144,7 @@
|
|
|
140
144
|
"require-directory": "2.1.1",
|
|
141
145
|
"resolve.exports": "2.0.3",
|
|
142
146
|
"restore-cursor": "3.1.0",
|
|
147
|
+
"run-applescript": "7.0.0",
|
|
143
148
|
"safe-buffer": "5.2.1",
|
|
144
149
|
"semver": "7.8.4",
|
|
145
150
|
"signal-exit": "3.0.7",
|
|
@@ -176,16 +181,16 @@
|
|
|
176
181
|
}
|
|
177
182
|
},
|
|
178
183
|
"optionalDependencies": {
|
|
179
|
-
"@nx/nx-darwin-arm64": "23.2.0-beta.
|
|
180
|
-
"@nx/nx-darwin-x64": "23.2.0-beta.
|
|
181
|
-
"@nx/nx-freebsd-x64": "23.2.0-beta.
|
|
182
|
-
"@nx/nx-linux-arm-gnueabihf": "23.2.0-beta.
|
|
183
|
-
"@nx/nx-linux-arm64-gnu": "23.2.0-beta.
|
|
184
|
-
"@nx/nx-linux-arm64-musl": "23.2.0-beta.
|
|
185
|
-
"@nx/nx-linux-x64-gnu": "23.2.0-beta.
|
|
186
|
-
"@nx/nx-linux-x64-musl": "23.2.0-beta.
|
|
187
|
-
"@nx/nx-win32-arm64-msvc": "23.2.0-beta.
|
|
188
|
-
"@nx/nx-win32-x64-msvc": "23.2.0-beta.
|
|
184
|
+
"@nx/nx-darwin-arm64": "23.2.0-beta.3",
|
|
185
|
+
"@nx/nx-darwin-x64": "23.2.0-beta.3",
|
|
186
|
+
"@nx/nx-freebsd-x64": "23.2.0-beta.3",
|
|
187
|
+
"@nx/nx-linux-arm-gnueabihf": "23.2.0-beta.3",
|
|
188
|
+
"@nx/nx-linux-arm64-gnu": "23.2.0-beta.3",
|
|
189
|
+
"@nx/nx-linux-arm64-musl": "23.2.0-beta.3",
|
|
190
|
+
"@nx/nx-linux-x64-gnu": "23.2.0-beta.3",
|
|
191
|
+
"@nx/nx-linux-x64-musl": "23.2.0-beta.3",
|
|
192
|
+
"@nx/nx-win32-arm64-msvc": "23.2.0-beta.3",
|
|
193
|
+
"@nx/nx-win32-x64-msvc": "23.2.0-beta.3"
|
|
189
194
|
},
|
|
190
195
|
"nx-migrations": {
|
|
191
196
|
"migrations": "./migrations.json",
|