Skip to content

Commit 7a3928f

Browse files
ESLint auto-fixes (changed single quotes to double quotes)
1 parent 5d8c850 commit 7a3928f

23 files changed

Lines changed: 575 additions & 574 deletions

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ root = true
1111
charset = utf-8
1212
trim_trailing_whitespace = true
1313
insert_final_newline = true
14+
end_of_line = lf
1415

1516
# 2 space indentation
1617
indent_style = space
1718
indent_size = 2
1819

1920
# JavaScript-specific settings
2021
[*.js]
21-
quote_type = single
22+
quote_type = double
2223
continuation_indent_size = 2
2324
curly_bracket_next_line = false
2425
indent_brace_style = BSD

bin/bump.js

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
#!/usr/bin/env node
2-
'use strict';
2+
"use strict";
33

4-
const program = require('commander');
5-
const SemVer = require('semver');
6-
const inquirer = require('inquirer');
7-
const chalk = require('chalk');
8-
const api = require('../');
4+
const program = require("commander");
5+
const SemVer = require("semver");
6+
const inquirer = require("inquirer");
7+
const chalk = require("chalk");
8+
const api = require("../");
99

1010
program
11-
.version(require('../package').version)
12-
.option('--major', 'Increase major version')
13-
.option('--minor', 'Increase minor version')
14-
.option('--patch', 'Increase patch version')
15-
.option('--premajor', 'Increase major version, pre-release')
16-
.option('--preminor', 'Increase preminor version, pre-release')
17-
.option('--prepatch', 'Increase prepatch version, pre-release')
18-
.option('--prerelease', 'Increase prerelease version')
19-
.option('--prompt', 'Prompt for type of bump (patch, minor, major, premajor, prerelase, etc.)')
20-
.option('--preid <name>', 'The identifier for prerelease versions (default is "beta")')
21-
.option('--commit [message]', 'Commit changed files to Git (default message is "release vX.X.X")')
22-
.option('--tag', 'Tag the commit in Git')
23-
.option('--push', 'Push the Git commit')
24-
.option('--all', 'Commit/tag/push ALL pending files, not just the ones changed by bump')
25-
.option('--grep <filespec...>', 'Files and/or globs to do a text-replace of the old version number with the new one')
26-
.option('--lock', 'Also update the package-lock.json')
27-
.on('--help', () => {
11+
.version(require("../package").version)
12+
.option("--major", "Increase major version")
13+
.option("--minor", "Increase minor version")
14+
.option("--patch", "Increase patch version")
15+
.option("--premajor", "Increase major version, pre-release")
16+
.option("--preminor", "Increase preminor version, pre-release")
17+
.option("--prepatch", "Increase prepatch version, pre-release")
18+
.option("--prerelease", "Increase prerelease version")
19+
.option("--prompt", "Prompt for type of bump (patch, minor, major, premajor, prerelase, etc.)")
20+
.option("--preid <name>", 'The identifier for prerelease versions (default is "beta")')
21+
.option("--commit [message]", 'Commit changed files to Git (default message is "release vX.X.X")')
22+
.option("--tag", "Tag the commit in Git")
23+
.option("--push", "Push the Git commit")
24+
.option("--all", "Commit/tag/push ALL pending files, not just the ones changed by bump")
25+
.option("--grep <filespec...>", "Files and/or globs to do a text-replace of the old version number with the new one")
26+
.option("--lock", "Also update the package-lock.json")
27+
.on("--help", () => {
2828
console.log(
29-
' Examples:\n' +
30-
'\n' +
31-
' $ bump --patch\n' +
32-
' $ bump --major --tag\n' +
33-
' $ bump --patch --tag --all --grep README.md\n' +
34-
' $ bump --prompt --tag --push --all\n'
29+
" Examples:\n" +
30+
"\n" +
31+
" $ bump --patch\n" +
32+
" $ bump --major --tag\n" +
33+
" $ bump --patch --tag --all --grep README.md\n" +
34+
" $ bump --prompt --tag --push --all\n"
3535
);
3636
})
3737
.parse(process.argv);
@@ -48,7 +48,7 @@ else {
4848
options.grep = program.args.concat(options.grep);
4949
}
5050

51-
if (typeof options.commit === 'string') {
51+
if (typeof options.commit === "string") {
5252
options.commitMessage = options.commit;
5353
options.commit = true;
5454
}
@@ -58,7 +58,7 @@ else {
5858
.then(() => {
5959
api.grep(manifests, options);
6060
manifests.forEach((manifest) => {
61-
api.runNpmScriptIfExists(manifest, 'version');
61+
api.runNpmScriptIfExists(manifest, "version");
6262
});
6363
})
6464
.then(() => {
@@ -67,7 +67,7 @@ else {
6767
}
6868
else {
6969
manifests.forEach((manifest) => {
70-
api.runNpmScriptIfExists(manifest, 'postversion');
70+
api.runNpmScriptIfExists(manifest, "postversion");
7171
});
7272
}
7373
})
@@ -87,7 +87,7 @@ else {
8787
function bumpManifests (manifests, options) {
8888
let i = 0;
8989

90-
return bumpNext('patch');
90+
return bumpNext("patch");
9191

9292
function bumpNext (defaultBumpType) {
9393
let manifest = manifests[i++];
@@ -110,37 +110,37 @@ function bumpManifests (manifests, options) {
110110
*/
111111
function bumpManifest (manifest, defaultBumpType, options) {
112112
return new Promise((resolve, reject) => {
113-
api.runNpmScriptIfExists(manifest, 'preversion');
113+
api.runNpmScriptIfExists(manifest, "preversion");
114114

115115
if (options.prompt) {
116116
// Prompt the user for the type of bump to perform
117117
let version = api.versionInfo(manifest, options);
118-
console.log('\nCurrent version in %s is %s', manifest, version.current);
118+
console.log("\nCurrent version in %s is %s", manifest, version.current);
119119

120120
inquirer.prompt([
121121
{
122-
type: 'list',
123-
name: 'bumpType',
124-
message: 'How would you like to bump it?',
122+
type: "list",
123+
name: "bumpType",
124+
message: "How would you like to bump it?",
125125
default: defaultBumpType,
126126
choices: [
127-
{ value: 'major', name: 'major (' + version.nextMajor + ')' },
128-
{ value: 'minor', name: 'minor (' + version.nextMinor + ')' },
129-
{ value: 'patch', name: 'patch (' + version.nextPatch + ')' },
130-
{ value: 'premajor', name: 'pre-release major (' + version.nextPreMajor + ')' },
131-
{ value: 'preminor', name: 'pre-release minor (' + version.nextPreMinor + ')' },
132-
{ value: 'prepatch', name: 'pre-release patch (' + version.nextPrePatch + ')' },
133-
{ value: 'prerelease', name: 'pre-release (' + version.nextPreRelease + ')' },
127+
{ value: "major", name: "major (" + version.nextMajor + ")" },
128+
{ value: "minor", name: "minor (" + version.nextMinor + ")" },
129+
{ value: "patch", name: "patch (" + version.nextPatch + ")" },
130+
{ value: "premajor", name: "pre-release major (" + version.nextPreMajor + ")" },
131+
{ value: "preminor", name: "pre-release minor (" + version.nextPreMinor + ")" },
132+
{ value: "prepatch", name: "pre-release patch (" + version.nextPrePatch + ")" },
133+
{ value: "prerelease", name: "pre-release (" + version.nextPreRelease + ")" },
134134
new inquirer.Separator(),
135-
{ value: 'custom', name: 'custom...' },
135+
{ value: "custom", name: "custom..." },
136136
]
137137
},
138138
{
139-
type: 'input',
140-
name: 'newVersion',
141-
message: 'Enter the new version number:',
139+
type: "input",
140+
name: "newVersion",
141+
message: "Enter the new version number:",
142142
default: version.current,
143-
when: answers => answers.bumpType === 'custom',
143+
when: answers => answers.bumpType === "custom",
144144
filter: SemVer.clean,
145145
validate: answer => {
146146
return SemVer.valid(answer) ? true : "That's not a valid version number";
@@ -153,13 +153,13 @@ function bumpManifest (manifest, defaultBumpType, options) {
153153
}
154154
else {
155155
let bumpType =
156-
options.major ? 'major'
157-
: options.minor ? 'minor'
158-
: options.patch ? 'patch'
159-
: options.premajor ? 'premajor'
160-
: options.preminor ? 'preminor'
161-
: options.prepatch ? 'prepatch'
162-
: options.prerelease ? 'prerelease'
156+
options.major ? "major"
157+
: options.minor ? "minor"
158+
: options.patch ? "patch"
159+
: options.premajor ? "premajor"
160+
: options.preminor ? "preminor"
161+
: options.prepatch ? "prepatch"
162+
: options.prerelease ? "prerelease"
163163
: defaultBumpType;
164164

165165
bump(bumpType);

0 commit comments

Comments
 (0)