Skip to content

Commit 1770244

Browse files
committed
deps!: update to recent version of Semantic-release + esm support
* downgrade to @semantic-release/commit-analyzer@v12.0.0 * downgrade to @semantic-release/release-notes-generator@v13.0.0 * downgrade other dependencies for @semantic-release/release-notes-generator@v13.0.0 * Fixup CI
1 parent 42ba71e commit 1770244

File tree

12 files changed

+2460
-261
lines changed

12 files changed

+2460
-261
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: "22"
17+
node-version-file: ".nvmrc"
1818

1919
- name: Restore cached node_modules
2020
uses: actions/cache@v4

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.15.0
1+
22.13.1

index.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
const { analyzeCommits: ac } = require("./src/commit-analyzer");
2-
const { generateNotes: gn } = require("./src/release-notes-generator");
3-
const { validateStrategy } = require("./src/utils");
1+
import { analyzeCommits as ac } from "./src/commit-analyzer.js";
2+
import { generateNotes as gn } from "./src/release-notes-generator.js";
3+
import { validateStrategy } from "./src/utils.js";
4+
5+
import debugFactory from "debug";
6+
const debug = debugFactory("semantic-release:pr-analyzer");
7+
8+
export async function analyzeCommits(pluginConfig, context) {
9+
debug("analyzeCommits() - pluginConfig: " + JSON.stringify(pluginConfig));
410

5-
const analyzeCommits = async (pluginConfig, context) => {
611
const { commitAnalyzerConfig, strategy: strtg } = pluginConfig || {};
712
const strategy = validateStrategy(strtg);
13+
debug("analyzeCommits() - commitAnalyzerConfig: " + JSON.stringify(commitAnalyzerConfig));
14+
debug("analyzeCommits() - strategy: " + strategy);
15+
816
return ac(strategy, { ...pluginConfig, ...commitAnalyzerConfig }, context);
9-
};
17+
}
1018

11-
const generateNotes = async (pluginConfig, context) => {
19+
export async function generateNotes(pluginConfig, context) {
1220
const { notesGeneratorConfig, strategy: strtg } = pluginConfig || {};
1321
const strategy = validateStrategy(strtg);
1422
return gn(strategy, { ...pluginConfig, ...notesGeneratorConfig }, context);
15-
};
16-
17-
module.exports = { generateNotes, analyzeCommits };
23+
}

0 commit comments

Comments
 (0)