Skip to content

Commit cf6d86b

Browse files
committed
[meta] add auto-changelog
1 parent cdaa465 commit cf6d86b

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
package-lock=false
2+
allow-same-version=true
3+
message=v%s

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
<!-- auto-changelog-above -->
9+
110
1.1.9 / 2022-05-13
211
=================
312
* [Refactor] use `foreach` instead of `for-each`

package.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
"prepack": "npmignore --auto --commentLines=autogenerated",
2424
"prepublishOnly": "safe-publish-latest",
2525
"prepublish": "not-in-publish || npm run prepublishOnly",
26+
"prelint": "evalmd README.md",
27+
"lint": "eslint --ext=js,mjs .",
2628
"pretest": "npm run --silent lint",
2729
"test": "npm run tests-only && npm run test:harmony",
2830
"tests-only": "nyc tape test",
2931
"test:harmony": "nyc node --harmony --es-staging test",
3032
"posttest": "npx aud --production",
31-
"prelint": "evalmd README.md",
32-
"lint": "eslint --ext=js,mjs ."
33+
"version": "auto-changelog && git add CHANGELOG.md",
34+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
3335
},
3436
"repository": {
3537
"type": "git",
@@ -65,6 +67,7 @@
6567
"devDependencies": {
6668
"@ljharb/eslint-config": "^21.0.0",
6769
"aud": "^2.0.1",
70+
"auto-changelog": "^2.4.0",
6871
"eslint": "=8.8.0",
6972
"evalmd": "^0.0.19",
7073
"in-publish": "^2.0.1",
@@ -98,6 +101,15 @@
98101
"engines": {
99102
"node": ">= 0.4"
100103
},
104+
"auto-changelog": {
105+
"output": "CHANGELOG.md",
106+
"template": "keepachangelog",
107+
"unreleased": false,
108+
"commitLimit": false,
109+
"backfillLimit": false,
110+
"hideCredit": true,
111+
"startingVersion": "1.1.10"
112+
},
101113
"publishConfig": {
102114
"ignore": [
103115
".github/workflows"

0 commit comments

Comments
 (0)