Skip to content

Commit 556a236

Browse files
committed
Fix: 'Buffer() is deprecated' warnings
1 parent 38f5997 commit 556a236

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

gulpfile.babel.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ function ui5LibPreloads() {
12571257
'**/library-preload.json',
12581258
tap(oFile => {
12591259
const oJSONRaw = oFile.contents.toString('utf8')
1260-
oFile.contents = new Buffer(
1260+
oFile.contents = Buffer.from(
12611261
`jQuery.sap.registerPreloadedModules(${oJSONRaw});`
12621262
)
12631263
return oFile
@@ -1598,7 +1598,7 @@ function ui5ThemeStyles() {
15981598
.pipe(
15991599
tap(oFile => {
16001600
const sCSS = oFile.contents.toString('utf8')
1601-
oFile.contents = new Buffer(
1601+
oFile.contents = Buffer.from(
16021602
sCSS.replace(/(\s*\d*\.?\d+)em/gm, '$1rem')
16031603
)
16041604
return oFile
@@ -1686,7 +1686,7 @@ function ui5ThemeStylesDist() {
16861686
*/
16871687
tap(oFile => {
16881688
const sCSS = oFile.contents.toString('utf8')
1689-
oFile.contents = new Buffer(
1689+
oFile.contents = Buffer.from(
16901690
sCSS.replace(/(\s*\d*\.?\d+)em/gm, '$1rem')
16911691
)
16921692
return oFile
@@ -1774,13 +1774,13 @@ function loadDependencies() {
17741774
.pipe(
17751775
tap(file => {
17761776
file.contents = Buffer.concat([
1777-
new Buffer(
1777+
Buffer.from(
17781778
`sap.ui.define([/* no dependencies */], function(){
17791779
var exports = {};
17801780
var module = { exports: null };`
17811781
),
17821782
file.contents,
1783-
new Buffer(`return module.exports; });`)
1783+
Buffer.from(`return module.exports; });`)
17841784
])
17851785
})
17861786
)
@@ -1865,13 +1865,13 @@ function loadDependenciesDist() {
18651865
.pipe(
18661866
tap(file => {
18671867
file.contents = Buffer.concat([
1868-
new Buffer(
1868+
Buffer.from(
18691869
`sap.ui.define([/* no dependencies */], function(){
18701870
var exports = {};
18711871
var module = { exports: null };`
18721872
),
18731873
file.contents,
1874-
new Buffer(`return module.exports; });`)
1874+
Buffer.from(`return module.exports; });`)
18751875
])
18761876
})
18771877
)

0 commit comments

Comments
 (0)