@schematics/update
Advanced tools
Comparing version 0.1102.15 to 0.1102.16
{ | ||
"name": "@schematics/update", | ||
"version": "0.1102.15", | ||
"version": "0.1102.16", | ||
"description": "Schematics specific to updating packages", | ||
@@ -19,4 +19,4 @@ "experimental": true, | ||
"dependencies": { | ||
"@angular-devkit/core": "11.2.15", | ||
"@angular-devkit/schematics": "11.2.15", | ||
"@angular-devkit/core": "11.2.16", | ||
"@angular-devkit/schematics": "11.2.16", | ||
"@yarnpkg/lockfile": "1.1.0", | ||
@@ -23,0 +23,0 @@ "ini": "2.0.0", |
@@ -330,6 +330,30 @@ "use strict"; | ||
.map(([name, info]) => { | ||
const tag = options.next | ||
? (info.npmPackageJson['dist-tags']['next'] ? 'next' : 'latest') : 'latest'; | ||
const version = info.npmPackageJson['dist-tags'][tag]; | ||
const target = info.npmPackageJson.versions[version]; | ||
var _a, _b; | ||
let tag = options.next | ||
? info.npmPackageJson['dist-tags']['next'] | ||
? 'next' | ||
: 'latest' | ||
: 'latest'; | ||
let version = info.npmPackageJson['dist-tags'][tag]; | ||
let target = info.npmPackageJson.versions[version]; | ||
const versionDiff = semver.diff(info.installed.version, version); | ||
if (versionDiff !== 'patch' && | ||
versionDiff !== 'minor' && | ||
/^@(?:angular|nguniversal)\//.test(name)) { | ||
const installedMajorVersion = (_a = semver.parse(info.installed.version)) === null || _a === void 0 ? void 0 : _a.major; | ||
const toInstallMajorVersion = (_b = semver.parse(version)) === null || _b === void 0 ? void 0 : _b.major; | ||
if (installedMajorVersion !== undefined && | ||
toInstallMajorVersion !== undefined && | ||
installedMajorVersion < toInstallMajorVersion - 1) { | ||
const nextMajorVersion = `${installedMajorVersion + 1}.`; | ||
const nextMajorVersions = Object.keys(info.npmPackageJson.versions) | ||
.filter((v) => v.startsWith(nextMajorVersion)) | ||
.sort((a, b) => (a > b ? -1 : 1)); | ||
if (nextMajorVersions.length) { | ||
version = nextMajorVersions[0]; | ||
target = info.npmPackageJson.versions[version]; | ||
tag = ''; | ||
} | ||
} | ||
} | ||
return { | ||
@@ -350,2 +374,3 @@ name, | ||
.map(({ name, info, version, tag, target }) => { | ||
var _a; | ||
// Look for packageGroup. | ||
@@ -366,3 +391,6 @@ if (target['ng-update'] && target['ng-update']['packageGroup']) { | ||
let command = `ng update ${name}`; | ||
if (tag == 'next') { | ||
if (!tag) { | ||
command += `@${((_a = semver.parse(version)) === null || _a === void 0 ? void 0 : _a.major) || version}`; | ||
} | ||
else if (tag == 'next') { | ||
command += ' --next'; | ||
@@ -369,0 +397,0 @@ } |
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
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
60779
1511
+ Added@angular-devkit/core@11.2.16(transitive)
+ Added@angular-devkit/schematics@11.2.16(transitive)
- Removed@angular-devkit/core@11.2.15(transitive)
- Removed@angular-devkit/schematics@11.2.15(transitive)
Updated@angular-devkit/core@11.2.16