diff --git a/.cz-config.js b/.cz-config.js index da8bed91300..b9895b88383 100644 --- a/.cz-config.js +++ b/.cz-config.js @@ -19,7 +19,7 @@ module.exports = { // sort type values in asc types: [ { value: "ast", name: "ast: init, migrate, add, etc" }, - { value: "break", name: "break: changes that break the behaviour of the cli" }, + { value: "break", name: "break: Changes that break the behaviour of the cli" }, { value: "chore", name: "chore: Updating deps, docs, linting, etc" }, { value: "cli", name: "cli: Core CLI things" }, { value: "docs", name: "docs: Documentation" }, @@ -27,6 +27,5 @@ module.exports = { { value: "fix", name: "fix: Bugs, typos, etc" }, { value: "misc", name: "misc: Other formats like tweaks and such" }, { value: "tests", name: "tests: Tests, jest, binTestCases, etc" }, - { value: "break", name: "break: changes that break the behaviour of the cli" } ] }; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6b69f35554d..4a20c875ec3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,6 +107,8 @@ In case you've got a small change in most of the cases your pull request would b Our commit messages format follows the [angular.js commits format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format). +You can use `npm run commit` script to have an interactive way for making commits that follow our guidelines. + We don't use the scope. The template of a commit would look like this: ### Commit Message Format @@ -123,6 +125,7 @@ format that includes a **type** and a **subject**: This is the list of *type* of commits that we accept: * ast +* break * chore * cli * docs @@ -130,7 +133,6 @@ This is the list of *type* of commits that we accept: * fix * misc * tests -* break The **header** is mandatory. diff --git a/package-lock.json b/package-lock.json index cc5e709a43f..16a230275b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4488,6 +4488,12 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, "columnify": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", @@ -5498,6 +5504,12 @@ "array-find-index": "^1.0.1" } }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", + "dev": true + }, "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", @@ -5518,6 +5530,131 @@ "word-wrap": "^1.0.3" } }, + "cz-customizable": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cz-customizable/-/cz-customizable-5.2.0.tgz", + "integrity": "sha1-oXKnoksZcujz1omfM0Gl0zDhP+M=", + "dev": true, + "requires": { + "editor": "1.0.0", + "find-config": "0.3.0", + "inquirer": "1.2.3", + "temp": "0.8.3", + "winston": "2.1.0", + "word-wrap": "1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "inquirer": { + "version": "1.2.3", + "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "external-editor": "^1.1.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "mute-stream": "0.0.6", + "pinkie-promise": "^2.0.0", + "run-async": "^2.2.0", + "rx": "^4.1.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=", + "dev": true + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "word-wrap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.1.0.tgz", + "integrity": "sha1-NWFT1h0QYQ1gB4XF1wEojgrnZKY=", + "dev": true + } + } + }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -5988,6 +6125,12 @@ "safer-buffer": "^2.1.0" } }, + "editor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", + "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=", + "dev": true + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -6662,6 +6805,12 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", @@ -7179,6 +7328,15 @@ } } }, + "find-config": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-config/-/find-config-0.3.0.tgz", + "integrity": "sha1-xPayrkkbLK48qK9yQB8a2Ez90Nk=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, "find-node-modules": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-1.0.4.tgz", @@ -14470,6 +14628,12 @@ "find-up": "^3.0.0" } }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", + "dev": true + }, "please-upgrade-node": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", @@ -17462,6 +17626,12 @@ "figgy-pudding": "^3.5.1" } }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, "stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", @@ -17748,6 +17918,24 @@ "xtend": "^4.0.0" } }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, "temp-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", @@ -18613,6 +18801,12 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -19447,6 +19641,29 @@ "string-width": "^1.0.2 || 2" } }, + "winston": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/winston/-/winston-2.1.0.tgz", + "integrity": "sha1-NGiCFcyNu3hIOLmqYm5zruRP5LY=", + "dev": true, + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", + "dev": true + } + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index f3bac1a9905..8f604a94be8 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "bundlesize": "bundlesize", "changelog": "conventional-changelog --config ./build/changelog-generator/index.js --infile CHANGELOG.md --same-file", "clean:all": "rimraf node_modules packages/*/node_modules", + "commit": "git-cz", "docs": "typedoc", "format": "prettier-eslint ./bin/*.js ./test/**/*.js ./packages/**/*.js --write", "lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"", @@ -133,6 +134,7 @@ "commitizen": "^2.10.1", "commitlint-config-cz": "^0.10.1", "conventional-changelog-cli": "^2.0.5", + "cz-customizable": "^5.2.0", "eslint": "^5.5.0", "eslint-plugin-node": "^7.0.1", "husky": "^1.0.0",