Skip to content

Commit

Permalink
chore(deps): update dependency eslint-config-standard to v14 and esli…
Browse files Browse the repository at this point in the history
…nt to v6.2.2 (#438)

* chore(deps): update dependency eslint-config-standard to v14
* chore: Adds compatible eslint version and runs 'eslint --fix' to meet new standard config.
  • Loading branch information
renovate[bot] authored and jbottigliero committed Oct 13, 2019
1 parent 2b5619b commit 106d039
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 97 deletions.
2 changes: 1 addition & 1 deletion command.js
Expand Up @@ -77,7 +77,7 @@ const yargs = require('yargs')
.option('git-tag-fallback', {
type: 'boolean',
default: defaults.gitTagFallback,
describe: `fallback to git tags for version, if no meta-information file is found (e.g., package.json)`
describe: 'fallback to git tags for version, if no meta-information file is found (e.g., package.json)'
})
.option('path', {
type: 'string',
Expand Down
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -27,15 +27,15 @@ module.exports = function standardVersion (argv) {
let pkg
bump.pkgFiles.forEach((filename) => {
if (pkg) return
let pkgPath = path.resolve(process.cwd(), filename)
const pkgPath = path.resolve(process.cwd(), filename)
try {
let data = fs.readFileSync(pkgPath, 'utf8')
const data = fs.readFileSync(pkgPath, 'utf8')
pkg = JSON.parse(data)
} catch (err) {}
})
let newVersion
let defaults = require('./defaults')
let args = Object.assign({}, defaults, argv)
const defaults = require('./defaults')
const args = Object.assign({}, defaults, argv)

return Promise.resolve()
.then(() => {
Expand Down
18 changes: 9 additions & 9 deletions lib/lifecycles/bump.js
Expand Up @@ -32,7 +32,7 @@ function Bump (args, version) {
})
.then((release) => {
if (!args.firstRelease) {
let releaseType = getReleaseType(args.prerelease, release.releaseType, version)
const releaseType = getReleaseType(args.prerelease, release.releaseType, version)
newVersion = semver.valid(releaseType) || semver.inc(version, releaseType, args.prerelease)
updateConfigs(args, newVersion)
} else {
Expand Down Expand Up @@ -101,7 +101,7 @@ function isInPrerelease (version) {
return Array.isArray(semver.prerelease(version))
}

let TypeList = ['major', 'minor', 'patch'].reverse()
const TypeList = ['major', 'minor', 'patch'].reverse()

/**
* extract the in-pre-release type in target version
Expand All @@ -110,7 +110,7 @@ let TypeList = ['major', 'minor', 'patch'].reverse()
* @return {string}
*/
function getCurrentActiveType (version) {
let typelist = TypeList
const typelist = TypeList
for (let i = 0; i < typelist.length; i++) {
if (semver[typelist[i]](version)) {
return typelist[i]
Expand Down Expand Up @@ -164,15 +164,15 @@ function bumpVersion (releaseAs, currentVersion, args) {
function updateConfigs (args, newVersion) {
const dotgit = DotGitignore()
Bump.pkgFiles.concat(Bump.lockFiles).forEach(function (filename) {
let configPath = path.resolve(process.cwd(), filename)
const configPath = path.resolve(process.cwd(), filename)
try {
if (dotgit.ignore(configPath)) return
let stat = fs.lstatSync(configPath)
const stat = fs.lstatSync(configPath)
if (stat.isFile()) {
let data = fs.readFileSync(configPath, 'utf8')
let indent = detectIndent(data).indent
let newline = detectNewline(data)
let config = JSON.parse(data)
const data = fs.readFileSync(configPath, 'utf8')
const indent = detectIndent(data).indent
const newline = detectNewline(data)
const config = JSON.parse(data)
checkpoint(args, 'bumping version in ' + filename + ' from %s to %s', [config.version, newVersion])
config.version = newVersion
writeFile(args, configPath, stringifyPackage(config, indent, newline))
Expand Down
4 changes: 2 additions & 2 deletions lib/lifecycles/changelog.js
Expand Up @@ -29,14 +29,14 @@ function outputChangelog (args, newVersion) {
const header = args.changelogHeader || '# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n'

let oldContent = args.dryRun ? '' : fs.readFileSync(args.infile, 'utf-8')
let oldContentStart = oldContent.search(START_OF_LAST_RELEASE_PATTERN)
const oldContentStart = oldContent.search(START_OF_LAST_RELEASE_PATTERN)
// find the position of the last release and remove header:
if (oldContentStart !== -1) {
oldContent = oldContent.substring(oldContentStart)
}
let content = ''
const context = { version: newVersion }
let changelogStream = conventionalChangelog({
const changelogStream = conventionalChangelog({
debug: args.verbose && console.info.bind(console, 'conventional-changelog'),
preset: presetLoader(args),
tagPrefix: args.tagPrefix
Expand Down
2 changes: 1 addition & 1 deletion lib/lifecycles/commit.js
Expand Up @@ -20,7 +20,7 @@ module.exports = function (args, newVersion) {
function execCommit (args, newVersion) {
let msg = 'committing %s'
let paths = []
let verify = args.verify === false || args.n ? '--no-verify ' : ''
const verify = args.verify === false || args.n ? '--no-verify ' : ''
let toAdd = ''

// only start with a pre-populated paths list when CHANGELOG processing is not skipped
Expand Down
2 changes: 1 addition & 1 deletion lib/run-lifecycle-hook.js
Expand Up @@ -5,7 +5,7 @@ const runExec = require('./run-exec')

module.exports = function (args, hookName, newVersion, hooks, cb) {
if (!hooks[hookName]) return Promise.resolve()
let command = hooks[hookName] + ' --new-version="' + newVersion + '"'
const command = hooks[hookName] + ' --new-version="' + newVersion + '"'
checkpoint(args, 'Running lifecycle hook "%s"', [hookName])
checkpoint(args, '- hook command: "%s"', [command], chalk.blue(figures.info))
return runExec(args, command)
Expand Down
2 changes: 1 addition & 1 deletion lib/run-lifecycle-script.js
Expand Up @@ -6,7 +6,7 @@ const runExec = require('./run-exec')
module.exports = function (args, hookName) {
const scripts = args.scripts
if (!scripts || !scripts[hookName]) return Promise.resolve()
let command = scripts[hookName]
const command = scripts[hookName]
checkpoint(args, 'Running lifecycle script "%s"', [hookName])
checkpoint(args, '- execute command: "%s"', [command], chalk.blue(figures.info))
return runExec(args, command)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -56,8 +56,8 @@
"devDependencies": {
"chai": "4.2.0",
"coveralls": "3.0.7",
"eslint": "6.2.1",
"eslint-config-standard": "12.0.0",
"eslint": "6.2.2",
"eslint-config-standard": "14.1.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-node": "9.2.0",
"eslint-plugin-promise": "4.2.1",
Expand Down

0 comments on commit 106d039

Please sign in to comment.