[Snyk] Upgrade @google-cloud/sql from 0.8.0 to 0.18.0 #2708
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade @google-cloud/sql from 0.8.0 to 0.18.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 10 versions ahead of your current version.
The recommended version was released on a month ago.
Release notes
Package name: @google-cloud/sql
Updating
Breaking Changes
No more
apiResponse
indataset.get
When getting entities from your dataset, the upstream API sometimes forces us to make multiple requests before returning all of the results. We do this for you automatically, but when going over this method recently, we noticed we were returning an
apiResponse
value. That can be misleading, as if we had to make multiple requests,apiResponse
would only have been the last one.To match our convention in other places within our API, anytime there is a possibility for multiple requests, we don't provide an
apiResponse
. If you previously depended on it, please update your code accordingly. If that's not possible, please open an issue so we can learn more about your use case and help find a solution.Introductions
Hello, Cloud DNS! (#486, #706)
This release introduces support for Google Cloud DNS.
Google Cloud DNS is a high-performance, resilient, global DNS service that provides a cost-effective way to make your applications and services available to your users. This programmable, authoritative DNS service can be used to easily publish and manage DNS records using the same infrastructure relied upon by Google.
Example: Creating an NS record
keyFilename: '/path/to/keyfile.json',
projectId: 'my-project'
});
var zone = dns.zone('my-existing-zone');
var nsRecord = zone.record('ns', {
ttl: 86400,
name: 'my-domain.com.',
data: 'ns-cloud1.googledomains.com.'
});
zone.addRecord(nsRecord, function(err, change) {});
Documentation
We're always working to improve our documentation. Since the last release, among various smaller changes, we also have 4 revamped guides, covering the topics:
Fixes
Features
dataset.get()
operations.Thank you!
Thanks to you, we continue to fix, tweak, and grow our library. If you have ideas how we can improve, please let us know. See our new Contributing guide for how to get started.
Updating
Breaking Changes
Pub/Sub upgraded to v1 (#699, #711)
Upgrading to
v1
of the official JSON API brought one change to our library, best described in a before & after:subscription.setAckDeadline({ ackId: 123 }, function(err) {});
// After:
subscription.setAckDeadline({ ackIds: [123] }, function(err) {});
No more
nextQuery
by default! (#640, #692)Previously, many API interactions forced you to manually page through the results:
var callback = function(err, buckets, nextQuery, apiResponse) {
if (nextQuery) {
gcs.getBuckets(nextQuery, callback);
}
};
gcs.getBuckets(callback);
From a performance and cost perspective, this is an ideal way to paginate. From a usability perspective, this was not ideal. Now, pagination is automatically handled for you:
To enable the old behavior, supply an configuration object with
autoPaginate
set tofalse
:Topics must be manually created (#696, #742)
Our API previously supported
autoCreate
when referencing a topic:This was added primarily to support publishing a message to a topic that may not exist yet. However, the topic that was just created likely didn't have any subscribers yet. And a message published to a topic with no subscribers is dropped. Instead of carrying around the overhead of supporting an error-prone use case, we have removed this option.
To help ease the transition, we have added
topic.getMetadata
to help you check if a topic exists or not before publishing to it.ConfigStore upgraded to v1 (#729, #730)
ConfigStore is a dependency used behind the scenes to support resumable uploads to your GCS buckets. When you enable resumable uploads, or if you are using bucket.upload with files > 5 MB, a hidden config file is written to with some metadata that enables resumable uploads.
Previously, the file was YAML, but it is now JSON. This is only a breaking change if you are in the middle of making a resumable upload while upgrading gcloud, as the old data from the YAML file is not carried over to the new file.
Features
streams
across all APIs that involvednextQuery
.maxInProgress
option to limit the amount of messages consumed simultaneously.message.ack
andmessage.skip
.topic.getMetadata
.deleteFiles
to recursively get and delete files from a bucket.Fixes
apiResponse
callback argument to all failed API operations.apiResponse
callback argument from a faileddataset.setMetadata
operation in the correct place.Thank you!
All of these changes wouldn't have been possible without the help of many from our great community. Before recognizing them, there's a quick introduction to make. Please look out for gcloud-node's latest addition, Dave Gramlich (@ callmehiphop). In a couple of short weeks, we've already seen great contributions from him, ranging from major doc enhancements to library-wide code quality improvements. Thanks, Dave! Keep it up 💯
And last but not least, these folks have opened issues, sent PRs, and made all of our codebases that much better for it:
@ beshkenadze
@ javorosas
@ akashkrishnan
@ jacobsa
@ macvean
@ leibale
@ abelino
@ mziccard
Thanks for all of the contributions - we would love to see even more! :)
Updating
Features
PubSub (#669, #685): Default
autoCreate: true
fortopic
objects. What the heck does that mean?pubsub.createTopic('my-new-topic', function(err, topic) {
if (err) {
console.error(err);
return;
}
topic.publish({ data: 'Hello!' }, function(err) {});
});
// After -- The topic is lazily created for you.
pubsub.topic('my-new-topic').publish({ data: 'Hello!' }, function(err) {});
Search (#632, #648): Introducing Cloud Search, now supported by gcloud-node. Read more...
Fixes
Thanks to @ robertdimarco, @ weslem, @ sunnychow, @ jdcc, @ gquinones, @ ofrobots, @ chrishiestand, and many more for helping us track down some important issues.
See the docs for more information. If you have any issues updating your code to use the new version, please submit an issue on GitHub.
Changes (potentially breaking)
projectId
is required to be specified, otherwise an error is thrown.Please submit an issue if you've found we've introduced regressions in this release.
Features
File#move
File#getSignedUrl
now supports options:promptSaveAs
responseDisposition
responseType
File#createReadStream
now emits theresponse
event.Fixes
Docs
Contributors
npm test
will now build the docs before running the test suite to support #627.Thanks to @ mziccard, @ robertdimarco, @ phw, and many more for catching some important issues and giving us some great ideas.
See the docs for more information. If you have any issues updating your code to use the new version, please submit an issue on GitHub.
Developers/Users
Changes (Potentially Breaking!)
Additions
google-auth-library-nodejs
to bring better auth support in different environments! (eae1b7d)apiResponse
object to most APIs throughout library. This lets you work with the raw API response to do extra fancy things if you need. (b1af0d0)generation
for objects. (4614265, a450f0c)file#getSignedPolicy
. (6cbdbe9)Fixes
import
complete event. (90e3175)Bonus
See the docs for more information.
Contributors
npm run regression-test
tonpm run system-test
to better reflect type of tests.0.13.0
Developers/Users
Additions
Changes
Fixes
errors
property instead oferror
. (#336, fb46ca1)mime-types
. (