Skip to content

Commit e607e70

Browse files
committed
feat: check latest version & show local version
1 parent 6fe403c commit e607e70

File tree

5 files changed

+420
-19
lines changed

5 files changed

+420
-19
lines changed

index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import color from 'picocolors'
88
import {
99
banner,
1010
checkDuplicateDir,
11+
checkNewVersion,
1112
choices,
1213
download,
1314
fixDirectoryPath,
@@ -24,6 +25,8 @@ async function init() {
2425

2526
await stinger()
2627

28+
await checkNewVersion().catch(() => process.exit(0))
29+
2730
const args = process.argv.slice(2)
2831

2932
const { positionals } = parseArgs({

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@
5050
"degit": "^2.8.4",
5151
"glob": "^10.3.12",
5252
"gradient-string": "^2.0.2",
53-
"picocolors": "^1.0.0"
53+
"is-online": "9.0.1",
54+
"picocolors": "^1.0.0",
55+
"semver": "^7.6.0"
5456
},
5557
"devDependencies": {
56-
"@leedomjs/eslint-config-ts": "^0.9.0",
58+
"@leedomjs/eslint-config-ts": "^0.10.0",
5759
"@types/node": "^20.12.2",
5860
"bumpp": "^9.4.0",
5961
"eslint": "^8.57.0",

0 commit comments

Comments
 (0)