Skip to content

Commit

Permalink
chore(deps): update dependency @google-cloud/storage to v2.3.3 (#959)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @google-cloud/storage to v2.3.3

* Update syntax for new Storage
  • Loading branch information
renovate[bot] authored and fhinkel committed Dec 15, 2018
1 parent 4da4a2d commit 0a9ffc8
Show file tree
Hide file tree
Showing 24 changed files with 60 additions and 55 deletions.
4 changes: 2 additions & 2 deletions appengine/storage/flexible/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const bodyParser = require('body-parser');
// the project specified by the GOOGLE_CLOUD_PROJECT environment variable. See
// https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
// These environment variables are set automatically on Google App Engine
const Storage = require('@google-cloud/storage');
const {Storage} = require('@google-cloud/storage');

// Instantiate a storage client
const storage = Storage();
const storage = new Storage();

const app = express();
app.set('view engine', 'pug');
Expand Down
12 changes: 6 additions & 6 deletions appengine/storage/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"node": ">=8.0.0"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"body-parser": "1.18.3",
"express": "4.16.4",
"multer": "1.4.1",
"pug": "2.0.3"
"@google-cloud/storage": "^2.3.3",
"body-parser": "^1.18.3",
"express": "^4.16.4",
"multer": "^1.4.1",
"pug": "^2.0.3"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0"
"ava": "^0.25.0"
},
"cloud-repo-tools": {
"requiresProjectId": true,
Expand Down
4 changes: 2 additions & 2 deletions appengine/storage/flexible/system-test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
'use strict';

const path = require(`path`);
const Storage = require(`@google-cloud/storage`);
const storage = Storage();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();
const test = require(`ava`);
const utils = require(`@google-cloud/nodejs-repo-tools`);

Expand Down
4 changes: 2 additions & 2 deletions appengine/storage/standard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const bodyParser = require('body-parser');
// the project specified by the GOOGLE_CLOUD_PROJECT environment variable. See
// https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
// These environment variables are set automatically on Google App Engine
const Storage = require('@google-cloud/storage');
const {Storage} = require('@google-cloud/storage');

// Instantiate a storage client
const storage = Storage();
const storage = new Storage();

const app = express();
app.set('view engine', 'pug');
Expand Down
12 changes: 6 additions & 6 deletions appengine/storage/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"node": ">=8"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"body-parser": "1.18.3",
"express": "4.16.4",
"multer": "1.4.1",
"pug": "2.0.3"
"@google-cloud/storage": "^2.3.3",
"body-parser": "^1.18.3",
"express": "^4.16.4",
"multer": "^1.4.1",
"pug": "^2.0.3"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0"
"ava": "^0.25.0"
},
"cloud-repo-tools": {
"requiresProjectId": true,
Expand Down
4 changes: 2 additions & 2 deletions appengine/storage/standard/system-test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
'use strict';

const path = require(`path`);
const Storage = require(`@google-cloud/storage`);
const storage = Storage();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();
const test = require(`ava`);
const utils = require(`@google-cloud/nodejs-repo-tools`);

Expand Down
14 changes: 7 additions & 7 deletions functions/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"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"
},
"dependencies": {
"@google-cloud/debug-agent": "2.6.0",
"@google-cloud/debug-agent": "^2.6.0",
"escape-html": "^1.0.3",
"pug": "2.0.3",
"safe-buffer": "5.1.2"
"pug": "^2.0.3",
"safe-buffer": "^5.1.2"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"@google-cloud/pubsub": "^0.22.0",
"@google-cloud/storage": "^1.5.0",
"ava": "0.25.0",
"@google-cloud/storage": "^2.0.0",
"ava": "^0.25.0",
"express": "^4.16.3",
"proxyquire": "2.1.0",
"sinon": "4.5.0",
"proxyquire": "^2.1.0",
"sinon": "^4.5.0",
"supertest": "^3.0.0",
"uuid": "^3.1.0",
"yargs": "^11.0.0"
Expand Down
4 changes: 2 additions & 2 deletions functions/helloworld/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const storageShim = (gcfFn, bucketName, topicName, subscriptionName) => {
// [START functions_testing_shim_storage]
// Import dependencies
const Pubsub = require('@google-cloud/pubsub');
const Storage = require(`@google-cloud/storage`);
const {Storage} = require(`@google-cloud/storage`);
const pubsub = Pubsub();
const storage = Storage();
const storage = new Storage();

// TODO(developer): specify a function to test
// const gcfCode = require('./index.js');
Expand Down
3 changes: 2 additions & 1 deletion functions/helloworld/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const uuid = require(`uuid`);

const {PubSub} = require(`@google-cloud/pubsub`);
const pubsub = new PubSub();
const storage = require(`@google-cloud/storage`)();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();

const baseCmd = process.env.FUNCTIONS_CMD;
const topicName = process.env.FUNCTIONS_TOPIC;
Expand Down
4 changes: 2 additions & 2 deletions functions/helloworld/test/sample.system.storage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

// [START functions_storage_system_test]
const Storage = require(`@google-cloud/storage`);
const storage = Storage();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();
const uuid = require(`uuid`);
const test = require(`ava`);
const path = require(`path`);
Expand Down
4 changes: 2 additions & 2 deletions functions/helloworld/test/shim.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const Supertest = require(`supertest`);
const tools = require(`@google-cloud/nodejs-repo-tools`);
const {PubSub} = require(`@google-cloud/pubsub`);
const pubsub = new PubSub();
const Storage = require(`@google-cloud/storage`);
const storage = Storage();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();
const uuid = require(`uuid`);
const path = require(`path`);

Expand Down
10 changes: 5 additions & 5 deletions functions/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0",
"proxyquire": "2.1.0",
"sinon": "4.5.0",
"ava": "^0.25.0",
"proxyquire": "^2.1.0",
"sinon": "^4.5.0",
"uuid": "^3.3.2"
},
"dependencies": {
"@google-cloud/storage": "2.3.1",
"@google-cloud/storage": "^2.3.3",
"busboy": "^0.2.14",
"escape-html": "^1.0.3",
"safe-buffer": "5.1.2"
"safe-buffer": "^5.1.2"
},
"cloud-repo-tools": {
"requiresKeyFile": true,
Expand Down
3 changes: 2 additions & 1 deletion functions/imagemagick/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
const gm = require('gm').subClass({imageMagick: true});
const fs = require('fs');
const path = require('path');
const storage = require('@google-cloud/storage')();
const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
const vision = require('@google-cloud/vision').v1p1beta1;

const client = new vision.ImageAnnotatorClient();
Expand Down
10 changes: 5 additions & 5 deletions functions/imagemagick/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"test": "ava -T 20s --verbose test/*.test.js"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"@google-cloud/vision": "0.23.0",
"@google-cloud/storage": "^2.3.3",
"@google-cloud/vision": "^0.23.0",
"gm": "^1.23.1"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0",
"proxyquire": "2.1.0",
"sinon": "4.5.0"
"ava": "^0.25.0",
"proxyquire": "^2.1.0",
"sinon": "^4.5.0"
},
"cloud-repo-tools": {
"requiresKeyFile": true,
Expand Down
2 changes: 1 addition & 1 deletion functions/imagemagick/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function getSample(filename) {

return {
program: proxyquire(`../`, {
'@google-cloud/storage': StorageMock,
'@google-cloud/storage': {Storage: StorageMock},
gm: gmMock,
fs: fsMock,
}),
Expand Down
3 changes: 2 additions & 1 deletion functions/ocr/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const config = require('./config.json');
const {PubSub} = require('@google-cloud/pubsub');
const pubsub = new PubSub();
// Get a reference to the Cloud Storage component
const storage = require('@google-cloud/storage')();
const {Storage} = require('@google-cloud/storage');
const storage = new Storage();

// Get a reference to the Cloud Vision API component
const Vision = require('@google-cloud/vision');
Expand Down
2 changes: 1 addition & 1 deletion functions/ocr/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@google-cloud/pubsub": "0.22.2",
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "^2.3.3",
"@google-cloud/translate": "2.1.3",
"@google-cloud/vision": "0.23.0",
"safe-buffer": "5.1.2"
Expand Down
2 changes: 1 addition & 1 deletion functions/ocr/app/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function getSample() {
'@google-cloud/translate': translateStub,
'@google-cloud/vision': visionStub,
'@google-cloud/pubsub': {PubSub: PubsubMock},
'@google-cloud/storage': StorageMock,
'@google-cloud/storage': {Storage: StorageMock},
'./config.json': config,
}),
mocks: {
Expand Down
3 changes: 2 additions & 1 deletion functions/sendgrid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const config = require('./config.json');
const uuid = require('uuid');

// Get a reference to the Cloud Storage component
const storage = require('@google-cloud/storage')();
const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
// Get a reference to the BigQuery component
const {BigQuery} = require('@google-cloud/bigquery');
const bigquery = new BigQuery();
Expand Down
2 changes: 1 addition & 1 deletion functions/sendgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@google-cloud/bigquery": "^2.0.0",
"@google-cloud/storage": "^1.7.0",
"@google-cloud/storage": "^2.0.0",
"safe-buffer": "^5.1.2",
"sendgrid": "^5.2.3",
"uuid": "^3.3.2"
Expand Down
2 changes: 1 addition & 1 deletion functions/sendgrid/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function getSample() {
program: proxyquire(`../`, {
sendgrid: sendgrid,
'@google-cloud/bigquery': {BigQuery: BigQueryMock},
'@google-cloud/storage': StorageMock,
'@google-cloud/storage': {Storage: StorageMock},
'./config.json': config,
uuid: uuid,
}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.3",
"ava": "0.25.0",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion storage-transfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"ava": "0.25.0",
"proxyquire": "2.1.0",
"sinon": "4.5.0",
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "^2.3.3",
"uuid": "3.3.2"
},
"cloud-repo-tools": {
Expand Down
3 changes: 2 additions & 1 deletion storage-transfer/system-test/transfer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
/* eslint no-empty: 0 */
'use strict';

const storage = require(`@google-cloud/storage`)();
const {Storage} = require(`@google-cloud/storage`);
const storage = new Storage();
const test = require(`ava`);
const tools = require(`@google-cloud/nodejs-repo-tools`);
const uuid = require(`uuid`);
Expand Down

0 comments on commit 0a9ffc8

Please sign in to comment.