create-nx-workspace 19.5.7 → 19.6.0-beta.1
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
|
@@ -9,8 +9,9 @@ const child_process_1 = require("child_process");
|
|
|
9
9
|
function deduceDefaultBase() {
|
|
10
10
|
const nxDefaultBase = 'main';
|
|
11
11
|
try {
|
|
12
|
-
return ((0, child_process_1.execSync)('git config --get init.defaultBranch')
|
|
13
|
-
|
|
12
|
+
return ((0, child_process_1.execSync)('git config --get init.defaultBranch', { windowsHide: true })
|
|
13
|
+
.toString()
|
|
14
|
+
.trim() || nxDefaultBase);
|
|
14
15
|
}
|
|
15
16
|
catch {
|
|
16
17
|
return nxDefaultBase;
|
package/src/utils/git/git.js
CHANGED
|
@@ -7,7 +7,9 @@ const default_base_1 = require("./default-base");
|
|
|
7
7
|
const output_1 = require("../output");
|
|
8
8
|
function checkGitVersion() {
|
|
9
9
|
try {
|
|
10
|
-
let gitVersionOutput = (0, child_process_1.execSync)('git --version')
|
|
10
|
+
let gitVersionOutput = (0, child_process_1.execSync)('git --version', { windowsHide: true })
|
|
11
|
+
.toString()
|
|
12
|
+
.trim();
|
|
11
13
|
return gitVersionOutput.match(/[0-9]+\.[0-9]+\.+[0-9]+/)?.[0];
|
|
12
14
|
}
|
|
13
15
|
catch {
|
|
@@ -119,7 +119,10 @@ function shouldRecordStats() {
|
|
|
119
119
|
return true;
|
|
120
120
|
}
|
|
121
121
|
try {
|
|
122
|
-
const stdout = (0, node_child_process_1.execSync)(pmc.getRegistryUrl, {
|
|
122
|
+
const stdout = (0, node_child_process_1.execSync)(pmc.getRegistryUrl, {
|
|
123
|
+
encoding: 'utf-8',
|
|
124
|
+
windowsHide: true,
|
|
125
|
+
});
|
|
123
126
|
const url = new URL(stdout.trim());
|
|
124
127
|
// don't record stats when testing locally
|
|
125
128
|
return url.hostname !== 'localhost';
|
|
@@ -101,6 +101,7 @@ function getPackageManagerVersion(packageManager, cwd = process.cwd()) {
|
|
|
101
101
|
const version = (0, child_process_1.execSync)(`${packageManager} --version`, {
|
|
102
102
|
cwd,
|
|
103
103
|
encoding: 'utf-8',
|
|
104
|
+
windowsHide: true,
|
|
104
105
|
}).trim();
|
|
105
106
|
pmVersionCache.set(packageManager, version);
|
|
106
107
|
return version;
|