From 7092f3f570a31195a1901fae7841d374a1323773 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Thu, 25 Nov 2021 12:13:18 +0100 Subject: [PATCH] chore: Setup auto CHANGELOG generation --- CHANGELOG.md | 9 +++++++++ commitlint.config.js | 31 +++++++++++++++++++++++++++++++ package.json | 28 +++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md create mode 100644 commitlint.config.js diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..f4d6f74fc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [8.3.1](https://github.com/dherault/serverless-offline/compare/v8.3.0...v8.3.1) (2021-11-25) + +### Bug Fixes + +- Fix handling of modern logs (`Cannot read properties of undefined (reading 'notice')` error) diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..c34feccf0 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,31 @@ +'use strict' + +module.exports = { + rules: { + 'body-leading-blank': [2, 'always'], + 'footer-leading-blank': [2, 'always'], + 'header-max-length': [2, 'always', 72], + 'scope-enum': [2, 'always', ['']], + 'subject-case': [2, 'always', 'sentence-case'], + 'subject-empty': [2, 'never'], + 'subject-full-stop': [2, 'never', '.'], + 'type-case': [2, 'always', 'lower-case'], + 'type-empty': [2, 'never'], + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'style', + 'test', + ], + ], + }, +} diff --git a/package.json b/package.json index 817c013ea..5ca4fd20d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "lint:updated": "pipe-git-updated --ext=js -- eslint", "list-contributors": "echo 'clone https://github.com/mgechev/github-contributors-list.git first, then run npm install' && cd ../github-contributors-list && node bin/githubcontrib --owner dherault --repo serverless-offline --sortBy contributions --showlogin true --sortOrder desc > contributors.md", "prepare": "npm run build", + "prepare-release": "standard-version && prettier --write CHANGELOG.md", "prepublishOnly": "npm run lint && npm run build", "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", "prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", @@ -172,6 +173,30 @@ "engines": { "node": ">=12.0.0" }, + "standard-version": { + "skip": { + "commit": true, + "tag": true + }, + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "refactor", + "section": "Maintenance Improvements" + } + ] + }, "dependencies": { "@hapi/boom": "^9.1.4", "@hapi/h2o2": "^9.1.0", @@ -227,7 +252,8 @@ "p-map": "^4.0.0", "prettier": "^2.4.1", "rimraf": "^3.0.2", - "serverless": "^2.66.2" + "serverless": "^2.66.2", + "standard-version": "^9.3.2" }, "peerDependencies": { "serverless": "^1.60.0 || 2 || 3"