Skip to content

Commit

Permalink
chore(deps): update dependency @google-cloud/storage to v2
Browse files Browse the repository at this point in the history
Fixes: #979
  • Loading branch information
renovate[bot] authored and fhinkel committed Dec 14, 2018
1 parent b485ea6 commit 80947e9
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 25 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
2 changes: 1 addition & 1 deletion appengine/storage/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node": ">=8.0.0"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"body-parser": "1.18.2",
"express": "4.16.4",
"multer": "1.4.1",
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
2 changes: 1 addition & 1 deletion appengine/storage/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node": ">=8"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"body-parser": "1.18.2",
"express": "4.16.4",
"multer": "1.4.1",
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
2 changes: 1 addition & 1 deletion functions/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^2.2.5",
"@google-cloud/pubsub": "^0.22.0",
"@google-cloud/storage": "^1.5.0",
"@google-cloud/storage": "^2.0.0",
"ava": "0.25.0",
"express": "^4.16.3",
"proxyquire": "2.1.0",
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
3 changes: 2 additions & 1 deletion functions/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ exports.uploadFile = (req, res) => {
// [END functions_http_form_data]

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

/**
* HTTP function that generates a signed URL
Expand Down
2 changes: 1 addition & 1 deletion functions/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"sinon": "4.4.2"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"busboy": "^0.2.14",
"escape-html": "^1.0.3",
"safe-buffer": "5.1.2"
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
2 changes: 1 addition & 1 deletion functions/imagemagick/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test": "ava -T 20s --verbose test/*.test.js"
},
"dependencies": {
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"@google-cloud/vision": "0.23.0",
"gm": "^1.23.1"
},
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')();
// Get a reference to the Translate API component
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.1",
"@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 @@ -71,7 +71,7 @@ function getSample() {
'@google-cloud/translate': {Translate: TranslateMock},
'@google-cloud/vision': VisionMock,
'@google-cloud/pubsub': {PubSub: PubsubMock},
'@google-cloud/storage': StorageMock,
'@google-cloud/storage': {Storage: StorageMock},
'./config.json': config,
}),
mocks: {
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.3.1",
"safe-buffer": "^5.1.2",
"sendgrid": "^5.2.3",
"uuid": "^3.3.2"
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": "^2.3.6",
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"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.4.8",
"@google-cloud/storage": "1.7.0",
"@google-cloud/storage": "2.3.1",
"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 80947e9

Please sign in to comment.