Skip to content

Commit

Permalink
Chore: rename vars
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Feb 19, 2019
1 parent 5651f4d commit fb93cb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 5 additions & 5 deletions lib/release-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ function excludeReverts(logs) {
* Inspects an array of git commit log messages and calculates the release
* information based on it.
* @param {string} currentVersion The version of the project read from package.json.
* @param {string[]} plogs An array of log messages for the release.
* @param {string[]} logs An array of log messages for the release.
* @param {string} [prereleaseId] If doing a prerelease, the prerelease identifier.
* @returns {Object} An object containing all the changes since the last version.
* @private
*/
function calculateReleaseFromGitLogs(currentVersion, plogs, prereleaseId) {
function calculateReleaseFromGitLogs(currentVersion, logs, prereleaseId) {

const logs = excludeReverts(parseLogs(plogs));
const excludedLogs = excludeReverts(parseLogs(logs));

const changelog = {},
repository = getPackageInfo().repository;
Expand All @@ -210,11 +210,11 @@ function calculateReleaseFromGitLogs(currentVersion, plogs, prereleaseId) {
version: currentVersion,
type: "",
changelog,
rawChangelog: logs.map(generateChangelogLine).join("\n")
rawChangelog: excludedLogs.map(generateChangelogLine).join("\n")
};

// arrange change types into categories
logs.forEach(log => {
excludedLogs.forEach(log => {

// exclude untagged (e.g. revert) commits from version calculation
if (!log.flag) {
Expand Down
10 changes: 3 additions & 7 deletions lib/shell-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ module.exports = {
/**
* Returns an environment object that has been modified to work with local
* nod executables.
* @param {string} [arg0] Platform identifier (same values as process.platform).
* @param {Object} [arg1] The default environment object (mostly used for testing).
* @param {string} [platform] Platform identifier (same values as process.platform).
* @param {Object} [defaultEnv] The default environment object (mostly used for testing).
* @returns {Object} a modified environment object.
*/
getModifiedEnv(arg0, arg1) {

const platform = arg0 || process.platform;
const defaultEnv = arg1 || process.env;

getModifiedEnv(platform = process.platform, defaultEnv = process.env) {
const env = {},
pathSeparator = platform === "win32" ? ";" : ":";

Expand Down

0 comments on commit fb93cb2

Please sign in to comment.