Skip to content

Commit

Permalink
Merge pull request #526 from semantic-release/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
travi authored Sep 18, 2023
2 parents 249a23f + c87cc1e commit 2a2756e
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 566 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
strategy:
matrix:
node-version:
- 18.0.0
- 19
- 18.17.0
- 20.6.1
- 20
os:
- ubuntu-latest
runs-on: "${{ matrix.os }}"
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
12 changes: 3 additions & 9 deletions lib/load-changelog-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,13 @@ export default async ({ preset, config, parserOpts, writerOpts, presetConfig },

if (preset) {
const presetPackage = `conventional-changelog-${preset.toLowerCase()}`;
loadedConfig = importFrom.silent(__dirname, presetPackage) || importFrom(cwd, presetPackage);
loadedConfig = await (importFrom.silent(__dirname, presetPackage) || importFrom(cwd, presetPackage))(presetConfig);
} else if (config) {
loadedConfig = importFrom.silent(__dirname, config) || importFrom(cwd, config);
loadedConfig = await (importFrom.silent(__dirname, config) || importFrom(cwd, config))();
} else {
loadedConfig = conventionalChangelogAngular;
loadedConfig = await conventionalChangelogAngular();
}

loadedConfig = await (typeof loadedConfig === "function"
? isPlainObject(presetConfig)
? loadedConfig(presetConfig)
: promisify(loadedConfig)()
: loadedConfig);

return {
parserOpts: { ...loadedConfig.parserOpts, ...parserOpts },
writerOpts: { ...loadedConfig.writerOpts, ...writerOpts },
Expand Down
Loading

0 comments on commit 2a2756e

Please sign in to comment.