qase-javascript-commons 2.2.17 → 2.2.19

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
@@ -28,6 +28,7 @@ const os = __importStar(require("os"));
28
28
  const cp = __importStar(require("child_process"));
29
29
  const fs = __importStar(require("fs"));
30
30
  const path = __importStar(require("path"));
31
+ const child_process_1 = require("child_process");
31
32
  /**
32
33
  * Gets detailed OS information based on the platform
33
34
  * @returns {string} Detailed OS information
@@ -119,9 +120,15 @@ function getPackageVersion(packageName) {
119
120
  return packageJson.version;
120
121
  }
121
122
  // Try using npm list as fallback with recursive search
122
- const output = execCommand(`npm list --depth=10 --json`);
123
- if (!output)
123
+ let output = null;
124
+ try {
125
+ output = (0, child_process_1.execSync)(`npm list --depth=10 --json`, { stdio: "pipe" }).toString();
126
+ if (!output)
127
+ return null;
128
+ }
129
+ catch (error) {
124
130
  return null;
131
+ }
125
132
  try {
126
133
  const npmList = JSON.parse(output);
127
134
  // 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.19",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",