refactor(dev-infra): move semver utils into the utils directory (#42917)
Move semver into the utils directory rather than as a set of utils specifically for release tooling. While the utils are only currently used in the release tooling, they are not providing a release specific utility and can be used by any subtool of ng-dev. PR Close #42917
This commit is contained in:
parent
d2b1c3ec15
commit
e462743969
|
@ -6196,12 +6196,12 @@ class FatalReleaseActionError extends Error {
|
|||
* the version is cloned to not modify the original version instance.
|
||||
*/
|
||||
function semverInc(version, release, identifier) {
|
||||
const clone = new semver.SemVer(version.version);
|
||||
var clone = new semver.SemVer(version.version);
|
||||
return clone.inc(release, identifier);
|
||||
}
|
||||
/** Creates the equivalent experimental version for a provided SemVer. */
|
||||
function createExperimentalSemver(version) {
|
||||
const experimentalVersion = new semver.SemVer(version.format());
|
||||
var experimentalVersion = new semver.SemVer(version.format());
|
||||
experimentalVersion.major = 0;
|
||||
experimentalVersion.minor = version.major * 100 + version.minor;
|
||||
return new semver.SemVer(experimentalVersion.format());
|
||||
|
|
|
@ -14,11 +14,11 @@ import * as semver from 'semver';
|
|||
import {debug, error, green, info, promptConfirm, red, warn, yellow} from '../../utils/console';
|
||||
import {AuthenticatedGitClient} from '../../utils/git/authenticated-git-client';
|
||||
import {getListCommitsInBranchUrl, getRepositoryGitUrl} from '../../utils/git/github-urls';
|
||||
import {createExperimentalSemver} from '../../utils/semver';
|
||||
import {BuiltPackage, ReleaseConfig} from '../config/index';
|
||||
import {ReleaseNotes} from '../notes/release-notes';
|
||||
import {NpmDistTag} from '../versioning';
|
||||
import {ActiveReleaseTrains} from '../versioning/active-release-trains';
|
||||
import {createExperimentalSemver} from '../versioning/inc-semver';
|
||||
import {runNpmPublish} from '../versioning/npm-publish';
|
||||
|
||||
import {FatalReleaseActionError, UserAbortedReleaseActionError} from './actions-error';
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
import {ListChoiceOptions, prompt} from 'inquirer';
|
||||
|
||||
import {semverInc} from '../../../utils/semver';
|
||||
import {ActiveReleaseTrains} from '../../versioning/active-release-trains';
|
||||
import {semverInc} from '../../versioning/inc-semver';
|
||||
import {fetchLongTermSupportBranchesFromNpm, LtsBranch} from '../../versioning/long-term-support';
|
||||
import {ReleaseAction} from '../actions';
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {semverInc} from '../../../utils/semver';
|
||||
import {ActiveReleaseTrains} from '../../versioning/active-release-trains';
|
||||
import {semverInc} from '../../versioning/inc-semver';
|
||||
import {ReleaseAction} from '../actions';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import * as semver from 'semver';
|
||||
|
||||
import {semverInc} from '../../versioning/inc-semver';
|
||||
import {semverInc} from '../../../utils/semver';
|
||||
import {computeNewPrereleaseVersionForNext} from '../../versioning/next-prerelease-version';
|
||||
import {ReleaseTrain} from '../../versioning/release-trains';
|
||||
import {ReleaseAction} from '../actions';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {semverInc} from '../../../utils/semver';
|
||||
import {ActiveReleaseTrains} from '../../versioning/active-release-trains';
|
||||
import {semverInc} from '../../versioning/inc-semver';
|
||||
import {ReleaseAction} from '../actions';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
import * as semver from 'semver';
|
||||
|
||||
import {semverInc} from '../../utils/semver';
|
||||
import {ReleaseConfig} from '../config/index';
|
||||
|
||||
import {ActiveReleaseTrains} from './active-release-trains';
|
||||
import {semverInc} from './inc-semver';
|
||||
import {isVersionPublishedToNpm} from './npm-registry';
|
||||
|
||||
/** Computes the new pre-release version for the next release-train. */
|
||||
|
|
Loading…
Reference in New Issue