Skip to content

Commit

Permalink
fix: proper fix to pass on nextVersionCommand
Browse files Browse the repository at this point in the history
I missed a location in the previous PR. Added a test to confirm.
  • Loading branch information
rix0rrr committed Dec 16, 2024
1 parent 389f239 commit 612473a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/yarn/typescript-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export class TypeScriptWorkspace extends typescript.TypeScriptProject {
private: this.isPrivatePackage,
workflowNodeVersion: this.nodeVersion,
releasableCommits: options.releasableCommits,
nextVersionCommand: options.nextVersionCommand,
});

// jest config
Expand Down
19 changes: 19 additions & 0 deletions test/cdklabs-monorepo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,23 @@ describe('CdkLabsMonorepo', () => {
expect(releaseWorkflow.jobs['cdklabs-one_release_github'].needs).toStrictEqual(['release', 'cdklabs-one_release_npm']);
expect(outdir).toMatchSnapshot();
});

test('monorepo release with nextVersionCommand', () => {
const parent = new yarn.CdkLabsMonorepo({
name: 'monorepo',
defaultReleaseBranch: 'main',
release: true,
});

new yarn.TypeScriptWorkspace({
parent,
name: '@cdklabs/one',
nextVersionCommand: 'asdf',
});

const outdir = Testing.synth(parent);
const tasks = outdir['packages/@cdklabs/one/.projen/tasks.json'];

expect(tasks.tasks.bump.env.NEXT_VERSION_COMMAND).toStrictEqual('asdf');
});
});

0 comments on commit 612473a

Please sign in to comment.