chore(release): 1.22.1 [skip ci]

## [1.22.1](https://github.com/denysdovhan/wtfjs/compare/v1.22.0...v1.22.1) (2022-04-22)

### Bug Fixes

* fix description ([#220](https://github.com/denysdovhan/wtfjs/issues/220)) ([b28f5b5](b28f5b58bb))
* fix doctoc in deps ([78f3384](78f33844b0))
* **readme:** Add notice about Ukraine ([d288e70](d288e70b38))
This commit is contained in:
semantic-release-bot
2022-04-22 13:24:46 +00:00
parent 898a5b3dda
commit 7f5d1b4cba
3 changed files with 13 additions and 15 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "wtfjs",
"version": "1.22.0",
"version": "1.22.1",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -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"

View File

@ -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 });
@ -66,7 +66,7 @@ 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;
@ -74,14 +74,12 @@ fs.stat(translation, function(err, stats) {
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));