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 2.1.2 to 2.2.0

11

build/src/util.js

@@ -316,2 +316,3 @@ "use strict";

const onAuthenticated = (err, authenticatedReqOpts) => {
const authLibraryError = err;
const autoAuthFailed = err &&

@@ -357,3 +358,11 @@ err.message.indexOf('Could not load the default credentials') > -1;

else {
activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, callback);
activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => {
if (apiResponseError &&
apiResponseError.code === 401) {
// Re-use the "Could not load the default credentials error" if
// the API request failed due to missing credentials.
apiResponseError = authLibraryError;
}
callback(apiResponseError, ...params);
});
}

@@ -360,0 +369,0 @@ };

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

## [2.2.0](https://www.github.com/googleapis/nodejs-common/compare/v2.1.2...v2.2.0) (2019-09-11)
### Bug Fixes
* **docs:** remove anchor from reference doc link ([#474](https://www.github.com/googleapis/nodejs-common/issues/474)) ([81ebc1f](https://www.github.com/googleapis/nodejs-common/commit/81ebc1f))
### Features
* return more helpful error when authentication fails ([#480](https://www.github.com/googleapis/nodejs-common/issues/480)) ([98d2b7f](https://www.github.com/googleapis/nodejs-common/commit/98d2b7f))
### [2.1.2](https://www.github.com/googleapis/nodejs-common/compare/v2.1.1...v2.1.2) (2019-08-14)

@@ -9,0 +21,0 @@

7

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

@@ -51,3 +51,2 @@ "author": "Google Inc.",

"@types/ncp": "^2.0.1",
"@types/nock": "^10.0.0",
"@types/node": "^11.13.0",

@@ -67,3 +66,3 @@ "@types/proxyquire": "^1.3.28",

"ncp": "^2.0.0",
"nock": "^10.0.6",
"nock": "^11.3.2",
"nyc": "^14.0.0",

@@ -75,4 +74,4 @@ "power-assert": "^1.6.1",

"tmp": "0.1.0",
"typescript": "~3.5.0"
"typescript": "~3.6.0"
}
}

@@ -83,3 +83,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

[client-docs]: https://googleapis.dev/nodejs/common/latest#reference
[client-docs]: https://googleapis.dev/nodejs/common/latest

@@ -91,3 +91,1 @@ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png

[auth]: https://cloud.google.com/docs/authentication/getting-started
<a name="reference"></a>
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