From 24ed81d313996ac209bd487855309d8cf46613c2 Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Sun, 26 Jan 2020 17:53:46 -0600 Subject: [PATCH 1/2] [remove-lodash-library] Remove usage of lodash library in favor of local utils --- package.json | 5 ++--- test/_property.js | 9 +++++++++ test/access_token.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 test/_property.js diff --git a/package.json b/package.json index 8ac0fc5d..8ede6c23 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "contributors": [ "Jonathan Samines " ], + "license": "Apache-2.0", "homepage": "https://github.com/lelylan/simple-oauth2", "main": "index.js", "files": [ @@ -59,9 +60,7 @@ "eslint": "^6.8.0", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.20.0", - "lodash": "^4.17.15", "nock": "^11.7.2", "nyc": "^15.0.0" - }, - "license": "Apache-2.0" + } } diff --git a/test/_property.js b/test/_property.js new file mode 100644 index 00000000..adb780ce --- /dev/null +++ b/test/_property.js @@ -0,0 +1,9 @@ +'use strict'; + +const has = (...args) => Object.prototype.hasOwnProperty.call(...args); +const hasIn = (object, propertyName) => propertyName in object; + +module.exports = { + has, + hasIn, +}; diff --git a/test/access_token.js b/test/access_token.js index b16ee991..4f1b4c45 100644 --- a/test/access_token.js +++ b/test/access_token.js @@ -3,10 +3,10 @@ const test = require('ava'); const Chance = require('chance'); const accessTokenMixin = require('chance-access-token'); -const { has, hasIn } = require('lodash'); const { isValid, isDate, differenceInSeconds } = require('date-fns'); const oauth2Module = require('./../index.js'); +const { has, hasIn } = require('./_property'); const { createModuleConfig } = require('./_module-config'); const { createAuthorizationServer } = require('./_authorization-server-mock'); From 2ee6066dcfa6b7b16f988dd719fed1e1a9927106 Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Sun, 26 Jan 2020 17:57:24 -0600 Subject: [PATCH 2/2] [remove-lodash-library] Update CHANGELOG file to better describe change --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f599342a..ab86c24c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ ## Next ### Maintainance +* Remove dev lodash library * Update ava test runner to v3 -* Update chance-access-token library to v2 -* Update nyc instrumentation library to v15 +* Update chance-access-token dev library to v2 +* Update nyc instrumentation dev library to v15 ## 3.1.0 ### New features