qase-javascript-commons 2.2.17 → 2.2.18

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
+ # qase-javascript-commons@2.2.18
2
+
3
+ ## What's new
4
+
5
+ Resolved an issue where retrieving installed package versions failed if some dependencies were missing.
6
+
1
7
  # qase-javascript-commons@2.2.17
2
8
 
3
9
  ## What's new
@@ -119,9 +119,15 @@ function getPackageVersion(packageName) {
119
119
  return packageJson.version;
120
120
  }
121
121
  // Try using npm list as fallback with recursive search
122
- const output = execCommand(`npm list --depth=10 --json`);
123
- if (!output)
122
+ let output = null;
123
+ try {
124
+ output = execCommand(`npm list --depth=10 --json`);
125
+ if (!output)
126
+ return null;
127
+ }
128
+ catch (error) {
124
129
  return null;
130
+ }
125
131
  try {
126
132
  const npmList = JSON.parse(output);
127
133
  // Try direct dependency
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",