happy 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. package/index.js +10 -3
  2. package/package.json +1 -1
  3. package/src/test.js +2 -1
package/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import listr from "listr";
4
4
  import meow from "meow";
5
+
5
6
  import {
6
7
  analyze,
7
8
  build,
@@ -88,6 +89,12 @@ if (flags.publish) {
88
89
 
89
90
  const tasks = new listr(action.map((task) => task({ flags, input })));
90
91
 
91
- analyze()
92
- .then((ctx) => tasks.run(ctx))
93
- .catch((error) => console.error(error));
92
+ try {
93
+ const ctx = await analyze();
94
+ await tasks.run(ctx);
95
+ } catch (error) {
96
+ console.log("Failed...");
97
+ setTimeout(() => {
98
+ console.log(error.stdout?.trim?.(), "\n\n", error.message?.trim?.());
99
+ }, 1000);
100
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Happy simplifies your day-to-day git workflow",
5
5
  "author": "Francisco Presencia <public@francisco.io> (https://francisco.io/)",
6
6
  "funding": {
package/src/test.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import cmd from "atocha";
2
+
2
3
  import { stderrok } from "./helpers.js";
3
4
 
4
5
  const ci = "export CI=true || set CI=true&&";
@@ -9,5 +10,5 @@ export default (cli) => ({
9
10
  if (!ctx.pkg) return true;
10
11
  if (!ctx.pkg.scripts.test) return true;
11
12
  },
12
- task: async (ctx) => cmd(`${ci} npm run test`).catch(stderrok),
13
+ task: async () => cmd(`${ci} npm run test`).catch(stderrok),
13
14
  });