Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCF: Add Node 8 background function samples #779

Merged
merged 11 commits into from Nov 13, 2018
Merged

GCF: Add Node 8 background function samples #779

merged 11 commits into from Nov 13, 2018

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2018

Adding helloPromise and helloSynchronous samples for Node 8 to illustrate returning a Promise and a synchronously returning a result.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 22, 2018
* @returns {Promise}
*/
exports.helloPromise = (data) => {
const request = require('request-promise');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this outside of the function, and use two region tag blocks? e.g:

// [START tag_name]
const library = require('library');
// [END tag_name]

...

// [START tag_name]
exports.useLibrary = () => {
  ...
}
// [END tag_name]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I copied this from the original Node 6 sample though: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/background/index.js#L47-L53

Should that one be changed as well?

@ace-n
Copy link
Contributor

ace-n commented Oct 23, 2018

Also - can you add (unit) tests, or should I do that?

@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@ghost
Copy link
Author

ghost commented Oct 23, 2018

@ace-n Can you add unit tests? I can't get the tests running locally.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 1, 2018
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 1, 2018
@GoogleCloudPlatform GoogleCloudPlatform deleted a comment from googlebot Nov 1, 2018
Copy link
Contributor

@ace-n ace-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made edits + added tests. LGTM to me if it does to you.

@ghost
Copy link
Author

ghost commented Nov 5, 2018

Looks good to me, thanks!

@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 8, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 8, 2018
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@ace-n ace-n merged commit cccf576 into GoogleCloudPlatform:master Nov 13, 2018
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
renovate-bot pushed a commit to renovate-bot/nodejs-docs-samples that referenced this pull request Nov 17, 2022
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (GoogleCloudPlatform#789)

### Features

* support regapic LRO ([GoogleCloudPlatform#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([GoogleCloudPlatform#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([GoogleCloudPlatform#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([GoogleCloudPlatform#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants