File tree Expand file tree Collapse file tree 3 files changed +383
-655
lines changed
Expand file tree Collapse file tree 3 files changed +383
-655
lines changed Original file line number Diff line number Diff line change 55 "main" : " lib/index.js" ,
66 "scripts" : {
77 "release" : " standard-version -a -s" ,
8- "test" : " npm run lint && jest" ,
8+ "test" : " jest" ,
99 "lint" : " eslint . --ext .js,.ts" ,
1010 "commitmsg" : " commitlint -e $GIT_PARAMS" ,
1111 "type-check" : " tsc --noEmit" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export const noSuchFile = 'ENOENT';
1616export const resourceNotAvailable = 'EAGAIN' ;
1717export const pkgFileName = 'package.json' ;
1818
19+ type CallbackFS = NodeJS . ErrnoException | null ;
20+
1921export const fSError = function ( message : string , code : number = 409 ) : HttpError {
2022 const err : HttpError = createError ( code , message ) ;
2123 // $FlowFixMe
@@ -127,11 +129,11 @@ export default class LocalFS implements ILocalFSPackageManager {
127129 } ) ;
128130 }
129131
130- deletePackage ( fileName : string , callback : CallbackError ) {
132+ deletePackage ( fileName : string , callback : ( err : NodeJS . ErrnoException | null ) => void ) {
131133 return fs . unlink ( this . _getStorage ( fileName ) , callback ) ;
132134 }
133135
134- removePackage ( callback : CallbackError ) : void {
136+ removePackage ( callback : ( err : NodeJS . ErrnoException | null ) => void ) : void {
135137 fs . rmdir ( this . _getStorage ( '.' ) , callback ) ;
136138 }
137139
You can’t perform that action at this time.
0 commit comments