From dc4befb39d41d7d1577c28850d0d58dd2f109fe8 Mon Sep 17 00:00:00 2001 From: windard Date: Thu, 24 Oct 2019 17:12:26 +0800 Subject: [PATCH 1/2] fix stat ERR_OUT_OF_RANGE error --- lib/commands/stat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/stat.js b/lib/commands/stat.js index 772499c4..4f717f8b 100644 --- a/lib/commands/stat.js +++ b/lib/commands/stat.js @@ -169,7 +169,7 @@ function showCal(problems) { const idx = now.diff(d, 'days'); const j = (N_WEEKS - idx / N_WEEKDAYS + 1) * 2; - if (j >= 0) buf.write(MONTHS[d.month()], j); + if (j >= 0) buf.write(MONTHS[d.month()], j | 0); } log.printf('%7s%s', ' ', buf.toString()); From 6afbecd968cc39cad0b704789a28bf9ae0275f3a Mon Sep 17 00:00:00 2001 From: Shu0t1an Cheng Date: Fri, 10 Jan 2020 11:22:33 -0800 Subject: [PATCH 2/2] Do not install node modules globally --- bin/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install b/bin/install index 6f39955a..c5a497ae 100755 --- a/bin/install +++ b/bin/install @@ -32,5 +32,5 @@ check npm create $ENVFILE -npm install -g . +npm install . echo "leetcode-cli successfully installed."