backport 7.3.3 → 7.3.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.
@@ -81,18 +81,8 @@ async function backportRun(processArgs, optionsFromModule = {}) {
81
81
  backportResponse,
82
82
  });
83
83
  }
84
- if (e instanceof HandledError_1.HandledError || e instanceof apiRequestV4_1.GithubV4Exception) {
85
- (0, logger_1.consoleLog)(e.message);
86
- }
87
- else if (e instanceof Error) {
88
- // output
89
- (0, logger_1.consoleLog)('\n');
90
- (0, logger_1.consoleLog)(chalk_1.default.bold('⚠️ Ouch! An unhandled error occured 😿'));
91
- (0, logger_1.consoleLog)(e.stack ? e.stack : e.message);
92
- (0, logger_1.consoleLog)('Please open an issue in https://github.com/sqren/backport/issues or contact me directly on https://twitter.com/sorenlouv');
93
- (0, logger_1.consoleLog)(chalk_1.default.italic(`For additional details see the logs: ${(0, env_1.getLogfilePath)({
94
- logFilePath,
95
- })}`));
84
+ if (!options?.ls) {
85
+ outputError({ e, logFilePath });
96
86
  }
97
87
  logger_1.logger.error('Unhandled exception', e);
98
88
  process.exitCode = 1;
@@ -100,3 +90,19 @@ async function backportRun(processArgs, optionsFromModule = {}) {
100
90
  }
101
91
  }
102
92
  exports.backportRun = backportRun;
93
+ function outputError({ e, logFilePath, }) {
94
+ if (e instanceof HandledError_1.HandledError || e instanceof apiRequestV4_1.GithubV4Exception) {
95
+ (0, logger_1.consoleLog)(e.message);
96
+ return;
97
+ }
98
+ if (e instanceof Error) {
99
+ // output
100
+ (0, logger_1.consoleLog)('\n');
101
+ (0, logger_1.consoleLog)(chalk_1.default.bold('⚠️ Ouch! An unhandled error occured 😿'));
102
+ (0, logger_1.consoleLog)(e.stack ? e.stack : e.message);
103
+ (0, logger_1.consoleLog)('Please open an issue in https://github.com/sqren/backport/issues or contact me directly on https://twitter.com/sorenlouv');
104
+ (0, logger_1.consoleLog)(chalk_1.default.italic(`For additional details see the logs: ${(0, env_1.getLogfilePath)({
105
+ logFilePath,
106
+ })}`));
107
+ }
108
+ }
@@ -63,7 +63,12 @@ async function getCommits(options) {
63
63
  });
64
64
  }
65
65
  catch (e) {
66
- spinner.fail();
66
+ if (options.ls) {
67
+ spinner.stop();
68
+ }
69
+ else {
70
+ spinner.fail();
71
+ }
67
72
  throw e;
68
73
  }
69
74
  }
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "7.3.3";
1
+ export declare const PACKAGE_VERSION = "7.3.4";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PACKAGE_VERSION = void 0;
4
- exports.PACKAGE_VERSION = '7.3.3';
4
+ exports.PACKAGE_VERSION = '7.3.4';
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "branches",
15
15
  "branching"
16
16
  ],
17
- "version": "7.3.3",
17
+ "version": "7.3.4",
18
18
  "main": "./dist/entrypoint.module.js",
19
19
  "types": "dist/entrypoint.module.d.ts",
20
20
  "bin": {