From b122fe8862d381fa6b66b34eee5640a465d49c2a Mon Sep 17 00:00:00 2001 From: Atte Huhtakangas Date: Mon, 13 Nov 2023 16:25:16 +0000 Subject: [PATCH] fix(npm): mark releases as latest with lerna --- plugins/npm/__tests__/npm.test.ts | 8 ++++++-- plugins/npm/src/index.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/npm/__tests__/npm.test.ts b/plugins/npm/__tests__/npm.test.ts index 266417a7a..1921741ef 100644 --- a/plugins/npm/__tests__/npm.test.ts +++ b/plugins/npm/__tests__/npm.test.ts @@ -1684,12 +1684,16 @@ describe("makeRelease", () => { expect(publish).toHaveBeenCalledWith( "update package 1", "@packages/a", - false + false, + undefined, + true ); expect(publish).toHaveBeenCalledWith( "update package 2", "@packages/b", - false + false, + undefined, + true ); }); }); diff --git a/plugins/npm/src/index.ts b/plugins/npm/src/index.ts index e56dfe3d5..3694d24f9 100644 --- a/plugins/npm/src/index.ts +++ b/plugins/npm/src/index.ts @@ -1580,7 +1580,7 @@ export default class NPMPlugin implements IPlugin { auto.logger.log.info(`Using release notes:\n${releaseNotes}`); // 2. make a release for just that package - return auto.git?.publish(releaseNotes, tag, options.isPrerelease); + return auto.git?.publish(releaseNotes, tag, options.isPrerelease, undefined, !options.isPrerelease); }) );