nx 20.0.1 → 20.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/nx.js +2 -2
- package/package.json +11 -11
- package/schemas/nx-schema.json +4 -0
- package/src/command-line/activate-powerpack/activate-powerpack.js +1 -1
- package/src/command-line/add/add.js +1 -1
- package/src/command-line/connect/view-logs.js +1 -1
- package/src/command-line/exec/exec.js +3 -3
- package/src/command-line/format/format.js +3 -3
- package/src/command-line/graph/graph.js +1 -1
- package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +2 -2
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +1 -1
- package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -1
- package/src/command-line/init/implementation/react/index.js +6 -6
- package/src/command-line/init/implementation/utils.js +9 -5
- package/src/command-line/init/init-v1.js +1 -1
- package/src/command-line/init/init-v2.js +1 -1
- package/src/command-line/migrate/command-object.js +4 -4
- package/src/command-line/migrate/migrate.js +1 -1
- package/src/command-line/release/config/version-plans.js +1 -1
- package/src/command-line/release/plan.js +1 -1
- package/src/command-line/release/utils/exec-command.js +1 -1
- package/src/command-line/release/utils/github.js +1 -1
- package/src/command-line/release/utils/launch-editor.js +2 -2
- package/src/command-line/release/version.js +1 -1
- package/src/command-line/run/run.js +1 -1
- package/src/command-line/watch/watch.js +1 -1
- package/src/config/nx-json.d.ts +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/daemon/client/client.js +1 -1
- package/src/daemon/client/generate-help-output.js +1 -1
- package/src/executors/run-commands/run-commands.impl.js +1 -1
- package/src/executors/run-script/run-script.impl.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -1
- package/src/plugins/js/index.js +2 -2
- package/src/project-graph/file-utils.js +1 -1
- package/src/tasks-runner/cache.js +1 -1
- package/src/utils/ab-testing.js +1 -1
- package/src/utils/command-line-utils.js +3 -3
- package/src/utils/default-base.js +1 -1
- package/src/utils/git-utils.index-filter.js +2 -2
- package/src/utils/git-utils.js +4 -4
- package/src/utils/git-utils.tree-filter.js +1 -1
- package/src/utils/nx-cloud-utils.js +1 -4
@@ -11,7 +11,7 @@ function generateDaemonHelpOutput() {
|
|
11
11
|
*/
|
12
12
|
const res = (0, child_process_1.spawnSync)(process.execPath, ['./exec-is-server-available.js'], {
|
13
13
|
cwd: __dirname,
|
14
|
-
windowsHide:
|
14
|
+
windowsHide: false,
|
15
15
|
});
|
16
16
|
const isServerAvailable = res?.stdout?.toString().trim().indexOf('true') > -1;
|
17
17
|
if (!isServerAvailable) {
|
@@ -220,7 +220,7 @@ function nodeProcess(commandConfig, cwd, env, readyWhenStatus, streamOutput = tr
|
|
220
220
|
maxBuffer: exports.LARGE_BUFFER,
|
221
221
|
env,
|
222
222
|
cwd,
|
223
|
-
windowsHide:
|
223
|
+
windowsHide: false,
|
224
224
|
});
|
225
225
|
childProcesses.add(childProcess);
|
226
226
|
childProcess.stdout.on('data', (data) => {
|
Binary file
|
@@ -32,7 +32,7 @@ function getRootPackageName(tree) {
|
|
32
32
|
}
|
33
33
|
function getNxInitDate() {
|
34
34
|
try {
|
35
|
-
const nxInitIso = (0, child_process_1.execSync)('git log --diff-filter=A --follow --format=%aI -- nx.json | tail -1', { stdio: 'pipe', windowsHide:
|
35
|
+
const nxInitIso = (0, child_process_1.execSync)('git log --diff-filter=A --follow --format=%aI -- nx.json | tail -1', { stdio: 'pipe', windowsHide: false })
|
36
36
|
.toString()
|
37
37
|
.trim();
|
38
38
|
const nxInitDate = new Date(nxInitIso);
|
package/src/plugins/js/index.js
CHANGED
@@ -34,7 +34,7 @@ exports.createNodes = [
|
|
34
34
|
? (0, fs_1.readFileSync)(lockFilePath).toString()
|
35
35
|
: (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
|
36
36
|
maxBuffer: 1024 * 1024 * 10,
|
37
|
-
windowsHide:
|
37
|
+
windowsHide: false,
|
38
38
|
}).toString();
|
39
39
|
const lockFileHash = getLockFileHash(lockFileContents);
|
40
40
|
if (!lockFileNeedsReprocessing(lockFileHash)) {
|
@@ -64,7 +64,7 @@ const createDependencies = (_, ctx) => {
|
|
64
64
|
? (0, fs_1.readFileSync)(lockFilePath).toString()
|
65
65
|
: (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
|
66
66
|
maxBuffer: 1024 * 1024 * 10,
|
67
|
-
windowsHide:
|
67
|
+
windowsHide: false,
|
68
68
|
}).toString();
|
69
69
|
const lockFileHash = getLockFileHash(lockFileContents);
|
70
70
|
if (!lockFileNeedsReprocessing(lockFileHash)) {
|
@@ -91,7 +91,7 @@ function defaultReadFileAtRevision(file, revision) {
|
|
91
91
|
: (0, child_process_1.execSync)(`git show ${revision}:${filePathInGitRepository}`, {
|
92
92
|
maxBuffer: exports.TEN_MEGABYTES,
|
93
93
|
stdio: ['pipe', 'pipe', 'ignore'],
|
94
|
-
windowsHide:
|
94
|
+
windowsHide: false,
|
95
95
|
})
|
96
96
|
.toString()
|
97
97
|
.trim();
|
package/src/utils/ab-testing.js
CHANGED
@@ -99,7 +99,7 @@ function shouldRecordStats() {
|
|
99
99
|
try {
|
100
100
|
const stdout = (0, node_child_process_1.execSync)(pmc.getRegistryUrl, {
|
101
101
|
encoding: 'utf-8',
|
102
|
-
windowsHide:
|
102
|
+
windowsHide: false,
|
103
103
|
});
|
104
104
|
const url = new URL(stdout.trim());
|
105
105
|
// don't record stats when testing locally
|
@@ -213,7 +213,7 @@ function getMergeBase(base, head = 'HEAD') {
|
|
213
213
|
maxBuffer: file_utils_1.TEN_MEGABYTES,
|
214
214
|
cwd: workspace_root_1.workspaceRoot,
|
215
215
|
stdio: 'pipe',
|
216
|
-
windowsHide:
|
216
|
+
windowsHide: false,
|
217
217
|
})
|
218
218
|
.toString()
|
219
219
|
.trim();
|
@@ -224,7 +224,7 @@ function getMergeBase(base, head = 'HEAD') {
|
|
224
224
|
maxBuffer: file_utils_1.TEN_MEGABYTES,
|
225
225
|
cwd: workspace_root_1.workspaceRoot,
|
226
226
|
stdio: 'pipe',
|
227
|
-
windowsHide:
|
227
|
+
windowsHide: false,
|
228
228
|
})
|
229
229
|
.toString()
|
230
230
|
.trim();
|
@@ -241,7 +241,7 @@ function parseGitOutput(command) {
|
|
241
241
|
return (0, child_process_1.execSync)(command, {
|
242
242
|
maxBuffer: file_utils_1.TEN_MEGABYTES,
|
243
243
|
cwd: workspace_root_1.workspaceRoot,
|
244
|
-
windowsHide:
|
244
|
+
windowsHide: false,
|
245
245
|
})
|
246
246
|
.toString('utf-8')
|
247
247
|
.split('\n')
|
@@ -9,10 +9,10 @@ try {
|
|
9
9
|
const { execSync } = require('child_process');
|
10
10
|
// NOTE: Using env vars because Windows PowerShell has its own handling of quotes (") messes up quotes in args, even if escaped.
|
11
11
|
const src = process.env.NX_IMPORT_SOURCE;
|
12
|
-
execSync('git read-tree --empty', { stdio: 'inherit', windowsHide:
|
12
|
+
execSync('git read-tree --empty', { stdio: 'inherit', windowsHide: false });
|
13
13
|
execSync(`git reset ${process.env.GIT_COMMIT} -- "${src}"`, {
|
14
14
|
stdio: 'inherit',
|
15
|
-
windowsHide:
|
15
|
+
windowsHide: false,
|
16
16
|
});
|
17
17
|
}
|
18
18
|
catch (error) {
|
package/src/utils/git-utils.js
CHANGED
@@ -36,7 +36,7 @@ class GitRepository {
|
|
36
36
|
getGitRootPath(cwd) {
|
37
37
|
return (0, child_process_1.execSync)('git rev-parse --show-toplevel', {
|
38
38
|
cwd,
|
39
|
-
windowsHide:
|
39
|
+
windowsHide: false,
|
40
40
|
})
|
41
41
|
.toString()
|
42
42
|
.trim();
|
@@ -177,7 +177,7 @@ function getGithubSlugOrNull() {
|
|
177
177
|
try {
|
178
178
|
const gitRemote = (0, child_process_1.execSync)('git remote -v', {
|
179
179
|
stdio: 'pipe',
|
180
|
-
windowsHide:
|
180
|
+
windowsHide: false,
|
181
181
|
}).toString();
|
182
182
|
// If there are no remotes, we default to github
|
183
183
|
if (!gitRemote || gitRemote.length === 0) {
|
@@ -228,7 +228,7 @@ function commitChanges(commitMessage, directory) {
|
|
228
228
|
stdio: 'pipe',
|
229
229
|
input: commitMessage,
|
230
230
|
cwd: directory,
|
231
|
-
windowsHide:
|
231
|
+
windowsHide: false,
|
232
232
|
});
|
233
233
|
}
|
234
234
|
catch (err) {
|
@@ -250,7 +250,7 @@ function getLatestCommitSha() {
|
|
250
250
|
return (0, child_process_1.execSync)('git rev-parse HEAD', {
|
251
251
|
encoding: 'utf8',
|
252
252
|
stdio: 'pipe',
|
253
|
-
windowsHide:
|
253
|
+
windowsHide: false,
|
254
254
|
}).trim();
|
255
255
|
}
|
256
256
|
catch {
|
@@ -3,12 +3,9 @@ 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') {
|
6
|
+
if (process.env.NX_NO_CLOUD === 'true' || nxJson.neverConnectToCloud) {
|
7
7
|
return false;
|
8
8
|
}
|
9
|
-
if (nxJson.neverConnectToCloud) {
|
10
|
-
return true;
|
11
|
-
}
|
12
9
|
return (!!process.env.NX_CLOUD_ACCESS_TOKEN ||
|
13
10
|
!!nxJson.nxCloudAccessToken ||
|
14
11
|
!!nxJson.nxCloudId ||
|