2.1.0 • Published 3 years ago

@muukii/chglog_grouping_generator v2.1.0

Weekly downloads
115
License
MIT
Repository
github
Last release
3 years ago

A changelog generator that regarding pulls and specified commits.

Installation

npm install -g @muukii/chglog

Example

From: VergeGroup/Verge

$ chglog changelog -l 8.0.0 -r 8.6.0 --owner VergeGroup --repo Verge

Number of PRs : 31

tagnumber of PRs
Breaking Changes11
Performance3
Rename3
New Feature4
Docs1
Remove Symobl1

Group: Fix issues (3)

  • Make EventEmitter delivering event by commit order. #222 by @muukii
    • Breaking Changes
  • Add runtime sanitizer - Debug only #220 by @muukii
  • Fix InoutRef's wrapped property #189 by @muukii

Group: Enhancement (26)

  • Reduce reflecting to get performance #226 by @muukii
    • Breaking Changes Performance
  • Improve EntityType performance #224 by @muukii
    • Performance
  • Update default queue in sinkPrimitiveValue #214 by @muukii
    • Breaking Changes
  • Reduce the number of Emitters #216 by @muukii
  • Add runtime sanitizer - Debug only #220 by @muukii
  • Add documentation #219 by @muukii
  • Rename MemoizeMap to Pipeline #211 by @muukii
    • Rename
  • Add Sink method to DispatcherType #208 by @muukii
    • New Feature
  • Experimental Add creation method of SwiftUI.Binding #210 by @muukii
  • Support RxSwift 6 #209 by @muukii
    • Breaking Changes New Feature Performance
  • Update methods of Changes that become to use Comparer instead of closure #207 by @muukii
    • Breaking Changes
  • Add isEmpty to EntityTable #206 by @muukii
    • New Feature
  • Update Rx extension #202 by @muukii
  • Add method that maps Edge #201 by @muukii
    • Rename
  • Remove Verge/Core #200 by @muukii
    • Breaking Changes
  • Update CachedMapStorage #199 by @muukii
    • New Feature
  • Update how Derived retain itself to publish the value #198 by @muukii
  • Update cancelling in EventEmitter #197 by @muukii
    • Breaking Changes
  • Fix race-condition in VergeAnyCancellable #196 by @muukii
  • Drop receive changes itself in Store, Dispatcher #195 by @muukii
    • Breaking Changes
  • Trivial Update docs and few renames. #194 by @muukii
    • Docs Rename
  • ORM context.entities #192 by @muukii
  • Add precondition #191 by @muukii
  • Changes get a modification that indicates how the state changed #190 by @muukii
  • Support assign-assignee from Store #187 by @muukii
    • Breaking Changes Remove Symobl
  • Deprecation combined derived method #184 by @muukii
    • Breaking Changes

Other (3)

  • Bump ini from 1.3.5 to 1.3.8 in /Docs #205 by @dependabot
  • Changes default parameter which is queue in sink -> .mainIsolated() #193 by @muukii
    • Breaking Changes
  • Support rx.commitBinder #188 by @muukii

Usage

$ cd /path/to/your-repo
$ chglog changelog --github_token <YOUR_TOKEN> -l 8.5.0 -r 8.6.0 --owner VergeGroup --repo Verge

--github_token reads also enviroment variable GITHUB_ACCESS_TOKEN.

Customization - Inject JS

In addition using built-in generator, we can inject javascript code that generates a changelog with our own rules.

Create javascript file and use following template code.

module.exports = () => {

    const state = {
        titles: []
    }

    return {

        visit(pullRequest) {
            state.titles.push(pullRequest.title)
        },

        visitLabel(label, pullRequest) {

        },

        visitAuthor(author, pullRequest) {

        },

        render() {
            
            return JSON.stringify(state, null, 2)
        }
    }
}

Pssing this from argument

$ chglog changelog -g /path/to/your_generator.js

Customization - From JS

Define a visitor

export interface Visitor {
  visitLabel(label: Label, source: PullRequest): void;
  visitAuthor(author: User, source: PullRequest): void;
}
const createSampleVistor = () => {
  return {
    visitLabel(label: Label, source: PullRequest) {
      ...
    },
    visitAuthor(author: User, source: PullRequest) {
      ...
    },
};

Fetch and parse

const visitor = createSampleVistor();

await fetchData(
  {
    rightRef: "",
    leftRef: "",
    githubToken: "",
    repoOwner: "",
    repoName: "",
    workingDirectory: "",
  },
  visitor
);

Development

Module resolutions:

  • core
  • extensions
  • cli

Install dependencies

$ lerna bootstrap

Build all packages

$ lerna exec yarn run build

Run CLI

$ cd ./packages/cli
$ yarn run dev