happy 1.0.0 → 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.
- package/index.js +10 -3
- package/package.json +1 -1
- package/src/publish.js +2 -1
- 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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
package/src/publish.js
CHANGED
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 (
|
|
13
|
+
task: async () => cmd(`${ci} npm run test`).catch(stderrok),
|
|
13
14
|
});
|