@semantic-release/release-notes-generator 12.1.0 → 14.0.0-beta.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/index.js CHANGED
@@ -2,9 +2,9 @@ import { format } from "url";
2
2
  import { find, merge } from "lodash-es";
3
3
  import getStream from "get-stream";
4
4
  import intoStream from "into-stream";
5
- import { sync as parser } from "conventional-commits-parser";
5
+ import { CommitParser } from "conventional-commits-parser";
6
6
  import writer from "./wrappers/conventional-changelog-writer.js";
7
- import filter from "conventional-commits-filter";
7
+ import { filterRevertedCommitsSync } from "conventional-commits-filter";
8
8
  import { readPackageUp } from "read-pkg-up";
9
9
  import debugFactory from "debug";
10
10
  import loadChangelogConfig from "./lib/load-changelog-config.js";
@@ -43,7 +43,8 @@ export async function generateNotes(pluginConfig, context) {
43
43
 
44
44
  const { issue, commit, referenceActions, issuePrefixes } =
45
45
  find(HOSTS_CONFIG, (conf) => conf.hostname === hostname) || HOSTS_CONFIG.default;
46
- const parsedCommits = filter(
46
+ const parser = new CommitParser({ referenceActions, issuePrefixes, ...parserOpts });
47
+ const parsedCommits = filterRevertedCommitsSync(
47
48
  commits
48
49
  .filter(({ message, hash }) => {
49
50
  if (!message.trim()) {
@@ -55,7 +56,7 @@ export async function generateNotes(pluginConfig, context) {
55
56
  })
56
57
  .map((rawCommit) => ({
57
58
  ...rawCommit,
58
- ...parser(rawCommit.message, { referenceActions, issuePrefixes, ...parserOpts }),
59
+ ...parser.parse(rawCommit.message),
59
60
  }))
60
61
  );
61
62
  const previousTag = lastRelease.gitTag || lastRelease.gitHead;
@@ -33,7 +33,7 @@ export default async ({ preset, config, parserOpts, writerOpts, presetConfig },
33
33
  }
34
34
 
35
35
  return {
36
- parserOpts: { ...loadedConfig.parserOpts, ...parserOpts },
37
- writerOpts: { ...loadedConfig.writerOpts, ...writerOpts },
36
+ parserOpts: { ...loadedConfig.parser, ...parserOpts },
37
+ writerOpts: { ...loadedConfig.writer, ...writerOpts },
38
38
  };
39
39
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semantic-release/release-notes-generator",
3
3
  "description": "semantic-release plugin to generate changelog content with conventional-changelog",
4
- "version": "12.1.0",
4
+ "version": "14.0.0-beta.1",
5
5
  "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/semantic-release/release-notes-generator/issues"
@@ -11,10 +11,10 @@
11
11
  "Gregor Martynus (https://twitter.com/gr2m)"
12
12
  ],
13
13
  "dependencies": {
14
- "conventional-changelog-angular": "^7.0.0",
15
- "conventional-changelog-writer": "^7.0.0",
16
- "conventional-commits-filter": "^4.0.0",
17
- "conventional-commits-parser": "^5.0.0",
14
+ "conventional-changelog-angular": "^8.0.0",
15
+ "conventional-changelog-writer": "^8.0.0",
16
+ "conventional-commits-filter": "^5.0.0",
17
+ "conventional-commits-parser": "^6.0.0",
18
18
  "debug": "^4.0.0",
19
19
  "get-stream": "^7.0.0",
20
20
  "import-from-esm": "^1.0.3",
@@ -23,25 +23,29 @@
23
23
  "read-pkg-up": "^11.0.0"
24
24
  },
25
25
  "devDependencies": {
26
- "ava": "5.3.1",
27
- "c8": "8.0.1",
28
- "conventional-changelog-atom": "4.0.0",
29
- "conventional-changelog-conventionalcommits": "7.0.2",
30
- "conventional-changelog-ember": "4.0.0",
31
- "conventional-changelog-eslint": "5.0.0",
32
- "conventional-changelog-express": "4.0.0",
33
- "conventional-changelog-jshint": "4.0.0",
26
+ "ava": "6.1.2",
27
+ "c8": "9.1.0",
28
+ "conventional-changelog-atom": "5.0.0",
29
+ "conventional-changelog-conventionalcommits": "8.0.0",
30
+ "conventional-changelog-ember": "5.0.0",
31
+ "conventional-changelog-eslint": "6.0.0",
32
+ "conventional-changelog-express": "5.0.0",
33
+ "conventional-changelog-jshint": "5.0.0",
34
34
  "escape-string-regexp": "5.0.0",
35
- "fs-extra": "11.1.1",
36
- "prettier": "3.0.3",
37
- "semantic-release": "22.0.7",
38
- "sinon": "16.1.0",
35
+ "fs-extra": "11.2.0",
36
+ "lockfile-lint": "4.13.2",
37
+ "ls-engines": "0.9.1",
38
+ "npm-run-all2": "6.1.2",
39
+ "prettier": "3.2.5",
40
+ "publint": "0.2.7",
41
+ "semantic-release": "23.0.8",
42
+ "sinon": "17.0.1",
39
43
  "stream-buffers": "3.0.2",
40
44
  "tempy": "3.1.0",
41
- "testdouble": "3.20.0"
45
+ "testdouble": "3.20.2"
42
46
  },
43
47
  "engines": {
44
- "node": "^18.17 || >=20.6.1"
48
+ "node": ">=20.8.1"
45
49
  },
46
50
  "files": [
47
51
  "lib",
@@ -60,7 +64,8 @@
60
64
  "semantic-release"
61
65
  ],
62
66
  "license": "MIT",
63
- "main": "index.js",
67
+ "main": "./index.js",
68
+ "exports": "./index.js",
64
69
  "c8": {
65
70
  "include": [
66
71
  "lib/**/*.js",
@@ -76,6 +81,14 @@
76
81
  "peerDependencies": {
77
82
  "semantic-release": ">=20.1.0"
78
83
  },
84
+ "lockfile-lint": {
85
+ "path": "package-lock.json",
86
+ "type": "npm",
87
+ "validate-https": true,
88
+ "allowed-hosts": [
89
+ "npm"
90
+ ]
91
+ },
79
92
  "prettier": {
80
93
  "printWidth": 120,
81
94
  "trailingComma": "es5"
@@ -89,15 +102,21 @@
89
102
  "url": "https://github.com/semantic-release/release-notes-generator.git"
90
103
  },
91
104
  "scripts": {
92
- "lint": "prettier --check \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/*.js\"",
93
- "lint:fix": "prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/*.js\"",
94
- "pretest": "npm run lint",
95
- "semantic-release": "semantic-release",
96
- "test": "c8 ava --verbose",
97
- "test:ci": "c8 ava --verbose"
105
+ "lint:prettier": "prettier --check \"{lib,test}/**/*.{js,json,ts}\" \"*.{md,json,js}\" \".github/**/*.yml\"",
106
+ "lint:prettier:fix": "prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/**/*.js\"",
107
+ "lint:lockfile": "lockfile-lint",
108
+ "lint:engines": "ls-engines",
109
+ "lint:publish": "publint --strict",
110
+ "test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
111
+ "test:unit": "c8 ava --verbose",
112
+ "test:integration": "ava --verbose test/integration.test.js"
98
113
  },
99
114
  "type": "module",
100
115
  "ava": {
116
+ "files": [
117
+ "test/**/*.test.js",
118
+ "!test/integration.test.js"
119
+ ],
101
120
  "nodeArguments": [
102
121
  "--loader=testdouble",
103
122
  "--no-warnings"
@@ -105,7 +124,8 @@
105
124
  },
106
125
  "renovate": {
107
126
  "extends": [
108
- "github>semantic-release/.github"
127
+ "github>semantic-release/.github:renovate-config"
109
128
  ]
110
- }
129
+ },
130
+ "packageManager": "npm@10.7.0"
111
131
  }
@@ -1,3 +1,3 @@
1
- import writer from 'conventional-changelog-writer';
1
+ import { writeChangelogStream as writer } from 'conventional-changelog-writer';
2
2
 
3
3
  export default writer;