Skip to content

Commit

Permalink
chore(release): 1.22.1 [skip ci]
Browse files Browse the repository at this point in the history
## [1.22.1](v1.22.0...v1.22.1) (2022-04-22)

### Bug Fixes

* fix description ([#220](#220)) ([b28f5b5](b28f5b5))
* fix doctoc in deps ([78f3384](78f3384))
* **readme:** Add notice about Ukraine ([d288e70](d288e70))
  • Loading branch information
semantic-release-bot committed Apr 22, 2022
1 parent 898a5b3 commit 7f5d1b4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wtfjs",
"version": "1.22.0",
"version": "1.22.1",
"description": "A list of funny and tricky JavaScript examples",
"bin": {
"wtfjs": "wtfjs.js"
Expand Down
24 changes: 11 additions & 13 deletions wtfjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ const cli = meow(
"",
"Examples",
" wtfjs",
" wtfjs --lang pt-br"
" wtfjs --lang pt-br",
],
{
string: ["lang"],
alias: {
l: "lang",
h: "help"
h: "help",
},
default: {
lang: ""
}
lang: "",
},
}
);

const boxenOpts = {
borderColor: "yellow",
margin: {
bottom: 1
bottom: 1,
},
padding: {
right: 1,
left: 1
}
left: 1,
},
};

const mseeOpts = {
paragraphEnd: "\n\n"
paragraphEnd: "\n\n",
};

const notifier = updateNotifier({ pkg });
Expand All @@ -66,22 +66,20 @@ const translation = join(
!lang ? "./README.md" : `./README-${lang}.md`
);

fs.stat(translation, function(err, stats) {
fs.stat(translation, function (err, stats) {
if (err) {
console.log("The %s translation does not exist", chalk.bold(lang));
return;
}

fs.createReadStream(translation)
.pipe(
obj(function(chunk, enc, cb) {
obj(function (chunk, enc, cb) {
const message = [];

if (notifier.update) {
message.push(
`Update available: {green.bold ${
notifier.update.latest
}} {dim current: ${notifier.update.current}}`
`Update available: {green.bold ${notifier.update.latest}} {dim current: ${notifier.update.current}}`
);
message.push(`Run {blue npm install -g ${pkg.name}} to update.`);
this.push(boxen(message.join("\n"), boxenOpts));
Expand Down

0 comments on commit 7f5d1b4

Please sign in to comment.