nx 21.2.0-canary.20250603-88c5196 → 21.2.0-canary.20250604-283ec76
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.2.0-canary.
|
3
|
+
"version": "21.2.0-canary.20250604-283ec76",
|
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": {
|
@@ -83,16 +83,16 @@
|
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"optionalDependencies": {
|
86
|
-
"@nx/nx-darwin-arm64": "21.2.0-canary.
|
87
|
-
"@nx/nx-darwin-x64": "21.2.0-canary.
|
88
|
-
"@nx/nx-freebsd-x64": "21.2.0-canary.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.2.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.2.0-canary.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.2.0-canary.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.2.0-canary.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.2.0-canary.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.2.0-canary.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.2.0-canary.
|
86
|
+
"@nx/nx-darwin-arm64": "21.2.0-canary.20250604-283ec76",
|
87
|
+
"@nx/nx-darwin-x64": "21.2.0-canary.20250604-283ec76",
|
88
|
+
"@nx/nx-freebsd-x64": "21.2.0-canary.20250604-283ec76",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.2.0-canary.20250604-283ec76",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.2.0-canary.20250604-283ec76",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.2.0-canary.20250604-283ec76",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.2.0-canary.20250604-283ec76",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.2.0-canary.20250604-283ec76",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.2.0-canary.20250604-283ec76",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.2.0-canary.20250604-283ec76"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
@@ -5,12 +5,13 @@ const child_process_1 = require("child_process");
|
|
5
5
|
const path_1 = require("path");
|
6
6
|
const semver_1 = require("semver");
|
7
7
|
const fileutils_1 = require("../../../../utils/fileutils");
|
8
|
+
const installation_directory_1 = require("../../../../utils/installation-directory");
|
8
9
|
const object_sort_1 = require("../../../../utils/object-sort");
|
9
10
|
const output_1 = require("../../../../utils/output");
|
10
11
|
const package_json_1 = require("../../../../utils/package-json");
|
11
12
|
const package_manager_1 = require("../../../../utils/package-manager");
|
12
|
-
const utils_1 = require("../utils");
|
13
13
|
const connect_to_nx_cloud_1 = require("../../../connect/connect-to-nx-cloud");
|
14
|
+
const utils_1 = require("../utils");
|
14
15
|
// map of Angular major versions to Nx versions to use for legacy `nx init` migrations,
|
15
16
|
// key is major Angular version and value is Nx version to use
|
16
17
|
const nxAngularLegacyVersionMap = {
|
@@ -26,8 +27,25 @@ const versionWithConsolidatedPackages = '13.9.0';
|
|
26
27
|
// version when packages were rescoped from @nrwl/* to @nx/*
|
27
28
|
const versionWithRescopeToNx = '16.0.0-beta.2';
|
28
29
|
async function getLegacyMigrationFunctionIfApplicable(repoRoot, options) {
|
29
|
-
|
30
|
-
|
30
|
+
let majorAngularVersion;
|
31
|
+
try {
|
32
|
+
const angularVersion = (0, package_json_1.readModulePackageJson)('@angular/core', [
|
33
|
+
repoRoot,
|
34
|
+
...(0, installation_directory_1.getNxRequirePaths)(),
|
35
|
+
]).packageJson.version;
|
36
|
+
majorAngularVersion = (0, semver_1.major)(angularVersion);
|
37
|
+
}
|
38
|
+
catch {
|
39
|
+
output_1.output.error({
|
40
|
+
title: 'Could not determine the existing Angular version',
|
41
|
+
bodyLines: [
|
42
|
+
'Please ensure "@angular/core" is installed in the workspace and you are running this command from the root of the workspace.',
|
43
|
+
],
|
44
|
+
});
|
45
|
+
// errors are caught in the initHandler and not logged to the user, so we
|
46
|
+
// log it first and then throw to ensure it is logged to the user
|
47
|
+
throw new Error('Could not determine the existing Angular version');
|
48
|
+
}
|
31
49
|
if (majorAngularVersion >= minMajorAngularVersionSupported) {
|
32
50
|
// non-legacy
|
33
51
|
return null;
|
@@ -1175,6 +1175,7 @@ function getImplementationPath(collection, collectionPath, name) {
|
|
1175
1175
|
}
|
1176
1176
|
function nxCliPath(nxWorkspaceRoot) {
|
1177
1177
|
const version = process.env.NX_MIGRATE_CLI_VERSION || 'latest';
|
1178
|
+
const isVerbose = process.env.NX_VERBOSE_LOGGING === 'true';
|
1178
1179
|
try {
|
1179
1180
|
const packageManager = (0, package_manager_1.detectPackageManager)();
|
1180
1181
|
const pmc = (0, package_manager_1.getPackageManagerCommand)(packageManager);
|
@@ -1187,25 +1188,30 @@ function nxCliPath(nxWorkspaceRoot) {
|
|
1187
1188
|
license: 'MIT',
|
1188
1189
|
});
|
1189
1190
|
(0, package_manager_1.copyPackageManagerConfigurationFiles)(nxWorkspaceRoot ?? workspace_root_1.workspaceRoot, tmpDir);
|
1191
|
+
// Let's print the output of the install process to the console when verbose
|
1192
|
+
// is enabled, so it's easier to debug issues with the installation process
|
1193
|
+
const stdio = isVerbose
|
1194
|
+
? ['ignore', 'inherit', 'inherit']
|
1195
|
+
: 'ignore';
|
1190
1196
|
if (pmc.preInstall) {
|
1191
1197
|
// ensure package.json and repo in tmp folder is set to a proper package manager state
|
1192
1198
|
(0, child_process_1.execSync)(pmc.preInstall, {
|
1193
1199
|
cwd: tmpDir,
|
1194
|
-
stdio
|
1200
|
+
stdio,
|
1195
1201
|
windowsHide: false,
|
1196
1202
|
});
|
1197
1203
|
// if it's berry ensure we set the node_linker to node-modules
|
1198
1204
|
if (packageManager === 'yarn' && pmc.ciInstall.includes('immutable')) {
|
1199
1205
|
(0, child_process_1.execSync)('yarn config set nodeLinker node-modules', {
|
1200
1206
|
cwd: tmpDir,
|
1201
|
-
stdio
|
1207
|
+
stdio,
|
1202
1208
|
windowsHide: false,
|
1203
1209
|
});
|
1204
1210
|
}
|
1205
1211
|
}
|
1206
1212
|
(0, child_process_1.execSync)(pmc.install, {
|
1207
1213
|
cwd: tmpDir,
|
1208
|
-
stdio
|
1214
|
+
stdio,
|
1209
1215
|
windowsHide: false,
|
1210
1216
|
});
|
1211
1217
|
// Set NODE_PATH so that these modules can be used for module resolution
|
@@ -1215,7 +1221,7 @@ function nxCliPath(nxWorkspaceRoot) {
|
|
1215
1221
|
}
|
1216
1222
|
catch (e) {
|
1217
1223
|
console.error(`Failed to install the ${version} version of the migration script. Using the current version.`);
|
1218
|
-
if (
|
1224
|
+
if (isVerbose) {
|
1219
1225
|
console.error(e);
|
1220
1226
|
}
|
1221
1227
|
return null;
|
Binary file
|