nx 20.1.0-canary.20241017-c902036 → 20.1.0-canary.20241019-19e765f
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/bin/nx.js +2 -2
- package/package.json +11 -11
- 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/command-object.js +9 -0
- package/src/command-line/format/format.js +6 -4
- 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/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/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.d.ts +1 -0
- 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
package/bin/nx.js
CHANGED
@@ -191,7 +191,7 @@ function getLocalNxVersion(workspace) {
|
|
191
191
|
function _getLatestVersionOfNx() {
|
192
192
|
try {
|
193
193
|
return (0, child_process_1.execSync)('npm view nx@latest version', {
|
194
|
-
windowsHide:
|
194
|
+
windowsHide: false,
|
195
195
|
})
|
196
196
|
.toString()
|
197
197
|
.trim();
|
@@ -199,7 +199,7 @@ function _getLatestVersionOfNx() {
|
|
199
199
|
catch {
|
200
200
|
try {
|
201
201
|
return (0, child_process_1.execSync)('pnpm view nx@latest version', {
|
202
|
-
windowsHide:
|
202
|
+
windowsHide: false,
|
203
203
|
})
|
204
204
|
.toString()
|
205
205
|
.trim();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.1.0-canary.
|
3
|
+
"version": "20.1.0-canary.20241019-19e765f",
|
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.1.0-canary.
|
84
|
-
"@nx/nx-darwin-arm64": "20.1.0-canary.
|
85
|
-
"@nx/nx-linux-x64-gnu": "20.1.0-canary.
|
86
|
-
"@nx/nx-linux-x64-musl": "20.1.0-canary.
|
87
|
-
"@nx/nx-win32-x64-msvc": "20.1.0-canary.
|
88
|
-
"@nx/nx-linux-arm64-gnu": "20.1.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-musl": "20.1.0-canary.
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "20.1.0-canary.
|
91
|
-
"@nx/nx-win32-arm64-msvc": "20.1.0-canary.
|
92
|
-
"@nx/nx-freebsd-x64": "20.1.0-canary.
|
83
|
+
"@nx/nx-darwin-x64": "20.1.0-canary.20241019-19e765f",
|
84
|
+
"@nx/nx-darwin-arm64": "20.1.0-canary.20241019-19e765f",
|
85
|
+
"@nx/nx-linux-x64-gnu": "20.1.0-canary.20241019-19e765f",
|
86
|
+
"@nx/nx-linux-x64-musl": "20.1.0-canary.20241019-19e765f",
|
87
|
+
"@nx/nx-win32-x64-msvc": "20.1.0-canary.20241019-19e765f",
|
88
|
+
"@nx/nx-linux-arm64-gnu": "20.1.0-canary.20241019-19e765f",
|
89
|
+
"@nx/nx-linux-arm64-musl": "20.1.0-canary.20241019-19e765f",
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "20.1.0-canary.20241019-19e765f",
|
91
|
+
"@nx/nx-win32-arm64-msvc": "20.1.0-canary.20241019-19e765f",
|
92
|
+
"@nx/nx-freebsd-x64": "20.1.0-canary.20241019-19e765f"
|
93
93
|
},
|
94
94
|
"nx-migrations": {
|
95
95
|
"migrations": "./migrations.json",
|
@@ -21,7 +21,7 @@ async function requirePowerpack() {
|
|
21
21
|
if ('code' in e && e.code === 'MODULE_NOT_FOUND') {
|
22
22
|
try {
|
23
23
|
(0, child_process_1.execSync)(`${(0, package_manager_1.getPackageManagerCommand)().addDev} @nx/powerpack-license@latest`, {
|
24
|
-
windowsHide:
|
24
|
+
windowsHide: false,
|
25
25
|
});
|
26
26
|
// @ts-ignore
|
27
27
|
return await Promise.resolve().then(() => require('@nx/powerpack-license'));
|
@@ -35,7 +35,7 @@ async function installPackage(pkgName, version, nxJson) {
|
|
35
35
|
if ((0, fs_1.existsSync)('package.json')) {
|
36
36
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
37
37
|
await new Promise((resolve) => (0, child_process_1.exec)(`${pmc.addDev} ${pkgName}@${version}`, {
|
38
|
-
windowsHide:
|
38
|
+
windowsHide: false,
|
39
39
|
}, (error, stdout) => {
|
40
40
|
if (error) {
|
41
41
|
spinner.fail();
|
@@ -43,7 +43,7 @@ async function viewLogs() {
|
|
43
43
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
44
44
|
(0, child_process_1.execSync)(`${pmc.exec} nx-cloud upload-and-show-run-details`, {
|
45
45
|
stdio: [0, 1, 2],
|
46
|
-
windowsHide:
|
46
|
+
windowsHide: false,
|
47
47
|
});
|
48
48
|
if (!cloudUsed) {
|
49
49
|
output_1.output.note({
|
@@ -34,7 +34,7 @@ async function nxExecCommand(args) {
|
|
34
34
|
NX_PROJECT_NAME: process.env.NX_TASK_TARGET_PROJECT,
|
35
35
|
NX_PROJECT_ROOT_PATH: projectGraph.nodes?.[process.env.NX_TASK_TARGET_PROJECT]?.data?.root,
|
36
36
|
},
|
37
|
-
windowsHide:
|
37
|
+
windowsHide: false,
|
38
38
|
});
|
39
39
|
}
|
40
40
|
else {
|
@@ -67,7 +67,7 @@ async function runScriptAsNxTarget(projectGraph, argv, nxArgs) {
|
|
67
67
|
cwd: projectGraph.nodes?.[projectName]?.data?.root
|
68
68
|
? (0, path_2.joinPathFragments)(workspace_root_1.workspaceRoot, projectGraph.nodes?.[projectName]?.data?.root)
|
69
69
|
: workspace_root_1.workspaceRoot,
|
70
|
-
windowsHide:
|
70
|
+
windowsHide: false,
|
71
71
|
});
|
72
72
|
});
|
73
73
|
}
|
@@ -81,7 +81,7 @@ function runTargetOnProject(scriptDefinition, targetName, project, projectName,
|
|
81
81
|
const command = `${pm.exec} nx run ${projectName}:\\\"${targetName}\\\" ${extraArgs.join(' ')}`;
|
82
82
|
(0, child_process_1.execSync)(command, {
|
83
83
|
stdio: 'inherit',
|
84
|
-
windowsHide:
|
84
|
+
windowsHide: false,
|
85
85
|
});
|
86
86
|
}
|
87
87
|
function readScriptArgV(overrides) {
|
@@ -35,6 +35,15 @@ function withFormatOptions(yargs) {
|
|
35
35
|
describe: 'Projects to format (comma/space delimited).',
|
36
36
|
type: 'string',
|
37
37
|
coerce: shared_options_1.parseCSV,
|
38
|
+
})
|
39
|
+
.option('sort-root-tsconfig-paths', {
|
40
|
+
describe: `Ensure the workspace's tsconfig compilerOptions.paths are sorted. Warning: This will cause comments in the tsconfig to be lost.`,
|
41
|
+
type: 'boolean',
|
42
|
+
/**
|
43
|
+
* TODO(v21): Stop sorting tsconfig paths by default, paths are now less common/important
|
44
|
+
* in Nx workspace setups, and the sorting causes comments to be lost.
|
45
|
+
*/
|
46
|
+
default: true,
|
38
47
|
})
|
39
48
|
.option('all', {
|
40
49
|
describe: 'Format all projects.',
|
@@ -39,7 +39,9 @@ async function format(command, args) {
|
|
39
39
|
const chunkList = (0, chunkify_1.chunkify)(patterns);
|
40
40
|
switch (command) {
|
41
41
|
case 'write':
|
42
|
-
|
42
|
+
if (nxArgs.sortRootTsconfigPaths) {
|
43
|
+
sortTsConfig();
|
44
|
+
}
|
43
45
|
addRootConfigFiles(chunkList, nxArgs);
|
44
46
|
chunkList.forEach((chunk) => write(chunk));
|
45
47
|
break;
|
@@ -144,12 +146,12 @@ function write(patterns) {
|
|
144
146
|
const prettierPath = getPrettierPath();
|
145
147
|
(0, node_child_process_1.execSync)(`node "${prettierPath}" --write --list-different ${regularPatterns.join(' ')}`, {
|
146
148
|
stdio: [0, 1, 2],
|
147
|
-
windowsHide:
|
149
|
+
windowsHide: false,
|
148
150
|
});
|
149
151
|
if (swcrcPatterns.length > 0) {
|
150
152
|
(0, node_child_process_1.execSync)(`node "${prettierPath}" --write --list-different ${swcrcPatterns.join(' ')} --parser json`, {
|
151
153
|
stdio: [0, 1, 2],
|
152
|
-
windowsHide:
|
154
|
+
windowsHide: false,
|
153
155
|
});
|
154
156
|
}
|
155
157
|
}
|
@@ -160,7 +162,7 @@ async function check(patterns) {
|
|
160
162
|
}
|
161
163
|
const prettierPath = getPrettierPath();
|
162
164
|
return new Promise((resolve) => {
|
163
|
-
(0, node_child_process_1.exec)(`node "${prettierPath}" --list-different ${patterns.join(' ')}`, { encoding: 'utf-8', windowsHide:
|
165
|
+
(0, node_child_process_1.exec)(`node "${prettierPath}" --list-different ${patterns.join(' ')}`, { encoding: 'utf-8', windowsHide: false }, (error, stdout) => {
|
164
166
|
if (error) {
|
165
167
|
// The command failed so there are files with different formatting. Prettier writes them to stdout, newline separated.
|
166
168
|
resolve(stdout.trim().split('\n'));
|
@@ -801,6 +801,6 @@ function getHelpTextFromTarget(projectName, targetName) {
|
|
801
801
|
throw new Error(`No help command found for ${projectName}:${targetName}`);
|
802
802
|
return (0, node_child_process_1.execSync)(command, {
|
803
803
|
cwd: target.options?.cwd ?? workspace_root_1.workspaceRoot,
|
804
|
-
windowsHide:
|
804
|
+
windowsHide: false,
|
805
805
|
}).toString();
|
806
806
|
}
|
@@ -84,7 +84,7 @@ async function getLegacyMigrationFunctionIfApplicable(repoRoot, options) {
|
|
84
84
|
output_1.output.log({ title: '📝 Setting up workspace' });
|
85
85
|
(0, child_process_1.execSync)(`${pmc.exec} ${legacyMigrationCommand}`, {
|
86
86
|
stdio: [0, 1, 2],
|
87
|
-
windowsHide:
|
87
|
+
windowsHide: false,
|
88
88
|
});
|
89
89
|
if (useNxCloud) {
|
90
90
|
output_1.output.log({ title: '🛠️ Setting up Nx Cloud' });
|
@@ -110,7 +110,7 @@ async function installDependencies(repoRoot, pkgInfo, pmc) {
|
|
110
110
|
json.dependencies = (0, object_sort_1.sortObjectByKeys)(json.dependencies);
|
111
111
|
}
|
112
112
|
(0, fileutils_1.writeJsonFile)(`package.json`, json);
|
113
|
-
(0, child_process_1.execSync)(pmc.install, { stdio: [0, 1, 2], windowsHide:
|
113
|
+
(0, child_process_1.execSync)(pmc.install, { stdio: [0, 1, 2], windowsHide: false });
|
114
114
|
}
|
115
115
|
async function resolvePackageVersion(packageName, version) {
|
116
116
|
try {
|
@@ -63,7 +63,7 @@ function generateDotNxSetup(version) {
|
|
63
63
|
function normalizeVersionForNxJson(pkg, version) {
|
64
64
|
if (!(0, semver_1.valid)(version)) {
|
65
65
|
version = (0, child_process_1.execSync)(`npm view ${pkg}@${version} version`, {
|
66
|
-
windowsHide:
|
66
|
+
windowsHide: false,
|
67
67
|
}).toString();
|
68
68
|
}
|
69
69
|
return version.trimEnd();
|
@@ -4,7 +4,7 @@ exports.checkForUncommittedChanges = checkForUncommittedChanges;
|
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
function checkForUncommittedChanges() {
|
6
6
|
const gitResult = (0, child_process_1.execSync)('git status --porcelain', {
|
7
|
-
windowsHide:
|
7
|
+
windowsHide: false,
|
8
8
|
}).toString();
|
9
9
|
const filteredResults = gitResult
|
10
10
|
.split('\n')
|
@@ -41,7 +41,7 @@ function installDependencies(options) {
|
|
41
41
|
}
|
42
42
|
(0, child_process_1.execSync)(`${options.pmc.addDev} ${dependencies.join(' ')}`, {
|
43
43
|
stdio: [0, 1, 2],
|
44
|
-
windowsHide:
|
44
|
+
windowsHide: false,
|
45
45
|
});
|
46
46
|
}
|
47
47
|
async function normalizeOptions(options) {
|
@@ -56,7 +56,7 @@ async function normalizeOptions(options) {
|
|
56
56
|
};
|
57
57
|
const isCRA5 = /^[^~]?5/.test(deps['react-scripts']);
|
58
58
|
const npmVersion = (0, child_process_1.execSync)('npm -v', {
|
59
|
-
windowsHide:
|
59
|
+
windowsHide: false,
|
60
60
|
}).toString();
|
61
61
|
// Should remove this check 04/2023 once Node 14 & npm 6 reach EOL
|
62
62
|
const npxYesFlagNeeded = !npmVersion.startsWith('6'); // npm 7 added -y flag to npx
|
@@ -91,11 +91,11 @@ async function reorgnizeWorkspaceStructure(options) {
|
|
91
91
|
output_1.output.log({ title: '🧶 Updating .gitignore file' });
|
92
92
|
(0, child_process_1.execSync)(`echo "node_modules" >> .gitignore`, {
|
93
93
|
stdio: [0, 1, 2],
|
94
|
-
windowsHide:
|
94
|
+
windowsHide: false,
|
95
95
|
});
|
96
96
|
(0, child_process_1.execSync)(`echo "dist" >> .gitignore`, {
|
97
97
|
stdio: [0, 1, 2],
|
98
|
-
windowsHide:
|
98
|
+
windowsHide: false,
|
99
99
|
});
|
100
100
|
process.chdir('..');
|
101
101
|
copyFromTempWorkspaceToRoot();
|
@@ -117,7 +117,7 @@ async function reorgnizeWorkspaceStructure(options) {
|
|
117
117
|
}
|
118
118
|
function createTempWorkspace(options) {
|
119
119
|
(0, node_fs_1.rmSync)('temp-workspace', { recursive: true, force: true });
|
120
|
-
(0, child_process_1.execSync)(`npx ${options.npxYesFlagNeeded ? '-y' : ''} create-nx-workspace@latest temp-workspace --appName=${options.reactAppName} --preset=react-monorepo --style=css --bundler=${options.isVite ? 'vite' : 'webpack'} --packageManager=${options.packageManager} ${options.nxCloud ? '--nxCloud=yes' : '--nxCloud=skip'} ${options.addE2e ? '--e2eTestRunner=playwright' : '--e2eTestRunner=none'}`, { stdio: [0, 1, 2], windowsHide:
|
120
|
+
(0, child_process_1.execSync)(`npx ${options.npxYesFlagNeeded ? '-y' : ''} create-nx-workspace@latest temp-workspace --appName=${options.reactAppName} --preset=react-monorepo --style=css --bundler=${options.isVite ? 'vite' : 'webpack'} --packageManager=${options.packageManager} ${options.nxCloud ? '--nxCloud=yes' : '--nxCloud=skip'} ${options.addE2e ? '--e2eTestRunner=playwright' : '--e2eTestRunner=none'}`, { stdio: [0, 1, 2], windowsHide: false });
|
121
121
|
output_1.output.log({ title: '👋 Welcome to Nx!' });
|
122
122
|
output_1.output.log({ title: '🧹 Clearing unused files' });
|
123
123
|
(0, node_fs_1.cpSync)((0, path_1.join)('temp-workspace', 'apps', options.reactAppName, 'project.json'), 'project.json', { recursive: true });
|
@@ -209,7 +209,7 @@ async function addBundler(options) {
|
|
209
209
|
});
|
210
210
|
(0, child_process_1.execSync)(`echo "SKIP_PREFLIGHT_CHECK=true" > .env`, {
|
211
211
|
stdio: [0, 1, 2],
|
212
|
-
windowsHide:
|
212
|
+
windowsHide: false,
|
213
213
|
});
|
214
214
|
}
|
215
215
|
}
|
@@ -59,7 +59,7 @@ function deduceDefaultBase() {
|
|
59
59
|
try {
|
60
60
|
(0, child_process_1.execSync)(`git rev-parse --verify main`, {
|
61
61
|
stdio: ['ignore', 'ignore', 'ignore'],
|
62
|
-
windowsHide:
|
62
|
+
windowsHide: false,
|
63
63
|
});
|
64
64
|
return 'main';
|
65
65
|
}
|
@@ -67,7 +67,7 @@ function deduceDefaultBase() {
|
|
67
67
|
try {
|
68
68
|
(0, child_process_1.execSync)(`git rev-parse --verify dev`, {
|
69
69
|
stdio: ['ignore', 'ignore', 'ignore'],
|
70
|
-
windowsHide:
|
70
|
+
windowsHide: false,
|
71
71
|
});
|
72
72
|
return 'dev';
|
73
73
|
}
|
@@ -75,7 +75,7 @@ function deduceDefaultBase() {
|
|
75
75
|
try {
|
76
76
|
(0, child_process_1.execSync)(`git rev-parse --verify develop`, {
|
77
77
|
stdio: ['ignore', 'ignore', 'ignore'],
|
78
|
-
windowsHide:
|
78
|
+
windowsHide: false,
|
79
79
|
});
|
80
80
|
return 'develop';
|
81
81
|
}
|
@@ -83,7 +83,7 @@ function deduceDefaultBase() {
|
|
83
83
|
try {
|
84
84
|
(0, child_process_1.execSync)(`git rev-parse --verify next`, {
|
85
85
|
stdio: ['ignore', 'ignore', 'ignore'],
|
86
|
-
windowsHide:
|
86
|
+
windowsHide: false,
|
87
87
|
});
|
88
88
|
return 'next';
|
89
89
|
}
|
@@ -132,7 +132,11 @@ function updateGitIgnore(root) {
|
|
132
132
|
catch { }
|
133
133
|
}
|
134
134
|
function runInstall(repoRoot, pmc = (0, package_manager_1.getPackageManagerCommand)()) {
|
135
|
-
(0, child_process_1.execSync)(pmc.install, {
|
135
|
+
(0, child_process_1.execSync)(pmc.install, {
|
136
|
+
stdio: [0, 1, 2],
|
137
|
+
cwd: repoRoot,
|
138
|
+
windowsHide: false,
|
139
|
+
});
|
136
140
|
}
|
137
141
|
async function initCloud(installationSource) {
|
138
142
|
const token = await (0, connect_to_nx_cloud_2.connectWorkspaceToCloud)({
|
@@ -32,7 +32,7 @@ function installPlugins(repoRoot, plugins, pmc, updatePackageScripts) {
|
|
32
32
|
(0, child_process_2.execSync)(`${pmc.exec} nx g ${plugin}:init --keepExistingVersions ${updatePackageScripts ? '--updatePackageScripts' : ''}`, {
|
33
33
|
stdio: [0, 1, 2],
|
34
34
|
cwd: repoRoot,
|
35
|
-
windowsHide:
|
35
|
+
windowsHide: false,
|
36
36
|
});
|
37
37
|
}
|
38
38
|
}
|
@@ -101,7 +101,7 @@ function runMigration() {
|
|
101
101
|
}
|
102
102
|
(0, child_process_2.execSync)(`${p} _migrate ${process.argv.slice(3).join(' ')}`, {
|
103
103
|
stdio: ['inherit', 'inherit', 'inherit'],
|
104
|
-
windowsHide:
|
104
|
+
windowsHide: false,
|
105
105
|
});
|
106
106
|
}
|
107
107
|
}
|
@@ -128,21 +128,21 @@ function nxCliPath() {
|
|
128
128
|
(0, child_process_2.execSync)(pmc.preInstall, {
|
129
129
|
cwd: tmpDir,
|
130
130
|
stdio: ['ignore', 'ignore', 'ignore'],
|
131
|
-
windowsHide:
|
131
|
+
windowsHide: false,
|
132
132
|
});
|
133
133
|
// if it's berry ensure we set the node_linker to node-modules
|
134
134
|
if (packageManager === 'yarn' && pmc.ciInstall.includes('immutable')) {
|
135
135
|
(0, child_process_2.execSync)('yarn config set nodeLinker node-modules', {
|
136
136
|
cwd: tmpDir,
|
137
137
|
stdio: ['ignore', 'ignore', 'ignore'],
|
138
|
-
windowsHide:
|
138
|
+
windowsHide: false,
|
139
139
|
});
|
140
140
|
}
|
141
141
|
}
|
142
142
|
(0, child_process_2.execSync)(pmc.install, {
|
143
143
|
cwd: tmpDir,
|
144
144
|
stdio: ['ignore', 'ignore', 'ignore'],
|
145
|
-
windowsHide:
|
145
|
+
windowsHide: false,
|
146
146
|
});
|
147
147
|
// Set NODE_PATH so that these modules can be used for module resolution
|
148
148
|
addToNodePath(path.join(tmpDir, 'node_modules'));
|
@@ -886,7 +886,7 @@ function runInstall() {
|
|
886
886
|
output_1.output.log({
|
887
887
|
title: `Running '${pmCommands.install}' to make sure necessary packages are installed`,
|
888
888
|
});
|
889
|
-
(0, child_process_1.execSync)(pmCommands.install, { stdio: [0, 1, 2], windowsHide:
|
889
|
+
(0, child_process_1.execSync)(pmCommands.install, { stdio: [0, 1, 2], windowsHide: false });
|
890
890
|
}
|
891
891
|
async function executeMigrations(root, migrations, isVerbose, shouldCreateCommits, commitPrefix) {
|
892
892
|
let initialDeps = getStringifiedPackageJsonDeps(root);
|
@@ -191,7 +191,7 @@ function isReleaseType(value) {
|
|
191
191
|
async function getCommitForVersionPlanFile(rawVersionPlan, isVerbose) {
|
192
192
|
return new Promise((resolve) => {
|
193
193
|
(0, node_child_process_1.exec)(`git log --diff-filter=A --pretty=format:"%s|%h|%an|%ae|%b" -n 1 -- ${rawVersionPlan.absolutePath}`, {
|
194
|
-
windowsHide:
|
194
|
+
windowsHide: false,
|
195
195
|
}, (error, stdout, stderr) => {
|
196
196
|
if (error) {
|
197
197
|
if (isVerbose) {
|
@@ -13,7 +13,7 @@ async function launchEditor(filePath) {
|
|
13
13
|
return new Promise((resolve, reject) => {
|
14
14
|
const editorProcess = (0, node_child_process_1.spawn)(cmd, [...args, filePath], {
|
15
15
|
stdio: 'inherit', // This will ensure the editor uses the current terminal
|
16
|
-
windowsHide:
|
16
|
+
windowsHide: false,
|
17
17
|
});
|
18
18
|
editorProcess.on('exit', (code) => {
|
19
19
|
if (code === 0) {
|
@@ -28,7 +28,7 @@ async function launchEditor(filePath) {
|
|
28
28
|
function getGitConfig(key) {
|
29
29
|
try {
|
30
30
|
return (0, node_child_process_1.execSync)(`git config --get ${key}`, {
|
31
|
-
windowsHide:
|
31
|
+
windowsHide: false,
|
32
32
|
})
|
33
33
|
.toString()
|
34
34
|
.trim();
|
@@ -97,7 +97,7 @@ class BatchCommandRunner extends BatchFunctionRunner {
|
|
97
97
|
[this.projectNameEnv]: env[this.projectNameEnv],
|
98
98
|
[this.fileChangesEnv]: env[this.fileChangesEnv],
|
99
99
|
},
|
100
|
-
windowsHide:
|
100
|
+
windowsHide: false,
|
101
101
|
});
|
102
102
|
commandExec.on('close', () => {
|
103
103
|
resolve();
|
@@ -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
|
@@ -34,6 +34,7 @@ export interface NxArgs {
|
|
34
34
|
batch?: boolean;
|
35
35
|
excludeTaskDependencies?: boolean;
|
36
36
|
skipSync?: boolean;
|
37
|
+
sortRootTsconfigPaths?: boolean;
|
37
38
|
}
|
38
39
|
export declare function createOverrides(__overrides_unparsed__?: string[]): Record<string, any>;
|
39
40
|
export declare function getBaseRef(nxJson: NxJsonConfiguration): string;
|
@@ -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 ||
|