Socket
Socket
Sign inDemoInstall

@schematics/update

Package Overview
Dependencies
Maintainers
3
Versions
348
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schematics/update - npm Package Compare versions

Comparing version 0.1102.15 to 0.1102.16

6

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc