Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update a few deps (fixing security issues) #274

Merged
merged 3 commits into from Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions bin/cli.js
@@ -1,11 +1,11 @@
#!/usr/bin/env node
var standardVersion = require('../index')
var cmdParser = require('../command')

/* istanbul ignore if */
if (process.version.match(/v(\d+)\./)[1] < 4) {
console.error('standard-version: Node v4 or greater is required. `standard-version` did not run.')
if (process.version.match(/v(\d+)\./)[1] < 6) {
console.error('standard-version: Node v6 or greater is required. `standard-version` did not run.')
} else {
const standardVersion = require('../index')
const cmdParser = require('../command')
standardVersion(cmdParser.argv)
.catch(() => {
process.exit(1)
Expand Down
4 changes: 2 additions & 2 deletions lib/lifecycles/changelog.js
Expand Up @@ -28,11 +28,11 @@ function outputChangelog (args, newVersion) {
}
var content = ''
var context
if (args.dryRun) context = {version: newVersion}
if (args.dryRun) context = { version: newVersion }
var changelogStream = conventionalChangelog({
preset: 'angular',
tagPrefix: args.tagPrefix
}, context, {merges: null})
}, context, { merges: null })
.on('error', function (err) {
return reject(err)
})
Expand Down
2 changes: 1 addition & 1 deletion lib/run-exec.js
Expand Up @@ -12,7 +12,7 @@ module.exports = function (args, cmd) {
printError(args, stderr || err.message)
return reject(err)
} else if (stderr) {
printError(args, stderr, {level: 'warn', color: 'yellow'})
printError(args, stderr, { level: 'warn', color: 'yellow' })
}
return resolve(stdout)
})
Expand Down
18 changes: 9 additions & 9 deletions package.json
Expand Up @@ -38,23 +38,23 @@
},
"homepage": "https://github.com/conventional-changelog/standard-version#readme",
"dependencies": {
"chalk": "^1.1.3",
"conventional-changelog": "^1.1.0",
"conventional-recommended-bump": "^1.0.0",
"chalk": "^2.4.1",
"conventional-changelog": "^3.0.5",
"conventional-recommended-bump": "^4.0.4",
"dotgitignore": "^1.0.3",
"figures": "^1.5.0",
"figures": "^2.0.0",
"fs-access": "^1.0.0",
"semver": "^5.1.0",
"yargs": "^8.0.1"
"yargs": "^12.0.2"
},
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^3.0.1",
"mocha": "^5.2.0",
"mock-git": "^1.0.2",
"mock-git": "^1.0.3",
"mockery": "^2.0.0",
"nyc": "^11.0.2",
"shelljs": "^0.7.3",
"standard": "^11.0.1"
"nyc": "^13.1.0",
"shelljs": "^0.7.8",
"standard": "^12.0.1"
}
}
32 changes: 16 additions & 16 deletions test.js
Expand Up @@ -43,20 +43,20 @@ function execCliAsync (argString) {

function writePackageJson (version, option) {
option = option || {}
var pkg = Object.assign(option, {version: version})
var pkg = Object.assign(option, { version: version })
fs.writeFileSync('package.json', JSON.stringify(pkg), 'utf-8')
delete require.cache[require.resolve(path.join(process.cwd(), 'package.json'))]
}

function writeBowerJson (version, option) {
option = option || {}
var bower = Object.assign(option, {version: version})
var bower = Object.assign(option, { version: version })
fs.writeFileSync('bower.json', JSON.stringify(bower), 'utf-8')
}

function writeManifestJson (version, option) {
option = option || {}
var manifest = Object.assign(option, {version: version})
var manifest = Object.assign(option, { version: version })
fs.writeFileSync('manifest.json', JSON.stringify(manifest), 'utf-8')
}

Expand Down Expand Up @@ -607,7 +607,7 @@ describe('cli', function () {
})

it('does not display `npm publish` if the package is private', function () {
writePackageJson('1.0.0', {private: true})
writePackageJson('1.0.0', { private: true })

var result = execCli()
result.code.should.equal(0)
Expand Down Expand Up @@ -666,7 +666,7 @@ describe('standard-version', function () {

describe('with mocked conventionalRecommendedBump', function () {
beforeEach(function () {
mockery.enable({warnOnUnregistered: false, useCleanCache: true})
mockery.enable({ warnOnUnregistered: false, useCleanCache: true })
mockery.registerMock('conventional-recommended-bump', function (_, cb) {
cb(new Error('bump err'))
})
Expand All @@ -682,7 +682,7 @@ describe('standard-version', function () {
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')

require('./index')({silent: true})
require('./index')({ silent: true })
.catch((err) => {
err.message.should.match(/bump err/)
done()
Expand All @@ -692,9 +692,9 @@ describe('standard-version', function () {

describe('with mocked conventionalChangelog', function () {
beforeEach(function () {
mockery.enable({warnOnUnregistered: false, useCleanCache: true})
mockery.enable({ warnOnUnregistered: false, useCleanCache: true })
mockery.registerMock('conventional-changelog', function () {
var readable = new stream.Readable({objectMode: true})
var readable = new stream.Readable({ objectMode: true })
readable._read = function () {
}
setImmediate(readable.emit.bind(readable), 'error', new Error('changelog err'))
Expand All @@ -712,7 +712,7 @@ describe('standard-version', function () {
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')

require('./index')({silent: true})
require('./index')({ silent: true })
.catch((err) => {
err.message.should.match(/changelog err/)
return done()
Expand All @@ -725,7 +725,7 @@ describe('standard-version', function () {
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')

require('./index')({silent: true})
require('./index')({ silent: true })
.then(() => {
// check last commit message
shell.exec('git log --oneline -n1').stdout.should.match(/chore\(release\): 1\.1\.0/)
Expand All @@ -738,7 +738,7 @@ describe('standard-version', function () {
describe('without a package file to bump', function () {
it('should exit with error', function () {
shell.rm('package.json')
return require('./index')({silent: true})
return require('./index')({ silent: true })
.catch((err) => {
err.message.should.equal('no package file found')
})
Expand All @@ -754,7 +754,7 @@ describe('standard-version', function () {
commit('feat: first commit')
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')
return require('./index')({silent: true})
return require('./index')({ silent: true })
.then(() => {
JSON.parse(fs.readFileSync('bower.json', 'utf-8')).version.should.equal('1.1.0')
getPackageVersion().should.equal('1.1.0')
Expand All @@ -771,7 +771,7 @@ describe('standard-version', function () {
commit('feat: first commit')
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')
return require('./index')({silent: true})
return require('./index')({ silent: true })
.then(() => {
JSON.parse(fs.readFileSync('manifest.json', 'utf-8')).version.should.equal('1.1.0')
getPackageVersion().should.equal('1.1.0')
Expand All @@ -788,7 +788,7 @@ describe('standard-version', function () {
commit('feat: first commit')
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')
require('./index')({silent: true})
require('./index')({ silent: true })
.then(() => {
JSON.parse(fs.readFileSync('npm-shrinkwrap.json', 'utf-8')).version.should.equal('1.1.0')
getPackageVersion().should.equal('1.1.0')
Expand All @@ -807,7 +807,7 @@ describe('standard-version', function () {
commit('feat: first commit')
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')
return require('./index')({silent: true})
return require('./index')({ silent: true })
.then(() => {
JSON.parse(fs.readFileSync('package-lock.json', 'utf-8')).version.should.equal('1.1.0')
getPackageVersion().should.equal('1.1.0')
Expand Down Expand Up @@ -871,7 +871,7 @@ describe('standard-version', function () {
commit('feat: first commit')
shell.exec('git tag -a v1.0.0 -m "my awesome first release"')
commit('feat: new feature!')
return require('./index')({silent: true})
return require('./index')({ silent: true })
.then(() => {
JSON.parse(fs.readFileSync('bower.json', 'utf-8')).version.should.equal('1.0.0')
getPackageVersion().should.equal('1.1.0')
Expand Down