make-angular-cli-faster
Advanced tools
Comparing version 13.10.2 to 14.0.0-beta.0
{ | ||
"name": "make-angular-cli-faster", | ||
"version": "13.10.2", | ||
"version": "14.0.0-beta.0", | ||
"description": "Make Angular CLI faster by enabling distributed computation caching", | ||
@@ -30,6 +30,6 @@ "repository": { | ||
"dependencies": { | ||
"@nrwl/devkit": "13.10.2", | ||
"@nrwl/workspace": "13.10.2", | ||
"@nrwl/devkit": "14.0.0-beta.0", | ||
"@nrwl/workspace": "14.0.0-beta.0", | ||
"enquirer": "^2.3.6", | ||
"nx": "13.10.2", | ||
"nx": "14.0.0-beta.0", | ||
"semver": "7.3.4", | ||
@@ -36,0 +36,0 @@ "tmp": "~0.2.1", |
@@ -28,5 +28,5 @@ "use strict"; | ||
const majorAngularVersion = (0, semver_1.major)(angularVersion); | ||
latestWorkspaceVersionWithMigration = (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', latestWorkspaceRangeVersionWithMigration); | ||
latestWorkspaceVersionWithMigration = yield (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', latestWorkspaceRangeVersionWithMigration); | ||
if (version) { | ||
const normalizedVersion = normalizeVersion(version); | ||
const normalizedVersion = yield normalizeVersion(version); | ||
if ((0, semver_1.lte)(normalizedVersion, latestWorkspaceVersionWithMigration)) { | ||
@@ -47,3 +47,3 @@ // specified version should use @nrwl/workspace:ng-add | ||
} | ||
const latestNxCompatibleVersion = getNxVersionBasedOnInstalledAngularVersion(angularVersion, majorAngularVersion); | ||
const latestNxCompatibleVersion = yield getNxVersionBasedOnInstalledAngularVersion(angularVersion, majorAngularVersion); | ||
// should use @nrwl/workspace:ng-add if the version is less than the | ||
@@ -70,3 +70,3 @@ // latest workspace version that has the migration, otherwise use | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const latestNxCompatibleVersion = getNxVersionBasedOnInstalledAngularVersion(angularVersion, majorAngularVersion); | ||
const latestNxCompatibleVersion = yield getNxVersionBasedOnInstalledAngularVersion(angularVersion, majorAngularVersion); | ||
const useSuggestedVersion = yield promptForVersion(latestNxCompatibleVersion); | ||
@@ -95,18 +95,20 @@ if (useSuggestedVersion) { | ||
var _a; | ||
if ((0, semver_1.lt)(angularVersion, '13.0.0')) { | ||
// the @nrwl/angular:ng-add generator is only available for versions supporting | ||
// Angular >= 13.0.0, fall back to @nrwl/workspace:ng-add | ||
return latestWorkspaceVersionWithMigration; | ||
} | ||
if ((_a = nxAngularVersionMap[majorAngularVersion]) === null || _a === void 0 ? void 0 : _a.max) { | ||
// use the max of the range | ||
return nxAngularVersionMap[majorAngularVersion].max; | ||
} | ||
if (majorAngularVersion > latestCompatibleAngularMajorVersion) { | ||
// installed Angular version is not supported yet, we can't @nrwl/angular:ng-add, | ||
// fall back to @nrwl/workspace:ng-add | ||
return latestWorkspaceVersionWithMigration; | ||
} | ||
// use latest, only the last version in the map should not contain a max | ||
return (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', 'latest'); | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
if ((0, semver_1.lt)(angularVersion, '13.0.0')) { | ||
// the @nrwl/angular:ng-add generator is only available for versions supporting | ||
// Angular >= 13.0.0, fall back to @nrwl/workspace:ng-add | ||
return latestWorkspaceVersionWithMigration; | ||
} | ||
if ((_a = nxAngularVersionMap[majorAngularVersion]) === null || _a === void 0 ? void 0 : _a.max) { | ||
// use the max of the range | ||
return nxAngularVersionMap[majorAngularVersion].max; | ||
} | ||
if (majorAngularVersion > latestCompatibleAngularMajorVersion) { | ||
// installed Angular version is not supported yet, we can't @nrwl/angular:ng-add, | ||
// fall back to @nrwl/workspace:ng-add | ||
return latestWorkspaceVersionWithMigration; | ||
} | ||
// use latest, only the last version in the map should not contain a max | ||
return yield (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', 'latest'); | ||
}); | ||
} | ||
@@ -133,9 +135,11 @@ function promptForVersion(version) { | ||
function normalizeVersion(version) { | ||
if (version.startsWith('^') || | ||
version.startsWith('~') || | ||
version.split('.').length < 3) { | ||
return (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', version); | ||
} | ||
return version; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
if (version.startsWith('^') || | ||
version.startsWith('~') || | ||
version.split('.').length < 3) { | ||
return yield (0, package_manager_1.resolvePackageVersion)('@nrwl/angular', version); | ||
} | ||
return version; | ||
}); | ||
} | ||
//# sourceMappingURL=migration.js.map |
import { MigrationDefinition } from './types'; | ||
export declare function installDependencies({ packageName, version }: MigrationDefinition, useNxCloud: boolean): void; | ||
export declare function resolvePackageVersion(packageName: string, version: string): string; | ||
export declare function resolvePackageVersion(packageName: string, version: string): Promise<string>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolvePackageVersion = exports.installDependencies = void 0; | ||
const tslib_1 = require("tslib"); | ||
const devkit_1 = require("@nrwl/devkit"); | ||
@@ -43,10 +44,12 @@ const child_process_1 = require("child_process"); | ||
function resolvePackageVersion(packageName, version) { | ||
try { | ||
return (0, package_manager_1.resolvePackageVersionUsingRegistry)(packageName, version); | ||
} | ||
catch (_a) { | ||
return (0, package_manager_1.resolvePackageVersionUsingInstallation)(packageName, version); | ||
} | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
try { | ||
return yield (0, package_manager_1.resolvePackageVersionUsingRegistry)(packageName, version); | ||
} | ||
catch (_a) { | ||
return yield (0, package_manager_1.resolvePackageVersionUsingInstallation)(packageName, version); | ||
} | ||
}); | ||
} | ||
exports.resolvePackageVersion = resolvePackageVersion; | ||
//# sourceMappingURL=package-manager.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25366
297
1
+ Added@nrwl/cli@14.0.0-beta.0(transitive)
+ Added@nrwl/devkit@14.0.0-beta.0(transitive)
+ Added@nrwl/jest@14.0.0-beta.0(transitive)
+ Added@nrwl/linter@14.0.0-beta.0(transitive)
+ Added@nrwl/tao@14.0.0-beta.0(transitive)
+ Added@nrwl/workspace@14.0.0-beta.0(transitive)
+ Addednx@14.0.0-beta.0(transitive)
- Removed@nrwl/cli@13.10.2(transitive)
- Removed@nrwl/devkit@13.10.2(transitive)
- Removed@nrwl/jest@13.10.2(transitive)
- Removed@nrwl/linter@13.10.2(transitive)
- Removed@nrwl/tao@13.10.2(transitive)
- Removed@nrwl/workspace@13.10.2(transitive)
- Removednx@13.10.2(transitive)
Updated@nrwl/devkit@14.0.0-beta.0
Updatednx@14.0.0-beta.0