Skip to content

Commit 1abd5a1

Browse files
committed
fix(deps): update dependency @google-cloud/bigquery to v2
Fixes: #949
1 parent 7dd9375 commit 1abd5a1

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

functions/sendgrid/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const uuid = require('uuid');
2424
// Get a reference to the Cloud Storage component
2525
const storage = require('@google-cloud/storage')();
2626
// Get a reference to the BigQuery component
27-
const bigquery = require('@google-cloud/bigquery')();
27+
const {BigQuery} = require('@google-cloud/bigquery');
28+
const bigquery = new BigQuery();
2829
// [END functions_sendgrid_setup]
2930

3031
// [START functions_sendgrid_get_client]

functions/sendgrid/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"test": "ava -T 20s --verbose test/*.test.js"
1616
},
1717
"dependencies": {
18-
"@google-cloud/bigquery": "0.12.0",
19-
"@google-cloud/storage": "1.7.0",
20-
"safe-buffer": "5.1.2",
21-
"sendgrid": "5.2.3",
22-
"uuid": "3.3.2"
18+
"@google-cloud/bigquery": "^2.0.0",
19+
"@google-cloud/storage": "^1.7.0",
20+
"safe-buffer": "^5.1.2",
21+
"sendgrid": "^5.2.3",
22+
"uuid": "^3.3.2"
2323
},
2424
"devDependencies": {
2525
"@google-cloud/nodejs-repo-tools": "^2.3.0",
26-
"ava": "0.25.0",
27-
"proxyquire": "2.1.0",
28-
"sinon": "4.0.2"
26+
"ava": "^0.25.0",
27+
"proxyquire": "^2.1.0",
28+
"sinon": "^4.0.2"
2929
},
3030
"cloud-repo-tools": {
3131
"requiresKeyFile": true,

functions/sendgrid/test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function getSample() {
8484
const dataset = {table: sinon.stub().returns(table)};
8585
dataset.get = sinon.stub().returns(Promise.resolve([dataset]));
8686
const bigquery = {dataset: sinon.stub().returns(dataset)};
87-
const BigQueryMock = sinon.stub().returns(bigquery);
87+
const BigQueryMock = sinon.stub().returns({BigQuery: bigquery});
8888
const StorageMock = sinon.stub().returns(storage);
8989
const sendgrid = sinon.stub().returns(client);
9090
const uuid = {v4: sinon.stub()};

0 commit comments

Comments
 (0)