Skip to content

Commit 80947e9

Browse files
renovate[bot]fhinkel
authored andcommitted
chore(deps): update dependency @google-cloud/storage to v2
Fixes: #979
1 parent b485ea6 commit 80947e9

File tree

20 files changed

+29
-25
lines changed

20 files changed

+29
-25
lines changed

appengine/storage/flexible/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const bodyParser = require('body-parser');
2828
// the project specified by the GOOGLE_CLOUD_PROJECT environment variable. See
2929
// https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
3030
// These environment variables are set automatically on Google App Engine
31-
const Storage = require('@google-cloud/storage');
31+
const {Storage} = require('@google-cloud/storage');
3232

3333
// Instantiate a storage client
34-
const storage = Storage();
34+
const storage = new Storage();
3535

3636
const app = express();
3737
app.set('view engine', 'pug');

appengine/storage/flexible/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"node": ">=8.0.0"
1010
},
1111
"dependencies": {
12-
"@google-cloud/storage": "1.7.0",
12+
"@google-cloud/storage": "2.3.1",
1313
"body-parser": "1.18.2",
1414
"express": "4.16.4",
1515
"multer": "1.4.1",

appengine/storage/flexible/system-test/app.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
'use strict';
1515

1616
const path = require(`path`);
17-
const Storage = require(`@google-cloud/storage`);
18-
const storage = Storage();
17+
const {Storage} = require(`@google-cloud/storage`);
18+
const storage = new Storage();
1919
const test = require(`ava`);
2020
const utils = require(`@google-cloud/nodejs-repo-tools`);
2121

appengine/storage/standard/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const bodyParser = require('body-parser');
2828
// the project specified by the GOOGLE_CLOUD_PROJECT environment variable. See
2929
// https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
3030
// These environment variables are set automatically on Google App Engine
31-
const Storage = require('@google-cloud/storage');
31+
const {Storage} = require('@google-cloud/storage');
3232

3333
// Instantiate a storage client
34-
const storage = Storage();
34+
const storage = new Storage();
3535

3636
const app = express();
3737
app.set('view engine', 'pug');

appengine/storage/standard/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"node": ">=8"
1010
},
1111
"dependencies": {
12-
"@google-cloud/storage": "1.7.0",
12+
"@google-cloud/storage": "2.3.1",
1313
"body-parser": "1.18.2",
1414
"express": "4.16.4",
1515
"multer": "1.4.1",

appengine/storage/standard/system-test/app.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
'use strict';
1515

1616
const path = require(`path`);
17-
const Storage = require(`@google-cloud/storage`);
18-
const storage = Storage();
17+
const {Storage} = require(`@google-cloud/storage`);
18+
const storage = new Storage();
1919
const test = require(`ava`);
2020
const utils = require(`@google-cloud/nodejs-repo-tools`);
2121

functions/helloworld/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@google-cloud/nodejs-repo-tools": "^2.2.5",
2727
"@google-cloud/pubsub": "^0.22.0",
28-
"@google-cloud/storage": "^1.5.0",
28+
"@google-cloud/storage": "^2.0.0",
2929
"ava": "0.25.0",
3030
"express": "^4.16.3",
3131
"proxyquire": "2.1.0",

functions/helloworld/test/sample.system.storage.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
*/
1515

1616
// [START functions_storage_system_test]
17-
const Storage = require(`@google-cloud/storage`);
18-
const storage = Storage();
17+
const {Storage} = require(`@google-cloud/storage`);
18+
const storage = new Storage();
1919
const uuid = require(`uuid`);
2020
const test = require(`ava`);
2121
const path = require(`path`);

functions/http/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ exports.uploadFile = (req, res) => {
194194
// [END functions_http_form_data]
195195

196196
// [START functions_http_signed_url]
197-
const storage = require('@google-cloud/storage')();
197+
const {Storage} = require('@google-cloud/storage');
198+
const storage = new Storage();
198199

199200
/**
200201
* HTTP function that generates a signed URL

functions/http/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"sinon": "4.4.2"
2222
},
2323
"dependencies": {
24-
"@google-cloud/storage": "1.7.0",
24+
"@google-cloud/storage": "2.3.1",
2525
"busboy": "^0.2.14",
2626
"escape-html": "^1.0.3",
2727
"safe-buffer": "5.1.2"

functions/imagemagick/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
const gm = require('gm').subClass({imageMagick: true});
2020
const fs = require('fs');
2121
const path = require('path');
22-
const storage = require('@google-cloud/storage')();
22+
const {Storage} = require('@google-cloud/storage');
23+
const storage = new Storage();
2324
const vision = require('@google-cloud/vision').v1p1beta1;
2425

2526
const client = new vision.ImageAnnotatorClient();

functions/imagemagick/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test": "ava -T 20s --verbose test/*.test.js"
1616
},
1717
"dependencies": {
18-
"@google-cloud/storage": "1.7.0",
18+
"@google-cloud/storage": "2.3.1",
1919
"@google-cloud/vision": "0.23.0",
2020
"gm": "^1.23.1"
2121
},

functions/imagemagick/test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function getSample(filename) {
6868

6969
return {
7070
program: proxyquire(`../`, {
71-
'@google-cloud/storage': StorageMock,
71+
'@google-cloud/storage': {Storage: StorageMock},
7272
gm: gmMock,
7373
fs: fsMock,
7474
}),

functions/ocr/app/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const config = require('./config.json');
2222
const {PubSub} = require('@google-cloud/pubsub');
2323
const pubsub = new PubSub();
2424
// Get a reference to the Cloud Storage component
25-
const storage = require('@google-cloud/storage')();
25+
const {Storage} = require('@google-cloud/storage');
26+
const storage = new Storage();
2627
// Get a reference to the Cloud Vision API component
2728
const vision = require('@google-cloud/vision')();
2829
// Get a reference to the Translate API component

functions/ocr/app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@google-cloud/pubsub": "0.22.2",
19-
"@google-cloud/storage": "1.7.0",
19+
"@google-cloud/storage": "2.3.1",
2020
"@google-cloud/translate": "2.1.3",
2121
"@google-cloud/vision": "0.23.0",
2222
"safe-buffer": "5.1.2"

functions/ocr/app/test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function getSample() {
7171
'@google-cloud/translate': {Translate: TranslateMock},
7272
'@google-cloud/vision': VisionMock,
7373
'@google-cloud/pubsub': {PubSub: PubsubMock},
74-
'@google-cloud/storage': StorageMock,
74+
'@google-cloud/storage': {Storage: StorageMock},
7575
'./config.json': config,
7676
}),
7777
mocks: {

functions/sendgrid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@google-cloud/bigquery": "^2.0.0",
19-
"@google-cloud/storage": "^1.7.0",
19+
"@google-cloud/storage": "^2.3.1",
2020
"safe-buffer": "^5.1.2",
2121
"sendgrid": "^5.2.3",
2222
"uuid": "^3.3.2"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"devDependencies": {
2525
"@google-cloud/nodejs-repo-tools": "^2.3.6",
26-
"@google-cloud/storage": "1.7.0",
26+
"@google-cloud/storage": "2.3.1",
2727
"ava": "0.25.0",
2828
"eslint": "^5.9.0",
2929
"eslint-config-prettier": "^3.3.0",

storage-transfer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"ava": "0.25.0",
2727
"proxyquire": "2.1.0",
2828
"sinon": "4.4.8",
29-
"@google-cloud/storage": "1.7.0",
29+
"@google-cloud/storage": "2.3.1",
3030
"uuid": "3.3.2"
3131
},
3232
"cloud-repo-tools": {

storage-transfer/system-test/transfer.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
/* eslint no-empty: 0 */
1717
'use strict';
1818

19-
const storage = require(`@google-cloud/storage`)();
19+
const {Storage} = require(`@google-cloud/storage`);
20+
const storage = new Storage();
2021
const test = require(`ava`);
2122
const tools = require(`@google-cloud/nodejs-repo-tools`);
2223
const uuid = require(`uuid`);

0 commit comments

Comments
 (0)