Skip to content

Commit f3b88d3

Browse files
committed
feat(conventional-changelog-presets): supported new preset format
BREAKING CHANGE: the new preset format is a breaking change when compared to the previous preset format. updating to support the new format means that the old preset format is no longer supported. update your preset to the latest version to maintain compatibility
1 parent 3f400dd commit f3b88d3

File tree

4 files changed

+64
-40
lines changed

4 files changed

+64
-40
lines changed

lib/load-parser-config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export default async ({ preset, config, parserOpts, presetConfig }, { cwd }) =>
2222

2323
if (preset) {
2424
const presetPackage = `conventional-changelog-${preset.toLowerCase()}`;
25-
loadedConfig = importFrom.silent(__dirname, presetPackage) || importFrom(cwd, presetPackage);
25+
loadedConfig = (importFrom.silent(__dirname, presetPackage) || importFrom(cwd, presetPackage))();
2626
} else if (config) {
27-
loadedConfig = importFrom.silent(__dirname, config) || importFrom(cwd, config);
27+
loadedConfig = (importFrom.silent(__dirname, config) || importFrom(cwd, config))();
2828
} else {
29-
loadedConfig = conventionalChangelogAngular;
29+
loadedConfig = conventionalChangelogAngular();
3030
}
3131

3232
loadedConfig = await (typeof loadedConfig === "function"

package-lock.json

+54-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"Gregor Martynus (https://twitter.com/gr2m)"
1818
],
1919
"dependencies": {
20-
"conventional-changelog-angular": "^6.0.0",
20+
"conventional-changelog-angular": "^7.0.0",
2121
"conventional-commits-filter": "^3.0.0",
2222
"conventional-commits-parser": "^5.0.0",
2323
"debug": "^4.0.0",
@@ -28,12 +28,12 @@
2828
"devDependencies": {
2929
"ava": "5.3.1",
3030
"c8": "8.0.1",
31-
"conventional-changelog-atom": "3.0.0",
31+
"conventional-changelog-atom": "4.0.0",
3232
"conventional-changelog-conventionalcommits": "6.1.0",
33-
"conventional-changelog-ember": "3.0.0",
34-
"conventional-changelog-eslint": "4.0.0",
35-
"conventional-changelog-express": "3.0.0",
36-
"conventional-changelog-jshint": "3.0.0",
33+
"conventional-changelog-ember": "4.0.0",
34+
"conventional-changelog-eslint": "5.0.0",
35+
"conventional-changelog-express": "4.0.0",
36+
"conventional-changelog-jshint": "4.0.0",
3737
"prettier": "3.0.3",
3838
"semantic-release": "21.1.1",
3939
"sinon": "15.2.0"

test/load-parser-config.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ loadConfig.title = (providedTitle, config) => `${providedTitle} Load "${config}"
3636
test('Load "conventional-changelog-angular" by default', async (t) => {
3737
t.deepEqual(
3838
await loadParserConfig({}, { cwd }),
39-
(await (await import("conventional-changelog-angular")).default).parserOpts
39+
(await (await import("conventional-changelog-angular")).default()).parserOpts
4040
);
4141
});
4242

0 commit comments

Comments
 (0)