From e7367d5bac7f036c66b0bca7202581ab65ab2a15 Mon Sep 17 00:00:00 2001 From: yoshi-taka Date: Fri, 24 Oct 2025 22:45:14 +0900 Subject: [PATCH] chore: remove lodash.keys --- package.json | 1 - source/platforms/git/gitJSONToGitDSL.ts | 5 ++--- yarn.lock | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 9a86251ed..1fd448e4f 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,6 @@ "jsonwebtoken": "^9.0.0", "lodash.includes": "^4.3.0", "lodash.isobject": "^3.0.2", - "lodash.keys": "^4.0.8", "lodash.mapvalues": "^4.6.0", "lodash.memoize": "^4.1.2", "memfs-or-file-map-to-github-branch": "^1.3.0", diff --git a/source/platforms/git/gitJSONToGitDSL.ts b/source/platforms/git/gitJSONToGitDSL.ts index 8f5cbd89c..107469fe5 100644 --- a/source/platforms/git/gitJSONToGitDSL.ts +++ b/source/platforms/git/gitJSONToGitDSL.ts @@ -3,7 +3,6 @@ import parseDiff from "parse-diff" import includes from "lodash.includes" import isobject from "lodash.isobject" -import keys from "lodash.keys" import memoize from "lodash.memoize" import * as jsonDiff from "fast-json-patch" @@ -144,8 +143,8 @@ export const gitJSONToGitDSL = (gitJSONRep: GitJSONDSL, config: GitJSONToGitDSLC diff.removed = arrayBefore.filter((o) => !includes(arrayAfter, o)) // Do the same, but for keys inside an object if they both are objects. } else if (isobject(afterValue) && isobject(beforeValue)) { - const beforeKeys = keys(beforeValue) as string[] - const afterKeys = keys(afterValue) as string[] + const beforeKeys = Object.keys(beforeValue) as string[] + const afterKeys = Object.keys(afterValue) as string[] diff.added = afterKeys.filter((o) => !includes(beforeKeys, o)) diff.removed = beforeKeys.filter((o) => !includes(afterKeys, o)) } diff --git a/yarn.lock b/yarn.lock index 555719c17..b6366c999 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5189,11 +5189,6 @@ lodash.isstring@^4.0.1: resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== -lodash.keys@^4.0.8: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" - integrity sha512-J79MkJcp7Df5mizHiVNpjoHXLi4HLjh9VLS/M7lQSGoQ+0oQ+lWEigREkqKyizPB1IawvQLLKY8mzEcm1tkyxQ== - lodash.mapvalues@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c"