diff --git a/src/yarn/typescript-workspace.ts b/src/yarn/typescript-workspace.ts index 4eeb90c..d5765f3 100644 --- a/src/yarn/typescript-workspace.ts +++ b/src/yarn/typescript-workspace.ts @@ -110,6 +110,7 @@ export class TypeScriptWorkspace extends typescript.TypeScriptProject { private: this.isPrivatePackage, workflowNodeVersion: this.nodeVersion, releasableCommits: options.releasableCommits, + nextVersionCommand: options.nextVersionCommand, }); // jest config diff --git a/test/cdklabs-monorepo.test.ts b/test/cdklabs-monorepo.test.ts index 7283e47..6da9d1a 100644 --- a/test/cdklabs-monorepo.test.ts +++ b/test/cdklabs-monorepo.test.ts @@ -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'); + }); });