Skip to content

Commit

Permalink
feature: changelog-io: simplify overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Feb 14, 2024
1 parent ad90cf3 commit f592363
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions lib/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ import _shortdate from 'shortdate';
import {readPackageUpSync as _readPackageUpSync} from 'read-package-up';
import buildCommand from './build-command.js';

const parseOverrides = ({shortdate = _shortdate, execSync = _execSync, readPackageUpSync = _readPackageUpSync}) => ({
shortdate,
execSync,
readPackageUpSync,
});
const parseOverrides = (overrides = {}) => {
const {
shortdate = _shortdate,
execSync = _execSync,
readPackageUpSync = _readPackageUpSync,
} = overrides;

return {
shortdate,
execSync,
readPackageUpSync,
}
};

export default (versionNew, overrides = {}) => {
export default (versionNew, overrides) => {
const {
shortdate,
execSync,
Expand Down

0 comments on commit f592363

Please sign in to comment.