@@ -570,7 +570,7 @@ function processCoreBundleFormat(fileHeader: string, languages: Language[], json
570570 contents . push ( index < modules . length - 1 ? '\t],' : '\t]' ) ;
571571 } ) ;
572572 contents . push ( '});' ) ;
573- emitter . queue ( new File ( { path : bundle + '.nls.' + language . id + '.js' , contents : new Buffer ( contents . join ( '\n' ) , 'utf-8' ) } ) ) ;
573+ emitter . queue ( new File ( { path : bundle + '.nls.' + language . id + '.js' , contents : Buffer . from ( contents . join ( '\n' ) , 'utf-8' ) } ) ) ;
574574 } ) ;
575575 } ) ;
576576 Object . keys ( statistics ) . forEach ( key => {
@@ -667,7 +667,7 @@ export function createXlfFilesForCoreBundle(): ThroughStream {
667667 const filePath = `${ xlf . project } /${ resource . replace ( / \/ / g, '_' ) } .xlf` ;
668668 const xlfFile = new File ( {
669669 path : filePath ,
670- contents : new Buffer ( xlf . toString ( ) , 'utf8' )
670+ contents : Buffer . from ( xlf . toString ( ) , 'utf8' )
671671 } ) ;
672672 this . queue ( xlfFile ) ;
673673 }
@@ -738,7 +738,7 @@ export function createXlfFilesForExtensions(): ThroughStream {
738738 if ( _xlf ) {
739739 let xlfFile = new File ( {
740740 path : path . join ( extensionsProject , extensionName + '.xlf' ) ,
741- contents : new Buffer ( _xlf . toString ( ) , 'utf8' )
741+ contents : Buffer . from ( _xlf . toString ( ) , 'utf8' )
742742 } ) ;
743743 folderStream . queue ( xlfFile ) ;
744744 }
@@ -810,7 +810,7 @@ export function createXlfFilesForIsl(): ThroughStream {
810810
811811 // Emit only upon all ISL files combined into single XLF instance
812812 const newFilePath = path . join ( projectName , resourceFile ) ;
813- const xlfFile = new File ( { path : newFilePath , contents : new Buffer ( xlf . toString ( ) , 'utf-8' ) } ) ;
813+ const xlfFile = new File ( { path : newFilePath , contents : Buffer . from ( xlf . toString ( ) , 'utf-8' ) } ) ;
814814 this . queue ( xlfFile ) ;
815815 } ) ;
816816}
@@ -1174,7 +1174,7 @@ function createI18nFile(originalFilePath: string, messages: any): File {
11741174 let content = JSON . stringify ( result , null , '\t' ) . replace ( / \r \n / g, '\n' ) ;
11751175 return new File ( {
11761176 path : path . join ( originalFilePath + '.i18n.json' ) ,
1177- contents : new Buffer ( content , 'utf8' )
1177+ contents : Buffer . from ( content , 'utf8' )
11781178 } ) ;
11791179}
11801180
@@ -1328,7 +1328,7 @@ function createIslFile(originalFilePath: string, messages: Map<string>, language
13281328
13291329 return new File ( {
13301330 path : filePath ,
1331- contents : iconv . encode ( new Buffer ( content . join ( '\r\n' ) , 'utf8' ) , innoSetup . codePage )
1331+ contents : iconv . encode ( Buffer . from ( content . join ( '\r\n' ) , 'utf8' ) , innoSetup . codePage )
13321332 } ) ;
13331333}
13341334
0 commit comments