From 0754fbdf4aab22538f47b8a72970ae394d9b3079 Mon Sep 17 00:00:00 2001 From: saurabhshri Date: Sat, 17 Jun 2023 14:20:06 +0530 Subject: [PATCH] revert back to modular lodash imports --- .gitignore | 1 + package.json | 8 +++++++- sign.js | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 88861393..9b03f607 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules .DS_Store .nyc_output coverage +.idea diff --git a/package.json b/package.json index 4f1e4e91..ae984ceb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,13 @@ }, "dependencies": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.3.8" }, diff --git a/sign.js b/sign.js index 1aeeabc2..82bf526e 100644 --- a/sign.js +++ b/sign.js @@ -2,7 +2,13 @@ const timespan = require('./lib/timespan'); const PS_SUPPORTED = require('./lib/psSupported'); const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); const jws = require('jws'); -const {includes, isBoolean, isInteger, isNumber, isPlainObject, isString, once} = require('lodash') +const includes = require('lodash.includes'); +const isBoolean = require('lodash.isboolean'); +const isInteger = require('lodash.isinteger'); +const isNumber = require('lodash.isnumber'); +const isPlainObject = require('lodash.isplainobject'); +const isString = require('lodash.isstring'); +const once = require('lodash.once'); const { KeyObject, createSecretKey, createPrivateKey } = require('crypto') const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none'];