@google-cloud/vision
6.2.0 · 12 Oct 2026Apache-2.01.1M / weekRepositoryHomepagenpmAtom feed
106 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x
1.11.0
11 Mar 2020Deferred client initialization
Export protos from src/index.ts
1.10.0
3 Mar 2020Move API to typescript code generation
1.9.0
10 Feb 2020Bump release level to GA
Features
Bump release level to GA
1.8.0
2 Jan 2020- Breaking
deps: TypeScript 3.7.0 causes breaking change in typings
Add new resource descriptors
samples: add sample of configuring alternate apiEndpoint
1.7.0
8 Nov 2019Add celebrity face detection
1.6.0
5 Nov 2019Added endpoint samples for vision api
Added endpoint samples for vision api
Features
Added endpoint samples for vision api
Reverts
Added endpoint samples for vision api
1.5.0
10 Oct 2019Update protobuf options for product sets
Use compatible version of google-gax
.d.ts for protos
Bug Fixes
Update protobuf options for product sets
Use compatible version of google-gax
Features
.d.ts for protos
Additional safe search confidence fields
1.4.0
16 Sep 2019Make vision helpers work with JSON proto
1.3.0
9 Sep 2019Use process versions object for client header
samples: upgrade yargs and fix broken CLI config
Load protos from JSON, grpc-fallback support
1.2.0
19 Aug 2019Adds support for multiple regions
1.1.0
5 Jun 2019Support apiEndpoint override in client constructor
1.0.0
13 May 2019- Breaking
Upgrade engines field to >=8.10.0
DEADLINE_EXCEEDED is idempotent
- 0.25.x
0.25.0
25 Feb 2019Simply reference an object. This has no async side effects.
var gcs = gcloud.storage(); var bucket = storage.bucket('i-know-this-bucket-exists');
Updating
$ npm install gcloud@0.25
:warning: Breaking Changes
Creating a BigQuery table: parameters changed!
Previously:
dataset.createTable({ id: 'new-table-id', // ... }, function(err, table, apiResponse) {});Now:
dataset.createTable('new-table-id', [options], function(err, table, apiResponse) {});Compute Engine operations are now event emitters
Previously:
operation.onComplete(function(err, metadata) { // metadata is the result of the operation. });Now:
operation.on('complete', function(metadata) { // `metadata` is the result of the operation. });Also, we now parse the results of the operation and consider an operation failure an error. Listen for the
errorevent to catch these errors, as well as anything else that might go wrong during an API call.operation.on('error', function(err) { // The operation may have failed. });:balloon: New methods available! :tada
#928, #931, #932, #942, #943, #944, #945, #946
All* of our APIs have new methods that might be more useful for you! Our paradigm so far has looked like this:
Service (e.g. BigQuery, Storage) |_ Object (e.g. a BigQuery dataset, a Storage bucket)
An object can typically be created or "gotten"-- a vague term to describe two things, depending on your use case:
Simply reference an object. This has no async side effects.
var gcs = gcloud.storage(); var bucket = storage.bucket('i-know-this-bucket-exists');Get information about an object.
var gcs = gcloud.storage(); var bucket = storage.bucket('i-know-this-bucket-exists'); bucket.getMetadata(function(err, metadata) { // `metadata` contains information about this bucket. });
There was a bit of confusion around this, though. Like, is that really the only way to check if something exists? Seeing if there was an error with a 404 returned? What if I want to get a bucket, otherwise have it created?
Check out the examples below to see some before and afters with these use cases in mind.
Previously:
function createTopic() { pubsub.createTopic('new-topic-name', function(err, topic, apiResponse) { // Topic created! }); } function doesBucketExist() { bucket.getMetadata(function(err, apiResponse) { if (err.code === 404) { // Bucket doesn't exist! } }); } function getDataset() { dataset.getMetadata(function(err, metadata, apiResponse) { // dataset.metadata is populated. }); } function getOrCreateDataset() { dataset.getMetadata(function(err) { if (err && err.code === 404) { bigQuery.createDataset(dataset.name, function(err, dataset) { // Dataset created! }); } }); }Now:
function createTopic() { topic.create(function(err, topic, apiResponse) { // Topic created! }); } function doesBucketExist() { bucket.exists(function(err, exists) { if (exists) { // Bucket exists! } }); } function getDataset() { dataset.get(function(err, dataset, apiResponse) { // dataset.metadata is populated. }); } function getOrCreateDataset() { dataset.get({ autoCreate: true }, function(err, dataset, apiResponse) { // Dataset exists and is ready to use! }); }NOTE The old methods are still supported and will continue to be.
* All except Datastore. For now.
Features
Core (#923): Return better API errors.
- 0.24.x
0.24.0
19 Dec 2018Updating
$ npm install gcloud@0.24.0
Breaking Changes
:key: Authentication is now required (#907)
We removed a quirk of our library that likely benefited a low percentage of users. When we make an API call, we try our hardest to find credentials to go along with it. That might come directly from you (via
config.credentialsorconfig.keyFilename), but also can be detected automatically based on the environment you are running the code in.The quirk is, some of our API calls might not really need authentication, such as downloading a file from a public bucket. Because of that, we would still make the API call without authentication and cross our fingers. If the API call failed, it would return an error. The problem with this approach is that the backend error was not very helpful, returning a simple "Unauthorized". Sure, that gets the point across, but doesn't help correct the problem.
Phew, this is turning into a long story. :zzz: Basically, if we can't find credentials, we return an error before we ever even hit the API. Please let us know if this was a bad move by opening an issue.
Fixes
- 0.23.x
0.23.0
8 Nov 2018Updating
$ npm install gcloud@0.23.0
Features
- 0.22.x
0.22.1
22 Sep 2018Fix response output for Detect Labels
Enable prefer-const in the eslint config
Enable no-var in eslint
Bug fixes
Fix response output for Detect Labels
Internal / Testing Changes
Enable prefer-const in the eslint config
Enable no-var in eslint
Switch to let/const
0.22.0
11 Sep 2018Updating
$ npm install gcloud@0.22.0
Hello, Resource Manager!
You now have access to your projects. At this time, support for the Resource Manager API is very minimal as we work out some auth questions.
var gcloud = require('gcloud'); var resource = gcloud.resource({ projectId: 'my-project', keyFilename: '/path/to/keyfile.json' });The most basic functionality is supported in all environments:
Get your project's metadata
// This refers to your default project as given // to `gcloud.resource` above. var project = resource.project(); project.getMetadata(function(err, metadata) { if (!err) { // metadata = { Project metadata } } });Get a list of your projects
resource.getProjects(function(err, projects) { if (!err) { // projects = [ array of Project objects ] } });See the full API in our Resource Manager API documentation.
- 0.21.x
0.21.0
18 Jul 2018Updating
$ npm install --save gcloud@0.21.0
Breaking Changes
:warning: Stop listening for
completeon your Storage streamsIf you've uploaded or downloaded a file from your bucket, you may have noticed that we use the
completeevent to tell you when everything's officially done. This is because the module we use, request, uses it to give us the response body. We need that data to be sure your file was downloaded or uploaded successfully-- did the data you received or sent match the data the server has?This was problematic and confusing: #340, #362, #423, #435, #436 #809. Users expected the
endevent with a readable stream and afinishevent with a writable. That's just what we're used to with Node streams. And worse, an upload that we determined invalid would have still emitted "finish", in addition to "error".We've just found a way to get around this: #824. If you're downloading a file, you'll get
endonly when we know the data is good. With an upload, you'll getfinishonly when we know the file was uploaded successfully.:heavy_multiplication_x: Before
// Downloading file.createReadStream() .pipe(fs.createWriteStream('local-copy.png')) .on('complete', function(metadata) {}); // Uploading fs.createReadStream('local-file.png') .pipe(file.createWriteStream()) .on('complete', function(metadata) {});:heavy_check_mark: After
// Downloading file.createReadStream() .pipe(fs.createWriteStream('local-copy.png')) .on('finish', function() { // metadata can now be found on the file: `file.metadata` }); // Uploading fs.createReadStream('local-file.png') .pipe(file.createWriteStream()) .on('end', function() { // metadata can now be found on the file: `file.metadata` });:warning: Use File#getSignedUrl and File#getSignedPolicy? Check your dates
Issue
PROur documentation previously stated that we accepted seconds, but in the code,
getSignedPolicywas expecting milliseconds. We noticed some inconsistency between the methods-- one wantedoptions.expires, anotheroptions.expiration, so we decided to simplify.In both methods, we now accept
options.expireswith anything Date() accepts.:heavy_multiplication_x: Before
file.getSignedPolicy({ expiration: Date.now() + 60 * 60 * 24 * 14 // two weeks }, function(err, policy) {}); file.getSignedUrl({ action: 'read', expires: Date.now() + (1000 * 60 * 60 * 24 * 14) // two weeks }, function(err, url) {});:heavy_check_mark: After
file.getSignedPolicy({ expires: '9-23-2015' }, function(err, policy) {}); file.getSignedUrl({ expires: '9-23-2015' }, function(err, url) {});Features
Node v4.0 support
From this release forward, Node v4.0 will be supported.
Share how you're using gcloud
This release brought a lot of changes. We move fast and have a lot more features coming soon, but we want to make sure what we support already is working as expected and find places where we can make improvements. We have an extensive test suite using both a simulated backend and the real thing, but it's still really important that we hear actual use cases. Because of them, our library has improved greatly already.
Share your project: #274 - we might even feature you on the homepage and readme!
Suggest an improvement or report a bug: github.com/GoogleCloudPlatform/gcloud-node/issu…
Look forward to hearing from you!
- 0.20.x
0.20.0
15 Jun 2018Updating
$ npm update gcloud
Hello, Compute Engine!
This release is for one thing only: introducing support for Compute Engine! You now have access to your instances, firewall rules, disks, snapshots, addresses, and networks.
Here's how you can create a virtual machine from the latest Ubuntu image.
var gcloud = require('gcloud'); var gce = gcloud.compute({ projectId: 'my-project', keyFilename: '/path/to/keyfile.json' }); var zone = gce.zone('us-central1-a'); var name = 'ubuntu-http'; var config = { os: 'ubuntu', http: true // allow HTTP traffic }; zone.createVM(name, config, function(err, vm, operation) { // `operation` lets you check the status of long-running tasks. operation.onComplete(function(err, metadata) { if (!err) { // Virtual machine created! } }); });See the full API in our Compute Engine API documentation
- 0.19.x
0.19.0
4 Apr 2018Reading the note…
- 0.18.x
0.18.0
26 Mar 2018Reading the note…
- 0.17.x
0.17.0
19 Mar 2018Reading the note…
- 0.16.x
0.16.0
5 Mar 2018Reading the note…
- 0.15.x
0.15.2
13 Feb 2018Reading the note…
0.15.1
10 Feb 2018Reading the note…
0.15.0
30 Jan 2018Reading the note…
- 0.14.x
0.14.0
20 Dec 2017Reading the note…
- 0.13.x
0.13.0
28 Nov 2017Reading the note…
- 0.12.x
0.12.0
26 Jul 2017Reading the note…
- 0.11.x
0.11.5
20 Jul 2017Reading the note…
0.11.4
5 Jul 2017Reading the note…
0.11.3
4 Jun 2017Reading the note…
0.11.2
17 Apr 2017Reading the note…
0.11.1
17 Apr 2017Reading the note…
0.11.0
31 Mar 2017Automatic detection of file mime-type based on file extension for GC Storage. 67fddd5
Paging in Datastore query: Returns
endCursorinstead ofnextQueryto be used as the start cursor for the next page of results. See here for more details.
Developers/Users
Additions
Support for Google Cloud Storage ACLs (Access Control Lists). Docs here. c158f8f
Automatic detection of file mime-type based on file extension for GC Storage. 67fddd5
Changes
Paging in Datastore query: Returns
endCursorinstead ofnextQueryto be used as the start cursor for the next page of results. See here for more details.
Fixes
GC Storage bucket metadata now set on creation. 8c42e93
GC Storage file names are now properly encoded. 3877b50
Limit datastore results logically when using a stream. b091d03
PubSub no longer fails when pull result contains no message data. 57213ee
Return correct buffer object when sending raw buffers with GC Datastore. 2d76a12
Improved error messages in some cases. cad0fa2
Bonus
Added a TodoMVC backend demo using gcloud-node and Express. Check it out.
See the docs for more information.
- 0.10.x
0.10.0
14 Mar 2017Reading the note…
- 0.9.x
0.9.0
3 Mar 2017Reading the note…
- 0.8.x
0.8.1
2 Mar 2017Reading the note…
0.8.0
31 Jan 2017Reading the note…
- 0.7.x
0.7.1
10 Jan 20170.7.0
9 Dec 2016Reading the note…
- 0.6.x
0.6.2
10 Jan 2017Reading the note…
0.6.1
10 Jan 2017Reading the note…
0.6.0
16 Nov 2016Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.