Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

google-proto-files

googleapis752.2kApache-2.04.2.0TypeScript support: included

All of the Google API's protocol buffer files

google, proto, protobuf, protocol buffer, grpc

readme

Google Cloud Platform logo

Google APIs Proto Files: Node.js Client

release level npm version

All of the Google API's protocol buffer files

A comprehensive list of changes in each version may be found in the CHANGELOG.

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

Table of contents:

Quickstart

Installing the client library

npm install google-proto-files

Using the client library

const protos = require('google-proto-files');

async function quickstart() {
  // Get a directory path by executing as a function
  const files = protos.getProtoPath('logging', 'v2');
  console.log(files);
  // node_modules/google-proto-files/google/logging/v2

  // Get a path to the entry proto file for a specific API version
  console.log(protos.pubsub.v1);
  // node_modules/google-proto-files/google/pubsub/v1/pubsub.proto

  // Load a proto which depends on google common protos.
  const root1 = await protos.load('./cloudcats.proto');
  const service1 = root1.lookup('example.MyService');
  console.log(service1);

  // Load protos synchronously
  const root2 = protos.loadSync('./cloudcats.proto');
  const service2 = root2.lookup('example.MyService');
  console.log(service2);
}
quickstart();

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

Sample Source Code Try it
Quickstart source code Open in Cloud Shell

The Google APIs Proto Files Node.js Client API Reference documentation also contains samples.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install google-proto-files@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

This library is considered to be stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against stable libraries are addressed with the highest priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md, the samples/README.md, and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, make an edit to its templates in directory.

License

Apache Version 2.0

See LICENSE

changelog

Changelog

npm history

4.2.0 (2024-03-25)

Features

4.1.0 (2024-01-11)

Features

  • Rerun with new proto files (specifically field_info.proto) (#480) (1f95f12)

4.0.0 (2023-08-11)

⚠ BREAKING CHANGES

  • upgrade to Node 14 (#462)

Miscellaneous Chores

3.0.3 (2023-02-03)

Bug Fixes

  • Revert "test: update tests to reflect upstream fix (#448)" (#449) (4b6bdc9)

3.0.2 (2022-08-23)

Bug Fixes

3.0.1 (2022-07-21)

Bug Fixes

  • deps: update dependency protobufjs to v7 (#439) (41b973f)

3.0.0 (2022-05-20)

⚠ BREAKING CHANGES

  • update library to use Node 12 (#434)

Build System

2.5.2 (2022-05-03)

Bug Fixes

2.5.1 (2021-12-21)

Bug Fixes

  • proto: speech has additional common proto (#382) (6423650)

2.5.0 (2021-10-19)

Features

  • include gapic and grafeas, add routing.proto, update protos (#372) (5c19425)

2.4.1 (2021-09-09)

Bug Fixes

  • build: switch primary branch to main (#365) (cf58304)

2.4.0 (2021-01-14)

Features

2.3.0 (2020-11-18)

Features

2.2.0 (2020-07-10)

Features

Bug Fixes

2.1.1 (2020-07-06)

Bug Fixes

2.1.0 (2020-06-02)

Features

Bug Fixes

2.0.0 (2020-03-27)

⚠ BREAKING CHANGES

  • update to latest gts and TypeScript (#271)
  • require node 10 in engines field (#272)

Features

Build System

1.1.2 (2020-01-03)

Bug Fixes

  • deps: pin TypeScript below 3.7.0 (cce5185)

1.1.1 (2019-11-14)

Bug Fixes

1.1.0 (2019-08-23)

Features

1.0.3 (2019-06-26)

Bug Fixes

  • docs: link to reference docs section on googleapis.dev (#206) (e25f29f)

1.0.2 (2019-06-14)

Bug Fixes

1.0.1 (2019-05-20)

Bug Fixes

  • deps: update dependency walkdir to ^0.4.0 (#187) (48682cd)

1.0.0 (2019-05-03)

Bug Fixes

  • deps: update dependency @google-cloud/promisify to v1 (#179) (9a819f9)

Build System

Miscellaneous Chores

BREAKING CHANGES

  • deps: this will ship async/await with the generated code.
  • upgrade engines field to >=8.10.0 (#175)

v0.20.0

03-15-2019 11:15 PDT

This release includes updated proto files from googleapis/googleapis.

Internal / Testing Changes

  • build: use per-repo npm publish token (#162)

v0.19.0

03-13-2019 14:17 PDT

Implementation Changes

  • refactor: removed async module dependency (#120)

New Features

  • Now the package includes new common proto file, google/api/resource.proto.

Dependencies

  • chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#111)
  • chore(deps): update dependency gts to ^0.9.0 (#113)
  • fix: Pin @types/sinon to last compatible version (#116)
  • chore(deps): update dependency @types/sinon to v5.0.7 (#117)
  • chore(deps): update dependency typescript to ~3.2.0 (#119)
  • chore(deps): update dependency @types/sinon to v7 (#137)
  • chore(deps): update dependency eslint-config-prettier to v4 (#141)
  • fix(deps): update dependency walkdir to v0.1.0 (#143)
  • fix(deps): update dependency walkdir to v0.2.0 (#145)
  • fix(deps): update dependency walkdir to ^0.3.0 (#148)
  • fix(deps): update dependency @google-cloud/promisify to ^0.4.0 (#153)

Documentation

  • docs: update readme badges (#123)
  • docs: add lint/fix example to contributing guide (#144)
  • docs: update contributing path in README (#147)
  • docs: update links in contrib guide (#155)

Internal / Testing Changes

  • chore: update eslintignore config (#112)
  • fix(build): fix system key decryption (#121)
  • chore: update license file (#125)
  • chore: nyc ignore build/test by default (#127)
  • chore: always nyc report before calling codecov (#128)
  • build: add Kokoro configs for autorelease (#131)
  • fix(build): fix Kokoro release script (#132)
  • chore: fix publish.sh permission +x (#133)
  • chore: update nyc and eslint configs (#135)
  • chore(build): inject yoshi automation key (#136)
  • build: check for 404s on all docs (#139)
  • build: ignore googleapis.com in doc link check (#140)
  • build: test using @grpc/grpc-js in CI (#150)
  • build: create docs test npm scripts (#151)
  • build: use linkinator for docs test (#152)
  • build: exclude CONTRIBUTING.md from synthing (#154)
  • build: use node10 to run samples-test, system-test etc (#158)
  • build: Add docuploader credentials to node publish jobs (#159)

v0.18.0

11-09-2018 15:34 PST

This is a minor service release, with a few internal changes.

  • refactor: use walkdir instead of globby (#109)
  • chore: drop contributors from multiple places (#108)
  • chore: use latest npm on Windows (#107)
  • refactor: convert to typescript (#106)
  • refactor: use a src/ directory (#105)
  • chore: update CircleCI config (#104)
  • chore: include build in eslintignore (#101)
  • chore(deps): update dependency eslint-plugin-node to v8 (#97)
  • chore: update issue templates (#96)
  • chore: remove old issue template (#94)
  • build: run tests on node11 (#93)
  • chores(build): do not collect sponge.xml from windows builds (#92)
  • chores(build): run codecov on continuous builds (#91)
  • chore: update new issue template (#90)
  • build: fix codecov uploading on Kokoro (#86)
  • build: automate library with synth.py (#85)
  • chore(deps): update dependency sinon to v7 (#84)

v0.17.0

Breaking changes

  • fix: drop support for node.js 4.x and 9.x (#57)

Fixes

  • fix: update linking for samples (#50)

Internal / Testing Changes

  • chore(deps): update dependency eslint-plugin-prettier to v3 (#81)
  • test: remove appveyor config (#80)
  • Enable prefer-const in the eslint config (#79)
  • Enable no-var in eslint (#78)
  • Update CI and fix tests (#77)
  • Retry npm install in CI (#76)
  • chore(deps): update dependency nyc to v13 (#75)
  • chore(deps): update dependency eslint-config-prettier to v3 (#74)
  • chore: ignore package-lock.json (#73)
  • chore(deps): lock file maintenance (#72)
  • chore: use let and const (#71)
  • chore: update renovate config (#69)
  • remove that whitespace (#68)
  • chore(deps): lock file maintenance (#67)
  • chore: move mocha options to mocha.opts (#66)
  • chore(deps): update dependency eslint-plugin-node to v7 (#62)
  • chore(deps): lock file maintenance (#65)
  • chore(deps): lock file maintenance (#61)
  • chore(deps): lock file maintenance (#60)
  • chore(deps): lock file maintenance (#59)
  • chore(deps): lock file maintenance (#58)
  • fix: remove unused packages (#56)
  • chore(deps): lock file maintenance (#55)
  • chore(deps): lock file maintenance (#54)
  • chore(deps): lock file maintenance (#53)
  • chore(deps): lock file maintenance (#52)
  • Configure Renovate (#48)
  • chore(package): update eslint to version 5.0.0 (#49)
  • refactor: drop repo-tool as an exec wrapper (#51)