From 8c165ce4f5694a7f0b0ecd82043e2f5985b71498 Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Mon, 26 Dec 2022 15:48:51 +0000 Subject: [PATCH 1/7] 5.0.7 -> 5.0.8-SNAPSHOT --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0043336..16fc02b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.7 +5.0.8-SNAPSHOT From 62fe35356818b86c7abf552de7415c96d5c0183f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 18:50:41 +0300 Subject: [PATCH 2/7] Bump minimist from 1.2.5 to 1.2.6 (#132) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 101ab6f466fe3174f3950c3e42a25b4d0b1bc519 Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Mon, 23 Jan 2023 21:41:27 +0300 Subject: [PATCH 3/7] EPMRPP-81509 || Add mergeOptions to mergeLaunches --- lib/report-portal-client.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/report-portal-client.js b/lib/report-portal-client.js index 5ce75a8..85d60ab 100644 --- a/lib/report-portal-client.js +++ b/lib/report-portal-client.js @@ -278,26 +278,34 @@ class RPClient { * * @Returns {Object} - an object which contains a data for merge launches in ReportPortal. */ - getMergeLaunchesRequest(launchIds) { + getMergeLaunchesRequest(launchIds, mergeOptions = {}) { return { - description: 'Merged launch', - endTime: this.helpers.now(), - extendSuitesDescription: true, launches: launchIds, mergeType: 'BASIC', - mode: 'DEFAULT', + description: this.config.description || 'Merged launch', + mode: this.config.mode || 'DEFAULT', name: this.config.launch || 'Test launch name', attributes: this.config.attributes, + endTime: this.helpers.now(), + extendSuitesDescription: true, + ...mergeOptions, }; } - /* + /** * This method is used for merge launches in ReportPortal. - * + * @param {Object} mergeOptions - options for merge request, can override default options. + * mergeOptions should look like this + * { + * "extendSuitesDescription": boolean, + * "description": string, + * "mergeType": 'BASIC' | 'DEEP', + * "name": string + * } * Please, keep in mind that this method is work only in case * the option isLaunchMergeRequired is true. */ - mergeLaunches() { + mergeLaunches(mergeOptions= {}) { if (this.isLaunchMergeRequired) { const launchUUIds = helpers.readLaunchesFromFile(); const params = new URLSearchParams({ @@ -319,7 +327,7 @@ class RPClient { }, ) .then((launchIds) => { - const request = this.getMergeLaunchesRequest(launchIds); + const request = this.getMergeLaunchesRequest(launchIds, mergeOptions); this.logDebug(`Merge launches with ids: ${launchIds}`, request); const mergeURL = 'launch/merge'; return this.restClient.create(mergeURL, request, { headers: this.headers }); From 95121d8d1d000d68162c06047b1c1f088d92ba21 Mon Sep 17 00:00:00 2001 From: Janis Dzalbe Date: Tue, 24 Jan 2023 09:51:52 +0200 Subject: [PATCH 4/7] Use dynamic page size in launch merge (#103) Fix issue when only first 20 launches is merged --- lib/report-portal-client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/report-portal-client.js b/lib/report-portal-client.js index 5ce75a8..c7b5785 100644 --- a/lib/report-portal-client.js +++ b/lib/report-portal-client.js @@ -302,6 +302,7 @@ class RPClient { const launchUUIds = helpers.readLaunchesFromFile(); const params = new URLSearchParams({ 'filter.in.uuid': launchUUIds, + 'page.size': launchUUIds.length, }); const launchSearchUrl = `launch?${params.toString()}`; this.logDebug(`Find launches with UUIDs to merge: ${launchUUIds}`); From 2b13ec7f743588ec1a0209a0c2b581683540a00f Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Tue, 24 Jan 2023 10:52:30 +0300 Subject: [PATCH 5/7] EPMRPP-81509 || Update jsdoc --- lib/report-portal-client.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/report-portal-client.js b/lib/report-portal-client.js index 85d60ab..070053a 100644 --- a/lib/report-portal-client.js +++ b/lib/report-portal-client.js @@ -304,6 +304,8 @@ class RPClient { * } * Please, keep in mind that this method is work only in case * the option isLaunchMergeRequired is true. + * + * @Returns {Promise} */ mergeLaunches(mergeOptions= {}) { if (this.isLaunchMergeRequired) { From 6685d40ed332e82da678f7bd513ce2ac70a41af6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Jan 2023 20:07:11 +0300 Subject: [PATCH 6/7] Bump json5 from 1.0.1 to 1.0.2 (#144) Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9db5184..1cac315 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,9 +62,9 @@ } }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "semver": { @@ -2233,9 +2233,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" From a5f36f8ebc5bf786e10d74d46fc993a13fcd68de Mon Sep 17 00:00:00 2001 From: Ilya Hancharyk Date: Tue, 24 Jan 2023 20:15:04 +0300 Subject: [PATCH 7/7] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5102518..fa27a63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### Added +- `mergeOptions` parameter to `mergeLaunches` method. +- Dynamic page size for launch merge based on launches count, resolves [#86](https://github.com/reportportal/client-javascript/issues/86). +### Security +- Updated versions of vulnerable packages (json5, minimist). ## [5.0.7] - 2022-12-26 ### Added