@@ -176,7 +176,6 @@ export interface Externals {
176176 * Bundle class to validate and pack nodejs bundles.
177177 */
178178export class Bundle {
179-
180179 private readonly manifest : any ;
181180 private readonly noticePath : string ;
182181
@@ -239,7 +238,6 @@ export class Bundle {
239238 * returned report and act accordingly.
240239 */
241240 public validate ( options : BundleValidateOptions = { } ) : ViolationsReport {
242-
243241 const fix = options . fix ?? false ;
244242
245243 // first validate
@@ -270,7 +268,6 @@ export class Bundle {
270268 * Returns the temp directory location.
271269 */
272270 public write ( ) : string {
273-
274271 const target = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'bundle-write-' ) ) ;
275272
276273 // we definitely don't need these directories in the package
@@ -302,7 +299,6 @@ export class Bundle {
302299 * Returns the location of the tarball.
303300 */
304301 public pack ( options : BundlePackOptions = { } ) : string {
305-
306302 const target = options . target ?? this . packageDir ;
307303
308304 const report = this . validate ( ) ;
@@ -324,7 +320,6 @@ export class Bundle {
324320 console . log ( 'Writing bundle' ) ;
325321 const bundleDir = this . write ( ) ;
326322 try {
327-
328323 if ( this . test ) {
329324 const command = `${ path . join ( bundleDir , this . test ) } ` ;
330325 console . log ( `Running sanity test: ${ command } ` ) ;
@@ -385,7 +380,6 @@ export class Bundle {
385380 }
386381
387382 private findExternalDependencyVersion ( name : string ) : string {
388-
389383 const versions = new Set < string > ( ) ;
390384
391385 // external dependencies will not exist in the dependencies list
@@ -418,7 +412,6 @@ export class Bundle {
418412 }
419413
420414 private closestPackagePath ( fdp : string ) : string {
421-
422415 if ( fs . existsSync ( path . join ( fdp , 'package.json' ) ) ) {
423416 return fdp ;
424417 }
@@ -437,7 +430,6 @@ export class Bundle {
437430 }
438431
439432 private esbuild ( ) : esbuild . BuildResult {
440-
441433 const bundle = esbuild . buildSync ( {
442434 entryPoints : this . entryPoints ,
443435 bundle : true ,
@@ -506,7 +498,6 @@ export class Bundle {
506498 }
507499
508500 private addExternals ( manifest : any ) {
509-
510501 // external dependencies should be specified as runtime dependencies
511502 for ( const external of this . externals . dependencies ?? [ ] ) {
512503 const version = this . findExternalDependencyVersion ( external ) ;
@@ -520,7 +511,6 @@ export class Bundle {
520511 manifest . optionalDependencies = manifest . optionalDependencies ?? { } ;
521512 manifest . optionalDependencies [ external ] = version ;
522513 }
523-
524514 }
525515
526516 private removeDependencies ( manifest : any ) {
@@ -551,7 +541,6 @@ export class Bundle {
551541}
552542
553543function longestCommonParent ( paths : string [ ] ) {
554-
555544 function _longestCommonParent ( p1 : string , p2 : string ) : string {
556545 const dirs1 = p1 . split ( path . sep ) ;
557546 const dirs2 = p2 . split ( path . sep ) ;
0 commit comments