Commit 68e68f0 1 parent e792fdc commit 68e68f0 Copy full SHA for 68e68f0
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,17 @@ async function printCDNTable(names) {
75
75
if ( ! names . includes ( name ) || ! file ) continue ;
76
76
const version = newPlugins [ name ] ;
77
77
const links = getVendors ( { ...value , version, minified : file } ) ;
78
+ const path = `./node_modules/${ name } /${ file } ` ;
79
+ const fileExists = fs . existsSync ( path ) ;
80
+ if ( ! fileExists ) {
81
+ console . log ( `
82
+ ## ${ name }
83
+
84
+ The file \`${ file } \` does not exist.` ) ;
85
+ continue ;
86
+ }
78
87
const integrity = await ssri
79
- . fromStream ( fs . createReadStream ( `./node_modules/ ${ name } / ${ file } ` ) , { algorithms : [ 'sha256' ] } ) ;
88
+ . fromStream ( fs . createReadStream ( path ) , { algorithms : [ 'sha256' ] } ) ;
80
89
await formatTable ( key , links , integrity . toString ( ) ) ;
81
90
}
82
91
}
You can’t perform that action at this time.
0 commit comments