From af7b749dd4e808d265fee22a10736b1852c13898 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 13 Jan 2018 21:41:23 +0000 Subject: [PATCH 1/2] chore(package): update semantic-release to version 12.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d1cb33..799cd58 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "loopback-datasource-juggler": "^3.13.0", "mocha": "^4.0.1", "rsvp": "4.7.0", - "semantic-release": "^11.0.2", + "semantic-release": "^12.2.2", "standard": "^10.0.3", "supertest": "^3.0.0" }, From 1773e94dd0af0a01cb5d800e768b55a31c961f3d Mon Sep 17 00:00:00 2001 From: Jeremy Trufier Date: Mon, 15 Jan 2018 14:49:09 +0100 Subject: [PATCH 2/2] chore(semantic-release): migrate for v12.*.* + commitlint and comitizen --- .travis.yml | 2 +- commitlint.config.js | 11 +++++++++++ package.json | 22 ++++++++++++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 commitlint.config.js diff --git a/.travis.yml b/.travis.yml index dcd0f14..194fcc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ after_success: - 'curl -Lo travis_after_all.py https://git.io/travis_after_all' - python travis_after_all.py - export $(cat .to_export_back) &> /dev/null - - npm run semantic-release + - npm run travis-deploy-once "npm run semantic-release" branches: except: - /^v\d+\.\d+\.\d+$/ diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..8ad8d06 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,11 @@ +/* eslint-env node */ + +module.exports = { + extends: ['@commitlint/config-conventional'], + + // Override rules. See http://marionebl.github.io/commitlint + rules: { + // Disable language rule + lang: [0, 'always', 'eng'] + } +} diff --git a/package.json b/package.json index 799cd58..1e05aab 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,13 @@ "tester": "mocha --reporter=spec ./test/**/*.test.js", "coverage": "istanbul cover _mocha ./test/**/*.test.js", "lint": "standard './test/**/*.js' './lib/**/*.js' --verbose | snazzy", - "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "semantic-release": "semantic-release", + "travis-deploy-once": "travis-deploy-once", "precommit": "lint-staged", - "formatter": "prettier-standard-formatter ." + "formatter": "prettier-standard-formatter .", + "commit": "git-cz", + "commit:retry": "git-cz --retry", + "commitmsg": "commitlint -e" }, "lint-staged": { "*.js": [ @@ -38,7 +42,6 @@ "body-parser": "^1.18.2", "debug": "^3.1.0", "http-status-codes": "^1.3.0", - "husky": "^0.14.0", "inflection": "^1.7.2", "lint-staged": "^6.0.0", "lodash": "^4.17.1", @@ -47,8 +50,13 @@ "type-is": "^1.6.14" }, "devDependencies": { + "@commitlint/cli": "^6.0.2", + "@commitlint/config-conventional": "^6.0.2", + "@commitlint/prompt": "^6.0.2", "chai": "^4.1.2", + "commitizen": "^2.9.6", "coveralls": "^3.0.0", + "husky": "^0.14.3", "istanbul": "^0.4.5", "loopback": "^3.16.2", "loopback-datasource-juggler": "^3.13.0", @@ -56,7 +64,8 @@ "rsvp": "4.7.0", "semantic-release": "^12.2.2", "standard": "^10.0.3", - "supertest": "^3.0.0" + "supertest": "^3.0.0", + "travis-deploy-once": "^4.3.1" }, "standard": { "globals": [ @@ -65,5 +74,10 @@ "describe", "afterEach" ] + }, + "config": { + "commitizen": { + "path": "node_modules/@commitlint/prompt" + } } }