mirror of
https://github.com/denysdovhan/wtfjs.git
synced 2025-08-26 04:33:19 +08:00
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:
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wtfjs",
|
||||
"version": "1.22.0",
|
||||
"version": "1.22.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -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"
|
||||
|
24
wtfjs.js
24
wtfjs.js
@ -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));
|
||||
|
Reference in New Issue
Block a user