Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

validate-github-token

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-github-token - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

12

index.js

@@ -16,2 +16,8 @@ "use strict";

exports.ValidationError = ValidationError;
function errorMessage(e) {
if (e instanceof Error) {
return e.message;
}
return `${e}`;
}
function endpointUrl(opts) {

@@ -31,3 +37,3 @@ var _a;

catch (err) {
throw new Error(`Invalid URL ${s} for API endpoint: ${err.message}`);
throw new Error(`Invalid URL ${s} for API endpoint: ${errorMessage(err)}`);
}

@@ -37,3 +43,3 @@ }

try {
return await node_fetch_1.default(url, {
return await (0, node_fetch_1.default)(url, {
headers: {

@@ -105,3 +111,3 @@ Authorization: `token ${token}`,

}
throw new Error(`Unexpected HTTP request failure with repsponse ${res.status} (${res.statusText}) and body '${body}'`);
throw new Error(`Unexpected HTTP request failure with response ${res.status} (${res.statusText}) and body '${body}'`);
}

@@ -108,0 +114,0 @@ return {

{
"name": "validate-github-token",
"version": "1.1.1",
"version": "1.1.2",
"description": "Validation for GitHub API token",

@@ -39,19 +39,19 @@ "main": "index.js",

"devDependencies": {
"@types/mocha": "^8.0.3",
"@types/node": "^14.10.1",
"@types/node-fetch": "^2.5.7",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.3.0",
"mocha": "^8.1.3",
"@types/mocha": "^9.1.1",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-mocha": "^10.0.5",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^8.0.1",
"mocha": "^10.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"typescript": "^4.0.2"
"prettier": "^2.7.1",
"typescript": "^4.7.4"
},
"dependencies": {
"node-fetch": "^2.6.1"
"node-fetch": "^2.6.7"
},

@@ -58,0 +58,0 @@ "husky": {

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