style: prettier (#2624)

This commit is contained in:
Gregor Martynus
2022-11-23 16:02:51 -08:00
committed by GitHub
parent 8a0d8be51f
commit d13ea9280e
54 changed files with 3129 additions and 15324 deletions
+15 -9
View File
@@ -1,7 +1,7 @@
import debugCommits from 'debug';
import {getCommits} from './git.js';
import debugCommits from "debug";
import { getCommits } from "./git.js";
const debug = debugCommits('semantic-release:get-commits');
const debug = debugCommits("semantic-release:get-commits");
/**
* Retrieve the list of commits on the current branch since the commit sha associated with the last release, or all the commits of the current branch if there is no last released version.
@@ -10,16 +10,22 @@ const debug = debugCommits('semantic-release:get-commits');
*
* @return {Promise<Array<Object>>} The list of commits on the branch `branch` since the last release.
*/
export default async ({cwd, env, lastRelease: {gitHead: from}, nextRelease: {gitHead: to = 'HEAD'} = {}, logger}) => {
export default async ({
cwd,
env,
lastRelease: { gitHead: from },
nextRelease: { gitHead: to = "HEAD" } = {},
logger,
}) => {
if (from) {
debug('Use from: %s', from);
debug("Use from: %s", from);
} else {
logger.log('No previous release found, retrieving all commits');
logger.log("No previous release found, retrieving all commits");
}
const commits = await getCommits(from, to, {cwd, env});
const commits = await getCommits(from, to, { cwd, env });
logger.log(`Found ${commits.length} commits since last release`);
debug('Parsed commits: %o', commits);
debug("Parsed commits: %o", commits);
return commits;
}
};