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

jwt-decode

Package Overview
Dependencies
Maintainers
45
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-decode - npm Package Compare versions

Comparing version 4.0.0-beta.3 to 4.0.0-beta.4

6

build/cjs/index.js

@@ -46,3 +46,3 @@ "use strict";

if (typeof part !== "string") {
throw new InvalidTokenError(`Invalid token specified: missing part #${(pos + 1)}`);
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
}

@@ -54,3 +54,3 @@ let decoded;

catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${(pos + 1)} (${e.message})`);
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
}

@@ -61,5 +61,5 @@ try {

catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${(pos + 1)} (${e.message})`);
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
}
}
exports.jwtDecode = jwtDecode;

@@ -42,3 +42,3 @@ export class InvalidTokenError extends Error {

if (typeof part !== "string") {
throw new InvalidTokenError(`Invalid token specified: missing part #${(pos + 1)}`);
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
}

@@ -50,3 +50,3 @@ let decoded;

catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${(pos + 1)} (${e.message})`);
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
}

@@ -57,4 +57,4 @@ try {

catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${(pos + 1)} (${e.message})`);
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
}
}
{
"name": "jwt-decode",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"description": "Decode JWT tokens, mostly useful for browser applications.",

@@ -12,8 +12,8 @@ "type": "module",

"import": {
"default": "./build/esm/index.js",
"types": "./build/esm/index.d.ts"
"types": "./build/esm/index.d.ts",
"default": "./build/esm/index.js"
},
"require": {
"default": "./build/cjs/index.js",
"types": "./build/cjs/index.d.ts"
"types": "./build/cjs/index.d.ts",
"default": "./build/cjs/index.js"
}

@@ -33,8 +33,14 @@ }

"scripts": {
"prebuild": "rimraf build",
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json && echo '{\"type\": \"commonjs\"}'> build/cjs/package.json",
"dev": "concurrently --kill-others \"npm run build:watch\" \"npm run dev:server\"",
"dev:server": "browser-sync start --config bs-config.json",
"prebuild": "shx rm -rf ./build && shx mkdir -p ./build/cjs && shx echo '{\"type\": \"commonjs\"}'> build/cjs/package.json",
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json",
"build:watch": "npm run build -- --watch",
"lint": "eslint .",
"lint:package": "publint",
"test": "npm run test:node && npm run test:browser",
"test:node": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --coverage",
"test:browser": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --coverage --testEnvironment=jsdom",
"prepack": "npm run build"
"prepack": "npm run build",
"prepare": "husky install"
},

@@ -47,6 +53,19 @@ "author": "Jose F. Romaniello <jfromaniello@gmail.com>",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"browser-sync": "^2.29.3",
"concurrently": "^8.2.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"jest-junit": "^16.0.0",
"rimraf": "^5.0.1",
"lint-staged": "^14.0.1",
"prettier": "^3.0.2",
"publint": "^0.2.2",
"shx": "^0.3.4",
"ts-jest": "^29.1.1",

@@ -60,4 +79,7 @@ "ts-node": "^10.9.1",

"engines": {
"node": ">=16"
"node": ">=18"
},
"lint-staged": {
"*.{js,ts}": "eslint --fix"
}
}
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