autorel 2.0.4 → 2.1.1

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/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ console.log('----------------------------');
17
17
  program
18
18
  .version(packageJson.version, '-v, --version')
19
19
  .description('An example CLI for managing a directory')
20
- .option('--dryRun', 'Do a dry run (arg: dryRun)')
20
+ .option('--dry-run', 'Do a dry run (arg: dryRun)')
21
21
  .option('--pre-release <value>', 'Pre-release channel. If specified, the release will be marked as a pre-release. Overrides branches configuration. (arg: preRelease)')
22
22
  .option('--use-version <value>', 'Specify a version to be used instead of calculating it from commit analysis. Must be a valid SemVer version, with no \'v\'. Overrides --pre-release, commitType, and branches configuration. (arg: useVersion)')
23
23
  .option('--run <value>', 'Command to run after the release is successful. (arg: run)')
@@ -33,14 +33,14 @@ const cliOptions = {
33
33
  publish: options.publish,
34
34
  skipRelease: options.skipRelease,
35
35
  };
36
- const config = (0, config_1.getConfig)(cliOptions);
36
+ output_1.default.debug(`CLI Options: ${JSON.stringify(cliOptions, null, 2)}`);
37
37
  // remove falsy values from the overrides
38
- if (config) {
39
- Object.keys(config).forEach((key) => (
38
+ if (cliOptions) {
39
+ Object.keys(cliOptions).forEach((key) => (
40
40
  // @ts-ignore
41
- !config[key] && delete config[key]));
41
+ !cliOptions[key] && delete cliOptions[key]));
42
42
  }
43
- output_1.default.debug(`CLI Options: ${JSON.stringify(cliOptions, null, 2)}`);
43
+ const config = (0, config_1.getConfig)(cliOptions);
44
44
  output_1.default.debug(`Config: ${JSON.stringify(config, null, 2)}`);
45
45
  (0, _1.autorel)(config);
46
46
  //# sourceMappingURL=cli.js.map
package/dist/config.js CHANGED
@@ -85,10 +85,11 @@ function readAutorelYaml(filePath = '.autorel.yaml') {
85
85
  return parsedData;
86
86
  }
87
87
  function getConfig(overrides) {
88
- const localConfig = readAutorelYaml();
88
+ const yamlConfig = readAutorelYaml();
89
+ output_1.default.debug(`Yaml: ${JSON.stringify(yamlConfig, null, 2)}`);
89
90
  return {
90
91
  ...defaults_1.defaultConfig,
91
- ...localConfig,
92
+ ...yamlConfig,
92
93
  ...overrides,
93
94
  };
94
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autorel",
3
- "version": "2.0.4",
3
+ "version": "2.1.1",
4
4
  "description": "Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.",
5
5
  "license": "MIT",
6
6
  "author": "Marc H. Weiner <mhweiner234@gmail.com> (https://mhweiner.com)",