Consolidate lodash CJS onto lodash-es (#63226) · github/docs@852e881 · GitHub
Skip to content

Commit 852e881

Browse files
heiskrCopilot
andauthored
Consolidate lodash CJS onto lodash-es (#63226)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 35abb1df-6285-443c-892a-30c594d2d64c
1 parent 32b3535 commit 852e881

7 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 1 deletion

‎src/frame/components/context/MainContext.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createContext, useContext } from 'react'
2-
import pick from 'lodash/pick'
2+
import { pick } from 'lodash-es'
33
import type { Response } from 'express'
44

55
import type { BreadcrumbT } from '@/frame/components/page-header/Breadcrumbs'

‎src/release-notes/pages/release-notes.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { GetServerSideProps } from 'next'
22
import { Liquid } from 'liquidjs'
3-
import pick from 'lodash/pick'
4-
import get from 'lodash/get'
3+
import { pick, get } from 'lodash-es'
54
import type { Response } from 'express'
65

76
import {

‎src/rest/scripts/test-open-api-schema.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// [end-readme]
66
import fs from 'fs'
77
import path from 'path'
8-
import _ from 'lodash'
8+
import { isEqual } from 'lodash-es'
99

1010
import frontmatter from '@/frame/lib/read-frontmatter'
1111
import getApplicableVersions from '@/versions/lib/get-applicable-versions'
@@ -155,7 +155,7 @@ function difference(obj1: Record<string, string[]>, obj2: Record<string, string[
155155
const diff = Object.keys(obj1).reduce((result, key) => {
156156
if (!Object.prototype.hasOwnProperty.call(obj2, key)) {
157157
result.push(key)
158-
} else if (_.isEqual(obj1[key], obj2[key])) {
158+
} else if (isEqual(obj1[key], obj2[key])) {
159159
const resultKeyIndex = result.indexOf(key)
160160
result.splice(resultKeyIndex, 1)
161161
}

‎src/search/components/hooks/useAISearchAutocomplete.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useRef, useCallback, useEffect } from 'react'
2-
import debounce from 'lodash/debounce'
2+
import { debounce } from 'lodash-es'
33
import { NextRouter } from 'next/router'
44
import { AutocompleteSearchHit, GeneralSearchHit } from '@/search/types'
55
import { executeCombinedSearch } from '@/search/components/helpers/execute-search-actions'

‎src/secret-scanning/components/SecretScanningTable.tsx‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)