Skip to content

Commit

Permalink
chore(deps): update dependency yargs-parser to 13.1.2 [security] (#225)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency yargs-parser to 13.1.2 [security]

* refactor(lint): updated to align to increased rule strictness

and disabled the reduce rule

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Travi <[email protected]>
  • Loading branch information
renovate[bot] and travi authored Jul 25, 2022
1 parent 018bf3e commit 346b32e
Show file tree
Hide file tree
Showing 17 changed files with 1,245 additions and 1,982 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ async function publish(pluginConfig, context) {
debug(error);

debug(
`The command ${pluginConfig.publishCmd ||
pluginConfig.cmd} wrote invalid JSON to stdout. The stdout content will be ignored.`
`The command ${
pluginConfig.publishCmd || pluginConfig.cmd
} wrote invalid JSON to stdout. The stdout content will be ignored.`
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/definitions/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const {isString} = require('lodash');
const pkg = require('../../package.json');

const [homepage] = pkg.homepage.split('#');
const stringify = object =>
const stringify = (object) =>
isString(object) ? object : inspect(object, {breakLength: Infinity, depth: 2, maxArrayLength: 5});
const linkify = file => `${homepage}/blob/master/${file}`;
const linkify = (file) => `${homepage}/blob/master/${file}`;

module.exports = {
EINVALIDCMD: ({cmd, cmdProp}) => ({
Expand Down
6 changes: 3 additions & 3 deletions lib/verify-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const {isNil, isString} = require('lodash');
const AggregateError = require('aggregate-error');
const getError = require('./get-error');

const isNonEmptyString = value => isString(value) && value.trim();
const isOptional = validator => value => isNil(value) || validator(value);
const isNonEmptyString = (value) => isString(value) && value.trim();
const isOptional = (validator) => (value) => isNil(value) || validator(value);

const VALIDATORS = {
cmd: isNonEmptyString,
shell: isOptional(shell => shell === true || isNonEmptyString(shell)),
shell: isOptional((shell) => shell === true || isNonEmptyString(shell)),
execCwd: isOptional(isNonEmptyString),
};

Expand Down
Loading

0 comments on commit 346b32e

Please sign in to comment.