Skip to content

Commit

Permalink
Merge pull request #50 from OldSneerJaw/48-prep-release-1.2.1
Browse files Browse the repository at this point in the history
Issue 48: Prepare release of v1.2.1
  • Loading branch information
dkichler authored May 21, 2019
2 parents 3981a63 + 73f793f commit e32ca62
Show file tree
Hide file tree
Showing 13 changed files with 4,355 additions and 4,625 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/). All notable changes will be documented in this file.

## [Unreleased]
## [1.2.1] - 2019-05-21
### Fixed
- [#46](https://github.com/OldSneerJaw/couchster/issues/46): Broken error equality test in Node.js 12

Expand Down Expand Up @@ -41,7 +41,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). All notable c
## [0.1.0] - 2018-02-28
Adapted from [synctos](https://github.com/Kashoo/synctos) for use with CouchDB

[Unreleased]: https://github.com/OldSneerJaw/couchster/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/OldSneerJaw/couchster/compare/v1.2.1...HEAD
[1.2.1]: https://github.com/OldSneerJaw/couchster/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/OldSneerJaw/couchster/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/OldSneerJaw/couchster/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/OldSneerJaw/couchster/compare/v0.2.0...v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion lib/commander/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.1
2.20.0
39 changes: 13 additions & 26 deletions lib/commander/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,11 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) {

// In case of globally installed, get the base dir where executable
// subcommand file should be located at
var baseDir,
link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f;
var baseDir;

// when symbolink is relative path
if (link !== f && link.charAt(0) !== '/') {
link = path.join(dirname(f), link);
}
baseDir = dirname(link);
var resolvedLink = fs.realpathSync(f);

baseDir = dirname(resolvedLink);

// prefer local `./<bin>` to bin in the $PATH
var localBin = path.join(baseDir, bin);
Expand Down Expand Up @@ -580,9 +577,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) {
proc.on('close', process.exit.bind(process));
proc.on('error', function(err) {
if (err.code === 'ENOENT') {
console.error('%s(1) does not exist, try --help', bin);
console.error('error: %s(1) does not exist, try --help', bin);
} else if (err.code === 'EACCES') {
console.error('%s(1) not executable. try chmod or run with root', bin);
console.error('error: %s(1) not executable. try chmod or run with root', bin);
}
process.exit(1);
});
Expand Down Expand Up @@ -664,7 +661,7 @@ Command.prototype.parseArgs = function(args, unknown) {
this.unknownOption(unknown[0]);
}
if (this.commands.length === 0 &&
this._args.filter(function(a) { return a.required }).length === 0) {
this._args.filter(function(a) { return a.required; }).length === 0) {
this.emit('command:*');
}
}
Expand Down Expand Up @@ -792,9 +789,7 @@ Command.prototype.opts = function() {
*/

Command.prototype.missingArgument = function(name) {
console.error();
console.error(" error: missing required argument `%s'", name);
console.error();
console.error("error: missing required argument `%s'", name);
process.exit(1);
};

Expand All @@ -807,13 +802,11 @@ Command.prototype.missingArgument = function(name) {
*/

Command.prototype.optionMissingArgument = function(option, flag) {
console.error();
if (flag) {
console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
console.error("error: option `%s' argument missing, got `%s'", option.flags, flag);
} else {
console.error(" error: option `%s' argument missing", option.flags);
console.error("error: option `%s' argument missing", option.flags);
}
console.error();
process.exit(1);
};

Expand All @@ -826,9 +819,7 @@ Command.prototype.optionMissingArgument = function(option, flag) {

Command.prototype.unknownOption = function(flag) {
if (this._allowUnknownOption) return;
console.error();
console.error(" error: unknown option `%s'", flag);
console.error();
console.error("error: unknown option `%s'", flag);
process.exit(1);
};

Expand All @@ -840,9 +831,7 @@ Command.prototype.unknownOption = function(flag) {
*/

Command.prototype.variadicArgNotLast = function(name) {
console.error();
console.error(" error: variadic arguments must be last `%s'", name);
console.error();
console.error("error: variadic arguments must be last `%s'", name);
process.exit(1);
};

Expand Down Expand Up @@ -1053,7 +1042,7 @@ Command.prototype.optionHelp = function() {
// Append the help information
return this.options.map(function(option) {
return pad(option.flags, width) + ' ' + option.description +
((option.bool && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : '');
((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : '');
}).concat([pad('-h, --help', width) + ' ' + 'output usage information'])
.join('\n');
};
Expand All @@ -1073,7 +1062,6 @@ Command.prototype.commandHelp = function() {

return [
'Commands:',
'',
commands.map(function(cmd) {
var desc = cmd[1] ? ' ' + cmd[1] : '';
return (desc ? pad(cmd[0], width) : cmd[0]) + desc;
Expand Down Expand Up @@ -1124,7 +1112,6 @@ Command.prototype.helpInformation = function() {

var options = [
'Options:',
'',
'' + this.optionHelp().replace(/^/gm, ' '),
''
];
Expand Down
2 changes: 1 addition & 1 deletion lib/indent.js/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.2
0.3.4
Loading

0 comments on commit e32ca62

Please sign in to comment.