Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 5 additions & 10 deletions functions/helloworld/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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 => {
Expand Down Expand Up @@ -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 => {
Expand All @@ -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 => {
Expand All @@ -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 => {
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 @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions functions/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions functions/tips/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,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 {
Expand Down
2 changes: 1 addition & 1 deletion functions/tips/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion iot/beta-features/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion iot/http_example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion iot/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion iot/mqtt_example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion iot/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"author": "Google Inc.",
"license": "Apache-2.0",
"dependencies": {
"@google-cloud/pubsub": "^0.22.2"
"@google-cloud/pubsub": "^0.28.0"
}
}