Skip to content

Commit

Permalink
📦 Upgrade dependencies (#2)
Browse files Browse the repository at this point in the history
Also updates code formatting based on upgraded config package.
  • Loading branch information
stormwarning authored Jan 27, 2019
1 parent 41d2ade commit 9e8140c
Show file tree
Hide file tree
Showing 11 changed files with 2,964 additions and 4,040 deletions.
13 changes: 1 addition & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
module.exports = {
extends: '@zazen/eslint-config',
rules: {
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore',
},
],
},
rules: {},
}
10 changes: 5 additions & 5 deletions bin/checkpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const util = require('util')
const chalk = require('chalk')
const figures = require('figures')

module.exports = function (argv, msg, args, figure) {
module.exports = function(argv, msg, args, figure) {
const defaultFigure = args.dryRun
? chalk.yellow(figures.tick)
: chalk.green(figures.tick)
Expand All @@ -16,11 +16,11 @@ module.exports = function (argv, msg, args, figure) {
util.format.apply(
util,
[msg].concat(
args.map(function (arg) {
args.map(function(arg) {
return chalk.bold(arg)
})
)
)
}),
),
),
)
}
}
2 changes: 1 addition & 1 deletion bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module.exports = require('yargs')
.example('$0', 'Update changelog and tag release')
.example(
'$0 -m "%s: see changelog for details"',
'Update changelog and tag release with custom commit message'
'Update changelog and tag release with custom commit message',
)
.pkgConf('standard-version')
.wrap(97)
20 changes: 11 additions & 9 deletions bin/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ const chalk = require('chalk')
const conventionalChangelog = require('conventional-changelog')
const accessSync = require('fs-access').sync

const config = require('../index')
const checkpoint = require('./checkpoint')
const writeFile = require('./write-file')
const config = require('../index')

module.exports = function release (args, newVersion) {
module.exports = function release(args, newVersion) {
if (args.skip.changelog) return Promise.resolve()

return outputChangelog(args, newVersion)
}

function outputChangelog (args, newVersion) {
function outputChangelog(args, newVersion) {
return new Promise((resolve, reject) => {
createIfMissing(args)

Expand Down Expand Up @@ -45,16 +45,16 @@ All notable changes to this project will be documented in this file.
config,
},
context,
{ merges: null }
).on('error', function (err) {
{ merges: null },
).on('error', function(err) {
return reject(err)
})

changelogStream.on('data', function (buffer) {
changelogStream.on('data', function(buffer) {
content += buffer.toString()
})

changelogStream.on('end', function () {
changelogStream.on('end', function() {
checkpoint(args, 'outputting changes to %s', [args.infile])

if (args.dryRun) {
Expand All @@ -64,7 +64,9 @@ All notable changes to this project will be documented in this file.
writeFile(
args,
args.infile,
header + '\n' + (content + oldContent).replace(/\n+$/, '\n')
header +
'\n' +
(content + oldContent).replace(/\n+$/, '\n'),
)
}

Expand All @@ -73,7 +75,7 @@ All notable changes to this project will be documented in this file.
})
}

function createIfMissing (args) {
function createIfMissing(args) {
try {
accessSync(args.infile, fs.F_OK)
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion bin/write-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs')

module.exports = function (args, filePath, content) {
module.exports = function(args, filePath, content) {
if (args.dryRun) return

fs.writeFileSync(filePath, content, 'utf8')
Expand Down
2 changes: 1 addition & 1 deletion conventional-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ const writerOpts = require(`./writer-opts`)
module.exports = Q.all([parserOpts, writerOpts]).spread(
(parserOpts, writerOpts) => {
return { parserOpts, writerOpts }
}
},
)
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports = Q.all([
recommendedBumpOpts,
writerOpts,
}
}
},
)
Loading

0 comments on commit 9e8140c

Please sign in to comment.