Socket
Socket
Sign inDemoInstall

@google-cloud/common

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/common - npm Package Compare versions

Comparing version 3.4.1 to 3.5.0

4

build/src/service-object.d.ts

@@ -66,3 +66,5 @@ /// <reference types="node" />

}
export declare type DeleteOptions = object;
export declare type DeleteOptions = {
ignoreNotFound?: boolean;
} & object;
export interface DeleteCallback {

@@ -69,0 +71,0 @@ (err: Error | null, apiResponse?: r.Response): void;

@@ -118,2 +118,4 @@ "use strict";

const [options, callback] = util_1.util.maybeOptionsOrCallback(optionsOrCallback, cb);
const ignoreNotFound = options.ignoreNotFound;
delete options.ignoreNotFound;
const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {};

@@ -128,3 +130,10 @@ const reqOpts = extend(true, {

// behavior. Ensure we call the original `request` method.
ServiceObject.prototype.request.call(this, reqOpts, callback);
ServiceObject.prototype.request.call(this, reqOpts, (err, ...args) => {
if (err) {
if (err.code === 404 && ignoreNotFound) {
err = null;
}
}
callback(err, ...args);
});
}

@@ -131,0 +140,0 @@ exists(optionsOrCallback, cb) {

@@ -7,2 +7,9 @@ # Changelog

## [3.5.0](https://www.github.com/googleapis/nodejs-common/compare/v3.4.1...v3.5.0) (2020-11-11)
### Features
* add ignoreNotFound to service-object#delete ([#634](https://www.github.com/googleapis/nodejs-common/issues/634)) ([3248e27](https://www.github.com/googleapis/nodejs-common/commit/3248e27c3776d705720f69c2dcf48d51f2cc4e5c))
### [3.4.1](https://www.github.com/googleapis/nodejs-common/compare/v3.4.0...v3.4.1) (2020-10-06)

@@ -9,0 +16,0 @@

{
"name": "@google-cloud/common",
"description": "Common components for Cloud APIs Node.js Client Libraries",
"version": "3.4.1",
"version": "3.5.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Google Inc.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc