Skip to content

Commit

Permalink
chore: Use object when exporting (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
aifrak authored May 5, 2022
1 parent dc1a810 commit 1237ee3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .release-it.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

// This file uses CommonJS because `cosmiconfig`.
const { readFileSync } = require('fs');
const commitGroupsSort = require('./scripts/release-it/plugins/conventional-changelog/commit-groups-sort.cjs');
const types = require('./scripts/release-it/types.cjs');
const {
commitGroupsSort,
} = require('./scripts/release-it/plugins/conventional-changelog/commit-groups-sort.cjs');
const { types } = require('./scripts/release-it/types.cjs');

const scriptsPath = './scripts/release-it';
const hooksPath = `${scriptsPath}/hooks`;
Expand Down
4 changes: 1 addition & 3 deletions scripts/release-it/plugins/calver-bumper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const DEFAULT_RELEASE_TYPE = `calendar.${DEFAULT_LEVEL}`;
const LEVEL_SEPARATOR = '.';
const MODIFIERS = new Set(['alpha', 'beta', 'dev', 'rc']);

class CalverBumper extends Plugin {
export default class CalverBumper extends Plugin {
/* ———————————————————————————————————————————— */
/* Implement Plugin interfaces */
/* ———————————————————————————————————————————— */
Expand Down Expand Up @@ -124,5 +124,3 @@ class CalverBumper extends Plugin {
return calver.parseVersion(latestVersion, format, levels);
}
}

export default CalverBumper;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* but without the static array.
*/

const types = require('../../types.cjs');
const { types } = require('../../types.cjs');

function commitGroupsSort(a, b) {
const groupA = a.title;
Expand All @@ -21,4 +21,4 @@ function commitGroupsSort(a, b) {
return -1;
}

module.exports = commitGroupsSort;
module.exports = { commitGroupsSort };
2 changes: 1 addition & 1 deletion scripts/release-it/types.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const types = [
{ type: 'perf', section: 'Performance Improvements' },
];

module.exports = types;
module.exports = { types };

0 comments on commit 1237ee3

Please sign in to comment.