@release-it/keep-a-changelog 7.1.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pkg.pr.new.yml +3 -3
- package/.github/workflows/test.yml +5 -5
- package/package.json +14 -10
- package/pnpm-workspace.yaml +2 -0
- package/test.js +11 -4
|
@@ -14,8 +14,8 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
18
|
-
- uses: actions/setup-node@
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
19
19
|
with:
|
|
20
|
-
node-version:
|
|
20
|
+
node-version: 22
|
|
21
21
|
- run: npx --yes pkg-pr-new publish --compact --comment=update
|
|
@@ -11,7 +11,6 @@ jobs:
|
|
|
11
11
|
- windows-latest
|
|
12
12
|
- macos-latest
|
|
13
13
|
node:
|
|
14
|
-
- 20
|
|
15
14
|
- 22
|
|
16
15
|
- 24
|
|
17
16
|
- 26
|
|
@@ -20,13 +19,14 @@ jobs:
|
|
|
20
19
|
name: ${{ matrix.os }} (Node v${{ matrix.node }})
|
|
21
20
|
|
|
22
21
|
steps:
|
|
23
|
-
- uses: actions/checkout@
|
|
24
|
-
- uses: actions/setup-node@
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
25
24
|
with:
|
|
26
25
|
node-version: ${{ matrix.node }}
|
|
26
|
+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
|
|
27
27
|
|
|
28
28
|
- name: Install dependencies
|
|
29
|
-
run:
|
|
29
|
+
run: pnpm install
|
|
30
30
|
|
|
31
31
|
- name: Run tests
|
|
32
|
-
run:
|
|
32
|
+
run: pnpm test
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@release-it/keep-a-changelog",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Keep-a-changelog plugin for release-it",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "
|
|
8
|
+
"test": "node --test test.js",
|
|
9
9
|
"release": "release-it"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
@@ -31,23 +31,27 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"detect-newline": "^4.0.1",
|
|
34
|
-
"semver": "^7.
|
|
34
|
+
"semver": "^7.8.5",
|
|
35
35
|
"string-template": "^1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"bron": "^2.0.3",
|
|
39
38
|
"fs-monkey": "^1.1.0",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
39
|
+
"installed-check": "^11.0.0",
|
|
40
|
+
"memfs": "^4.76.0",
|
|
41
|
+
"release-it": "^21.0.3",
|
|
42
|
+
"sinon": "^22.1.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"release-it": "^18.0.0 || ^19.0.0 || ^20.0.0"
|
|
45
|
+
"release-it": "^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": "^
|
|
48
|
+
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
|
|
49
49
|
},
|
|
50
|
+
"packageManager": "pnpm@11.17.0",
|
|
50
51
|
"release-it": {
|
|
52
|
+
"npm": {
|
|
53
|
+
"stage": true
|
|
54
|
+
},
|
|
51
55
|
"github": {
|
|
52
56
|
"release": true,
|
|
53
57
|
"tokenRef": "GITHUB_TOKEN_RELEASE_IT",
|
|
@@ -62,7 +66,7 @@
|
|
|
62
66
|
}
|
|
63
67
|
},
|
|
64
68
|
"hooks": {
|
|
65
|
-
"before:init": "
|
|
69
|
+
"before:init": "pnpm test && installed-check"
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
package/test.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { strict as assert } from 'node:assert';
|
|
2
|
-
import test from '
|
|
2
|
+
import test, { beforeEach } from 'node:test';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
|
-
import {
|
|
4
|
+
import { memfs } from 'memfs';
|
|
5
5
|
import { patchFs } from 'fs-monkey';
|
|
6
6
|
import { factory, runTasks } from 'release-it/test/util/index.js';
|
|
7
7
|
import sinon from 'sinon';
|
|
8
8
|
import Plugin from './index.js';
|
|
9
9
|
|
|
10
|
+
const { vol } = memfs({}, process.cwd());
|
|
11
|
+
|
|
10
12
|
const initialDryRunFileContents =
|
|
11
13
|
'\n\n## [Unreleased]\n\n* Item A\n* Item B\n\n## [1.0.0] - 2020-05-02\n\n* Item C\n* Item D';
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
const fixtures = {
|
|
14
16
|
'./CHANGELOG-FOO.md': '## [FOO]\n\n* Item A\n* Item B',
|
|
15
17
|
'./CHANGELOG-MULTIPLE_UNRELEASED.md': '## [Unreleased]\n* Item A\n\n## [Unreleased]* Item B\nB\n* Item C\n* Item D',
|
|
16
18
|
'./CHANGELOG-INVALID_ORDER.md':
|
|
@@ -34,10 +36,15 @@ vol.fromJSON({
|
|
|
34
36
|
'./CHANGELOG-VERSION_URL_UNRELEASED_TITLE_CASE.md':
|
|
35
37
|
'## [Unreleased]\n\n* Item A\n* Item B\n\n## [1.0.0] - 2020-05-02\n\n* Item C\n* Item D\n\n[Unreleased]: https://github.com/user/project/compare/1.0.0..HEAD\n[1.0.0]: https://github.com/user/project/compare/0.0.0...1.0.0',
|
|
36
38
|
'./CHANGELOG-VERSION_URL_NEW.md': '## [Unreleased]\n\n* Item A\n* Item B\n'
|
|
37
|
-
}
|
|
39
|
+
};
|
|
38
40
|
|
|
39
41
|
patchFs(vol);
|
|
40
42
|
|
|
43
|
+
beforeEach(() => {
|
|
44
|
+
vol.reset();
|
|
45
|
+
vol.fromJSON(fixtures);
|
|
46
|
+
});
|
|
47
|
+
|
|
41
48
|
const readFile = file => fs.readFileSync(file).toString();
|
|
42
49
|
|
|
43
50
|
const namespace = 'keep-a-changelog';
|