Skip to content

Commit 0a9ffc8

Browse files
renovate[bot]fhinkel
authored andcommitted
chore(deps): update dependency @google-cloud/storage to v2.3.3 (GoogleCloudPlatform#959)
* chore(deps): update dependency @google-cloud/storage to v2.3.3 * Update syntax for new Storage
1 parent 4da4a2d commit 0a9ffc8

File tree

24 files changed

+60
-55
lines changed

24 files changed

+60
-55
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

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"node": ">=8.0.0"
1010
},
1111
"dependencies": {
12-
"@google-cloud/storage": "1.7.0",
13-
"body-parser": "1.18.3",
14-
"express": "4.16.4",
15-
"multer": "1.4.1",
16-
"pug": "2.0.3"
12+
"@google-cloud/storage": "^2.3.3",
13+
"body-parser": "^1.18.3",
14+
"express": "^4.16.4",
15+
"multer": "^1.4.1",
16+
"pug": "^2.0.3"
1717
},
1818
"devDependencies": {
1919
"@google-cloud/nodejs-repo-tools": "^3.0.0",
20-
"ava": "0.25.0"
20+
"ava": "^0.25.0"
2121
},
2222
"cloud-repo-tools": {
2323
"requiresProjectId": true,

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"node": ">=8"
1010
},
1111
"dependencies": {
12-
"@google-cloud/storage": "1.7.0",
13-
"body-parser": "1.18.3",
14-
"express": "4.16.4",
15-
"multer": "1.4.1",
16-
"pug": "2.0.3"
12+
"@google-cloud/storage": "^2.3.3",
13+
"body-parser": "^1.18.3",
14+
"express": "^4.16.4",
15+
"multer": "^1.4.1",
16+
"pug": "^2.0.3"
1717
},
1818
"devDependencies": {
1919
"@google-cloud/nodejs-repo-tools": "^3.0.0",
20-
"ava": "0.25.0"
20+
"ava": "^0.25.0"
2121
},
2222
"cloud-repo-tools": {
2323
"requiresProjectId": true,

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
"system-test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose test/*.test.js"
1818
},
1919
"dependencies": {
20-
"@google-cloud/debug-agent": "2.6.0",
20+
"@google-cloud/debug-agent": "^2.6.0",
2121
"escape-html": "^1.0.3",
22-
"pug": "2.0.3",
23-
"safe-buffer": "5.1.2"
22+
"pug": "^2.0.3",
23+
"safe-buffer": "^5.1.2"
2424
},
2525
"devDependencies": {
2626
"@google-cloud/nodejs-repo-tools": "^3.0.0",
2727
"@google-cloud/pubsub": "^0.22.0",
28-
"@google-cloud/storage": "^1.5.0",
29-
"ava": "0.25.0",
28+
"@google-cloud/storage": "^2.0.0",
29+
"ava": "^0.25.0",
3030
"express": "^4.16.3",
31-
"proxyquire": "2.1.0",
32-
"sinon": "4.5.0",
31+
"proxyquire": "^2.1.0",
32+
"sinon": "^4.5.0",
3333
"supertest": "^3.0.0",
3434
"uuid": "^3.1.0",
3535
"yargs": "^11.0.0"

functions/helloworld/shim.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ const storageShim = (gcfFn, bucketName, topicName, subscriptionName) => {
7474
// [START functions_testing_shim_storage]
7575
// Import dependencies
7676
const Pubsub = require('@google-cloud/pubsub');
77-
const Storage = require(`@google-cloud/storage`);
77+
const {Storage} = require(`@google-cloud/storage`);
7878
const pubsub = Pubsub();
79-
const storage = Storage();
79+
const storage = new Storage();
8080

8181
// TODO(developer): specify a function to test
8282
// const gcfCode = require('./index.js');

functions/helloworld/test/index.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const uuid = require(`uuid`);
2222

2323
const {PubSub} = require(`@google-cloud/pubsub`);
2424
const pubsub = new PubSub();
25-
const storage = require(`@google-cloud/storage`)();
25+
const {Storage} = require(`@google-cloud/storage`);
26+
const storage = new Storage();
2627

2728
const baseCmd = process.env.FUNCTIONS_CMD;
2829
const topicName = process.env.FUNCTIONS_TOPIC;

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/helloworld/test/shim.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const Supertest = require(`supertest`);
1818
const tools = require(`@google-cloud/nodejs-repo-tools`);
1919
const {PubSub} = require(`@google-cloud/pubsub`);
2020
const pubsub = new PubSub();
21-
const Storage = require(`@google-cloud/storage`);
22-
const storage = Storage();
21+
const {Storage} = require(`@google-cloud/storage`);
22+
const storage = new Storage();
2323
const uuid = require(`uuid`);
2424
const path = require(`path`);
2525

functions/http/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
},
1717
"devDependencies": {
1818
"@google-cloud/nodejs-repo-tools": "^3.0.0",
19-
"ava": "0.25.0",
20-
"proxyquire": "2.1.0",
21-
"sinon": "4.5.0",
19+
"ava": "^0.25.0",
20+
"proxyquire": "^2.1.0",
21+
"sinon": "^4.5.0",
2222
"uuid": "^3.3.2"
2323
},
2424
"dependencies": {
25-
"@google-cloud/storage": "2.3.1",
25+
"@google-cloud/storage": "^2.3.3",
2626
"busboy": "^0.2.14",
2727
"escape-html": "^1.0.3",
28-
"safe-buffer": "5.1.2"
28+
"safe-buffer": "^5.1.2"
2929
},
3030
"cloud-repo-tools": {
3131
"requiresKeyFile": true,

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"test": "ava -T 20s --verbose test/*.test.js"
1616
},
1717
"dependencies": {
18-
"@google-cloud/storage": "1.7.0",
19-
"@google-cloud/vision": "0.23.0",
18+
"@google-cloud/storage": "^2.3.3",
19+
"@google-cloud/vision": "^0.23.0",
2020
"gm": "^1.23.1"
2121
},
2222
"devDependencies": {
2323
"@google-cloud/nodejs-repo-tools": "^3.0.0",
24-
"ava": "0.25.0",
25-
"proxyquire": "2.1.0",
26-
"sinon": "4.5.0"
24+
"ava": "^0.25.0",
25+
"proxyquire": "^2.1.0",
26+
"sinon": "^4.5.0"
2727
},
2828
"cloud-repo-tools": {
2929
"requiresKeyFile": true,

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

2728
// Get a reference to the Cloud Vision API component
2829
const Vision = require('@google-cloud/vision');

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.3",
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
@@ -95,7 +95,7 @@ function getSample() {
9595
'@google-cloud/translate': translateStub,
9696
'@google-cloud/vision': visionStub,
9797
'@google-cloud/pubsub': {PubSub: PubsubMock},
98-
'@google-cloud/storage': StorageMock,
98+
'@google-cloud/storage': {Storage: StorageMock},
9999
'./config.json': config,
100100
}),
101101
mocks: {

functions/sendgrid/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const config = require('./config.json');
2222
const uuid = require('uuid');
2323

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 BigQuery component
2728
const {BigQuery} = require('@google-cloud/bigquery');
2829
const bigquery = new BigQuery();

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.0.0",
2020
"safe-buffer": "^5.1.2",
2121
"sendgrid": "^5.2.3",
2222
"uuid": "^3.3.2"

functions/sendgrid/test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function getSample() {
9393
program: proxyquire(`../`, {
9494
sendgrid: sendgrid,
9595
'@google-cloud/bigquery': {BigQuery: BigQueryMock},
96-
'@google-cloud/storage': StorageMock,
96+
'@google-cloud/storage': {Storage: StorageMock},
9797
'./config.json': config,
9898
uuid: uuid,
9999
}),

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": "^3.0.0",
26-
"@google-cloud/storage": "1.7.0",
26+
"@google-cloud/storage": "2.3.3",
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.5.0",
29-
"@google-cloud/storage": "1.7.0",
29+
"@google-cloud/storage": "^2.3.3",
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)