diff --git a/src/bootstrapper.ts b/src/bootstrapper.ts index df3a5e5e0..af0150c9d 100644 --- a/src/bootstrapper.ts +++ b/src/bootstrapper.ts @@ -46,7 +46,7 @@ export class Bootstrapper { this.targetBranch = targetBranch; this.manifestFile = manifestFile; this.configFile = configFile; - this.initialVersion = Version.parse(initialVersionString); + this.initialVersion = Version.parseOne(initialVersionString); } async bootstrap(path: string, config: ReleaserConfig): Promise { diff --git a/src/manifest.ts b/src/manifest.ts index f465c9bd7..b060237be 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -1896,7 +1896,7 @@ async function parseReleasedVersions( ); const releasedVersions: ReleasedVersions = {}; for (const path in manifestJson) { - releasedVersions[path] = Version.parse(manifestJson[path]); + releasedVersions[path] = Version.parseOne(manifestJson[path]); } return releasedVersions; } diff --git a/src/plugins/cargo-workspace.ts b/src/plugins/cargo-workspace.ts index c13533dcd..dc05f3a1a 100644 --- a/src/plugins/cargo-workspace.ts +++ b/src/plugins/cargo-workspace.ts @@ -166,7 +166,7 @@ export class CargoWorkspace extends WorkspacePlugin { } protected bumpVersion(pkg: CrateInfo): Version { - const version = Version.parse(pkg.version); + const version = Version.parseOne(pkg.version); return new PatchVersionUpdate().bump(version); } diff --git a/src/plugins/maven-workspace.ts b/src/plugins/maven-workspace.ts index a90696b7a..03dd1b955 100644 --- a/src/plugins/maven-workspace.ts +++ b/src/plugins/maven-workspace.ts @@ -248,7 +248,7 @@ export class MavenWorkspace extends WorkspacePlugin { ); updatedVersions.set( updatedArtifact.name, - Version.parse(updatedArtifact.version) + Version.parseOne(updatedArtifact.version) ); } } else { @@ -334,7 +334,7 @@ export class MavenWorkspace extends WorkspacePlugin { protected bumpVersion(artifact: MavenArtifact): Version { const strategy = new JavaSnapshot(new AlwaysBumpPatch()); - return strategy.bump(Version.parse(artifact.version), [FAKE_COMMIT]); + return strategy.bump(Version.parseOne(artifact.version), [FAKE_COMMIT]); } protected updateCandidate( diff --git a/src/plugins/node-workspace.ts b/src/plugins/node-workspace.ts index 0379d6a41..06ce0aff7 100644 --- a/src/plugins/node-workspace.ts +++ b/src/plugins/node-workspace.ts @@ -144,7 +144,7 @@ export class NodeWorkspace extends WorkspacePlugin { } protected bumpVersion(pkg: Package): Version { - const version = Version.parse(pkg.version); + const version = Version.parseOne(pkg.version); return new PatchVersionUpdate().bump(version); } @@ -267,7 +267,7 @@ export class NodeWorkspace extends WorkspacePlugin { updatedVersions ); const packageJson = updatedPackage.toJSON() as PackageJson; - const version = Version.parse(packageJson.version); + const version = Version.parseOne(packageJson.version); const pullRequest: ReleasePullRequest = { title: PullRequestTitle.ofTargetBranch( this.targetBranch, diff --git a/src/strategies/base.ts b/src/strategies/base.ts index 73ca75802..db822875f 100644 --- a/src/strategies/base.ts +++ b/src/strategies/base.ts @@ -305,9 +305,9 @@ export abstract class BaseStrategy implements Strategy { this.logger.warn( `Setting version for ${this.path} from release-as configuration` ); - newVersion = Version.parse(this.releaseAs); + newVersion = Version.parseOne(this.releaseAs); } else if (releaseAsNote) { - newVersion = Version.parse(releaseAsNote.text); + newVersion = Version.parseOne(releaseAsNote.text); } else if (latestRelease) { newVersion = await this.versioningStrategy.bump( latestRelease.tag.version, @@ -749,10 +749,10 @@ If you instead want to use the version number \`${newVersion}\` generated from c */ protected initialReleaseVersion(): Version { if (this.initialVersion) { - return Version.parse(this.initialVersion); + return Version.parseOne(this.initialVersion); } - return Version.parse('0.0.1'); + return Version.parseOne('0.0.1'); } /** diff --git a/src/strategies/expo.ts b/src/strategies/expo.ts index 09ece886f..8f449bfeb 100644 --- a/src/strategies/expo.ts +++ b/src/strategies/expo.ts @@ -45,7 +45,7 @@ export class Expo extends Node { async getExpoSDKVersion(): Promise { const pkgJsonContents = await this.getPkgJsonContents(); const pkg = JSON.parse(pkgJsonContents.parsedContent); - return Version.parse( + return Version.parseOne( pkg.dependencies?.expo || pkg.devDependencies?.expo || pkg.peerDependencies?.expo || diff --git a/src/strategies/java-yoshi-mono-repo.ts b/src/strategies/java-yoshi-mono-repo.ts index 64d5a1b29..2fab01e8b 100644 --- a/src/strategies/java-yoshi-mono-repo.ts +++ b/src/strategies/java-yoshi-mono-repo.ts @@ -302,7 +302,7 @@ export class JavaYoshiMonoRepo extends Java { continue; } if (isPromotion && isStableArtifact(versionKey)) { - versionsMap.set(versionKey, Version.parse('1.0.0')); + versionsMap.set(versionKey, Version.parseOne('1.0.0')); } else { const newVersion = await this.versioningStrategy.bump( version, diff --git a/src/strategies/java-yoshi.ts b/src/strategies/java-yoshi.ts index 779ee6186..223103e09 100644 --- a/src/strategies/java-yoshi.ts +++ b/src/strategies/java-yoshi.ts @@ -208,7 +208,7 @@ export class JavaYoshi extends Java { continue; } if (isPromotion && isStableArtifact(versionKey)) { - versionsMap.set(versionKey, Version.parse('1.0.0')); + versionsMap.set(versionKey, Version.parseOne('1.0.0')); } else { const newVersion = await this.versioningStrategy.bump( version, diff --git a/src/strategies/php-yoshi.ts b/src/strategies/php-yoshi.ts index ff32d404f..f4e3cf7fd 100644 --- a/src/strategies/php-yoshi.ts +++ b/src/strategies/php-yoshi.ts @@ -106,7 +106,7 @@ export class PHPYoshi extends BaseStrategy { this.addPath(`${directory}/VERSION`), this.changesBranch ); - const version = Version.parse(contents.parsedContent); + const version = Version.parseOne(contents.parsedContent); const composer = await this.github.getFileJson( this.addPath(`${directory}/composer.json`), this.changesBranch diff --git a/src/updaters/java/versions-manifest.ts b/src/updaters/java/versions-manifest.ts index a38161a9b..936ada6fd 100644 --- a/src/updaters/java/versions-manifest.ts +++ b/src/updaters/java/versions-manifest.ts @@ -73,7 +73,7 @@ export class VersionsManifest extends JavaUpdate { content.split(/\r?\n/).forEach(line => { const match = line.match(/^([\w\-_]+):([^:]+):([^:]+)/); if (match) { - versions.set(match[1], Version.parse(match[2])); + versions.set(match[1], Version.parseOne(match[2])); } }); return versions; diff --git a/src/util/branch-name.ts b/src/util/branch-name.ts index 327e0c926..82067bd18 100644 --- a/src/util/branch-name.ts +++ b/src/util/branch-name.ts @@ -145,7 +145,7 @@ class AutoreleaseBranchName extends BranchName { const match = branchName.match(AUTORELEASE_PATTERN); if (match?.groups) { this.component = match.groups['component']; - this.version = Version.parse(match.groups['version']); + this.version = Version.parseOne(match.groups['version']); } } toString(): string { diff --git a/src/util/pull-request-body.ts b/src/util/pull-request-body.ts index ccb876b72..191bbd914 100644 --- a/src/util/pull-request-body.ts +++ b/src/util/pull-request-body.ts @@ -135,7 +135,7 @@ function extractMultipleReleases(notes: string, logger: Logger): ReleaseData[] { const notes = detail.textContent.trim(); data.push({ component: match.groups.component, - version: Version.parse(match.groups.version), + version: Version.parseOne(match.groups.version), notes, }); } else { @@ -147,7 +147,7 @@ function extractMultipleReleases(notes: string, logger: Logger): ReleaseData[] { detail.removeChild(summaryNode); const notes = detail.textContent.trim(); data.push({ - version: Version.parse(componentlessMatch.groups.version), + version: Version.parseOne(componentlessMatch.groups.version), notes, }); } @@ -165,7 +165,7 @@ function extractSingleRelease(body: string, logger: Logger): ReleaseData[] { } return [ { - version: Version.parse(versionString), + version: Version.parseOne(versionString), notes: body, }, ]; diff --git a/src/util/pull-request-title.ts b/src/util/pull-request-title.ts index 359b1d1f9..2f4928bfe 100644 --- a/src/util/pull-request-title.ts +++ b/src/util/pull-request-title.ts @@ -19,11 +19,27 @@ import {Version} from '../version'; // at the script level are undefined, they are only defined inside function // or instance methods/properties. -const DEFAULT_PR_TITLE_PATTERN = - 'chore${scope}: release${component} ${version}'; -export function generateMatchPattern(pullRequestTitlePattern?: string): RegExp { +const DEFAULT_PR_TITLE_PATTERN = 'release: ${componentsSegment}'; + +/** + * Default pattern for a component in the "components segment" of the release PR title + */ +const DEFAULT_PR_TITLE_PATTERN_SINGLE_COMPONENT_SEGMENT = + '${component} ${version}'; + +/** + * Default separator for components in the "component segment" of the release PR. + */ +const DEFAULT_PR_TITLE_PATTERN_COMPONENT_SEPARATOR = ','; + +export function generateMatchPatternPRTitleComponentsSegment( + componentsSegmentPattern?: string +): RegExp { return new RegExp( - `^${(pullRequestTitlePattern || DEFAULT_PR_TITLE_PATTERN) + `^${( + componentsSegmentPattern || + DEFAULT_PR_TITLE_PATTERN_SINGLE_COMPONENT_SEGMENT + ) .replace('[', '\\[') // TODO: handle all regex escaping .replace(']', '\\]') .replace('(', '\\(') @@ -39,24 +55,52 @@ export function generateMatchPattern(pullRequestTitlePattern?: string): RegExp { ); } +export function generateMatchPatternPRTitle( + pullRequestTitlePattern?: string, + componentsSegmentPattern?: string, + componentsSegmentSeparator?: string +): RegExp { + const matchPatternComponentsSegment = + generateMatchPatternPRTitleComponentsSegment( + componentsSegmentPattern || + DEFAULT_PR_TITLE_PATTERN_SINGLE_COMPONENT_SEGMENT + ); + return new RegExp( + `^${(pullRequestTitlePattern || DEFAULT_PR_TITLE_PATTERN) + .replace('[', '\\[') // TODO: handle all regex escaping + .replace(']', '\\]') + .replace('(', '\\(') + .replace(')', '\\)') + .replace( + '${scope}', + '(\\((?[\\w-./]+ => )?(?[\\w-./]+)\\))?' + ) + // FIXME(sam): review + fix regexp for components segment, it should handle + // the separator. + .replace('${componentsSegment}', ` ${matchPatternComponentsSegment}`) + .replace('${changesBranch}', '(??[\\w-./]+)?') + .replace('${branch}', '(?[\\w-./]+)?')}$` + ); +} + export class PullRequestTitle { - component?: string; + components?: string[]; changesBranch?: string; targetBranch?: string; - version?: Version; + versions?: Version[]; pullRequestTitlePattern: string; matchPattern: RegExp; private constructor(opts: { - version?: Version; - component?: string; + versions?: Version[]; + components?: string[]; targetBranch?: string; changesBranch?: string; pullRequestTitlePattern?: string; logger?: Logger; }) { - this.version = opts.version; - this.component = opts.component; + this.versions = opts.versions; + this.components = opts.components; this.targetBranch = opts.targetBranch; this.changesBranch = opts.changesBranch || this.targetBranch; this.pullRequestTitlePattern = @@ -73,10 +117,10 @@ export class PullRequestTitle { const match = title.match(matchPattern); if (match?.groups) { return new PullRequestTitle({ - version: match.groups['version'] - ? Version.parse(match.groups['version']) + versions: match.groups['versions'] + ? Version.parseMultiple(match.groups['versions']) : undefined, - component: match.groups['component'], + components: match.groups['components'], changesBranch: match.groups['changesBranch'], targetBranch: match.groups['branch'], pullRequestTitlePattern, @@ -87,26 +131,30 @@ export class PullRequestTitle { } static ofComponentVersion( - component: string, - version: Version, + components: string[], + versions: Version[], pullRequestTitlePattern?: string ): PullRequestTitle { - return new PullRequestTitle({version, component, pullRequestTitlePattern}); + return new PullRequestTitle({ + versions, + components, + pullRequestTitlePattern, + }); } - static ofVersion( + static ofSingleVersion( version: Version, pullRequestTitlePattern?: string ): PullRequestTitle { - return new PullRequestTitle({version, pullRequestTitlePattern}); + return new PullRequestTitle({versions: [version], pullRequestTitlePattern}); } static ofTargetBranchVersion( targetBranch: string, changesBranch: string, - version: Version, + versions: Version[], pullRequestTitlePattern?: string ): PullRequestTitle { return new PullRequestTitle({ - version, + versions, targetBranch, changesBranch, pullRequestTitlePattern, @@ -114,15 +162,15 @@ export class PullRequestTitle { } static ofComponentTargetBranchVersion( - component?: string, + components?: string[], targetBranch?: string, changesBranch?: string, - version?: Version, + versions?: Version[], pullRequestTitlePattern?: string ): PullRequestTitle { return new PullRequestTitle({ - version, - component, + versions, + components, targetBranch, changesBranch, pullRequestTitlePattern, @@ -144,14 +192,14 @@ export class PullRequestTitle { getTargetBranch(): string | undefined { return this.targetBranch; } - getChangesBRanch(): string | undefined { + getChangesBranch(): string | undefined { return this.changesBranch; } - getComponent(): string | undefined { - return this.component; + getComponents(): string[] | undefined { + return this.components; } - getVersion(): Version | undefined { - return this.version; + getVersions(): Version[] | undefined { + return this.versions; } toString(): string { @@ -160,14 +208,18 @@ export class PullRequestTitle { ? `(${this.changesBranch} => ${this.targetBranch})` : `(${this.targetBranch})` : ''; - const component = this.component ? ` ${this.component}` : ''; - const version = this.version ?? ''; - return this.pullRequestTitlePattern - .replace('${scope}', scope) - .replace('${component}', component) - .replace('${version}', version.toString()) - .replace('${changesBranch}', this.changesBranch || '') - .replace('${branch}', this.targetBranch || '') - .trim(); + const components = this.components ? ` ${this.components}` : ''; + const versions = this.versions ?? ''; + + // FIXME(sam): replace template values using indices for versions and components + // Should look like: `releases: ${components[0]} ${versions[0]}, ${components[1]} ${versions[1]}` + + // return this.pullRequestTitlePattern + // .replace('${scope}', scope) + // .replace('${component}', component) + // .replace('${version}', version.toString()) + // .replace('${changesBranch}', this.changesBranch || '') + // .replace('${branch}', this.targetBranch || '') + // .trim(); } } diff --git a/src/util/tag-name.ts b/src/util/tag-name.ts index 82ebb9d47..40e90e19a 100644 --- a/src/util/tag-name.ts +++ b/src/util/tag-name.ts @@ -40,7 +40,7 @@ export class TagName { const match = tagName.match(TAG_PATTERN); if (match?.groups) { return new TagName( - Version.parse(match.groups.version), + Version.parseOne(match.groups.version), match.groups.component, match.groups.separator, !!match.groups.v diff --git a/src/version.ts b/src/version.ts index 1cfeb36c8..6ef01018a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -48,7 +48,7 @@ export class Version { * @returns {Version} the parsed version * @throws {Error} if the version string cannot be parsed */ - static parse(versionString: string): Version { + static parseOne(versionString: string): Version { const match = versionString.match(VERSION_REGEX); if (!match?.groups) { throw Error(`unable to parse version string: ${versionString}`); @@ -61,6 +61,17 @@ export class Version { return new Version(major, minor, patch, preRelease, build); } + /** + * Parse multiple version strings into data classes. + * + * @param {string[]} versionStrings the input version strings + * @returns {Version[]} the parsed versions + * @throws {Error} if a version string cannot be parsed + */ + static parseMultiple(versionStrings: string[]): Version[] { + return versionStrings.map(v => Version.parseOne(v)); + } + /** * Comparator to other Versions to be used in sorting. * diff --git a/src/versioning-strategies/default.ts b/src/versioning-strategies/default.ts index 2db9c0303..be8dc96f6 100644 --- a/src/versioning-strategies/default.ts +++ b/src/versioning-strategies/default.ts @@ -78,7 +78,7 @@ export class DefaultVersioningStrategy implements VersioningStrategy { `found Release-As: ${releaseAs.text}, forcing version` ); return new CustomVersionUpdate( - Version.parse(releaseAs.text).toString() + Version.parseOne(releaseAs.text).toString() ); } if (commit.breaking) { diff --git a/src/versioning-strategies/dependency-manifest.ts b/src/versioning-strategies/dependency-manifest.ts index 6e31b7842..6e7ad1234 100644 --- a/src/versioning-strategies/dependency-manifest.ts +++ b/src/versioning-strategies/dependency-manifest.ts @@ -96,9 +96,9 @@ function buildDependencyUpdates( const versionString = match[2]; let version: Version; try { - version = Version.parse(versionString); + version = Version.parseOne(versionString); } catch { - version = Version.parse(`${versionString}.0.0`); + version = Version.parseOne(`${versionString}.0.0`); } // commits are sorted by latest first, so if there is a collision, diff --git a/src/versioning-strategies/prerelease.ts b/src/versioning-strategies/prerelease.ts index 463f79dd6..76a18db41 100644 --- a/src/versioning-strategies/prerelease.ts +++ b/src/versioning-strategies/prerelease.ts @@ -175,7 +175,7 @@ export class PrereleaseVersioningStrategy extends DefaultVersioningStrategy { `found Release-As: ${releaseAs.text}, forcing version` ); return new CustomVersionUpdate( - Version.parse(releaseAs.text).toString() + Version.parseOne(releaseAs.text).toString() ); } if (commit.breaking) { diff --git a/src/versioning-strategy.ts b/src/versioning-strategy.ts index 73de0849a..934737701 100644 --- a/src/versioning-strategy.ts +++ b/src/versioning-strategy.ts @@ -107,7 +107,7 @@ export class CustomVersionUpdate implements VersionUpdater { * @returns {Version} The bumped version */ bump(_version: Version): Version { - return Version.parse(this.versionString); + return Version.parseOne(this.versionString); } } diff --git a/test/changelog-notes/default-changelog-notes.ts b/test/changelog-notes/default-changelog-notes.ts index 60d0d55f7..cbdfa1b80 100644 --- a/test/changelog-notes/default-changelog-notes.ts +++ b/test/changelog-notes/default-changelog-notes.ts @@ -301,7 +301,7 @@ describe('DefaultChangelogNotes', () => { const notes = await changelogNotes.buildNotes(commits, notesOptions); const pullRequestBody = new PullRequestBody([ { - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes, }, ]); diff --git a/test/changelog-notes/github-changelog-notes.ts b/test/changelog-notes/github-changelog-notes.ts index 5eb8ffdb1..54819946f 100644 --- a/test/changelog-notes/github-changelog-notes.ts +++ b/test/changelog-notes/github-changelog-notes.ts @@ -107,7 +107,7 @@ describe('GitHubChangelogNotes', () => { const notes = await changelogNotes.buildNotes(commits, notesOptions); const pullRequestBody = new PullRequestBody([ { - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes, }, ]); diff --git a/test/github.ts b/test/github.ts index b810be6ae..ef5ca9126 100644 --- a/test/github.ts +++ b/test/github.ts @@ -798,7 +798,7 @@ describe('GitHub', () => { body: 'Some release notes response.', }); const release = await github.createRelease({ - tag: new TagName(Version.parse('1.2.3')), + tag: new TagName(Version.parseOne('1.2.3')), sha: 'abc123', notes: 'Some release notes', }); @@ -844,7 +844,7 @@ describe('GitHub', () => { }); const promise = github.createRelease({ - tag: new TagName(Version.parse('1.2.3')), + tag: new TagName(Version.parseOne('1.2.3')), sha: 'abc123', notes: 'Some release notes', }); @@ -867,7 +867,7 @@ describe('GitHub', () => { }); const promise = github.createRelease({ - tag: new TagName(Version.parse('1.2.3')), + tag: new TagName(Version.parseOne('1.2.3')), sha: 'abc123', notes: 'Some release notes', }); @@ -890,7 +890,7 @@ describe('GitHub', () => { }); const release = await github.createRelease( { - tag: new TagName(Version.parse('1.2.3')), + tag: new TagName(Version.parseOne('1.2.3')), sha: 'abc123', notes: 'Some release notes', }, @@ -930,7 +930,7 @@ describe('GitHub', () => { }); const release = await github.createRelease( { - tag: new TagName(Version.parse('1.2.3')), + tag: new TagName(Version.parseOne('1.2.3')), sha: 'abc123', notes: 'Some release notes', }, diff --git a/test/helpers.ts b/test/helpers.ts index e7161041f..588bedf9c 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -299,7 +299,7 @@ export function buildMockCandidatePullRequest( versionString: string, options: MockCandidatePullRequestOptions = {} ): CandidateReleasePullRequest { - const version = Version.parse(versionString); + const version = Version.parseOne(versionString); return { path, pullRequest: { @@ -381,7 +381,7 @@ export function mockPullRequests( export function mockReleaseData(count: number): ReleaseData[] { const releaseData: ReleaseData[] = []; - const version = Version.parse('1.2.3'); + const version = Version.parseOne('1.2.3'); for (let i = 0; i < count; i++) { releaseData.push({ component: `component${i}`, diff --git a/test/manifest.ts b/test/manifest.ts index 4e294e726..ed3eeb826 100644 --- a/test/manifest.ts +++ b/test/manifest.ts @@ -1655,7 +1655,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -1719,7 +1719,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -1738,7 +1738,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), }, { draftPullRequest: true, @@ -1760,7 +1760,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), }, { labels: ['some-special-label'], @@ -1783,7 +1783,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -1803,7 +1803,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -1867,7 +1867,7 @@ describe('Manifest', () => { }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -1959,8 +1959,8 @@ describe('Manifest', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -2045,8 +2045,8 @@ describe('Manifest', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -3193,9 +3193,9 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.2.1'), - 'path/a': Version.parse('1.0.1'), - 'path/b': Version.parse('0.2.3'), + '.': Version.parseOne('1.2.1'), + 'path/a': Version.parseOne('1.0.1'), + 'path/b': Version.parseOne('0.2.3'), }, { groupPullRequestTitlePattern: @@ -3293,8 +3293,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.1'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.1'), + 'path/b': Version.parseOne('0.2.3'), }, { groupPullRequestTitlePattern: @@ -3529,7 +3529,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.2.3'), + '.': Version.parseOne('1.2.3'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -3568,7 +3568,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -3598,7 +3598,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -3690,9 +3690,9 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.1.0'), - 'pkg/b': Version.parse('1.0.0'), - 'pkg/c': Version.parse('1.0.1'), + '.': Version.parseOne('1.1.0'), + 'pkg/b': Version.parseOne('1.0.0'), + 'pkg/c': Version.parseOne('1.0.1'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -3763,7 +3763,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), }, { draftPullRequest: true, @@ -3867,8 +3867,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -3912,8 +3912,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -3947,7 +3947,7 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), + 'path/a': Version.parseOne('1.0.0'), }, { plugins: ['sentence-case'], @@ -4037,7 +4037,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -4130,8 +4130,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -4191,7 +4191,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), }, { releaseSearchDepth: 1, @@ -4266,7 +4266,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), }, { commitSearchDepth: 1, @@ -4367,9 +4367,9 @@ version = "3.0.0" }, }, { - 'pkg/b': Version.parse('1.0.0'), - 'pkg/c': Version.parse('2.0.0'), - 'pkg/d': Version.parse('3.0.0'), + 'pkg/b': Version.parseOne('1.0.0'), + 'pkg/c': Version.parseOne('2.0.0'), + 'pkg/d': Version.parseOne('3.0.0'), }, { separatePullRequests: true, @@ -4411,9 +4411,9 @@ version = "3.0.0" }, }, { - 'pkg/b': Version.parse('1.0.0'), - 'pkg/c': Version.parse('2.0.0'), - 'pkg/d': Version.parse('3.0.0'), + 'pkg/b': Version.parseOne('1.0.0'), + 'pkg/c': Version.parseOne('2.0.0'), + 'pkg/d': Version.parseOne('3.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -4449,9 +4449,9 @@ version = "3.0.0" }, }, { - 'pkg/b': Version.parse('1.0.0'), - 'pkg/c': Version.parse('2.0.0'), - 'pkg/d': Version.parse('3.0.0'), + 'pkg/b': Version.parseOne('1.0.0'), + 'pkg/c': Version.parseOne('2.0.0'), + 'pkg/d': Version.parseOne('3.0.0'), } ); const pullRequests = await manifest.buildPullRequests([], []); @@ -4484,8 +4484,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -4556,8 +4556,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -4679,8 +4679,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -4791,8 +4791,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -4883,8 +4883,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -4985,11 +4985,11 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('1.0.0'), - 'path/c': Version.parse('1.0.0'), - 'path/d': Version.parse('1.0.0'), - 'path/e': Version.parse('1.0.0'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('1.0.0'), + 'path/c': Version.parseOne('1.0.0'), + 'path/d': Version.parseOne('1.0.0'), + 'path/e': Version.parseOne('1.0.0'), }, { separatePullRequests: true, @@ -5014,8 +5014,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/a', draft: false, - version: Version.parse('1.0.1'), // patch bump, does not match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.0.1'), // patch bump, does not match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type match filter @@ -5036,8 +5036,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/b', draft: false, - version: Version.parse('1.1.0'), // minor bump, match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // minor bump, match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type match filter @@ -5058,8 +5058,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/c', draft: false, - version: Version.parse('1.1.0'), // minor bump, match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // minor bump, match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'feat', // type does not match filter @@ -5080,8 +5080,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/d', draft: false, - version: Version.parse('1.1.0'), // minor bump, match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // minor bump, match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type does match filter @@ -5102,8 +5102,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/e', draft: false, - version: Version.parse('1.1.0'), // minor bump, match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // minor bump, match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type does match filter @@ -5200,10 +5200,10 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('1.0.0'), - 'path/c': Version.parse('1.0.0'), - 'path/d': Version.parse('1.0.0'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('1.0.0'), + 'path/c': Version.parseOne('1.0.0'), + 'path/d': Version.parseOne('1.0.0'), }, { separatePullRequests: true, @@ -5227,8 +5227,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/a', draft: false, - version: Version.parse('1.1.0'), - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type match filter @@ -5249,8 +5249,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/b', draft: false, - version: Version.parse('1.1.0'), - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type match filter @@ -5271,8 +5271,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/c', draft: false, - version: Version.parse('1.1.0'), - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type does match filter @@ -5293,8 +5293,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/d', draft: false, - version: Version.parse('1.1.0'), - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'feat', // type does not match filter @@ -5398,12 +5398,12 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('1.0.0'), - 'path/c': Version.parse('1.0.0'), - 'path/d': Version.parse('1.0.0'), - 'path/e': Version.parse('1.0.0'), - 'path/f': Version.parse('1.0.0'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('1.0.0'), + 'path/c': Version.parseOne('1.0.0'), + 'path/d': Version.parseOne('1.0.0'), + 'path/e': Version.parseOne('1.0.0'), + 'path/f': Version.parseOne('1.0.0'), }, { separatePullRequests: true, @@ -5428,8 +5428,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/a', draft: false, - version: Version.parse('1.0.1'), // version bump match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.0.1'), // version bump match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type match filter @@ -5460,8 +5460,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/b', draft: false, - version: Version.parse('1.1.0'), // version bump match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // version bump match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'feat', // type match filter @@ -5492,8 +5492,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/c', draft: false, - version: Version.parse('1.1.0'), // version bump match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // version bump match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'feat', // type does match filter @@ -5524,8 +5524,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/d', draft: false, - version: Version.parse('1.0.1'), // version bump match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.0.1'), // version bump match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'fix', // type does match filter @@ -5556,8 +5556,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/e', draft: false, - version: Version.parse('2.0.0'), // version bump does not match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('2.0.0'), // version bump does not match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'feat', // type match filter @@ -5588,8 +5588,8 @@ version = "3.0.0" labels: [], headRefName: 'release-please/branches/main/components/f', draft: false, - version: Version.parse('1.1.0'), // version bump match filter - previousVersion: Version.parse('1.0.0'), + version: Version.parseOne('1.1.0'), // version bump match filter + previousVersion: Version.parseOne('1.0.0'), conventionalCommits: [ { type: 'chore', // type does not match filter @@ -5706,8 +5706,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -5802,8 +5802,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -5920,8 +5920,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -6029,8 +6029,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -6104,8 +6104,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -6213,8 +6213,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -6300,8 +6300,8 @@ version = "3.0.0" }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -6376,7 +6376,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); @@ -6464,10 +6464,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); const releases = await manifest.buildReleases(); @@ -6554,8 +6554,8 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), } ); const releases = await manifest.buildReleases(); @@ -6602,7 +6602,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.2.6'), + '.': Version.parseOne('3.2.6'), } ); const releases = await manifest.buildReleases(); @@ -6646,7 +6646,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.2.6'), + '.': Version.parseOne('3.2.6'), } ); const releases = await manifest.buildReleases(); @@ -6732,10 +6732,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); const releases = await manifest.buildReleases(); @@ -6795,7 +6795,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.buildReleases(); @@ -6842,7 +6842,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), }, { draft: true, @@ -6895,7 +6895,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.0'), + '.': Version.parseOne('1.3.0'), } ); const releases = await manifest.buildReleases(); @@ -6948,7 +6948,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('0.1.0'), + '.': Version.parseOne('0.1.0'), } ); const releases = await manifest.buildReleases(); @@ -6997,7 +6997,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.0'), + '.': Version.parseOne('1.3.0'), } ); const releases = await manifest.buildReleases(); @@ -7047,7 +7047,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.0'), + '.': Version.parseOne('1.3.0'), } ); const releases = await manifest.buildReleases(); @@ -7082,7 +7082,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.2.6'), + '.': Version.parseOne('3.2.6'), } ); const releases = await manifest.buildReleases(); @@ -7123,7 +7123,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.2.6'), + '.': Version.parseOne('3.2.6'), } ); const releases = await manifest.buildReleases(); @@ -7161,7 +7161,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.1.0'), + '.': Version.parseOne('3.1.0'), } ); const releases = await manifest.buildReleases(); @@ -7217,11 +7217,11 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.0.0'), - api: Version.parse('1.0.0'), - chat: Version.parse('1.0.0'), - cmds: Version.parse('1.0.0'), - presence: Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), + api: Version.parseOne('1.0.0'), + chat: Version.parseOne('1.0.0'), + cmds: Version.parseOne('1.0.0'), + presence: Version.parseOne('1.0.0'), }, { groupPullRequestTitlePattern: 'chore: release v${version}', @@ -7305,10 +7305,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); const releases = await manifest.buildReleases(); @@ -7396,7 +7396,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.createReleases(); @@ -7507,10 +7507,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); const releases = await manifest.createReleases(); @@ -7595,7 +7595,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('3.2.6'), + '.': Version.parseOne('3.2.6'), } ); mockCreateRelease(github, [ @@ -7680,7 +7680,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), }, { labels: ['some-pull-request-label'], @@ -7768,7 +7768,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.createReleases(); @@ -7858,7 +7858,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.createReleases(); @@ -7946,7 +7946,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.createReleases(); @@ -8033,7 +8033,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); const releases = await manifest.createReleases(); @@ -8156,10 +8156,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); const releases = await manifest.createReleases(); @@ -8301,10 +8301,10 @@ version = "3.0.0" }, }, { - 'packages/bot-config-utils': Version.parse('3.1.4'), - 'packages/label-utils': Version.parse('1.0.1'), - 'packages/object-selector': Version.parse('1.0.2'), - 'packages/datastore-lock': Version.parse('2.0.0'), + 'packages/bot-config-utils': Version.parseOne('3.1.4'), + 'packages/label-utils': Version.parseOne('1.0.1'), + 'packages/object-selector': Version.parseOne('1.0.2'), + 'packages/datastore-lock': Version.parseOne('2.0.0'), } ); try { @@ -8396,7 +8396,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); @@ -8505,7 +8505,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); @@ -8606,7 +8606,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); @@ -8741,7 +8741,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); @@ -8872,7 +8872,7 @@ version = "3.0.0" }, }, { - '.': Version.parse('1.3.1'), + '.': Version.parseOne('1.3.1'), } ); diff --git a/test/plugins/cargo-workspace.ts b/test/plugins/cargo-workspace.ts index 2cc8b246b..9250ef94f 100644 --- a/test/plugins/cargo-workspace.ts +++ b/test/plugins/cargo-workspace.ts @@ -54,7 +54,7 @@ export function buildMockPackageUpdate( createIfMissing: false, cachedFileContents, updater: new CargoToml({ - version: Version.parse(manifest.package?.version || 'FIXME'), + version: Version.parseOne(manifest.package?.version || 'FIXME'), }), }; } diff --git a/test/plugins/compatibility/linked-versions-group-title.ts b/test/plugins/compatibility/linked-versions-group-title.ts index b3eed176e..c6302c2ce 100644 --- a/test/plugins/compatibility/linked-versions-group-title.ts +++ b/test/plugins/compatibility/linked-versions-group-title.ts @@ -44,7 +44,7 @@ export function buildMockPackageUpdate( createIfMissing: false, cachedFileContents, updater: new CargoToml({ - version: Version.parse(manifest.package?.version || 'FIXME'), + version: Version.parseOne(manifest.package?.version || 'FIXME'), }), }; } @@ -133,8 +133,8 @@ describe('Plugin compatibility', () => { }, }, { - '.': Version.parse('1.0.0'), - 'packages/nodeA': Version.parse('1.0.0'), + '.': Version.parseOne('1.0.0'), + 'packages/nodeA': Version.parseOne('1.0.0'), }, { plugins: [ diff --git a/test/plugins/compatibility/linked-versions-workspace.ts b/test/plugins/compatibility/linked-versions-workspace.ts index d938dbad0..440357451 100644 --- a/test/plugins/compatibility/linked-versions-workspace.ts +++ b/test/plugins/compatibility/linked-versions-workspace.ts @@ -48,7 +48,7 @@ export function buildMockPackageUpdate( createIfMissing: false, cachedFileContents, updater: new CargoToml({ - version: Version.parse(manifest.package?.version || 'FIXME'), + version: Version.parseOne(manifest.package?.version || 'FIXME'), }), }; } @@ -150,8 +150,8 @@ describe('Plugin compatibility', () => { }, }, { - 'packages/rustA': Version.parse('1.0.0'), - 'packages/rustB': Version.parse('1.0.0'), + 'packages/rustA': Version.parseOne('1.0.0'), + 'packages/rustB': Version.parseOne('1.0.0'), }, { plugins: [ diff --git a/test/plugins/linked-versions.ts b/test/plugins/linked-versions.ts index f439f8f79..3d33ab92e 100644 --- a/test/plugins/linked-versions.ts +++ b/test/plugins/linked-versions.ts @@ -42,7 +42,7 @@ export function buildMockPackageUpdate( createIfMissing: false, cachedFileContents, updater: new CargoToml({ - version: Version.parse(manifest.package?.version || 'FIXME'), + version: Version.parseOne(manifest.package?.version || 'FIXME'), }), }; } @@ -152,9 +152,9 @@ describe('LinkedVersions plugin', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), - 'path/c': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), + 'path/c': Version.parseOne('0.2.3'), }, { plugins: [ @@ -199,9 +199,9 @@ describe('LinkedVersions plugin', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), - 'path/c': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), + 'path/c': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -250,9 +250,9 @@ describe('LinkedVersions plugin', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), - 'path/c': Version.parse('0.2.3'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), + 'path/c': Version.parseOne('0.2.3'), }, { separatePullRequests: true, @@ -294,10 +294,10 @@ describe('LinkedVersions plugin', () => { }, }, { - 'path/a': Version.parse('1.0.0'), - 'path/b': Version.parse('0.2.3'), - 'path/c': Version.parse('0.2.3'), - 'path/d': Version.parse('1.0.0'), + 'path/a': Version.parseOne('1.0.0'), + 'path/b': Version.parseOne('0.2.3'), + 'path/c': Version.parseOne('0.2.3'), + 'path/d': Version.parseOne('1.0.0'), }, { separatePullRequests: true, diff --git a/test/plugins/maven-workspace.ts b/test/plugins/maven-workspace.ts index 01d443bd8..320fad3e4 100644 --- a/test/plugins/maven-workspace.ts +++ b/test/plugins/maven-workspace.ts @@ -526,7 +526,7 @@ function buildMockPackageUpdate( path, createIfMissing: false, cachedFileContents, - updater: new PomXml(Version.parse(newVersionString)), + updater: new PomXml(Version.parseOne(newVersionString)), }; } diff --git a/test/plugins/node-workspace.ts b/test/plugins/node-workspace.ts index c204a9ae6..c80d7f5ab 100644 --- a/test/plugins/node-workspace.ts +++ b/test/plugins/node-workspace.ts @@ -52,7 +52,7 @@ export function buildMockPackageUpdate( createIfMissing: false, cachedFileContents, updater: new PackageJson({ - version: Version.parse( + version: Version.parseOne( JSON.parse(cachedFileContents.parsedContent).version ), }), @@ -71,7 +71,7 @@ function buildMockChangelogUpdate( cachedFileContents, updater: new Changelog({ changelogEntry, - version: Version.parse(versionString), + version: Version.parseOne(versionString), }), }; } diff --git a/test/strategies/dart.ts b/test/strategies/dart.ts index 85945a2fb..f11a1c3da 100644 --- a/test/strategies/dart.ts +++ b/test/strategies/dart.ts @@ -75,7 +75,7 @@ describe('Dart', () => { packageName: 'some-dart-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-dart-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-dart-package'), sha: 'abc123', notes: 'some notes', }; @@ -97,7 +97,7 @@ describe('Dart', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'hello_world'), + tag: new TagName(Version.parseOne('0.123.4'), 'hello_world'), sha: 'abc123', notes: 'some notes', }; @@ -129,7 +129,7 @@ describe('Dart', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-dart-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-dart-package'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/elixir.ts b/test/strategies/elixir.ts index 0ba83da2e..80606e6e9 100644 --- a/test/strategies/elixir.ts +++ b/test/strategies/elixir.ts @@ -68,7 +68,7 @@ describe('Elixir', () => { component: 'some-elixir-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-elixir-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-elixir-package'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/expo.ts b/test/strategies/expo.ts index e40d3514f..e1cfec4a4 100644 --- a/test/strategies/expo.ts +++ b/test/strategies/expo.ts @@ -99,7 +99,7 @@ describe('Expo', () => { packageName: 'some-node-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-node-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-node-package'), sha: 'abc123', notes: 'some notes', }; @@ -131,7 +131,7 @@ describe('Expo', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'node-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'node-test-repo'), sha: 'abc123', notes: 'some notes', }; @@ -164,7 +164,7 @@ describe('Expo', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'node-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'node-test-repo'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/go-yoshi.ts b/test/strategies/go-yoshi.ts index 44bc54b35..19437b2b9 100644 --- a/test/strategies/go-yoshi.ts +++ b/test/strategies/go-yoshi.ts @@ -70,7 +70,7 @@ describe('GoYoshi', () => { component: 'iam', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'iam'), + tag: new TagName(Version.parseOne('0.123.4'), 'iam'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/go.ts b/test/strategies/go.ts index 8e6f12b7e..8b611e01e 100644 --- a/test/strategies/go.ts +++ b/test/strategies/go.ts @@ -70,7 +70,7 @@ describe('Go', () => { component: 'google-cloud-automl', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/helm.ts b/test/strategies/helm.ts index 847cc0b95..b9f57aa62 100644 --- a/test/strategies/helm.ts +++ b/test/strategies/helm.ts @@ -74,7 +74,7 @@ describe('Helm', () => { packageName: 'some-helm-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-helm-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-helm-package'), sha: 'abc123', notes: 'some notes', }; @@ -91,7 +91,7 @@ describe('Helm', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'helm-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'helm-test-repo'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/java-yoshi-mono-repo.ts b/test/strategies/java-yoshi-mono-repo.ts index f2a379ac4..691b0c519 100644 --- a/test/strategies/java-yoshi-mono-repo.ts +++ b/test/strategies/java-yoshi-mono-repo.ts @@ -102,7 +102,7 @@ describe('JavaYoshiMonoRepo', () => { .withArgs('versions.txt', 'main') .resolves(buildGitHubFileContent(fixturesPath, 'versions.txt')); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -130,7 +130,7 @@ describe('JavaYoshiMonoRepo', () => { buildGitHubFileContent(fixturesPath, 'versions-released.txt') ); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -166,7 +166,7 @@ describe('JavaYoshiMonoRepo', () => { ) ); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/java-yoshi.ts b/test/strategies/java-yoshi.ts index 56c4b02e9..79e8e34dc 100644 --- a/test/strategies/java-yoshi.ts +++ b/test/strategies/java-yoshi.ts @@ -95,7 +95,7 @@ describe('JavaYoshi', () => { .withArgs('versions.txt', 'main') .resolves(buildGitHubFileContent(fixturesPath, 'versions.txt')); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -123,7 +123,7 @@ describe('JavaYoshi', () => { buildGitHubFileContent(fixturesPath, 'versions-released.txt') ); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -159,7 +159,7 @@ describe('JavaYoshi', () => { ) ); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -196,7 +196,7 @@ describe('JavaYoshi', () => { .withArgs('versions.txt', 'main') .throws(new FileNotFoundError('versions.txt')); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/java.ts b/test/strategies/java.ts index 23ec83ccd..071f4e57e 100644 --- a/test/strategies/java.ts +++ b/test/strategies/java.ts @@ -85,7 +85,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -111,7 +111,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -140,7 +140,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -166,7 +166,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.4-SNAPSHOT')), + tag: new TagName(Version.parseOne('2.3.4-SNAPSHOT')), sha: 'abc123', notes: 'some notes', }; @@ -186,7 +186,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -215,7 +215,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -236,7 +236,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -274,7 +274,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; @@ -344,7 +344,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3'), 'test-sample'), + tag: new TagName(Version.parseOne('2.3.3'), 'test-sample'), sha: 'abc123', notes: 'some notes', }; @@ -376,7 +376,7 @@ describe('Java', () => { }); const latestRelease = { - tag: new TagName(Version.parse('2.3.3'), 'test-sample'), + tag: new TagName(Version.parseOne('2.3.3'), 'test-sample'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/krm-blueprint.ts b/test/strategies/krm-blueprint.ts index 373785798..fad16233d 100644 --- a/test/strategies/krm-blueprint.ts +++ b/test/strategies/krm-blueprint.ts @@ -76,7 +76,7 @@ describe('KRMBlueprint', () => { sandbox.stub(github, 'findFilesByExtensionAndRef').resolves([]); const latestRelease = { tag: new TagName( - Version.parse('0.123.4'), + Version.parseOne('0.123.4'), 'some-krm-blueprint-package' ), sha: 'abc123', diff --git a/test/strategies/maven.ts b/test/strategies/maven.ts index adb8753dc..570b5cb4e 100644 --- a/test/strategies/maven.ts +++ b/test/strategies/maven.ts @@ -94,7 +94,7 @@ describe('Maven', () => { .resolves(['pom.xml', 'submodule/pom.xml']); const latestRelease = { - tag: new TagName(Version.parse('2.3.3')), + tag: new TagName(Version.parseOne('2.3.3')), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/node.ts b/test/strategies/node.ts index 56b1e37b4..f408ae6e8 100644 --- a/test/strategies/node.ts +++ b/test/strategies/node.ts @@ -85,7 +85,7 @@ describe('Node', () => { packageName: 'some-node-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-node-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-node-package'), sha: 'abc123', notes: 'some notes', }; @@ -107,7 +107,7 @@ describe('Node', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'node-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'node-test-repo'), sha: 'abc123', notes: 'some notes', }; @@ -137,7 +137,7 @@ describe('Node', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'node-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'node-test-repo'), sha: 'abc123', notes: 'some notes', }; @@ -163,7 +163,7 @@ describe('Node', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-node-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-node-package'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/ocaml.ts b/test/strategies/ocaml.ts index ea07d1056..ab7d342bd 100644 --- a/test/strategies/ocaml.ts +++ b/test/strategies/ocaml.ts @@ -80,7 +80,7 @@ describe('OCaml', () => { }); sandbox.stub(github, 'findFilesByExtensionAndRef').resolves([]); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/php-yoshi.ts b/test/strategies/php-yoshi.ts index 67fb2fae2..bcf7a1d41 100644 --- a/test/strategies/php-yoshi.ts +++ b/test/strategies/php-yoshi.ts @@ -101,7 +101,7 @@ describe('PHPYoshi', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -119,7 +119,7 @@ describe('PHPYoshi', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/php.ts b/test/strategies/php.ts index 05da02f13..657343758 100644 --- a/test/strategies/php.ts +++ b/test/strategies/php.ts @@ -71,7 +71,7 @@ describe('PHP', () => { component: 'google-cloud-automl', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/python.ts b/test/strategies/python.ts index e31419295..24d6c3011 100644 --- a/test/strategies/python.ts +++ b/test/strategies/python.ts @@ -90,7 +90,7 @@ describe('Python', () => { .resolves(buildGitHubFileContent(fixturesPath, 'setup.py')); sandbox.stub(github, 'findFilesByFilenameAndRef').resolves([]); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/ruby.ts b/test/strategies/ruby.ts index ad7f70966..8b00ae502 100644 --- a/test/strategies/ruby.ts +++ b/test/strategies/ruby.ts @@ -73,7 +73,7 @@ describe('Ruby', () => { component: 'google-cloud-automl', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/rust.ts b/test/strategies/rust.ts index 9ac092056..571a1dfdc 100644 --- a/test/strategies/rust.ts +++ b/test/strategies/rust.ts @@ -75,7 +75,7 @@ describe('Rust', () => { component: 'google-cloud-automl', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; @@ -93,7 +93,7 @@ describe('Rust', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'rust-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'rust-test-repo'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/sfdx.ts b/test/strategies/sfdx.ts index 8a6df5d88..aaf79ba33 100644 --- a/test/strategies/sfdx.ts +++ b/test/strategies/sfdx.ts @@ -76,7 +76,7 @@ describe('Sfdx', () => { packageName: 'some-sfdx-package', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-sfdx-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-sfdx-package'), sha: 'abc123', notes: 'some notes', }; @@ -98,7 +98,7 @@ describe('Sfdx', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'sfdx-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'sfdx-test-repo'), sha: 'abc123', notes: 'some notes', }; @@ -128,7 +128,7 @@ describe('Sfdx', () => { ), ]; const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'sfdx-test-repo'), + tag: new TagName(Version.parseOne('0.123.4'), 'sfdx-test-repo'), sha: 'abc123', notes: 'some notes', }; @@ -154,7 +154,7 @@ describe('Sfdx', () => { github, }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'some-sfdx-package'), + tag: new TagName(Version.parseOne('0.123.4'), 'some-sfdx-package'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/simple.ts b/test/strategies/simple.ts index 084f09bd3..2e8ce9e83 100644 --- a/test/strategies/simple.ts +++ b/test/strategies/simple.ts @@ -71,7 +71,7 @@ describe('Simple', () => { component: 'google-cloud-automl', }); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/strategies/terraform-module.ts b/test/strategies/terraform-module.ts index 1e7d2276d..b19fb6c6e 100644 --- a/test/strategies/terraform-module.ts +++ b/test/strategies/terraform-module.ts @@ -74,7 +74,7 @@ describe('TerraformModule', () => { }); sandbox.stub(github, 'findFilesByFilenameAndRef').resolves([]); const latestRelease = { - tag: new TagName(Version.parse('0.123.4'), 'google-cloud-automl'), + tag: new TagName(Version.parseOne('0.123.4'), 'google-cloud-automl'), sha: 'abc123', notes: 'some notes', }; diff --git a/test/updaters/cargo-toml.ts b/test/updaters/cargo-toml.ts index 341fb8c10..c6cc2399e 100644 --- a/test/updaters/cargo-toml.ts +++ b/test/updaters/cargo-toml.ts @@ -21,7 +21,7 @@ import {expect} from 'chai'; import {Version} from '../../src/version'; const fixturesPath = './test/updaters/fixtures'; -const FAKE_VERSION = Version.parse('1.2.3'); +const FAKE_VERSION = Version.parseOne('1.2.3'); describe('CargoToml', () => { describe('updateContent', () => { @@ -58,7 +58,7 @@ describe('CargoToml', () => { resolve(fixturesPath, './Cargo.toml'), 'utf8' ).replace(/\r\n/g, '\n'); - const newVersion = Version.parse('14.0.0'); + const newVersion = Version.parseOne('14.0.0'); const versions = new Map(); versions.set('rust-test-repo', newVersion); const cargoToml = new CargoToml({ @@ -74,7 +74,7 @@ describe('CargoToml', () => { resolve(fixturesPath, './Cargo.toml'), 'utf8' ).replace(/\r\n/g, '\n'); - const newVersion = Version.parse('12.0.0'); + const newVersion = Version.parseOne('12.0.0'); const versions = new Map(); versions.set('normal-dep', '2.0.0'); versions.set('dev-dep', '2.0.0'); diff --git a/test/updaters/changelog-json.ts b/test/updaters/changelog-json.ts index 3302284d8..9107cdeae 100644 --- a/test/updaters/changelog-json.ts +++ b/test/updaters/changelog-json.ts @@ -34,7 +34,7 @@ describe('changelog.json', () => { ]; const conventionalCommits = parseConventionalCommits(commits); const changelogJson = new ChangelogJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), artifactName: 'foo-artifact', commits: conventionalCommits, language: 'JAVA', @@ -56,7 +56,7 @@ describe('changelog.json', () => { ]; const conventionalCommits = parseConventionalCommits(commits); const changelogJson = new ChangelogJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), artifactName: 'foo-artifact', language: 'JAVA', commits: conventionalCommits, @@ -81,7 +81,7 @@ describe('changelog.json', () => { ]; const conventionalCommits = parseConventionalCommits(commits); const changelogJson = new ChangelogJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), artifactName: 'foo-artifact', language: 'JAVA', commits: conventionalCommits, diff --git a/test/updaters/changelog.ts b/test/updaters/changelog.ts index e1729c2e7..d6407de0a 100644 --- a/test/updaters/changelog.ts +++ b/test/updaters/changelog.ts @@ -30,7 +30,7 @@ describe('ChangelogUpdater', () => { ).replace(/\r\n/g, '\n'); const changelog = new Changelog({ changelogEntry: '## 2.0.0\n\n* added a new foo to bar.', - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), }); const newContent = changelog.updateContent(oldContent); snapshot(newContent); @@ -43,7 +43,7 @@ describe('ChangelogUpdater', () => { ).replace(/\r\n/g, '\n'); const changelog = new Changelog({ changelogEntry: '## 2.0.0\n\n* added a new foo to bar.', - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), }); const newContent = changelog.updateContent(oldContent); snapshot(newContent); @@ -56,7 +56,7 @@ describe('ChangelogUpdater', () => { ).replace(/\r\n/g, '\n'); const changelog = new Changelog({ changelogEntry: '## 0.7.0\n\n* added a new foo to bar.', - version: Version.parse('0.7.0'), + version: Version.parseOne('0.7.0'), }); const newContent = changelog.updateContent(oldContent); snapshot(newContent); @@ -65,7 +65,7 @@ describe('ChangelogUpdater', () => { it('populates a new CHANGELOG if none exists', async () => { const changelog = new Changelog({ changelogEntry: '## 2.0.0\n\n* added a new foo to bar.', - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), }); const newContent = changelog.updateContent(undefined); snapshot(newContent); @@ -78,7 +78,7 @@ describe('ChangelogUpdater', () => { ).replace(/\r\n/g, '\n'); const changelog = new Changelog({ changelogEntry: '## 1.0.0\n\n* added a new foo to bar.', - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), versionHeaderRegex: '\n## Version [0-9[]+', }); const newContent = changelog.updateContent(oldContent); @@ -92,7 +92,7 @@ describe('ChangelogUpdater', () => { ).replace(/\r\n/g, '\n'); const changelog = new Changelog({ changelogEntry: '## 1.0.0\n\n* added a new foo to bar.', - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), }); const newContent = changelog.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/chart-yaml.ts b/test/updaters/chart-yaml.ts index 7a5ce7629..255ce58f8 100644 --- a/test/updaters/chart-yaml.ts +++ b/test/updaters/chart-yaml.ts @@ -29,7 +29,7 @@ describe('ChartYaml', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new ChartYaml({ - version: Version.parse('1.1.0'), + version: Version.parseOne('1.1.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/composite.ts b/test/updaters/composite.ts index 78e1478de..b7b8fe1bf 100644 --- a/test/updaters/composite.ts +++ b/test/updaters/composite.ts @@ -30,14 +30,14 @@ describe('CompositeUpdater', () => { describe('updateContent', () => { it('updates content multiple times', async () => { const versions1 = new Map(); - const version1 = Version.parse('1.2.3'); + const version1 = Version.parseOne('1.2.3'); versions1.set('artifact1', version1); const updater1 = new JavaUpdate({ versionsMap: versions1, version: version1, }); const versions2 = new Map(); - const version2 = Version.parse('2.0.0'); + const version2 = Version.parseOne('2.0.0'); versions2.set('artifact2', version2); const updater2 = new JavaUpdate({ versionsMap: versions2, diff --git a/test/updaters/dotnet/apis.ts b/test/updaters/dotnet/apis.ts index a706d2a80..a2746b855 100644 --- a/test/updaters/dotnet/apis.ts +++ b/test/updaters/dotnet/apis.ts @@ -30,7 +30,7 @@ describe('Apis', () => { ).replace(/\r\n/g, '\n'); const updater = new Apis( 'Google.Cloud.SecurityCenter.V1', - Version.parse('2.12.0') + Version.parseOne('2.12.0') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/dotnet/csproj.ts b/test/updaters/dotnet/csproj.ts index cc91ff28c..e4d40b0d1 100644 --- a/test/updaters/dotnet/csproj.ts +++ b/test/updaters/dotnet/csproj.ts @@ -20,7 +20,7 @@ import {Version} from '../../../src/version'; import {CsProj} from '../../../src/updaters/dotnet/csproj'; const fixturesPath = './test/updaters/fixtures'; -const FAKE_VERSION = Version.parse('1.2.3'); +const FAKE_VERSION = Version.parseOne('1.2.3'); describe('CsProj', () => { describe('updateContent', () => { diff --git a/test/updaters/dune-project.ts b/test/updaters/dune-project.ts index 1f86aad86..f50cb09d4 100644 --- a/test/updaters/dune-project.ts +++ b/test/updaters/dune-project.ts @@ -29,7 +29,7 @@ describe('DuneProject', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new DuneProject({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/elixir-mix-exs.ts b/test/updaters/elixir-mix-exs.ts index 842f3d22d..072360eca 100644 --- a/test/updaters/elixir-mix-exs.ts +++ b/test/updaters/elixir-mix-exs.ts @@ -29,7 +29,7 @@ describe('Elixir', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new ElixirMixExs({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -41,7 +41,7 @@ describe('Elixir', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new ElixirMixExs({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/esy-json.ts b/test/updaters/esy-json.ts index 10acb1cdb..1402c1042 100644 --- a/test/updaters/esy-json.ts +++ b/test/updaters/esy-json.ts @@ -29,7 +29,7 @@ describe('EsyJson', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new EsyJson({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/expo/app-json.ts b/test/updaters/expo/app-json.ts index 6cd30dd07..27695e6ef 100644 --- a/test/updaters/expo/app-json.ts +++ b/test/updaters/expo/app-json.ts @@ -29,8 +29,8 @@ describe('AppJson', () => { 'utf8' ); const packageJson = new AppJson({ - version: Version.parse('3.2.1'), - expoSDKVersion: Version.parse('44.0.0'), + version: Version.parseOne('3.2.1'), + expoSDKVersion: Version.parseOne('44.0.0'), }); const newContent = packageJson.updateContent(oldContent); snapshot(newContent.replace(/\r\n/g, '\n')); diff --git a/test/updaters/gemfile-lock.ts b/test/updaters/gemfile-lock.ts index b0da832aa..cf88a6dfc 100644 --- a/test/updaters/gemfile-lock.ts +++ b/test/updaters/gemfile-lock.ts @@ -56,7 +56,7 @@ describe('Gemfile.lock', () => { shouldUpdate ? 'update' : 'not update' } for ${description}`, () => { const version = new GemfileLock({ - version: Version.parse(newVersion), + version: Version.parseOne(newVersion), gemName, }); const result = version.updateContent(existingContent); @@ -71,7 +71,7 @@ describe('Gemfile.lock', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new GemfileLock({ - version: Version.parse('0.2.0'), + version: Version.parseOne('0.2.0'), gemName: '', }); const newContent = version.updateContent(oldContent); @@ -84,7 +84,7 @@ describe('Gemfile.lock', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new GemfileLock({ - version: Version.parse('0.2.0'), + version: Version.parseOne('0.2.0'), gemName: 'foo', }); const newContent = version.updateContent(oldContent); @@ -97,7 +97,7 @@ describe('Gemfile.lock', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new GemfileLock({ - version: Version.parse('0.2.0-alpha'), + version: Version.parseOne('0.2.0-alpha'), gemName: 'foo', }); const newContent = version.updateContent(oldContent); diff --git a/test/updaters/generic-json.ts b/test/updaters/generic-json.ts index 1be2aa936..c1c2ad4ff 100644 --- a/test/updaters/generic-json.ts +++ b/test/updaters/generic-json.ts @@ -29,7 +29,7 @@ describe('GenericJson', () => { resolve(fixturesPath, './esy.json'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericJson('$.version', Version.parse('v2.3.4')); + const updater = new GenericJson('$.version', Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); @@ -40,7 +40,7 @@ describe('GenericJson', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericJson( '$.packages..version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -50,7 +50,10 @@ describe('GenericJson', () => { resolve(fixturesPath, './esy.json'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericJson('$.nonExistent', Version.parse('v2.3.4')); + const updater = new GenericJson( + '$.nonExistent', + Version.parseOne('v2.3.4') + ); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); @@ -59,7 +62,10 @@ describe('GenericJson', () => { resolve(fixturesPath, './esy.json'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericJson('bad jsonpath', Version.parse('v2.3.4')); + const updater = new GenericJson( + 'bad jsonpath', + Version.parseOne('v2.3.4') + ); assert.throws(() => { updater.updateContent(oldContent); }); diff --git a/test/updaters/generic-toml.ts b/test/updaters/generic-toml.ts index 67a354eef..fc10dab0c 100644 --- a/test/updaters/generic-toml.ts +++ b/test/updaters/generic-toml.ts @@ -31,7 +31,7 @@ describe('GenericToml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericToml( '$.package.version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -43,7 +43,7 @@ describe('GenericToml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericToml( "$['dev-dependencies']..version", - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -53,7 +53,10 @@ describe('GenericToml', () => { resolve(fixturesPath, './Cargo.toml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericToml('$.nonExistent', Version.parse('v2.3.4')); + const updater = new GenericToml( + '$.nonExistent', + Version.parseOne('v2.3.4') + ); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); @@ -62,7 +65,10 @@ describe('GenericToml', () => { resolve(fixturesPath, './Cargo.toml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericToml('bad jsonpath', Version.parse('v2.3.4')); + const updater = new GenericToml( + 'bad jsonpath', + Version.parseOne('v2.3.4') + ); assert.throws(() => { updater.updateContent(oldContent); }); @@ -72,7 +78,7 @@ describe('GenericToml', () => { resolve(fixturesPath, './toml/invalid.txt'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericToml('$.boo', Version.parse('v2.3.4')); + const updater = new GenericToml('$.boo', Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); @@ -83,7 +89,7 @@ describe('GenericToml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericToml( '$.package.version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); expect(newContent).not.to.eql(oldContent); diff --git a/test/updaters/generic-xml.ts b/test/updaters/generic-xml.ts index 44dfd11f7..e0b5b0578 100644 --- a/test/updaters/generic-xml.ts +++ b/test/updaters/generic-xml.ts @@ -31,7 +31,7 @@ describe('GenericXml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericXml( '//Project/PropertyGroup/Version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -43,7 +43,7 @@ describe('GenericXml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericXml( '//project/nonExistent', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); @@ -53,7 +53,10 @@ describe('GenericXml', () => { resolve(fixturesPath, './Foo.csproj'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericXml('//Project/@Sdk', Version.parse('v2.3.4')); + const updater = new GenericXml( + '//Project/@Sdk', + Version.parseOne('v2.3.4') + ); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); diff --git a/test/updaters/generic-yaml.ts b/test/updaters/generic-yaml.ts index 253e3025d..cbaea8772 100644 --- a/test/updaters/generic-yaml.ts +++ b/test/updaters/generic-yaml.ts @@ -29,7 +29,7 @@ describe('GenericYaml', () => { resolve(fixturesPath, './helm/Chart.yaml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericYaml('$.version', Version.parse('v2.3.4')); + const updater = new GenericYaml('$.version', Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); @@ -40,7 +40,7 @@ describe('GenericYaml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericYaml( '$.packages..version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -52,7 +52,7 @@ describe('GenericYaml', () => { ).replace(/\r\n/g, '\n'); const updater = new GenericYaml( '$.dependencies..version', - Version.parse('v2.3.4') + Version.parseOne('v2.3.4') ); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -62,7 +62,10 @@ describe('GenericYaml', () => { resolve(fixturesPath, './helm/Chart.yaml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericYaml('$.nonExistent', Version.parse('v2.3.4')); + const updater = new GenericYaml( + '$.nonExistent', + Version.parseOne('v2.3.4') + ); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); @@ -71,7 +74,10 @@ describe('GenericYaml', () => { resolve(fixturesPath, './helm/Chart.yaml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericYaml('bad jsonpath', Version.parse('v2.3.4')); + const updater = new GenericYaml( + 'bad jsonpath', + Version.parseOne('v2.3.4') + ); assert.throws(() => { updater.updateContent(oldContent); }); @@ -81,7 +87,7 @@ describe('GenericYaml', () => { resolve(fixturesPath, './yaml/invalid.txt'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericYaml('$.boo', Version.parse('v2.3.4')); + const updater = new GenericYaml('$.boo', Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); @@ -90,7 +96,7 @@ describe('GenericYaml', () => { resolve(fixturesPath, './yaml/multi.yaml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new GenericYaml('$.version', Version.parse('v2.3.4')); + const updater = new GenericYaml('$.version', Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); diff --git a/test/updaters/generic.ts b/test/updaters/generic.ts index 73a4573ba..60545be63 100644 --- a/test/updaters/generic.ts +++ b/test/updaters/generic.ts @@ -31,7 +31,7 @@ describe('Generic', () => { const versions = new Map(); const pom = new Generic({ versionsMap: versions, - version: Version.parse('v2.3.4'), + version: Version.parseOne('v2.3.4'), }); const newContent = pom.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/java-auth-versions.ts b/test/updaters/java-auth-versions.ts index 45068204c..23782c7e6 100644 --- a/test/updaters/java-auth-versions.ts +++ b/test/updaters/java-auth-versions.ts @@ -29,9 +29,9 @@ describe('JavaAuthVersions', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('google-auth-library', Version.parse('0.25.0')); + versions.set('google-auth-library', Version.parseOne('0.25.0')); const javaAuthVersions = new VersionsManifest({ - version: Version.parse('0.25.0'), + version: Version.parseOne('0.25.0'), versionsMap: versions, }); const newContent = javaAuthVersions.updateContent(oldContent); @@ -46,10 +46,10 @@ describe('JavaAuthVersions', () => { const versions = new Map(); versions.set( 'google-auth-library-oauth2-http', - Version.parse('0.16.2-SNAPSHOT') + Version.parseOne('0.16.2-SNAPSHOT') ); const javaAuthVersions = new VersionsManifest({ - version: Version.parse('0.16.2-SNAPSHOT'), + version: Version.parseOne('0.16.2-SNAPSHOT'), versionsMap: versions, }); const newContent = javaAuthVersions.updateContent(oldContent); @@ -62,14 +62,14 @@ describe('JavaAuthVersions', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('google-auth-library', Version.parse('0.25.0')); + versions.set('google-auth-library', Version.parseOne('0.25.0')); versions.set( 'google-auth-library-oauth2-http', - Version.parse('0.16.2-SNAPSHOT') + Version.parseOne('0.16.2-SNAPSHOT') ); const javaAuthVersions = new VersionsManifest({ versionsMap: versions, - version: Version.parse('0.25.0'), + version: Version.parseOne('0.25.0'), }); const newContent = javaAuthVersions.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/java-released.ts b/test/updaters/java-released.ts index 313ca067c..913671abf 100644 --- a/test/updaters/java-released.ts +++ b/test/updaters/java-released.ts @@ -31,7 +31,7 @@ describe('JavaReleased', () => { const versions = new Map(); const pom = new JavaReleased({ versionsMap: versions, - version: Version.parse('v2.3.4'), + version: Version.parseOne('v2.3.4'), }); const newContent = pom.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/java-update.ts b/test/updaters/java-update.ts index 9b03dfaae..5a62cec89 100644 --- a/test/updaters/java-update.ts +++ b/test/updaters/java-update.ts @@ -29,10 +29,13 @@ describe('JavaUpdate', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('google-auth-library-parent', Version.parse('v0.16.2-sp.1')); + versions.set( + 'google-auth-library-parent', + Version.parseOne('v0.16.2-sp.1') + ); const updater = new JavaUpdate({ versionsMap: versions, - version: Version.parse('v0.16.2-sp.1'), + version: Version.parseOne('v0.16.2-sp.1'), }); const newContent = updater.updateContent(oldContent); snapshot(newContent); @@ -43,10 +46,10 @@ describe('JavaUpdate', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('module-name', Version.parse('3.3.3')); + versions.set('module-name', Version.parseOne('3.3.3')); const updater = new JavaUpdate({ versionsMap: versions, - version: Version.parse('3.3.3'), + version: Version.parseOne('3.3.3'), isSnapshot: true, }); const newContent = updater.updateContent(oldContent); @@ -58,10 +61,10 @@ describe('JavaUpdate', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('module-name', Version.parse('3.3.3')); + versions.set('module-name', Version.parseOne('3.3.3')); const updater = new JavaUpdate({ versionsMap: versions, - version: Version.parse('3.3.3'), + version: Version.parseOne('3.3.3'), }); const newContent = updater.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/krm-blueprint-version.ts b/test/updaters/krm-blueprint-version.ts index 4e976d92e..ebf4d8986 100644 --- a/test/updaters/krm-blueprint-version.ts +++ b/test/updaters/krm-blueprint-version.ts @@ -46,10 +46,10 @@ describe('KRM Blueprint', () => { const versionsMap = new Map(); versionsMap.set( 'previousVersion', - Version.parse(test.previousVersion) + Version.parseOne(test.previousVersion) ); const version = new KRMBlueprintVersion({ - version: Version.parse(test.expectedVersion), + version: Version.parseOne(test.expectedVersion), versionsMap, }); const newContent = version.updateContent(oldContent); @@ -64,7 +64,7 @@ describe('KRM Blueprint', () => { ).replace(/\r\n/g, '\n'); const version = new KRMBlueprintVersion({ - version: Version.parse(test.expectedVersion), + version: Version.parseOne(test.expectedVersion), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/metadata.ts b/test/updaters/metadata.ts index 652c14322..914809b47 100644 --- a/test/updaters/metadata.ts +++ b/test/updaters/metadata.ts @@ -29,7 +29,7 @@ describe('metadata.yaml', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new MetadataVersion({ - version: Version.parse('2.1.0'), + version: Version.parseOne('2.1.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/module-version.ts b/test/updaters/module-version.ts index 7687442eb..c17376199 100644 --- a/test/updaters/module-version.ts +++ b/test/updaters/module-version.ts @@ -29,7 +29,7 @@ describe('versions.tf', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new ModuleVersion({ - version: Version.parse('2.1.0'), + version: Version.parseOne('2.1.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/opam.ts b/test/updaters/opam.ts index 35c9cdb3d..81c58afcc 100644 --- a/test/updaters/opam.ts +++ b/test/updaters/opam.ts @@ -29,7 +29,7 @@ describe('Opam', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new Opam({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/package-json.ts b/test/updaters/package-json.ts index 90c0c8f42..64d703ea8 100644 --- a/test/updaters/package-json.ts +++ b/test/updaters/package-json.ts @@ -29,7 +29,7 @@ describe('PackageJson', () => { 'utf8' ); const packageJson = new PackageJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), }); const newContent = packageJson.updateContent(oldContent); snapshot(newContent.replace(/\r\n/g, '\n')); diff --git a/test/updaters/package-lock-json.ts b/test/updaters/package-lock-json.ts index 25c07edbe..39b4a72ff 100644 --- a/test/updaters/package-lock-json.ts +++ b/test/updaters/package-lock-json.ts @@ -29,7 +29,7 @@ describe('PackageLockJson', () => { 'utf8' ); const packageJson = new PackageLockJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), }); const newContent = packageJson.updateContent(oldContent); snapshot(newContent.replace(/\r\n/g, '\n')); @@ -43,7 +43,7 @@ describe('PackageLockJson', () => { 'utf8' ); const packageJson = new PackageLockJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), }); const newContent = packageJson.updateContent(oldContent); snapshot(newContent.replace(/\r\n/g, '\n')); @@ -57,7 +57,7 @@ describe('PackageLockJson', () => { 'utf8' ); const packageJson = new PackageLockJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), }); const newContent = packageJson.updateContent(oldContent); snapshot(newContent.replace(/\r\n/g, '\n')); diff --git a/test/updaters/php-client-version.ts b/test/updaters/php-client-version.ts index 6dab5a41c..a6628451a 100644 --- a/test/updaters/php-client-version.ts +++ b/test/updaters/php-client-version.ts @@ -29,7 +29,7 @@ describe('PHPManifest', () => { 'utf8' ).replace(/\r\n/g, '\n'); const composer = new PHPClientVersion({ - version: Version.parse('0.8.0'), + version: Version.parseOne('0.8.0'), }); const newContent = composer.updateContent(oldContent); snapshot(newContent); @@ -40,7 +40,7 @@ describe('PHPManifest', () => { 'utf8' ).replace(/\r\n/g, '\n'); const composer = new PHPClientVersion({ - version: Version.parse('0.8.0'), + version: Version.parseOne('0.8.0'), }); const newContent = composer.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/php-composer-update-packages.ts b/test/updaters/php-composer-update-packages.ts index 8adbcea67..3e36440c3 100644 --- a/test/updaters/php-composer-update-packages.ts +++ b/test/updaters/php-composer-update-packages.ts @@ -23,7 +23,7 @@ describe('PHPComposer', () => { it('does not update a version when version is the same', async () => { const oldContent = '{"version":"1.0.0","replace":{"version":"1.0.0"}}'; - const version = Version.parse('1.0.0'); + const version = Version.parseOne('1.0.0'); const versionsMap: VersionsMap = new Map(); @@ -42,7 +42,7 @@ describe('PHPComposer', () => { it('update all versions in composer.json', async () => { const oldContent = '{"version":"0.0.0","replace":{"version":"0.0.0"}}'; - const version = Version.parse('1.0.0'); + const version = Version.parseOne('1.0.0'); const versionsMap: VersionsMap = new Map(); @@ -63,7 +63,7 @@ describe('PHPComposer', () => { it('update root version in composer.json', async () => { const oldContent = '{"version":"0.0.0"}'; - const version = Version.parse('1.0.0'); + const version = Version.parseOne('1.0.0'); const versionsMap: VersionsMap = new Map(); @@ -82,7 +82,7 @@ describe('PHPComposer', () => { it('update replace version in composer.json when version is present', async () => { const oldContent = '{"replace":{"version":"0.0.0"}}'; - const version = Version.parse('1.0.0'); + const version = Version.parseOne('1.0.0'); const versionsMap: VersionsMap = new Map(); @@ -101,7 +101,7 @@ describe('PHPComposer', () => { it('update replace version in composer.json when version is missing', async () => { const oldContent = '{"replace":{}}'; - const version = Version.parse('1.0.0'); + const version = Version.parseOne('1.0.0'); const versionsMap: VersionsMap = new Map(); diff --git a/test/updaters/pom-xml.ts b/test/updaters/pom-xml.ts index 265c8ff65..6e70af0d7 100644 --- a/test/updaters/pom-xml.ts +++ b/test/updaters/pom-xml.ts @@ -28,7 +28,7 @@ describe('PomXml', () => { resolve(fixturesPath, './pom.xml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new PomXml(Version.parse('v2.3.4')); + const updater = new PomXml(Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); @@ -38,7 +38,7 @@ describe('PomXml', () => { resolve(fixturesPath, './pom-submodule.xml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new PomXml(Version.parse('v2.3.4')); + const updater = new PomXml(Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); @@ -51,11 +51,11 @@ describe('PomXml', () => { const updatedVersions = new Map(); updatedVersions.set( 'com.google.auth:google-auth-library-credentials', - Version.parse('v2.1.3') + Version.parseOne('v2.1.3') ); - updatedVersions.set('com.google.guava:guava', Version.parse('v1.2.4')); + updatedVersions.set('com.google.guava:guava', Version.parseOne('v1.2.4')); - const updater = new PomXml(Version.parse('v2.3.4'), updatedVersions); + const updater = new PomXml(Version.parseOne('v2.3.4'), updatedVersions); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); @@ -65,7 +65,7 @@ describe('PomXml', () => { resolve(fixturesPath, './pom-trailing-newline.xml'), 'utf8' ).replace(/\r\n/g, '\n'); - const updater = new PomXml(Version.parse('v2.3.4')); + const updater = new PomXml(Version.parseOne('v2.3.4')); const newContent = updater.updateContent(oldContent); snapshot(newContent); }); diff --git a/test/updaters/pubspec-yaml.ts b/test/updaters/pubspec-yaml.ts index 3e0a32322..c6a2d86aa 100644 --- a/test/updaters/pubspec-yaml.ts +++ b/test/updaters/pubspec-yaml.ts @@ -29,7 +29,7 @@ describe('PubspecYaml', () => { 'utf8' ).replace(/\r\n/g, '\n'); // required for windows const version = new PubspecYaml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -41,7 +41,7 @@ describe('PubspecYaml', () => { 'utf8' ).replace(/\r\n/g, '\n'); // required for windows const version = new PubspecYaml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -53,7 +53,7 @@ describe('PubspecYaml', () => { 'utf8' ).replace(/\r\n/g, '\n'); // required for windows const version = new PubspecYaml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/pyproject-toml.ts b/test/updaters/pyproject-toml.ts index bbe31913e..53969ea6e 100644 --- a/test/updaters/pyproject-toml.ts +++ b/test/updaters/pyproject-toml.ts @@ -26,7 +26,7 @@ describe('PyProjectToml', () => { it('refuses to update something that is not a valid pyproject', async () => { const oldContent = '[woops]\nindeed = true'; const pyProject = new PyProjectToml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); expect(() => { pyProject.updateContent(oldContent); @@ -36,7 +36,7 @@ describe('PyProjectToml', () => { it('refuses to update when version is missing', async () => { const oldContent = "[project]\nname = 'project'"; const pyProject = new PyProjectToml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); expect(() => { pyProject.updateContent(oldContent); @@ -52,7 +52,7 @@ describe('pyproject-project.toml', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PyProjectToml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -68,7 +68,7 @@ describe('pyproject-poetry.toml', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PyProjectToml({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/python-file-with-version.ts b/test/updaters/python-file-with-version.ts index 0d5ee833c..7c7d19bb7 100644 --- a/test/updaters/python-file-with-version.ts +++ b/test/updaters/python-file-with-version.ts @@ -29,7 +29,7 @@ describe('version.py', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PythonFileWithVersion({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -40,7 +40,7 @@ describe('version.py', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PythonFileWithVersion({ - version: Version.parse('0.5.11'), + version: Version.parseOne('0.5.11'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -56,7 +56,7 @@ describe('project/__init__.py', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PythonFileWithVersion({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -72,7 +72,7 @@ describe('src/project/__init__.py', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new PythonFileWithVersion({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/readme.ts b/test/updaters/readme.ts index f00111504..7f9218c39 100644 --- a/test/updaters/readme.ts +++ b/test/updaters/readme.ts @@ -29,7 +29,7 @@ describe('README.md', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new ReadMe({ - version: Version.parse('2.1.0'), + version: Version.parseOne('2.1.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/root-composer-update-packages.ts b/test/updaters/root-composer-update-packages.ts index 063300d0f..260950666 100644 --- a/test/updaters/root-composer-update-packages.ts +++ b/test/updaters/root-composer-update-packages.ts @@ -25,14 +25,14 @@ describe('composer-update-package.json', () => { describe('updateContent', () => { it('updates all versions in root composer file', async () => { const versions = new Map(); - versions.set('google/cloud-automl', Version.parse('0.8.0')); - versions.set('google/cloud-talent', Version.parse('1.0.0')); + versions.set('google/cloud-automl', Version.parseOne('0.8.0')); + versions.set('google/cloud-talent', Version.parseOne('1.0.0')); const oldContent = readFileSync( resolve(fixturesPath, './composer-update-packages.json'), 'utf8' ).replace(/\r\n/g, '\n'); const composer = new RootComposerUpdatePackages({ - version: Version.parse('1.0.0'), + version: Version.parseOne('1.0.0'), versionsMap: versions, }); const newContent = composer.updateContent(oldContent); diff --git a/test/updaters/ruby/common.ts b/test/updaters/ruby/common.ts index 1ccaf4544..9927c0ce3 100644 --- a/test/updaters/ruby/common.ts +++ b/test/updaters/ruby/common.ts @@ -35,7 +35,7 @@ describe('ruby-common', () => { testTable.forEach(([input, expected]) => { it(`${input} should resolve to ${expected}`, () => { expect( - resolveRubyGemfileLockVersion(Version.parse(input).toString()) + resolveRubyGemfileLockVersion(Version.parseOne(input).toString()) ).to.equal(expected); }); }); @@ -55,7 +55,9 @@ describe('ruby-common', () => { testTable.forEach(([input, expected]) => { it(`${input} should equal ${expected}`, () => { - expect(stringifyRubyVersion(Version.parse(input))).to.equal(expected); + expect(stringifyRubyVersion(Version.parseOne(input))).to.equal( + expected + ); }); }); @@ -73,7 +75,7 @@ describe('ruby-common', () => { testTable.forEach(([input, expected]) => { it(`${input} combined with resolveRubyGemfileLockVersion should equal ${expected}`, () => { - const versionString = stringifyRubyVersion(Version.parse(input)); + const versionString = stringifyRubyVersion(Version.parseOne(input)); expect(resolveRubyGemfileLockVersion(versionString)).to.equal( expected ); @@ -95,14 +97,14 @@ describe('ruby-common', () => { testTable.forEach(([input, expected]) => { it(`${input} should equal ${expected}`, () => { - expect(stringifyRubyVersion(Version.parse(input), true)).to.equal( + expect(stringifyRubyVersion(Version.parseOne(input), true)).to.equal( expected ); }); it(`${input} combined with resolveRubyGemfileLockVersion should equal ${expected}`, () => { const versionString = stringifyRubyVersion( - Version.parse(input), + Version.parseOne(input), true ); expect(resolveRubyGemfileLockVersion(versionString)).to.equal( diff --git a/test/updaters/samples-package-json.ts b/test/updaters/samples-package-json.ts index d4d8b513e..c29681300 100644 --- a/test/updaters/samples-package-json.ts +++ b/test/updaters/samples-package-json.ts @@ -29,7 +29,7 @@ describe('SamplesPackageJson', () => { 'utf8' ); const samplesPackageJson = new SamplesPackageJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), packageName: '@google-cloud/firestore', }); const newContent = samplesPackageJson.updateContent(oldContent); @@ -42,7 +42,7 @@ describe('SamplesPackageJson', () => { 'utf8' ).replace(/\r\n/g, '\n'); const samplesPackageJson = new SamplesPackageJson({ - version: Version.parse('14.0.0'), + version: Version.parseOne('14.0.0'), packageName: '@google-cloud/firestore', }); const newContent = samplesPackageJson.updateContent(oldContent); diff --git a/test/updaters/setup-cfg.ts b/test/updaters/setup-cfg.ts index 3a66fd5f1..5994e2022 100644 --- a/test/updaters/setup-cfg.ts +++ b/test/updaters/setup-cfg.ts @@ -29,7 +29,7 @@ describe('setup.cfg', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new SetupCfg({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -40,7 +40,7 @@ describe('setup.cfg', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new SetupCfg({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/setup-py.ts b/test/updaters/setup-py.ts index 355c1556e..04baadb02 100644 --- a/test/updaters/setup-py.ts +++ b/test/updaters/setup-py.ts @@ -29,7 +29,7 @@ describe('setup.py', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new SetupPy({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/sfdx-project-json.ts b/test/updaters/sfdx-project-json.ts index b94ded96c..e263567c1 100644 --- a/test/updaters/sfdx-project-json.ts +++ b/test/updaters/sfdx-project-json.ts @@ -35,7 +35,7 @@ describe('SfdxProjectJson', () => { const versions = new Map(); const pom = new SfdxProjectJson({ versionsMap: versions, - version: Version.parse('v2.3.4'), + version: Version.parseOne('v2.3.4'), }); const newContent = pom.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/version-go.ts b/test/updaters/version-go.ts index 9a3eea466..99a91ce31 100644 --- a/test/updaters/version-go.ts +++ b/test/updaters/version-go.ts @@ -29,7 +29,7 @@ describe('version.go', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new VersionGo({ - version: Version.parse('0.59.0'), + version: Version.parseOne('0.59.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/version-manifest.ts b/test/updaters/version-manifest.ts index e4f19971e..e29389147 100644 --- a/test/updaters/version-manifest.ts +++ b/test/updaters/version-manifest.ts @@ -73,11 +73,11 @@ describe('VersionManifest', () => { 'utf8' ).replace(/\r\n/g, '\n'); const versions = new Map(); - versions.set('google-cloud-trace', Version.parse('0.109.0')); - versions.set('grpc-google-cloud-trace-v1', Version.parse('0.74.0')); + versions.set('google-cloud-trace', Version.parseOne('0.109.0')); + versions.set('grpc-google-cloud-trace-v1', Version.parseOne('0.74.0')); const javaAuthVersions = new VersionsManifest({ versionsMap: versions, - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), }); const newContent = javaAuthVersions.updateContent(oldContent); snapshot(newContent); diff --git a/test/updaters/version-rb.ts b/test/updaters/version-rb.ts index 21a5daca2..e25e9e9b8 100644 --- a/test/updaters/version-rb.ts +++ b/test/updaters/version-rb.ts @@ -47,7 +47,7 @@ describe('version.rb', () => { shouldUpdate ? 'update' : 'not update' } for ${description}`, () => { const version = new VersionRB({ - version: Version.parse(newVersion), + version: Version.parseOne(newVersion), }); const result = version.updateContent(existingContent); expect(result).to.equal(expected); @@ -61,7 +61,7 @@ describe('version.rb', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new VersionRB({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -75,7 +75,7 @@ describe('version.rb', () => { .replace(/\r\n/g, '\n') .replace(/"/g, "'"); const version = new VersionRB({ - version: Version.parse('0.6.0'), + version: Version.parseOne('0.6.0'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -87,7 +87,7 @@ describe('version.rb', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new VersionRB({ - version: Version.parse('0.6.11'), + version: Version.parseOne('0.6.11'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); @@ -99,7 +99,7 @@ describe('version.rb', () => { 'utf8' ).replace(/\r\n/g, '\n'); const version = new VersionRB({ - version: Version.parse('10.0.0-alpha1'), + version: Version.parseOne('10.0.0-alpha1'), }); const newContent = version.updateContent(oldContent); snapshot(newContent); diff --git a/test/util/branch-name.ts b/test/util/branch-name.ts index c504f682c..1c4b31070 100644 --- a/test/util/branch-name.ts +++ b/test/util/branch-name.ts @@ -155,7 +155,7 @@ describe('BranchName', () => { }); describe('ofVersion', () => { it('builds the autorelease versioned branch name', () => { - const branchName = BranchName.ofVersion(Version.parse('1.2.3')); + const branchName = BranchName.ofVersion(Version.parseOne('1.2.3')); expect(branchName.toString()).to.eql('release-v1.2.3'); }); }); @@ -163,7 +163,7 @@ describe('BranchName', () => { it('builds the autorelease versioned branch name with component', () => { const branchName = BranchName.ofComponentVersion( 'storage', - Version.parse('1.2.3') + Version.parseOne('1.2.3') ); expect(branchName.toString()).to.eql('release-storage-v1.2.3'); }); diff --git a/test/util/pull-request-body.ts b/test/util/pull-request-body.ts index df4fd6ec2..faf666864 100644 --- a/test/util/pull-request-body.ts +++ b/test/util/pull-request-body.ts @@ -128,12 +128,12 @@ describe('PullRequestBody', () => { const data = [ { component: 'pkg1', - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, { component: 'pkg2', - version: Version.parse('2.0.0'), + version: Version.parseOne('2.0.0'), notes: 'more special notes go here', }, ]; @@ -145,7 +145,7 @@ describe('PullRequestBody', () => { const data = [ { component: 'pkg1', - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, ]; @@ -157,7 +157,7 @@ describe('PullRequestBody', () => { const data = [ { component: 'pkg1', - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, ]; @@ -169,12 +169,12 @@ describe('PullRequestBody', () => { const data = [ { component: 'pkg1', - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, { component: 'pkg2', - version: Version.parse('2.0.0'), + version: Version.parseOne('2.0.0'), notes: 'more special notes go here', }, ]; @@ -189,12 +189,12 @@ describe('PullRequestBody', () => { const data = [ { component: 'pkg1', - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, { component: 'pkg2', - version: Version.parse('2.0.0'), + version: Version.parseOne('2.0.0'), notes: 'more special notes go here', }, ]; @@ -213,12 +213,12 @@ describe('PullRequestBody', () => { it('can handle componently entries', () => { const data = [ { - version: Version.parse('1.2.3'), + version: Version.parseOne('1.2.3'), notes: 'some special notes go here', }, { component: 'pkg2', - version: Version.parse('2.0.0'), + version: Version.parseOne('2.0.0'), notes: 'more special notes go here', }, ]; diff --git a/test/util/pull-request-title.ts b/test/util/pull-request-title.ts index 7cecc14f6..14b71e29a 100644 --- a/test/util/pull-request-title.ts +++ b/test/util/pull-request-title.ts @@ -29,8 +29,8 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); expect(pullRequestTitle?.toString()).to.eql(name); }); it('parses a versioned branch name with v', () => { @@ -38,16 +38,16 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a versioned branch name with component', () => { const name = 'chore: release storage v1.2.3'; const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.eql('storage'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.eql('storage'); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); }); @@ -56,8 +56,8 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a target branch and changes branch', () => { @@ -65,8 +65,8 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a target branch and component', () => { @@ -74,8 +74,8 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.eql('storage'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.eql(['storage']); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql(['1.2.3']); }); it('parses a target branch and component with a slash', () => { @@ -83,8 +83,32 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.parse(name); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.eql('some/title-test'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('0.0.1'); + expect(pullRequestTitle?.getComponents()).to.eql(['some/title-test']); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql(['0.0.1']); + }); + + it('parses multiple components separated by commas', () => { + const name = 'releases: sdk 0.1.2, vertex-sdk 2.3.4'; + const pullRequestTitle = PullRequestTitle.parse(name); + expect(pullRequestTitle).to.not.be.undefined; + expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; + expect(pullRequestTitle?.getComponents()).to.eql(['sdk', 'vertex-sdk']); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql([ + '0.1.2', + '2.3.4', + ]); + }); + + it('parses multiple components separated by a space', () => { + const name = 'releases: sdk 0.1.2 vertex-sdk 2.3.4'; + const pullRequestTitle = PullRequestTitle.parse(name); + expect(pullRequestTitle).to.not.be.undefined; + expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; + expect(pullRequestTitle?.getComponents()).to.eql(['sdk', 'vertex-sdk']); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql([ + '0.1.2', + '2.3.4', + ]); }); it('fails to parse', () => { @@ -95,7 +119,7 @@ describe('PullRequestTitle', () => { describe('ofVersion', () => { it('builds the autorelease versioned branch name', () => { const pullRequestTitle = PullRequestTitle.ofVersion( - Version.parse('1.2.3') + Version.parseOne('1.2.3') ); expect(pullRequestTitle.toString()).to.eql('chore: release 1.2.3'); }); @@ -104,7 +128,7 @@ describe('PullRequestTitle', () => { it('builds the autorelease versioned branch name with component', () => { const pullRequestTitle = PullRequestTitle.ofComponentVersion( 'storage', - Version.parse('1.2.3') + Version.parseOne('1.2.3') ); expect(pullRequestTitle.toString()).to.eql( 'chore: release storage 1.2.3' @@ -128,7 +152,7 @@ describe('PullRequestTitle', () => { const pullRequestTitle = PullRequestTitle.ofTargetBranchVersion( 'main', 'main', - Version.parse('1.2.3') + Version.parseOne('1.2.3') ); expect(pullRequestTitle.toString()).to.eql('chore(main): release 1.2.3'); }); @@ -139,7 +163,7 @@ describe('PullRequestTitle', () => { 'foo', 'main', 'main', - Version.parse('1.2.3') + Version.parseOne('1.2.3') ); expect(pullRequestTitle.toString()).to.eql( 'chore(main): release foo 1.2.3' @@ -167,8 +191,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); expect(pullRequestTitle?.toString()).to.eql(name); }); it('parses a versioned branch name with v', () => { @@ -179,8 +203,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a versioned branch name with component', () => { const name = 'chore: 🔖 release storage v1.2.3'; @@ -190,8 +214,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.be.undefined; - expect(pullRequestTitle?.getComponent()).to.eql('storage'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.eql('storage'); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); }); @@ -203,8 +227,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a target branch and component', () => { @@ -215,8 +239,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.eql('storage'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql('1.2.3'); + expect(pullRequestTitle?.getComponents()).to.eql('storage'); + expect(pullRequestTitle?.getVersions()?.toString()).to.eql('1.2.3'); }); it('parses a component with @ sign prefix', () => { @@ -226,7 +250,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle).to.not.be.undefined; - expect(pullRequestTitle?.getComponent()).to.eql('@example/storage'); + expect(pullRequestTitle?.getComponents()).to.eql('@example/storage'); }); it('fails to parse', () => { @@ -245,8 +269,8 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('main'); - expect(pullRequestTitle?.getComponent()).to.be.undefined; - expect(pullRequestTitle?.getVersion()).to.be.undefined; + expect(pullRequestTitle?.getComponents()).to.be.undefined; + expect(pullRequestTitle?.getVersions()).to.be.undefined; }); it('parses a complex title and pattern', () => { @@ -256,16 +280,16 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { ); expect(pullRequestTitle).to.not.be.undefined; expect(pullRequestTitle?.getTargetBranch()).to.eql('hotfix/v3.1.0-bug'); - expect(pullRequestTitle?.getVersion()?.toString()).to.eql( + expect(pullRequestTitle?.getVersions()?.toString()).to.eql( '3.1.0-hotfix1' ); - expect(pullRequestTitle?.getComponent()).to.eql('@example/storage'); + expect(pullRequestTitle?.getComponents()).to.eql('@example/storage'); }); }); describe('ofVersion', () => { it('builds the autorelease versioned branch name', () => { const pullRequestTitle = PullRequestTitle.ofVersion( - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql('chore: 🔖 release 1.2.3'); @@ -275,7 +299,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { it('builds the autorelease versioned branch name with component', () => { const pullRequestTitle = PullRequestTitle.ofComponentVersion( 'storage', - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql( @@ -288,7 +312,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { const pullRequestTitle = PullRequestTitle.ofTargetBranchVersion( 'main', 'main', - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql( @@ -299,7 +323,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { const pullRequestTitle = PullRequestTitle.ofTargetBranchVersion( 'main', 'next', - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql( @@ -313,7 +337,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { 'foo', 'main', 'main', - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql( @@ -325,7 +349,7 @@ describe('PullRequestTitle with custom pullRequestTitlePattern', () => { 'foo', 'main', 'next', - Version.parse('1.2.3'), + Version.parseOne('1.2.3'), 'chore${scope}: 🔖 release${component} ${version}' ); expect(pullRequestTitle.toString()).to.eql( diff --git a/test/version.ts b/test/version.ts index 2daaa965c..1912ba309 100644 --- a/test/version.ts +++ b/test/version.ts @@ -21,7 +21,7 @@ describe('Version', () => { describe('parse', () => { it('can read a plain semver', async () => { const input = '1.23.45'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -31,7 +31,7 @@ describe('Version', () => { }); it('can read a SNAPSHOT version', async () => { const input = '1.23.45-SNAPSHOT'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -41,7 +41,7 @@ describe('Version', () => { }); it('can read a beta version', async () => { const input = '1.23.45-beta'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -51,7 +51,7 @@ describe('Version', () => { }); it('can read a beta SNAPSHOT version', async () => { const input = '1.23.45-beta-SNAPSHOT'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -61,7 +61,7 @@ describe('Version', () => { }); it('can read an lts version', async () => { const input = '1.23.45-sp.1'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -71,7 +71,7 @@ describe('Version', () => { }); it('can read an lts beta version', async () => { const input = '1.23.45-beta-sp.1'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -81,7 +81,7 @@ describe('Version', () => { }); it('can read an lts snapshot version', async () => { const input = '1.23.45-sp.1-SNAPSHOT'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -91,7 +91,7 @@ describe('Version', () => { }); it('can read an lts beta snapshot version', async () => { const input = '1.23.45-beta-sp.1-SNAPSHOT'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -100,7 +100,7 @@ describe('Version', () => { }); it('can read a plain semver with build', async () => { const input = '1.23.45+678'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -110,7 +110,7 @@ describe('Version', () => { }); it('can read a plain semver with alphanumeric build', async () => { const input = '1.23.45+678abc'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -120,7 +120,7 @@ describe('Version', () => { }); it('can read a semver with pre-release and build', async () => { const input = '1.23.45-beta.123+678'; - const version = Version.parse(input); + const version = Version.parseOne(input); expect(version.major).to.equal(1); expect(version.minor).to.equal(23); expect(version.patch).to.equal(45); @@ -131,16 +131,16 @@ describe('Version', () => { }); describe('compare', () => { it('should handle pre-release versions', () => { - const comparison = Version.parse('1.2.3').compare( - Version.parse('1.2.3-alpha') + const comparison = Version.parseOne('1.2.3').compare( + Version.parseOne('1.2.3-alpha') ); expect(comparison).to.eql(1); }); it('should sort in ascending order using compare', () => { const input = [ - Version.parse('1.2.3'), - Version.parse('1.2.3-alpha'), - Version.parse('2.2.0'), + Version.parseOne('1.2.3'), + Version.parseOne('1.2.3-alpha'), + Version.parseOne('2.2.0'), ]; const output = input.sort((a, b) => a.compare(b)); expect(output.map(version => version.toString())).to.eql([ diff --git a/test/versioning-strategies/always-bump-major.ts b/test/versioning-strategies/always-bump-major.ts index 9dae9d444..b79e8570d 100644 --- a/test/versioning-strategies/always-bump-major.ts +++ b/test/versioning-strategies/always-bump-major.ts @@ -57,7 +57,7 @@ describe('AlwaysBumpMajorStrategy', () => { ]; it('bumps major', async () => { const strategy = new AlwaysBumpMajor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); @@ -101,7 +101,7 @@ describe('AlwaysBumpMajorStrategy', () => { ]; it('bumps major for minor', async () => { const strategy = new AlwaysBumpMajor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); @@ -134,7 +134,7 @@ describe('AlwaysBumpMajorStrategy', () => { ]; it('bumps major for patch', async () => { const strategy = new AlwaysBumpMajor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); diff --git a/test/versioning-strategies/always-bump-minor.ts b/test/versioning-strategies/always-bump-minor.ts index 83806778b..4cb897e31 100644 --- a/test/versioning-strategies/always-bump-minor.ts +++ b/test/versioning-strategies/always-bump-minor.ts @@ -57,7 +57,7 @@ describe('AlwaysBumpMinorStrategy', () => { ]; it('bumps minor for major', async () => { const strategy = new AlwaysBumpMinor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); @@ -101,7 +101,7 @@ describe('AlwaysBumpMinorStrategy', () => { ]; it('bumps minor', async () => { const strategy = new AlwaysBumpMinor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); @@ -134,7 +134,7 @@ describe('AlwaysBumpMinorStrategy', () => { ]; it('bumps minor for patch', async () => { const strategy = new AlwaysBumpMinor(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); diff --git a/test/versioning-strategies/default.ts b/test/versioning-strategies/default.ts index 9b0b7a623..b682dd9db 100644 --- a/test/versioning-strategies/default.ts +++ b/test/versioning-strategies/default.ts @@ -57,21 +57,21 @@ describe('DefaultVersioningStrategy', () => { ]; it('can bump a major', async () => { const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); it('can bump a major on pre major for breaking change', async () => { const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.0.0'); }); it('can bump a minor pre major for breaking change', async () => { const strategy = new DefaultVersioningStrategy({bumpMinorPreMajor: true}); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -115,13 +115,13 @@ describe('DefaultVersioningStrategy', () => { ]; it('can bump a minor', async () => { const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); it('can bump a minor pre-major', async () => { const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -129,7 +129,7 @@ describe('DefaultVersioningStrategy', () => { const strategy = new DefaultVersioningStrategy({ bumpPatchForMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.1.3'); }); @@ -162,7 +162,7 @@ describe('DefaultVersioningStrategy', () => { ]; it('can bump a patch', async () => { const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.2.4'); }); @@ -206,7 +206,7 @@ describe('DefaultVersioningStrategy', () => { }, ]; const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('3.1.2'); }); @@ -258,7 +258,7 @@ describe('DefaultVersioningStrategy', () => { }, ]; const strategy = new DefaultVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('3.1.2'); }); diff --git a/test/versioning-strategies/dependency-manifest.ts b/test/versioning-strategies/dependency-manifest.ts index 1de23910f..ca6975708 100644 --- a/test/versioning-strategies/dependency-manifest.ts +++ b/test/versioning-strategies/dependency-manifest.ts @@ -57,21 +57,21 @@ describe('DependencyManifest', () => { ]; it('can bump a major', async () => { const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); it('can bump a major on pre major for breaking change', async () => { const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.0.0'); }); it('can bump a minor pre major for breaking change', async () => { const strategy = new DependencyManifest({bumpMinorPreMajor: true}); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -115,13 +115,13 @@ describe('DependencyManifest', () => { ]; it('can bump a minor', async () => { const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); it('can bump a minor pre-major', async () => { const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -129,7 +129,7 @@ describe('DependencyManifest', () => { const strategy = new DependencyManifest({ bumpPatchForMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.1.3'); }); @@ -162,7 +162,7 @@ describe('DependencyManifest', () => { ]; it('can bump a patch', async () => { const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.2.4'); }); @@ -184,7 +184,7 @@ describe('DependencyManifest', () => { }, ]; const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.2.4'); }); @@ -203,7 +203,7 @@ describe('DependencyManifest', () => { }, ]; const strategy = new DependencyManifest({}); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('1.3.0'); }); @@ -224,7 +224,7 @@ describe('DependencyManifest', () => { const strategy = new DependencyManifest({ bumpPatchForMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.1.3'); }); @@ -245,7 +245,7 @@ describe('DependencyManifest', () => { const strategy = new DependencyManifest({ bumpMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -266,7 +266,7 @@ describe('DependencyManifest', () => { const strategy = new DependencyManifest({ bumpMinorPreMajor: true, }); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('2.0.0'); }); diff --git a/test/versioning-strategies/java-add-snapshot.ts b/test/versioning-strategies/java-add-snapshot.ts index ed9a576f9..001a06c05 100644 --- a/test/versioning-strategies/java-add-snapshot.ts +++ b/test/versioning-strategies/java-add-snapshot.ts @@ -25,7 +25,7 @@ describe('JavaAddSnapshot', () => { describe('with DefaultVersioning', () => { it('should bump to snapshot', async () => { const strategy = new JavaAddSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, []); expect(newVersion.toString()).to.equal('1.2.4-SNAPSHOT'); }); @@ -36,7 +36,7 @@ describe('JavaAddSnapshot', () => { const strategy = new JavaAddSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, []); expect(newVersion.toString()).to.equal('1.2.3-sp.1-SNAPSHOT'); }); @@ -45,7 +45,7 @@ describe('JavaAddSnapshot', () => { const strategy = new JavaAddSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('1.2.3-sp.1'); + const oldVersion = Version.parseOne('1.2.3-sp.1'); const newVersion = await strategy.bump(oldVersion, []); expect(newVersion.toString()).to.equal('1.2.3-sp.2-SNAPSHOT'); }); @@ -54,7 +54,7 @@ describe('JavaAddSnapshot', () => { describe('with AlwaysBumpPatch', () => { it('should bump to snapshot', async () => { const strategy = new JavaAddSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, []); expect(newVersion.toString()).to.equal('1.2.4-SNAPSHOT'); }); diff --git a/test/versioning-strategies/java.ts b/test/versioning-strategies/java.ts index 969214298..95faac2c5 100644 --- a/test/versioning-strategies/java.ts +++ b/test/versioning-strategies/java.ts @@ -121,14 +121,14 @@ describe('JavaVersioningStrategy', () => { describe('with breaking change', () => { it('can bump a major', async () => { const strategy = new JavaSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('2.0.0'); }); it('can bump a major on pre major for breaking change', async () => { const strategy = new JavaSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('1.0.0'); }); @@ -137,7 +137,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new DefaultVersioningStrategy({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -146,13 +146,13 @@ describe('JavaVersioningStrategy', () => { describe('with a feature', () => { it('can bump a minor', async () => { const strategy = new JavaSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('1.3.0'); }); it('can bump a minor pre-major', async () => { const strategy = new JavaSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -162,7 +162,7 @@ describe('JavaVersioningStrategy', () => { bumpPatchForMinorPreMajor: true, }) ); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -171,7 +171,7 @@ describe('JavaVersioningStrategy', () => { describe('with a fix', () => { it('can bump a patch', async () => { const strategy = new JavaSnapshot(new DefaultVersioningStrategy({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('1.2.3'); }); @@ -184,7 +184,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('1.2.3-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('1.2.3-sp.1'); }); @@ -193,7 +193,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -202,7 +202,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -213,7 +213,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('1.2.3-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('1.2.3-sp.1'); }); @@ -222,7 +222,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -231,7 +231,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -242,7 +242,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('1.2.3-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('1.2.3-sp.1'); }); @@ -251,7 +251,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -260,7 +260,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new ServicePackVersioningStrategy({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-sp.1-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-sp.1-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('0.1.2-sp.1'); }); @@ -271,14 +271,14 @@ describe('JavaVersioningStrategy', () => { describe('with breaking change', () => { it('can bump a major', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('1.2.3'); }); it('can bump a major on pre major for breaking change', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -287,7 +287,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new AlwaysBumpPatch({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, breakingCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -296,14 +296,14 @@ describe('JavaVersioningStrategy', () => { describe('with a feature', () => { it('can bump a minor', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('1.2.3'); }); it('can bump a minor on pre major for breaking change', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -312,7 +312,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new AlwaysBumpPatch({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, featureCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -321,14 +321,14 @@ describe('JavaVersioningStrategy', () => { describe('with a fix', () => { it('can bump a patch', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('1.2.3-SNAPSHOT'); + const oldVersion = Version.parseOne('1.2.3-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('1.2.3'); }); it('can bump a patch on pre major for breaking change', async () => { const strategy = new JavaSnapshot(new AlwaysBumpPatch({})); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); @@ -337,7 +337,7 @@ describe('JavaVersioningStrategy', () => { const strategy = new JavaSnapshot( new AlwaysBumpPatch({bumpMinorPreMajor: true}) ); - const oldVersion = Version.parse('0.1.2-SNAPSHOT'); + const oldVersion = Version.parseOne('0.1.2-SNAPSHOT'); const newVersion = await strategy.bump(oldVersion, fixCommits); expect(newVersion.toString()).to.equal('0.1.2'); }); diff --git a/test/versioning-strategies/prerelease.ts b/test/versioning-strategies/prerelease.ts index 45b38b241..55ff7a66c 100644 --- a/test/versioning-strategies/prerelease.ts +++ b/test/versioning-strategies/prerelease.ts @@ -68,7 +68,7 @@ describe('PrereleaseVersioningStrategy', () => { const expected = expectedBumps[old]; it(`can bump ${old} to ${expected}`, async () => { const strategy = new PrereleaseVersioningStrategy(); - const oldVersion = Version.parse(old); + const oldVersion = Version.parseOne(old); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal(expected); }); @@ -77,7 +77,7 @@ describe('PrereleaseVersioningStrategy', () => { const strategy = new PrereleaseVersioningStrategy({ bumpMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.2.0'); }); @@ -132,7 +132,7 @@ describe('PrereleaseVersioningStrategy', () => { const expected = expectedBumps[old]; it(`can bump ${old} to ${expected}`, async () => { const strategy = new PrereleaseVersioningStrategy(); - const oldVersion = Version.parse(old); + const oldVersion = Version.parseOne(old); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal(expected); }); @@ -141,7 +141,7 @@ describe('PrereleaseVersioningStrategy', () => { const strategy = new PrereleaseVersioningStrategy({ bumpPatchForMinorPreMajor: true, }); - const oldVersion = Version.parse('0.1.2'); + const oldVersion = Version.parseOne('0.1.2'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('0.1.3'); }); @@ -187,7 +187,7 @@ describe('PrereleaseVersioningStrategy', () => { const expected = expectedBumps[old]; it(`can bump ${old} to ${expected}`, async () => { const strategy = new PrereleaseVersioningStrategy(); - const oldVersion = Version.parse(old); + const oldVersion = Version.parseOne(old); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal(expected); }); @@ -232,7 +232,7 @@ describe('PrereleaseVersioningStrategy', () => { }, ]; const strategy = new PrereleaseVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('3.1.2'); }); @@ -284,7 +284,7 @@ describe('PrereleaseVersioningStrategy', () => { }, ]; const strategy = new PrereleaseVersioningStrategy(); - const oldVersion = Version.parse('1.2.3'); + const oldVersion = Version.parseOne('1.2.3'); const newVersion = await strategy.bump(oldVersion, commits); expect(newVersion.toString()).to.equal('3.1.2'); });