@cmflow/cli 2.0.0-rc.3 → 2.0.0

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "2.0.0-rc.3",
3
+ "version": "2.0.0",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -34,5 +34,6 @@ export default defineConfig({
34
34
  publish: ["./src/semantic/core/sync-repository.js", "@semantic-release/github"],
35
35
  success: ["@semantic-release/github"],
36
36
  fail: ["@semantic-release/github"],
37
- npmPublish: false
37
+ npmPublish: false,
38
+ writerOpts: {}
38
39
  });
@@ -1,7 +1,13 @@
1
1
  import fs from "fs";
2
2
 
3
3
  export function getPackageJson() {
4
- const content = fs.readFileSync(`${process.cwd()}/package.json`, { encoding: "utf8" });
4
+ try {
5
+ const content = fs.readFileSync(`${process.cwd()}/package.json`, { encoding: "utf8" });
5
6
 
6
- return JSON.parse(content);
7
+ return JSON.parse(content);
8
+ } catch {
9
+ return {
10
+ name: "@clubmed/root"
11
+ };
12
+ }
7
13
  }
@@ -45,7 +45,7 @@ async function runAll(step, pluginConfig, context, defaultCondition) {
45
45
  await taskFunction(pluginConfig, context);
46
46
  context.logger.success(` Completed conditional step "${step}" of plugin "${task}"`);
47
47
  } catch (er) {
48
- context.logger.fail(` Fail conditional step "${step}" of plugin "${task}"`);
48
+ context.logger.error(` Fail conditional step "${step}" of plugin "${task}"`);
49
49
  throw er;
50
50
  }
51
51
  }