Skip to content

Commit 17bf6ed

Browse files
committed
Use native Buffer.from()
safe-buffer is not needed in Node 8 anymore, we can safely use native Buffer.from(). See https://nodejs.org/fr/docs/guides/buffer-constructor-deprecation/
1 parent c264441 commit 17bf6ed

File tree

26 files changed

+8
-36
lines changed

26 files changed

+8
-36
lines changed

appengine/endpoints/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
const express = require('express');
1919
const bodyParser = require('body-parser');
20-
const {Buffer} = require('safe-buffer');
2120

2221
const app = express();
2322
app.use(bodyParser.json());

appengine/endpoints/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"dependencies": {
2525
"body-parser": "^1.18.3",
2626
"express": "^4.16.4",
27-
"safe-buffer": "^5.1.2"
2827
},
2928
"devDependencies": {
3029
"@google-cloud/nodejs-repo-tools": "^3.3.0",

appengine/endpoints/test/app.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
'use strict';
1717

18-
const {Buffer} = require('safe-buffer');
1918
const express = require('express');
2019
const path = require('path');
2120
const proxyquire = require('proxyquire').noCallThru();

appengine/pubsub/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const express = require('express');
1919
const bodyParser = require('body-parser');
2020
const {OAuth2Client} = require('google-auth-library');
2121
const path = require('path');
22-
const {Buffer} = require('safe-buffer');
2322
const process = require('process'); // Required for mocking environment variables
2423

2524
// By default, the client will authenticate using the service account file

appengine/pubsub/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"body-parser": "^1.18.3",
1818
"express": "^4.16.3",
1919
"google-auth-library": "^5.0.0",
20-
"pug": "^2.0.1",
21-
"safe-buffer": "^5.1.2"
20+
"pug": "^2.0.1"
2221
},
2322
"devDependencies": {
2423
"@google-cloud/nodejs-repo-tools": "^3.3.0",

endpoints/getting-started/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
// [START setup]
2020
const express = require('express');
2121
const bodyParser = require('body-parser');
22-
const {Buffer} = require('safe-buffer');
2322

2423
const app = express();
2524

endpoints/getting-started/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
},
1919
"dependencies": {
2020
"body-parser": "^1.18.3",
21-
"express": "^4.16.4",
22-
"safe-buffer": "^5.1.2"
21+
"express": "^4.16.4"
2322
},
2423
"devDependencies": {
2524
"@google-cloud/nodejs-repo-tools": "^3.3.0",

endpoints/getting-started/test/app.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
'use strict';
1717

18-
const {Buffer} = require('safe-buffer');
1918
const express = require('express');
2019
const path = require('path');
2120
const proxyquire = require('proxyquire').noPreserveCache();

functions/helloworld/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
'use strict';
1717

18-
const {Buffer} = require('safe-buffer');
19-
2018
// [START functions_helloworld_http]
2119
const escapeHtml = require('escape-html');
2220

functions/helloworld/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"dependencies": {
2020
"@google-cloud/debug-agent": "^4.0.0",
2121
"escape-html": "^1.0.3",
22-
"pug": "^2.0.3",
23-
"safe-buffer": "^5.1.2"
22+
"pug": "^2.0.3"
2423
},
2524
"devDependencies": {
2625
"@google-cloud/nodejs-repo-tools": "^3.3.0",

0 commit comments

Comments
 (0)