File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 15
15
"start" : " node ./bin/picgo" ,
16
16
"lint" : " eslint src/**/*.ts && npm run build" ,
17
17
"test" : " echo \" Error: no test specified\" && exit 1" ,
18
- "build" : " rm -rf ./dist && rollup -c rollup.config.js && ls -lh dist " ,
18
+ "build" : " rimraf ./dist && rollup -c rollup.config.js" ,
19
19
"dev" : " rollup -c rollup.config.js -w" ,
20
20
"patch" : " npm version patch && git push origin master && git push origin --tags" ,
21
21
"minor" : " npm version minor && git push origin master && git push origin --tags" ,
115
115
"request" : " ^2.87.0" ,
116
116
"request-promise-native" : " ^1.0.5" ,
117
117
"resolve" : " ^1.8.1" ,
118
- "rimraf" : " ^2.6.3 "
118
+ "rimraf" : " ^3.0.2 "
119
119
},
120
120
"repository" : {
121
121
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ export class Logger implements ILogger {
47
47
let log = `${ dayjs ( ) . format ( 'YYYY-MM-DD HH:mm:ss' ) } [PicGo ${ type . toUpperCase ( ) } ] `
48
48
msg . forEach ( ( item : ILogArgvTypeWithError ) => {
49
49
if ( typeof item === 'object' && type === 'error' ) {
50
- log += `\n------Error Stack Begin------\n${ util . format ( item . stack ) } \n-------Error Stack End------- `
50
+ log += `\n------Error Stack Begin------\n${ util . format ( item ? .stack ) } \n-------Error Stack End------- `
51
51
} else {
52
52
if ( typeof item === 'object' ) {
53
53
item = JSON . stringify ( item )
54
54
}
55
- log += `${ item } `
55
+ log += `${ item as string } `
56
56
}
57
57
} )
58
58
log += '\n'
Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ export class PluginHandler implements IPluginHandler {
229
229
this . ctx . log . error ( 'NPM is not installed' )
230
230
this . ctx . emit ( IBuildInEvent . FAILED , 'NPM is not installed' )
231
231
} )
232
- } catch ( e : any ) {
233
- this . ctx . log . error ( e )
232
+ } catch ( e ) {
233
+ this . ctx . log . error ( e as Error )
234
234
this . ctx . emit ( IBuildInEvent . FAILED , e )
235
235
}
236
236
} )
Original file line number Diff line number Diff line change @@ -92,11 +92,11 @@ export class PluginLoader implements IPluginLoader {
92
92
this . pluginMap . set ( name , pluginInterface )
93
93
plugin ( this . ctx ) . register ( this . ctx )
94
94
}
95
- } catch ( e : any ) {
95
+ } catch ( e ) {
96
96
this . pluginMap . delete ( name )
97
97
this . list = this . list . filter ( ( item : string ) => item !== name )
98
98
this . fullList . delete ( name )
99
- this . ctx . log . error ( e )
99
+ this . ctx . log . error ( e as Error )
100
100
this . ctx . emit ( IBuildInEvent . NOTIFICATION , {
101
101
title : `Plugin ${ name } Load Error` ,
102
102
body : e
Original file line number Diff line number Diff line change @@ -4839,7 +4839,7 @@ reusify@^1.0.4:
4839
4839
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
4840
4840
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
4841
4841
4842
- rimraf@^2.5.2, rimraf@^2.6.3 :
4842
+ rimraf@^2.5.2 :
4843
4843
version "2.7.1"
4844
4844
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
4845
4845
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
You can’t perform that action at this time.
0 commit comments