From 5acbdbb79040b93006913a440d1bdec6f3567818 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Tue, 16 Apr 2019 17:29:49 -0400 Subject: [PATCH] fix(deps): update dependency @google-cloud/pubsub to v0.28.1 --- functions/helloworld/package.json | 2 +- functions/helloworld/test/index.test.js | 15 +++++---------- functions/ocr/app/package.json | 2 +- functions/pubsub/package.json | 4 ++-- functions/tips/index.js | 3 +-- functions/tips/package.json | 2 +- iot/beta-features/gateway/package.json | 2 +- iot/http_example/package.json | 2 +- iot/manager/package.json | 2 +- iot/mqtt_example/package.json | 2 +- iot/scripts/package.json | 2 +- 11 files changed, 16 insertions(+), 22 deletions(-) diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index 3d1d066575..1e92dfab18 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", - "@google-cloud/pubsub": "^0.22.0", + "@google-cloud/pubsub": "^0.28.0", "@google-cloud/storage": "^2.0.0", "mocha": "^6.0.0", "express": "^4.16.3", diff --git a/functions/helloworld/test/index.test.js b/functions/helloworld/test/index.test.js index 3c60c77ba7..c8499481bd 100644 --- a/functions/helloworld/test/index.test.js +++ b/functions/helloworld/test/index.test.js @@ -111,8 +111,7 @@ it('helloPubSub: should print a name', async () => { // Publish to pub/sub topic const topic = pubsub.topic(topicName); - const publisher = topic.publisher(); - await publisher.publish(Buffer.from(name)); + await topic.publish(Buffer.from(name)); // Check logs await tools.tryTest(async assert => { @@ -128,8 +127,7 @@ it('helloPubSub: should print hello world', async () => { // Publish to pub/sub topic const topic = pubsub.topic(topicName); - const publisher = topic.publisher(); - await publisher.publish(Buffer.from(''), {a: 'b'}); + await topic.publish(Buffer.from(''), {a: 'b'}); // Check logs await tools.tryTest(async assert => { @@ -216,8 +214,7 @@ it('helloError: should throw an error', async () => { // Publish to pub/sub topic const topic = pubsub.topic(topicName); - const publisher = topic.publisher(); - await publisher.publish(Buffer.from(''), {a: 'b'}); + await topic.publish(Buffer.from(''), {a: 'b'}); // Check logs await tools.tryTest(async assert => { @@ -233,8 +230,7 @@ it('helloError2: should throw a value', async () => { // Publish to pub/sub topic const topic = pubsub.topic(topicName); - const publisher = topic.publisher(); - await publisher.publish(Buffer.from(''), {a: 'b'}); + await topic.publish(Buffer.from(''), {a: 'b'}); // Check logs await tools.tryTest(async assert => { @@ -250,8 +246,7 @@ it('helloError3: callback should return an errback value', async () => { // Publish to pub/sub topic const topic = pubsub.topic(topicName); - const publisher = topic.publisher(); - await publisher.publish(Buffer.from(''), {a: 'b'}); + await topic.publish(Buffer.from(''), {a: 'b'}); // Check logs await tools.tryTest(async assert => { diff --git a/functions/ocr/app/package.json b/functions/ocr/app/package.json index 623ebe8715..25ccc926b0 100644 --- a/functions/ocr/app/package.json +++ b/functions/ocr/app/package.json @@ -15,7 +15,7 @@ "test": "mocha test/*.test.js --timeout=20000" }, "dependencies": { - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.1", "@google-cloud/storage": "^2.3.3", "@google-cloud/translate": "^2.1.4", "@google-cloud/vision": "^0.25.0", diff --git a/functions/pubsub/package.json b/functions/pubsub/package.json index f4ea74b36b..d0b536ed1b 100644 --- a/functions/pubsub/package.json +++ b/functions/pubsub/package.json @@ -15,8 +15,8 @@ "test": "mocha test/*.test.js --timeout=20000" }, "dependencies": { - "@google-cloud/pubsub": "^0.22.2", - "safe-buffer": "^5.1.2" + "@google-cloud/pubsub": "^0.28.1", + "safe-buffer": "5.1.2" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", diff --git a/functions/tips/index.js b/functions/tips/index.js index 70a90713a4..a168ebe951 100644 --- a/functions/tips/index.js +++ b/functions/tips/index.js @@ -189,9 +189,8 @@ const pubsub = new PubSub(); */ exports.gcpApiCall = (req, res) => { const topic = pubsub.topic(req.body.topic); - const publisher = topic.publisher(); - publisher.publish(Buffer.from('Test message'), err => { + topic.publish(Buffer.from('Test message'), err => { if (err) { res.status(500).send(`Error publishing the message: ${err}`); } else { diff --git a/functions/tips/package.json b/functions/tips/package.json index 6f883de045..1aa2dd7e8a 100644 --- a/functions/tips/package.json +++ b/functions/tips/package.json @@ -15,7 +15,7 @@ "test": "mocha test/*.test.js --timeout=60000 --exit" }, "dependencies": { - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.0", "safe-buffer": "^5.1.2" }, "devDependencies": { diff --git a/iot/beta-features/gateway/package.json b/iot/beta-features/gateway/package.json index 1e5a482fa4..411193c05c 100644 --- a/iot/beta-features/gateway/package.json +++ b/iot/beta-features/gateway/package.json @@ -25,7 +25,7 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", "mocha": "^6.0.0", - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.0", "uuid": "^3.1.0" }, "cloud-repo-tools": { diff --git a/iot/http_example/package.json b/iot/http_example/package.json index 01fcb2ca04..a0d0a6ddf7 100644 --- a/iot/http_example/package.json +++ b/iot/http_example/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "googleapis": "^39.0.0", - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.0", "@google-cloud/nodejs-repo-tools": "^3.0.0", "mocha": "^6.0.0", "uuid": "^3.3.2" diff --git a/iot/manager/package.json b/iot/manager/package.json index 6db724b37b..670e1cf07c 100644 --- a/iot/manager/package.json +++ b/iot/manager/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@google-cloud/iot": "^0.2.0", - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.0", "googleapis": "^39.0.0", "yargs": "^13.2.2" }, diff --git a/iot/mqtt_example/package.json b/iot/mqtt_example/package.json index 7dad935157..6da097b15b 100644 --- a/iot/mqtt_example/package.json +++ b/iot/mqtt_example/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.2.0", - "@google-cloud/pubsub": "^0.22.2", + "@google-cloud/pubsub": "^0.28.0", "mocha": "^6.0.0", "uuid": "^3.3.2" } diff --git a/iot/scripts/package.json b/iot/scripts/package.json index 64ff219597..ccf21d392f 100644 --- a/iot/scripts/package.json +++ b/iot/scripts/package.json @@ -5,6 +5,6 @@ "author": "Google Inc.", "license": "Apache-2.0", "dependencies": { - "@google-cloud/pubsub": "^0.22.2" + "@google-cloud/pubsub": "^0.28.0" } }