@cmflow/cli 2.0.0-alpha.7 → 2.0.0-alpha.8

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-alpha.7",
3
+ "version": "2.0.0-alpha.8",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -11,7 +11,6 @@
11
11
  "bin": {
12
12
  "checkfeatures": "./bin/checkfeatures.sh",
13
13
  "cm": "./bin/cm.js",
14
- "cmchangelog": "bin/cm-changelog.js",
15
14
  "cmconfig": "bin/cm-config.js",
16
15
  "cmexpedit": "./bin/cmexpedit.sh",
17
16
  "cmfetch": "bin/cm-fetch.js",
@@ -36,8 +35,6 @@
36
35
  "axios": "1.8.2",
37
36
  "chalk": "^4.1.0",
38
37
  "commander": "5.1.0",
39
- "conventional-changelog": "3.1.25",
40
- "conventional-changelog-cli": "2.2.2",
41
38
  "execa": "5.1.1",
42
39
  "figures": "3.2.0",
43
40
  "fs-extra": "^10.1.0",
@@ -88,8 +85,7 @@
88
85
  "lint_ci": "eslint --format junit --output-file ./reports/eslint.xml",
89
86
  "lint_fix": "eslint --fix",
90
87
  "release": "node bin/cmrelease.js",
91
- "release_dry_run": "node bin/cmrelease.js --dry-run",
92
- "build_changelog": "node bin/cm-changelog.js"
88
+ "release_dry_run": "node bin/cmrelease.js --dry-run"
93
89
  },
94
90
  "husky": {
95
91
  "hooks": {
@@ -1,4 +1,3 @@
1
- export * from "./changelog.js";
2
1
  export * from "./clean.js";
3
2
  export * from "./deploy.js";
4
3
  export * from "./fetch.js";
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import commander from "commander";
4
-
5
- import { commands, runCommand } from "../src/index.js";
6
-
7
- commander
8
- .usage("cmchangelog [options]")
9
- .alias("cm changelog")
10
- .option(
11
- "-p, --preset <preset>",
12
- "Name of the preset you want to use. Must be one of the following:\n" +
13
- "angular, atom, codemirror, ember, eslint, express, jquery, jscs or jshint",
14
- "angular"
15
- )
16
- .option(
17
- "-r, --release-count <count>",
18
- "How many releases to be generated from the latest\n" +
19
- "If 0, the whole changelog will be regenerated and the outfile will be overwritten\n" +
20
- "Default: 0",
21
- 0
22
- )
23
- .option("-t, --tag-prefix <prefix>", "Tag prefix to consider when reading the tags")
24
- .parse(process.argv);
25
-
26
- runCommand(commands.Changelog, commander);
@@ -1,47 +0,0 @@
1
- import conventionalChangelog from "conventional-changelog";
2
- import { createWriteStream } from "fs";
3
- import { Observable } from "rxjs";
4
-
5
- export class Changelog {
6
- mapContext(commander, config) {
7
- return {
8
- preset: commander.preset || "angular",
9
- releaseCount: commander.releaseCount || 0,
10
- outfile: `${process.cwd()}/CHANGELOG.md`,
11
-
12
- tagPrefix: (config.tagFormat || commander.tagPrefix || "").replace("${version}", "")
13
- };
14
- }
15
-
16
- exec({ preset, releaseCount, outfile, tagPrefix }) {
17
- const writableStream = createWriteStream(outfile, { encoding: "utf8" });
18
-
19
- return new Observable((observer) => {
20
- const stream = conventionalChangelog({
21
- preset,
22
- releaseCount,
23
- path: `${process.cwd()}/package.json`,
24
- tagPrefix
25
- });
26
-
27
- stream.pipe(writableStream);
28
-
29
- stream.on("error", (err) => {
30
- observer.error(err);
31
- });
32
-
33
- stream.on("end", () => {
34
- observer.complete();
35
- });
36
- });
37
- }
38
-
39
- getTasks(ctx) {
40
- return [
41
- {
42
- title: "Generate changelog",
43
- task: () => this.exec(ctx)
44
- }
45
- ];
46
- }
47
- }