cucumberjs-qase-reporter 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # cucumberjs-qase-reporter@2.4.4
2
+
3
+ ## Fixed
4
+
5
+ - Qase test case IDs that are `<= 0` (e.g. `@Q0` or `@QaseID=0`) are now dropped with a warning instead of being sent to the API, which previously rejected the whole batch with HTTP 400. Bumped `qase-javascript-commons` pin to `~2.7.4`.
6
+
1
7
  # cucumberjs-qase-reporter@2.4.3
2
8
 
3
9
  ## Fixed
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TagParser = void 0;
4
4
  const qase_javascript_commons_1 = require("qase-javascript-commons");
5
+ const internal_1 = require("qase-javascript-commons/internal");
5
6
  const qaseIdRegExp = /^@[Qq]-?(\d+)$/;
6
7
  const newQaseIdRegExp = /^@[Qq]ase[Ii][Dd]=(\d+(?:,\s*\d+)*)$/;
7
8
  const qaseTitleRegExp = /^@[Qq]ase[Tt]itle=(.+)$/;
@@ -28,12 +29,12 @@ class TagParser {
28
29
  };
29
30
  for (const tag of tags) {
30
31
  if (qaseIdRegExp.test(tag.name)) {
31
- metadata.ids.push(Number(tag.name.replace(/^@[Qq]-?/, '')));
32
+ metadata.ids.push(...(0, internal_1.filterPositiveIds)([Number(tag.name.replace(/^@[Qq]-?/, ''))]));
32
33
  continue;
33
34
  }
34
35
  if (newQaseIdRegExp.test(tag.name)) {
35
36
  const idsStr = tag.name.replace(/^@[Qq]ase[Ii][Dd]=/, '');
36
- metadata.ids.push(...idsStr.split(',').map((s) => Number(s.trim())));
37
+ metadata.ids.push(...(0, internal_1.filterPositiveIds)(idsStr.split(',').map((s) => Number(s.trim()))));
37
38
  continue;
38
39
  }
39
40
  if (qaseTitleRegExp.test(tag.name)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cucumberjs-qase-reporter",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "Qase TMS CucumberJS Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "main": "./dist/index.js",
@@ -41,7 +41,7 @@
41
41
  "license": "Apache-2.0",
42
42
  "dependencies": {
43
43
  "@cucumber/messages": "^22.0.0",
44
- "qase-javascript-commons": "~2.7.3"
44
+ "qase-javascript-commons": "~2.7.4"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@cucumber/cucumber": ">=7.0.0"