create-nx-workspace 24.0.0 → 24.0.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.
|
@@ -75,6 +75,10 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
75
75
|
}
|
|
76
76
|
// Generate package manager specific files (e.g., .yarnrc.yml for Yarn Berry)
|
|
77
77
|
(0, package_manager_1.generatePackageManagerFiles)(directory, packageManager);
|
|
78
|
+
const packageJsonPath = (0, path_1.join)(directory, 'package.json');
|
|
79
|
+
const packageJson = JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, 'utf-8'));
|
|
80
|
+
packageJson.packageManager = `${packageManager}@${(0, package_manager_1.getPackageManagerVersion)(packageManager)}`;
|
|
81
|
+
(0, node_fs_1.writeFileSync)(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
|
|
78
82
|
// Install dependencies with the user's package manager
|
|
79
83
|
if (aiMode) {
|
|
80
84
|
(0, ai_output_1.logProgress)('installing', `Installing dependencies with ${packageManager}...`);
|
|
@@ -293,11 +297,10 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
293
297
|
};
|
|
294
298
|
}
|
|
295
299
|
function setAnalyticsPreference(directory, enabled) {
|
|
296
|
-
const { readFileSync, writeFileSync } = require('fs');
|
|
297
300
|
const nxJsonPath = (0, path_1.join)(directory, 'nx.json');
|
|
298
|
-
const nxJson = JSON.parse(readFileSync(nxJsonPath, 'utf-8'));
|
|
301
|
+
const nxJson = JSON.parse((0, node_fs_1.readFileSync)(nxJsonPath, 'utf-8'));
|
|
299
302
|
nxJson.analytics = enabled;
|
|
300
|
-
writeFileSync(nxJsonPath, JSON.stringify(nxJson, null, 2) + '\n');
|
|
303
|
+
(0, node_fs_1.writeFileSync)(nxJsonPath, JSON.stringify(nxJson, null, 2) + '\n');
|
|
301
304
|
}
|
|
302
305
|
function extractConnectUrl(text) {
|
|
303
306
|
const urlPattern = /(https:\/\/[^\s]+\/connect\/[^\s]+)/g;
|