Skip to content

Commit

Permalink
fix(readme, tests): fix readme and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil committed Jul 24, 2020
1 parent d65b560 commit 0090f2d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 44 deletions.
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
[![npm](https://badges.weareopensource.me/npm/v/waos-conventional-changelog.svg?style=flat-square)](https://www.npmjs.com/package/waos-conventional-changelog) [![Build Status](https://badges.weareopensource.me/travis/WeAreOpenSourceProjects/waos-conventional-changelog.svg?style=flat-square)](https://travis-ci.org/WeAreOpenSourceProjects/waos-conventional-changelog) [![Code Climate](https://badges.weareopensource.me/codeclimate/maintainability-percentage/WeAreOpenSourceProjects/waos-conventional-changelog.svg?style=flat-square)](https://codeclimate.com/github/WeAreOpenSourceProjects/waos-conventional-changelog/maintainability)
[![Dependencies Status](https://david-dm.org/WeAreOpenSourceProjects/waos-conventional-changelog.svg?style=flat-square)](https://david-dm.org/WeAreOpenSourceProjects/waos-conventional-changelog) [![Greenkeeper badge](https://badges.greenkeeper.io/WeAreOpenSourceProjects/waos-conventional-changelog.svg?style=flat-square)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/WeAreOpenSourceProjects/waos-conventional-changelog/badge.svg?style=flat-square)](https://snyk.io/test/github/WeAreOpenSourceProjects/waos-conventional-changelog)
[![npm](https://badges.weareopensource.me/npm/v/@weareopensource/conventional-changelog.svg?style=flat-square)](https://www.npmjs.com/package/@weareopensource/conventional-changelog) [![Build Status](https://badges.weareopensource.me/travis/weareopensource/conventional-changelog.svg?style=flat-square)](https://travis-ci.org/github/weareopensource/conventional-changelog) [![Code Climate](https://badges.weareopensource.me/codeclimate/maintainability-percentage/weareopensource/conventional-changelog.svg?style=flat-square)](https://codeclimate.com/github/weareopensource/conventional-changelog/maintainability)
[![Dependabot badge](https://badges.weareopensource.me/badge/Dependabot-enabled-2768cf.svg?style=flat-square)](https://dependabot.com) [![Known Vulnerabilities](https://snyk.io/test/github/WeAreOpenSourceProjects/waos-conventional-changelog/badge.svg?style=flat-square)](https://snyk.io/test/github/WeAreOpenSourceProjects/waos-conventional-changelog)

[![Blog](https://badges.weareopensource.me/badge/Read-On%20our%20Blog-1abc9c.svg?style=flat-square)](https://weareopensource.me) [![Slack](https://badges.weareopensource.me/badge/Chat-On%20Slack-d0355b.svg?style=flat-square)](mailto:[email protected]?subject=Join%20Slack&body=Hi,%20I%20found%20your%20community%20We%20Are%20Open%20Source.%20I%20would%20be%20interested%20to%20join%20the%20Slack%20to%20share%20and%20discuss%20about%20...%20,%20Thanks) [![Mail](https://badges.weareopensource.me/badge/Contact-By%20Mail-3498db.svg?style=flat-square)](mailto:[email protected]?subject=Contact)
# :globe_with_meridians: [WeAreOpenSource](https://weareopensource.me) Conventional Changelog


# Presentation
## :book: Presentation

Prompts for [conventional changelog](https://github.com/conventional-changelog/conventional-changelog) standard, based on [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog), which seems to be abandoned. For this reason, we decided to make our own package and included some PRs, switch to ES6 and add an Emoji system for some fun.

PR included :
* yinzara - [feat: implement subject feedback, scope filtering, subject filtering](https://github.com/commitizen/cz-conventional-changelog/pull/75)
Our rules on this dev, **Quick** / **Simple** / **Lite**.

![gif](http://waos.ovh/content/gif/waos-conventional-changelog.gif)

# Prerequisites
## :boom: Installation

Make sure you have installed all of the following prerequisites on your development machine:

- Node.js (10.x) - [Download & Install Node.js](https://nodejs.org/en/download/)

# Installation

Global :

```bash
npm install --global commitizen waos-conventional-changelog
```

Local :

```bash
npm install --global commitizen
commitizen init waos-conventional-changelog --save-dev --save-exact
npm install --save-dev @weareopensource/conventional-changelog commitizen
commitizen init @weareopensource/conventional-changelog --save-dev --save-exact
```

# Integration
### Integration

We suggest to follow something like this : [How to create good commit messages](https://medium.com/@klauskpm/how-to-create-good-commit-messages-67943d30cced). Juste change cz-conventional-changelog part with waos-conventional-changelog
We suggest to follow something like this : [How to create good commit messages](https://medium.com/@klauskpm/how-to-create-good-commit-messages-67943d30cced). Juste change cz-conventional-changelog part with @weareopensource/conventional-changelog

## Configuration
### Configuration

### package.json
#### package.json

Like commitizen, you specify the configuration of cz-conventional-changelog through the package.json's `config.commitizen` key.

Expand Down Expand Up @@ -79,13 +68,25 @@ The following environment varibles can be used to override any default configura
If using the [commitlint](https://github.com/conventional-changelog/commitlint) js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.


# Licence
## :pencil2: [Contribute](https://blog.weareopensource.me/how-to-contribute/)

## :globe_with_meridians: [We Are Open Source, Who we are ?](https://weareopensource.me)

Today, we dreams to create Backs/Fronts, aligns on feats, in multiple languages, in order to allow anyone to compose fullstack on demand (React, Angular, VusJS, Node, Nest, Swift, Go).
Feel free to discuss, share other kind of bricks, and invite whoever you want with this mindset to come help us.

## :clipboard: Licence

[![Packagist](https://badges.weareopensource.me/packagist/l/doctrine/orm.svg?style=flat-square)](/LICENSE.md)

# Thanks
## :family: Main Team

* Pierre Brisorgueil

[![Github](https://badges.weareopensource.me/badge/Follow-me%20on%20Github-282828.svg?style=flat-square)](https://github.com/PierreBrisorgueil) [![Twitter](https://badges.weareopensource.me/badge/Follow-me%20on%20Twitter-3498db.svg?style=flat-square)](https://twitter.com/pbrisorgueil?lang=fr) [![Youtube](https://badges.weareopensource.me/badge/Watch-me%20on%20Youtube-e74c3c.svg?style=flat-square)](https://www.youtube.com/channel/UCIIjHtrZL5-rFFupn7c3OtA) [![Instagram](https://badges.weareopensource.me/badge/Follow-me%20on%20Instagram-f27231.svg?style=flat-square)](https://www.instagram.com/pierre_brsrgl/) [![Linkedin](https://badges.weareopensource.me/badge/Add-me%20on%20linkedin-006DA9.svg?style=flat-square)](https://www.linkedin.com/in/pierre-brisorgueil/)

[![Help](https://badges.weareopensource.me/badge/Help-On%20Patreon-052d49.svg?style=flat-square)](https://www.patreon.com/pbrisorgueil) [![Cofee](https://badges.weareopensource.me/badge/Buy-Me%20a%20Coffee-FF813F.svg?style=flat-square)](https://www.buymeacoffee.com/JrSa9tZGO)
Feel free to help us ! :)

## :link: Links

[![Twitter](https://badges.weareopensource.me/badge/Follow-me%20on%20Twitter-3498db.svg?style=flat-square)](https://twitter.com/pbrisorgueil?lang=fr) [![Youtube](https://badges.weareopensource.me/badge/Watch-me%20on%20Youtube-e74c3c.svg?style=flat-square)](https://www.youtube.com/channel/UCIIjHtrZL5-rFFupn7c3OtA)
[![Blog](https://badges.weareopensource.me/badge/Read-our%20Blog-1abc9c.svg?style=flat-square)](https://blog.weareopensource.me) [![Slack](https://badges.weareopensource.me/badge/Chat-on%20our%20Slack-d0355b.svg?style=flat-square)](https://join.slack.com/t/weareopensource/shared_invite/zt-62p1qxna-PEQn289qx6mmHobzKW8QFw) [![Discord](https://badges.weareopensource.me/badge/Chat-on%20our%20Discord-516DB9.svg?style=flat-square)](https://discord.gg/U2a2vVm) [![Mail](https://badges.weareopensource.me/badge/Contact-us%20by%20mail-00a8ff.svg?style=flat-square)](mailto:[email protected]?subject=Contact)
Binary file added assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions engine.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const defaultOptions = {
maxHeaderWidth: 100,
};

const type = 'func';
const type = 'feat';
const scope = 'everything';
const subject = 'testing123';
const longBody = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('commit message', () => {
type,
subject,
}),
).toEqual(`${type}: ${subject}`);
).toEqual(`${type}: ${subject}`);
});
test('only header w/ scope', () => {
expect(
Expand All @@ -138,7 +138,7 @@ describe('commit message', () => {
scope,
subject,
}),
).toEqual(`${type}(${scope}): ${subject}`);
).toEqual(`${type}(${scope}): ${subject}`);
});
test('header and body w/ out scope', () => {
expect(
Expand All @@ -147,7 +147,7 @@ describe('commit message', () => {
subject,
body,
}),
).toEqual(`${type}: ${subject}\n\n${body}`);
).toEqual(`${type}: ${subject}\n\n${body}`);
});
test('header and body w/ scope', () => {
expect(
Expand All @@ -157,7 +157,7 @@ describe('commit message', () => {
subject,
body,
}),
).toEqual(`${type}(${scope}): ${subject}\n\n${body}`);
).toEqual(`${type}(${scope}): ${subject}\n\n${body}`);
});
test('header, body and issues w/ out scope', () => {
expect(
Expand All @@ -167,7 +167,7 @@ describe('commit message', () => {
body,
issues,
}),
).toEqual(`${type}: ${subject}\n\n${body}\n\n${issues}`);
).toEqual(`${type}: ${subject}\n\n${body}\n\n${issues}`);
});
test('header, body and issues w/ scope', () => {
expect(
Expand All @@ -178,7 +178,7 @@ describe('commit message', () => {
body,
issues,
}),
).toEqual(`${type}(${scope}): ${subject}\n\n${body}\n\n${issues}`);
).toEqual(`${type}(${scope}): ${subject}\n\n${body}\n\n${issues}`);
});
test('header, body and long issues w/ out scope', () => {
expect(
Expand All @@ -188,7 +188,7 @@ describe('commit message', () => {
body,
issues: longIssues,
}),
).toEqual(`${type}: ${subject}\n\n${body}\n\n${longIssues}`);
).toEqual(`${type}: ${subject}\n\n${body}\n\n${longIssues}`);
});
test('header, body and long issues w/ scope', () => {
expect(
Expand All @@ -199,7 +199,7 @@ describe('commit message', () => {
body,
issues: longIssues,
}),
).toEqual(`${type}(${scope}): ${subject}\n\n${body}\n\n${longIssues}`);
).toEqual(`${type}(${scope}): ${subject}\n\n${body}\n\n${longIssues}`);
});
test('header and long body w/ out scope', () => {
expect(
Expand All @@ -208,7 +208,7 @@ describe('commit message', () => {
subject,
body: longBody,
}),
).toEqual(`${type}: ${subject}\n\n${longBody}`);
).toEqual(`${type}: ${subject}\n\n${longBody}`);
});
test('header and long body w/ scope', () => {
expect(
Expand All @@ -218,7 +218,7 @@ describe('commit message', () => {
subject,
body: longBody,
}),
).toEqual(`${type}(${scope}): ${subject}\n\n${longBody}`);
).toEqual(`${type}(${scope}): ${subject}\n\n${longBody}`);
});
test('header, long body and issues w/ out scope', () => {
expect(
Expand All @@ -228,7 +228,7 @@ describe('commit message', () => {
body: longBody,
issues,
}),
).toEqual(`${type}: ${subject}\n\n${longBody}\n\n${issues}`);
).toEqual(`${type}: ${subject}\n\n${longBody}\n\n${issues}`);
});
test('header, long body and issues w/ scope', () => {
expect(
Expand All @@ -239,7 +239,7 @@ describe('commit message', () => {
body: longBody,
issues,
}),
).toEqual(`${type}(${scope}): ${subject}\n\n${longBody}\n\n${issues}`);
).toEqual(`${type}(${scope}): ${subject}\n\n${longBody}\n\n${issues}`);
});
test('header, long body and long issues w/ out scope', () => {
expect(
Expand All @@ -249,7 +249,7 @@ describe('commit message', () => {
body: longBody,
issues: longIssues,
}),
).toEqual(`${type}: ${subject}\n\n${longBody}\n\n${longIssues}`);
).toEqual(`${type}: ${subject}\n\n${longBody}\n\n${longIssues}`);
});
test('header, long body and long issues w/ scope', () => {
expect(
Expand All @@ -261,7 +261,7 @@ describe('commit message', () => {
issues: longIssues,
}),
).toEqual(
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${longIssues}`,
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${longIssues}`,
);
});
test('header, long body, breaking change, and long issues w/ scope', () => {
Expand All @@ -275,7 +275,7 @@ describe('commit message', () => {
issues: longIssues,
}),
).toEqual(
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${breakingChange}${breaking}\n\n${longIssues}`,
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${breakingChange}${breaking}\n\n${longIssues}`,
);
});
test('header, long body, breaking change (with prefix entered), and long issues w/ scope', () => {
Expand All @@ -289,7 +289,7 @@ describe('commit message', () => {
issues: longIssues,
}),
).toEqual(
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${breakingChange}${breaking}\n\n${longIssues}`,
`${type}(${scope}): ${subject}\n\n${longBody}\n\n${breakingChange}${breaking}\n\n${longIssues}`,
);
});
});
Expand Down

0 comments on commit 0090f2d

Please sign in to comment.