Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit 6eda44b

Browse files
Jimmy Fortintremblaymath
Jimmy Fortin
authored andcommitted
chore: commitlint, commitizen and conventional-changelog integration
1 parent 97e9697 commit 6eda44b

File tree

6 files changed

+1095
-35
lines changed

6 files changed

+1095
-35
lines changed

.scriptsrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@extends": "npm-scripts-conventional-changelog"
3+
}

CHANGELOG.md

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,105 @@
1-
# Changelog
1+
<a name="2.4.0"></a>
2+
# [2.4.0]
23

3-
Please refer to (`ovh-ui-kit-documentation`)[#!/documentation/changelog] to see changelogs related to this project.
4+
### Bug Fixes
5+
6+
- update menu header and active item for navbar
7+
- hide empty sublink for navbar
8+
9+
### Features
10+
11+
- add textarea component
12+
- add radio-group component
13+
- manage textarea and select errors in field component
14+
15+
<a name="2.3.0"></a>
16+
# [2.3.0]
17+
18+
### Bug Fixes
19+
20+
- update navbar template for internal menus
21+
- prevent datagrid to render empty cell when template contains only white spaces
22+
23+
### Features
24+
25+
- add title to existing back-button component
26+
- add a toggler-links attribute to navbar
27+
- add select component
28+
29+
<a name="2.2.0"></a>
30+
# [2.2.0]
31+
32+
### Bug Fixes
33+
34+
- prevent useless calls to row-loader on datagrid
35+
- close the notification menu when clicked on navbar
36+
- fix transition slide on navbar
37+
- avoid sorting if property attribute is not set on datagrid column
38+
39+
### Features
40+
41+
- add field component
42+
- add modal component
43+
- add required attribute on checkbox
44+
- add spinner between page changes on datagrid
45+
- add disabled attribute to disable item on action-menu
46+
47+
<a name="2.1.0"></a>
48+
# [2.1.0]
49+
50+
### Features
51+
52+
- add navbar component
53+
54+
<a name="2.0.2"></a>
55+
# [2.0.2]
56+
57+
### Bug Fixes
58+
59+
- fix unwanted properties on component tags (e.g. `aria-label`, `id`, `name`, ...)
60+
61+
<a name="2.0.1"></a>
62+
# [2.0.1]
63+
64+
### Bug Fixes
65+
66+
- **oui-datagrid:** handle `data-` prefixes on `oui-column`
67+
- **oui-datagrid:** add scope context to process header titles
68+
69+
<a name="2.0.0"></a>
70+
# [2.0.0]
71+
72+
### BREAKING CHANGES
73+
- consider `ovh-ui-kit` as a peer dependency instead of a dependency
74+
- **oui-checkbox:** no `oui-checkbox-label` and `oui-checkbox-description` transcludes anymore
75+
- **oui-checkbox:** modifiers no more supported (big and thumbnails)
76+
- **oui-radio:** no `oui-radio-label` and `oui-radio-description` transcludes anymore
77+
- **oui-radio:** modifiers no more supported (big and thumbnails)
78+
- **oui-message:** default aria-label removed for close button
79+
- **oui-message:** `message`, `dismissable` and `on-dismiss` attributes removed
80+
- **oui-spinner:** rename `oui-loader` to `oui-spinner`
81+
- **oui-spinner:** no more `align` and `inline` attributes
82+
83+
### Features
84+
- indeterminate state support on `oui-checkbox`
85+
- use OVH's eslint config
86+
87+
List of new components:
88+
- `oui-button`
89+
- `oui-back-button`
90+
- `oui-numeric`
91+
- `oui-dropdown`
92+
- `oui-action-menu`
93+
- `oui-tooltip`
94+
- `oui-pagination`
95+
- `oui-datagrid`
96+
97+
### Bug Fixes
98+
- can run `karma` and `karma:watch` commands on Windows
99+
100+
<a name="1.1.0"></a>
101+
# [1.1.0]
102+
103+
### Features
104+
105+
- loader component

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ contributed to ovh-ui-angular must be released under this license.
2424

2525
When introducing a new file into the project, please make sure it has a
2626
copyright header making clear under which license it's being released.
27+
28+
# Commits
29+
30+
All commits in this project must follow this specific message convention: <https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit>

commitlint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* eslint-disable no-magic-numbers */
2+
3+
const { join, basename } = require("path");
4+
const { lstatSync, readdirSync } = require("fs");
5+
6+
const packagesDir = join(__dirname, "packages");
7+
8+
const isDirectory = (source) =>
9+
lstatSync(source).isDirectory();
10+
11+
const isComponentPackage = (name) =>
12+
name.startsWith("oui-");
13+
14+
const getDirectories = (source) =>
15+
readdirSync(source)
16+
.map(name => join(source, name))
17+
.filter(isDirectory);
18+
19+
const getDirectoriesNames = (source) =>
20+
getDirectories(source)
21+
.map(name => basename(name));
22+
23+
const getComponents = () =>
24+
getDirectoriesNames(packagesDir)
25+
.filter(isComponentPackage);
26+
27+
module.exports = {
28+
"extends": ["@commitlint/config-conventional"],
29+
rules: {
30+
// Force scope to be one of our component name
31+
"scope-enum": [2, "always", getComponents()]
32+
}
33+
};

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
"browser": "./dist/oui-angular.min.js",
1313
"module": "packages/oui-angular/src/index.js",
1414
"scripts": {
15+
"commit": "npm-scripts-config commit",
16+
"commitmsg": "npm-scripts-config commitmsg",
1517
"preversion": "npm build && git add dist",
18+
"version": "npm-scripts-config version",
1619
"postversion": "git push && git push --tags",
20+
"preview-changelog": "npm-scripts-config preview-changelog",
1721
"build": "npm run build:clean && npm run build:webpack",
1822
"build:clean": "rimraf dist",
1923
"build:webpack": "webpack --progress --colors --config build/webpack.dist.babel.js",
@@ -23,6 +27,11 @@
2327
"unit:ci": "cross-env NODE_ENV=test babel-node node_modules/karma/bin/karma start build/karma.conf.js --reporters spec,coverage --single-run",
2428
"unit:watch": "cross-env NODE_ENV=test BABEL_ENV=test node -r babel-register node_modules/karma/bin/karma start build/karma.conf.js --watch"
2529
},
30+
"config": {
31+
"commitizen": {
32+
"path": "cz-conventional-changelog"
33+
}
34+
},
2635
"dependencies": {
2736
"popper.js": "^1.12.9"
2837
},
@@ -74,6 +83,8 @@
7483
"minimist": "^1.2.0",
7584
"ng-annotate": "^1.2.2",
7685
"ng-annotate-loader": "^0.6.1",
86+
"npm-scripts-config": "^0.0.1",
87+
"npm-scripts-conventional-changelog": "^0.0.1",
7788
"opn": "^5.1.0",
7889
"portscanner": "^2.1.1",
7990
"postcss-loader": "^2.0.8",

0 commit comments

Comments
 (0)