Skip to content

Commit c1d115d

Browse files
Merge pull request #1539 from salesforcecli/d/W-11741114-b
fix: replace standard-version with commit-and-tag-version @W-11741114@
2 parents 6774e37 + d202a64 commit c1d115d

File tree

4 files changed

+406
-174
lines changed

4 files changed

+406
-174
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"@salesforce/ts-types": "^2.0.10",
2323
"aws-sdk": "^2.1692.0",
2424
"chalk": "^5.6.0",
25+
"commit-and-tag-version": "^12.6.0",
2526
"fast-glob": "^3.3.3",
2627
"got": "^13",
2728
"just-diff": "^5.2.0",
2829
"proxy-agent": "^6.4.0",
2930
"semver": "^7.7.2",
3031
"shelljs": "^0.10.0",
31-
"standard-version": "^9.5.0",
3232
"strip-ansi": "^6",
3333
"yarn-deduplicate": "^6.0.2"
3434
},

src/repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ export class PackageRepo extends Repository {
195195
);
196196
return this.package.packageJson.version;
197197
} else {
198-
this.logger.debug('Using standard-version to determine next version');
199-
let command = 'npx standard-version --dry-run --skip.tag --skip.commit --skip.changelog';
198+
this.logger.debug('Using commit-and-tag-version to determine next version');
199+
let command = 'npx commit-and-tag-version --dry-run --skip.tag --skip.commit --skip.changelog';
200200
// It can be an empty string if they want
201201
if (isString(this.options?.useprerelease)) {
202202
command += ` --prerelease ${this.options?.useprerelease}`;

test/repository.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('PackageRepo', () => {
4242
expect(repo.nextVersion).to.equal('2.0.0');
4343
});
4444

45-
it('should use standard-version to determine the next version if the version in the package.json already exists', async () => {
45+
it('should use commit-and-tag-version to determine the next version if the version in the package.json already exists', async () => {
4646
stubMethod($$.SANDBOX, Package.prototype, 'readPackageJson').returns(
4747
Promise.resolve({ name: pkgName, version: '1.0.0' })
4848
);
@@ -51,7 +51,7 @@ describe('PackageRepo', () => {
5151
expect(repo.nextVersion).to.equal('1.1.0');
5252
});
5353

54-
it('should use standard-version to determine a prerelease version', async () => {
54+
it('should use commit-and-tag-version to determine a prerelease version', async () => {
5555
stubMethod($$.SANDBOX, Package.prototype, 'readPackageJson').returns(
5656
Promise.resolve({ name: pkgName, version: '1.0.0' })
5757
);
@@ -61,7 +61,7 @@ describe('PackageRepo', () => {
6161
expect(execStub.args[0][0]).to.include('--prerelease');
6262
});
6363

64-
it('should use standard-version to determine a specific prerelease version', async () => {
64+
it('should use commit-and-tag-version to determine a specific prerelease version', async () => {
6565
stubMethod($$.SANDBOX, Package.prototype, 'readPackageJson').returns(
6666
Promise.resolve({ name: pkgName, version: '1.0.0' })
6767
);

0 commit comments

Comments
 (0)