Skip to content

Commit

Permalink
docs: fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Nov 21, 2020
1 parent 1d24e45 commit ed475e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const cli = meow(
--sequential-init Avoid hypothetical concurrent initialization collisions.
--first-parent Apply commit filtering to current branch only.
--deps.bump Define deps version updating rule. Allowed: override, satisfy, inherit.
--deps.release Define release type for dependant package if any of its deps changes. Supported values: patch, minor, major, inherit.
--deps.release Define release type for dependent package if any of its deps changes. Supported values: patch, minor, major, inherit.
--help Help info.
Examples
Expand Down
10 changes: 5 additions & 5 deletions lib/updateDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ const getNextVersion = (pkg) => {
*/
const resolveReleaseType = (pkg, bumpStrategy = "override", releaseStrategy = "patch", ignore = []) => {
// NOTE This fn also updates pkg deps, so it must be invoked anyway.
const dependantReleaseType = getDependantRelease(pkg, bumpStrategy, releaseStrategy, ignore);
const dependentReleaseType = getDependentRelease(pkg, bumpStrategy, releaseStrategy, ignore);

// Release type found by commitAnalyzer.
if (pkg._nextType) {
return pkg._nextType;
}

if (!dependantReleaseType) {
if (!dependentReleaseType) {
return undefined;
}

pkg._nextType = releaseStrategy === "inherit" ? dependantReleaseType : releaseStrategy;
pkg._nextType = releaseStrategy === "inherit" ? dependentReleaseType : releaseStrategy;

return pkg._nextType;
};

/**
* Get dependant release type by recursive scanning and updating its deps.
* Get dependent release type by recursive scanning and updating its deps.
*
* @param {Package} pkg The package with local deps to check.
* @param {string} bumpStrategy Dependency resolution strategy: override, satisfy, inherit.
Expand All @@ -54,7 +54,7 @@ const resolveReleaseType = (pkg, bumpStrategy = "override", releaseStrategy = "p
* @returns {string|undefined} Returns the highest release type if found, undefined otherwise
* @internal
*/
const getDependantRelease = (pkg, bumpStrategy, releaseStrategy, ignore) => {
const getDependentRelease = (pkg, bumpStrategy, releaseStrategy, ignore) => {
const severityOrder = ["patch", "minor", "major"];
const { _localDeps, manifest = {} } = pkg;
const { dependencies = {}, devDependencies = {}, peerDependencies = {}, optionalDependencies = {} } = manifest;
Expand Down
2 changes: 1 addition & 1 deletion test/lib/updateDeps.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("resolveReleaseType()", () => {
"major"
],
[
"overrides dependant release type with custom value if defined",
"overrides dependent release type with custom value if defined",
{
manifest: { dependencies: { a: "1.0.0" } },
_nextType: undefined,
Expand Down

0 comments on commit ed475e2

Please sign in to comment.