Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
Branch: master
Clone or download
renovate and yoshi-automation chore(deps): update dependency mocha to v6
chore(deps): update dependency mocha to v6

This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| mocha | devDependencies | major | `^5.2.0` -> `^6.0.0` | [homepage](https://mochajs.org/), [source](https://togithub.com/mochajs/mocha) |

---

### Release Notes

<details>
<summary>mochajs/mocha</summary>

### [`v6.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#&#8203;600--2019-02-18)

[Compare Source](https://togithub.com/mochajs/mocha/compare/v5.2.0...v6.0.0)

#### 🎉 Enhancements

-   [#&#8203;3726](https://togithub.com/mochajs/mocha/issues/3726): Add ability to unload files from `require` cache ([**@&#8203;plroebuck**](https://togithub.com/plroebuck))

#### 🐛 Fixes

-   [#&#8203;3737](https://togithub.com/mochajs/mocha/issues/3737): Fix falsy values from options globals ([**@&#8203;plroebuck**](https://togithub.com/plroebuck))
-   [#&#8203;3707](https://togithub.com/mochajs/mocha/issues/3707): Fix encapsulation issues for `Suite#_onlyTests` and `Suite#_onlySuites` ([**@&#8203;vkarpov15**](https://togithub.com/vkarpov15))
-   [#&#8203;3711](https://togithub.com/mochajs/mocha/issues/3711): Fix diagnostic messages dealing with plurality and markup of output ([**@&#8203;plroebuck**](https://togithub.com/plroebuck))
-   [#&#8203;3723](https://togithub.com/mochajs/mocha/issues/3723): Fix "reporter-option" to allow comma-separated options ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3722](https://togithub.com/mochajs/mocha/issues/3722): Fix code quality and performance of `lookupFiles` and `files` ([**@&#8203;plroebuck**](https://togithub.com/plroebuck))
-   [#&#8203;3650](https://togithub.com/mochajs/mocha/issues/3650), [#&#8203;3654](https://togithub.com/mochajs/mocha/issues/3654): Fix noisy error message when no files found ([**@&#8203;craigtaub**](https://togithub.com/craigtaub))
-   [#&#8203;3632](https://togithub.com/mochajs/mocha/issues/3632): Tests having an empty title are no longer confused with the "root" suite ([**@&#8203;juergba**](https://togithub.com/juergba))
-   [#&#8203;3666](https://togithub.com/mochajs/mocha/issues/3666): Fix missing error codes ([**@&#8203;vkarpov15**](https://togithub.com/vkarpov15))
-   [#&#8203;3684](https://togithub.com/mochajs/mocha/issues/3684): Fix exiting problem in Node.js v11.7.0+ ([**@&#8203;addaleax**](https://togithub.com/addaleax))
-   [#&#8203;3691](https://togithub.com/mochajs/mocha/issues/3691): Fix `--delay` (and other boolean options) not working in all cases ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3692](https://togithub.com/mochajs/mocha/issues/3692): Fix invalid command-line argument usage not causing actual errors ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3698](https://togithub.com/mochajs/mocha/issues/3698), [#&#8203;3699](https://togithub.com/mochajs/mocha/issues/3699): Fix debug-related Node.js options not working in all cases ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3700](https://togithub.com/mochajs/mocha/issues/3700): Growl notifications now show the correct number of tests run ([**@&#8203;outsideris**](https://togithub.com/outsideris))
-   [#&#8203;3686](https://togithub.com/mochajs/mocha/issues/3686): Avoid potential ReDoS when diffing large objects ([**@&#8203;cyjake**](https://togithub.com/cyjake))
-   [#&#8203;3715](https://togithub.com/mochajs/mocha/issues/3715): Fix incorrect order of emitted events when used programmatically ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3706](https://togithub.com/mochajs/mocha/issues/3706): Fix regression wherein `--reporter-option`/`--reporter-options` did not support comma-separated key/value pairs ([**@&#8203;boneskull**](https://togithub.com/boneskull))

#### 📖 Documentation

-   [#&#8203;3652](https://togithub.com/mochajs/mocha/issues/3652): Switch from Jekyll to Eleventy ([**@&#8203;Munter**](https://togithub.com/Munter))

#### 🔩 Other

-   [#&#8203;3677](https://togithub.com/mochajs/mocha/issues/3677): Add error objects for createUnsupportedError and createInvalidExceptionError ([**@&#8203;boneskull**](https://togithub.com/boneskull))
-   [#&#8203;3733](https://togithub.com/mochajs/mocha/issues/3733): Removed unnecessary processing in post-processing hook ([**@&#8203;wanseob**](https://togithub.com/wanseob))
-   [#&#8203;3730](https://togithub.com/mochajs/mocha/issues/3730): Update nyc to latest version ([**@&#8203;coreyfarrell**](https://togithub.com/coreyfarrell))
-   [#&#8203;3648](https://togithub.com/mochajs/mocha/issues/3648), [#&#8203;3680](https://togithub.com/mochajs/mocha/issues/3680): Fixes to support latest versions of [unexpected](https://npm.im/unexpected) and [unexpected-sinon](https://npm.im/unexpected-sinon) ([**@&#8203;sunesimonsen**](https://togithub.com/sunesimonsen))
-   [#&#8203;3638](https://togithub.com/mochajs/mocha/issues/3638): Add meta tag to site ([**@&#8203;MartijnCuppens**](https://togithub.com/MartijnCuppens))
-   [#&#8203;3653](https://togithub.com/mochajs/mocha/issues/3653): Fix parts of test suite failing to run on Windows ([**@&#8203;boneskull**](https://togithub.com/boneskull))

</details>

---

### Renovate configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻️ **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`".

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#googleapis/nodejs-pubsub).

#488 automerged by dpebot
Latest commit eee4f5d Feb 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: move CONTRIBUTING.md to root (#470) Feb 7, 2019
.kokoro build: create docs test npm scripts (#474) Feb 11, 2019
proto refactor(typescript): noImplicityAny for topic.ts and subscription.ts ( Jan 25, 2019
protos/google docs: sync generated grpc message type docs Jan 7, 2019
samples chore(deps): update dependency mocha to v6 Feb 19, 2019
smoke-test test: update code style of smoke test (#463) Feb 5, 2019
src refactor(ts): improve TypeScript types (#482) Feb 18, 2019
system-test refactor(ts): improve TypeScript types (#482) Feb 18, 2019
test refactor(typescript): noImplicityAny for Topic test file Feb 19, 2019
.clang-format refactor(ts): convert to typescript (#310) Nov 2, 2018
.cloud-repo-tools.json build: check broken links in generated docs (#416) Jan 15, 2019
.eslintignore chore: update nyc and eslint configs (#409) Dec 11, 2018
.eslintrc.yml Enable prefer-const in the eslint config (#260) Sep 20, 2018
.gitignore fix docs (#229) Aug 30, 2018
.jsdoc.js build: check broken links in generated docs (#416) Jan 15, 2019
.nycrc chore: update nyc and eslint configs (#409) Dec 11, 2018
.prettierignore Repo migration (#4) Dec 11, 2017
.prettierrc Repo migration (#4) Dec 11, 2017
CHANGELOG.md docs: make mention of message change in changelog (#469) Feb 7, 2019
CODE_OF_CONDUCT.md Repo migration (#4) Dec 11, 2017
CONTRIBUTING.md docs: update links in contrib guide (#479) Feb 14, 2019
LICENSE chore: update license file (#386) Dec 4, 2018
README.md docs: update contributing path in README (#471) Feb 8, 2019
codecov.yaml Update kokoro config (#275) Oct 2, 2018
package.json chore(deps): update dependency mocha to v6 Feb 19, 2019
renovate.json chore: ignore package-lock.json (#207) Aug 7, 2018
synth.metadata fix: throw on invalid credentials and update retry config (#476) Feb 14, 2019
synth.py fix: add getSubscriberStub to synth file (#425) Jan 15, 2019
tsconfig.json chore(build): eslint all js files, and use js for all generated files ( Nov 12, 2018
tslint.json refactor(ts): convert to typescript (#310) Nov 2, 2018

README.md

Google Cloud Platform logo

Google Cloud Pub/Sub: Node.js Client

release level npm version codecov

Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications.

Using the client library

  1. Select or create a Cloud Platform project.

  2. Enable billing for your project.

  3. Enable the Google Cloud Pub/Sub API.

  4. Set up authentication with a service account so you can access the API from your local workstation.

  5. Install the client library:

     npm install --save @google-cloud/pubsub
    
  6. Try an example:

// Imports the Google Cloud client library
const {PubSub} = require('@google-cloud/pubsub');

async function quickstart(
  projectId = 'your-project-id', // Your Google Cloud Platform project ID
  topicName = 'my-topic' // Name for the new topic to create
) {
  // Instantiates a client
  const pubsub = new PubSub({projectId});

  // Creates the new topic
  const [topic] = await pubsub.createTopic(topicName);
  console.log(`Topic ${topic.name} created.`);
}

Samples

Samples are in the samples/ directory. The samples' README.md has instructions for running the samples.

Sample Source Code Try it
Subscriptions source code Open in Cloud Shell
Topics source code Open in Cloud Shell

The Cloud Pub/Sub Node.js Client API Reference documentation also contains samples.

Versioning

This library follows Semantic Versioning.

This library is considered to be in beta. This means it is expected to be mostly stable while we work toward a general availability release; however, complete stability is not guaranteed. We will address issues and requests against beta libraries with a high priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

License

Apache Version 2.0

See LICENSE

What's Next

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.