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

[Snyk] Upgrade @google-cloud/sql from 0.8.0 to 0.18.0 #2708

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WontonSam
Copy link
Owner

snyk-top-banner

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
  • 0.18.0 - 2024-08-20

    Updating

    $ npm update gcloud

    Breaking Changes

    No more apiResponse in dataset.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
    var dns = gcloud.dns({
    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

    • Core (#785): Handle unexpected network errors.

    Features

    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.

  • 0.17.0 - 2024-07-22

    Updating

    $ npm update gcloud

    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:

    // Before:
    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:

    // Before:
    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:

    // After:
    gcs.getBuckets(function(err, buckets) {
      // `buckets` is *all of your buckets*
      // No pagination necessary.
    });

    To enable the old behavior, supply an configuration object with autoPaginate set to false:

    gcs.getBuckets({ autoPaginate: false }, function(err, buckets, nextQuery, apiResponse) {});
    Topics must be manually created (#696, #742)

    Our API previously supported autoCreate when referencing a topic:

    var topic = pubsub.topic('my-topic', { autoCreate: true });

    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

    • Core (#673, #692): Support streams across all APIs that involved nextQuery.
    • Core (#701, #705): Use automatic HTTP request retry logic with exponential backoff for readable streams.
    • Pub/Sub (#649, #650): Add maxInProgress option to limit the amount of messages consumed simultaneously.
    • Pub/Sub (#650): Add convenience methods to returned messages: message.ack and message.skip.
    • Pub/Sub (#646, #742): Add topic.getMetadata.
    • Storage (#420, #700): Support reading a negative byte offset from a file.
    • Storage (#680, #698): Add deleteFiles to recursively get and delete files from a bucket.
    • Storage (#751, #752, #753): Support automatic gzip compression for GCS uploads.

    Fixes

    • Core (#741): Return the apiResponse callback argument to all failed API operations.
    • BigQuery (#737): Return the apiResponse callback argument from a failed dataset.setMetadata operation in the correct place.
    • Pub/Sub (#754): Prevent multiple automatic pulling processes.
    • Storage (#654, #745): Previously, files with gzip encoding were not passing our validation check, as we were computing hashes on the decoded data. We now run our data validation on the raw HTTP response data.

    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! :)

  • 0.16.0 - 2024-07-10

    Updating

    $ npm update gcloud

    Features

    • PubSub (#669, #685): Default autoCreate: true for topic objects. What the heck does that mean?

      // Before -- You had to create the topic before publishing.
      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

    • Core (#661): Cache authentication layer to prevent unnecessary API requests.
    • BigQuery (#647, #652): Prevent passing extra information in API requests.
    • BigQuery (#432, #656): Handle missing jobReference from API, so query result requests don't fail.
    • Storage (#693, #694): Prevent storing excess data in gcloud-node config file for resumable uploads.

    Thanks to @ robertdimarco, @ weslem, @ sunnychow, @ jdcc, @ gquinones, @ ofrobots, @ chrishiestand, and many more for helping us track down some important issues.

  • 0.15.0 - 2024-06-27

    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)

    • Core (#639): 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

    • Core (#522, #528): Removed 5-connection limit on open GCS connections.
    • Datastore (#595, #604): Remove the array wrapper for single-property queries.
    • PubSub (#605, #618): Support subscribing to a topic from another project.
    • Storage (#529): File#move
    • Storage (#578): File#getSignedUrl now supports options:
      • promptSaveAs
      • responseDisposition
      • responseType
    • Storage (#606, #610): File#createReadStream now emits the response event.

    Fixes

    • Core (#523, #530, #636): Assure all open sockets are closed.
    • Storage (#638): Use URL path instead of subdomain to support buckets with special characters.

    Docs

    • We've greatly improved the accuracy of our example code. All examples from the docs are validated against our library, which means a release cannot be made unless the docs are correct! (#598, #627)
    • Browsing is a generally better experience than previously. We've made several tweaks that will make it easier to use and assure you get the answer you're looking for as quickly as possible.

    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.

  • 0.14.0 - 2024-06-19

    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!)

    • No breaking changes since the last version! (v0.13.2). Please submit an issue if we're wrong about this.

    Additions

    • Core: Integration of google-auth-library-nodejs to bring better auth support in different environments! (eae1b7d)
    • Core: Add 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)
    • Datastore: Detect and use Datastore local server automatically with environment variable. (c8a593e)
    • Storage: Specify a generation for objects. (4614265, a450f0c)
    • Storage: Implement file#getSignedPolicy. (6cbdbe9)

    Fixes

    Bonus

    • Now methods in the docs link directly into the GitHub code! See the link at the bottom of this page for a demo. (b530bd1)
    • Here's some cake → 🍰

    See the docs for more information.

    Contributors

    • Changed npm run regression-test to npm run system-test to better reflect type of tests.
  • 0.13.0 - 2024-06-05

    0.13.0

  • 0.12.0 - 2024-05-21

    Developers/Users

    Additions

    • Support resumable uploads. (d1fa389)
    • Support for ranged requests using byte offsets in Storage downloads. (cae3cb6)
    • Download integrity checks for Storage using CRC32C and MD5 hashes. (c7c6e60)

    Changes

    • Datastore: Commit transactions after queueing modifications. (7b963bf)

    Fixes

    • Fix PubSub publishing message data bug. Thanks @ pilwon! (#330, 070ec53, f97caca, 23ed686)
    • Fix BigQuery's Table#insert to have errors property instead of error. (#336, fb46ca1)
    • Better mime-type detection using mime-types. (

Snyk has created this PR to upgrade @google-cloud/sql from 0.8.0 to 0.18.0.

See this package in npm:
@google-cloud/sql

See this project in Snyk:
https://app.snyk.io/org/googlecloud-fD9E4u83kGB6j2zHM2NDFc/project/d84eb024-3157-426e-94f3-b1f7d776d826?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

google-cla bot commented Sep 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants