Skip to content

Commit

Permalink
tools: remeda -> lodash (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvinis authored Jan 4, 2023
1 parent 9f26154 commit 83c2a45
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/Theme.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext } from "react"
import { isString } from "remeda"
import { isString } from "lodash"
import { ThemeContext, ThemeProvider } from "styled-components/native"
import { AllThemesType, Color, SpacingUnit, Theme3Type, Theme5LightType, THEMES } from "./tokens"

Expand Down
2 changes: 1 addition & 1 deletion lib/elements/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { EyeOpenedIcon, XCircleIcon } from "../../svgs"
import { Text } from "../Text"
import { Spinner } from "../Spinner"
import { MeasuredView } from "../../utils/MeasuredView"
import { isArray, isString } from "remeda"
import { isArray, isString } from "lodash"
import { Color } from "../../tokens"

const DEFAULT_FONT_SIZE = 16
Expand Down
2 changes: 1 addition & 1 deletion lib/elements/Tabs/TabBarContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef } from "react"
import { Animated, LayoutRectangle, ScrollView, View } from "react-native"
import { compact } from "remeda"
import { compact } from "lodash"
import { Box } from "../../atoms"
import { useColor } from "../../hooks"
import { useScreenDimensions } from "../../utils/useScreenDimensions"
Expand Down
4 changes: 2 additions & 2 deletions lib/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { THEME_V3 } from "@artsy/palette-tokens"
import { mapKeys, mapValues } from "remeda"
import { mapKeys, mapValues } from "lodash"
import {
Color as ColorV3WithoutDevPurple,
SpacingUnit as SpacingUnitV3Numbers,
Expand Down Expand Up @@ -46,7 +46,7 @@ const fixSpaceUnitsV3 = (
} => {
let fixed = units

fixed = mapKeys(fixed, (numberKey) => `${numberKey}`) as any
fixed = mapKeys(fixed, (_, numberKey) => `${numberKey}`) as any

fixed = mapValues(fixed, (stringValueWithPx) => {
const justStringValue = stringValueWithPx.split("px")[0]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"@styled-system/core": "^5.1.2",
"@styled-system/theme-get": "^5.1.2",
"events": "^3.3.0",
"lodash": "^4.17.21",
"react-nanny": "^2.15.0",
"react-spring": "8.0.22",
"remeda": "^1.3.0",
"styled-components": "^5.3.6",
"styled-system": "^5.1.5"
},
Expand All @@ -58,6 +58,7 @@
"@tsconfig/react-native": "^2.0.3",
"@types/events": "^3.0.0",
"@types/jest": "^29.2.5",
"@types/lodash": "^4.14.191",
"@types/react-native": "^0.69.6",
"@types/react-test-renderer": "^18.0.0",
"@types/styled-components": "^5.1.26",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,11 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==

"@types/lodash@^4.14.191":
version "4.14.191"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa"
integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==

"@types/node@*":
version "18.7.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.14.tgz#0fe081752a3333392d00586d815485a17c2cf3c9"
Expand Down Expand Up @@ -7990,11 +7995,6 @@ regjsparser@^0.8.2:
dependencies:
jsesc "~0.5.0"

remeda@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/remeda/-/remeda-1.3.0.tgz#6dc642187e08ead2265e8c7f8517a16a69e325ce"
integrity sha512-DJkLBUzi0dEigDuyPtVe50aNzQq8EBQOintPaxvzwSNreXOGsRnvfGiK+cTsY+nUgGCBrcFxcvH8MIg2skfIZA==

remove-markdown@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/remove-markdown/-/remove-markdown-0.3.0.tgz#5e4b667493a93579728f3d52ecc1db9ca505dc98"
Expand Down

0 comments on commit 83c2a45

Please sign in to comment.