Skip to content

Commit 6a85f77

Browse files
authored
Merge pull request #1490 from yoshi-taka/remove-lodash-find
chore: replace lodash.find with native Array.find
2 parents bd42e6c + 68ffaff commit 6a85f77

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
"json5": "^2.2.3",
160160
"jsonpointer": "^5.0.0",
161161
"jsonwebtoken": "^9.0.0",
162-
"lodash.find": "^4.6.0",
163162
"lodash.includes": "^4.3.0",
164163
"lodash.isobject": "^3.0.2",
165164
"lodash.keys": "^4.0.8",

source/ambient.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
declare module "lodash.includes"
2-
declare module "lodash.find"
32
declare module "lodash.isobject"
43
declare module "lodash.keys"
54
declare module "jest-runtime"

source/ci_source/ci_source_helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Env } from "./ci_source"
22
import { GitHubAPI } from "../platforms/github/GitHubAPI"
33
import { GitHubPRDSL } from "../dsl/GitHubDSL"
4-
import find from "lodash.find"
54
import {
65
BitBucketServerAPI,
76
bitbucketServerRepoCredentialsFromEnv,
@@ -64,7 +63,7 @@ export async function getPullRequestIDForBranch(metadata: RepoMetaData, env: Env
6463
}
6564
const api = new GitHubAPI(metadata, token)
6665
const prs = (await api.getPullRequests()) as any[]
67-
const prForBranch: GitHubPRDSL = find(prs, (pr: GitHubPRDSL) => pr.head.ref === branch)
66+
const prForBranch = prs.find((pr: GitHubPRDSL) => pr.head.ref === branch)
6867
if (prForBranch) {
6968
return prForBranch.number
7069
}

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5149,11 +5149,6 @@ lodash.escaperegexp@^4.1.2:
51495149
resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347"
51505150
integrity sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==
51515151

5152-
lodash.find@^4.6.0:
5153-
version "4.6.0"
5154-
resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1"
5155-
integrity sha512-yaRZoAV3Xq28F1iafWN1+a0rflOej93l1DQUejs3SZ41h2O9UJBoS9aueGjPDgAl4B6tPC0NuuchLKaDQQ3Isg==
5156-
51575152
lodash.flatten@^4.4.0:
51585153
version "4.4.0"
51595154
resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"

0 commit comments

Comments
 (0)