Socket
Socket
Sign inDemoInstall

@pnpm/error

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/error - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

20

lib/index.js

@@ -16,6 +16,9 @@ "use strict";

constructor(request, response, hint) {
const _request = {
url: request.url,
};
if (request.authHeaderValue) {
_request.authHeaderValue = hideAuthInformation(request.authHeaderValue);
}
const message = `GET ${request.url}: ${response.statusText} - ${response.status}`;
const authHeaderValue = request.authHeaderValue
? hideAuthInformation(request.authHeaderValue)
: undefined;
// NOTE: For security reasons, some registries respond with 404 on authentication errors as well.

@@ -25,4 +28,4 @@ // So we print authorization info on 404 errors as well.

hint = hint ? `${hint}\n\n` : '';
if (authHeaderValue) {
hint += `An authorization header was used: ${authHeaderValue}`;
if (_request.authHeaderValue) {
hint += `An authorization header was used: ${_request.authHeaderValue}`;
}

@@ -34,3 +37,3 @@ else {

super(`FETCH_${response.status}`, message, { hint });
this.request = request;
this.request = _request;
this.response = response;

@@ -42,2 +45,7 @@ }

const [authType, token] = authHeaderValue.split(' ');
if (token == null)
return '[hidden]';
if (token.length < 20) {
return `${authType} [hidden]`;
}
return `${authType} ${token.substring(0, 4)}[hidden]`;

@@ -44,0 +52,0 @@ }

{
"name": "@pnpm/error",
"version": "6.0.0",
"version": "6.0.1",
"description": "An error class for pnpm errors",

@@ -27,3 +27,3 @@ "main": "lib/index.js",

"devDependencies": {
"@pnpm/error": "6.0.0"
"@pnpm/error": "6.0.1"
},

@@ -37,6 +37,7 @@ "dependencies": {

"scripts": {
"lint": "eslint \"src/**/*.ts\"",
"test": "pnpm run compile",
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
"_test": "jest",
"test": "pnpm run compile && pnpm run _test",
"compile": "tsc --build && pnpm run lint --fix"
}
}

Sorry, the diff of this file is not supported yet

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