diff --git a/.npmrc b/.npmrc index 43c97e7..eacea13 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ package-lock=false +allow-same-version=true +message=v%s diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a724cf0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). diff --git a/package.json b/package.json index ff37358..e06897f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "pretest": "npm run lint", "tests-only": "node test", "test": "npm run tests-only", - "posttest": "npx aud" + "posttest": "npx aud", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", @@ -32,11 +34,19 @@ "homepage": "https://github.com/ljharb/side-channel#readme", "devDependencies": { "@ljharb/eslint-config": "^15.0.2", + "auto-changelog": "^1.16.2", "eslint": "^6.7.2", "tape": "^4.11.0" }, "dependencies": { "es-abstract": "^1.16.2", "object-inspect": "^1.7.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false } }