Skip to content

Commit 955fcda

Browse files
committed
remove lodash
1 parent a6d2ead commit 955fcda

File tree

15 files changed

+42
-46
lines changed

15 files changed

+42
-46
lines changed

common/config/rush/pnpm-config.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@
125125
* PNPM documentation: https://pnpm.io/package_json#pnpmpackageextensions
126126
*/
127127
"globalPackageExtensions": {
128-
"babel-plugin-lodash": {
129-
"dependencies": {
130-
"@babel/types": "~7.20.0"
131-
}
132-
}
128+
// "babel-plugin-lodash": {
129+
// "dependencies": {
130+
// "@babel/types": "~7.20.0"
131+
// }
132+
// }
133133
},
134134

135135
/**

common/config/rush/pnpm-lock.yaml

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/carousel/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
},
3939
"dependencies": {
4040
"@styled-system/theme-get": "^5.1.2",
41-
"lodash.debounce": "^4.0.8",
4241
"moize": "^6.1.6",
4342
"prop-types": "^15.8.1",
4443
"pure-react-carousel": "^1.30.1",

packages/carousel/src/helpers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { useState, useEffect } from 'react'
21
import moize from 'moize'
2+
import { debounce } from 'pcln-design-system'
3+
import { useEffect, useState } from 'react'
34
import { v4 as uuidv4 } from 'uuid'
45
import {
5-
VISIBLE_SLIDES_BREAKPOINT_1,
6-
VISIBLE_SLIDES_BREAKPOINT_2,
76
CAROUSEL_BREAKPOINT_1,
87
CAROUSEL_BREAKPOINT_2,
98
MEDIA_QUERY_MATCH,
9+
VISIBLE_SLIDES_BREAKPOINT_1,
10+
VISIBLE_SLIDES_BREAKPOINT_2,
1011
} from './constants'
11-
import debounce from 'lodash.debounce'
1212

1313
const getSlideKey = moize(uuidv4, { profileName: 'getSlideKey' })
1414

@@ -65,4 +65,4 @@ const getMobileVisibleSlidesArray = (visibleSlides) => [visibleSlides[0], null,
6565
const getMobileVisibleSlides = (visibleSlides) =>
6666
Array.isArray(visibleSlides) ? getMobileVisibleSlidesArray(visibleSlides) : visibleSlides
6767

68-
export { getSlideKey, getVisibleSlidesArray, useResponsiveVisibleSlides, getMobileVisibleSlides }
68+
export { getMobileVisibleSlides, getSlideKey, getVisibleSlidesArray, useResponsiveVisibleSlides }

packages/codemods/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"inquirer": "^8.2.0",
2828
"is-git-clean": "^1.1.0",
2929
"jscodeshift": "^0.13.0",
30-
"lodash.get": "^4.4.2",
3130
"meow": "^10.1.1",
3231
"pcln-design-system": "workspace:*",
3332
"prop-types": "^15.8.1",

packages/codemods/transforms/rename-deprecated-props-flex.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import get from 'lodash.get'
2-
31
const update = (path) => {
42
const Node = path.value
53

64
// Dumb way to skip text elements since they also can have an align prop
7-
if (get(Node, 'openingElement.name.name', '').toLowerCase().includes('text')) {
5+
if (Node?.openingElement?.name?.name?.toLowerCase()?.includes('text')) {
86
return
97
}
108

packages/core/config/jest.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"global": {
55
"statements": 96,
66
"branches": 95,
7-
"functions": 90,
7+
"functions": 89,
88
"lines": 96
99
}
1010
}

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
"@types/styled-system": "^5.1.22",
8080
"deepmerge": "^4.3.1",
8181
"hoist-non-react-statics": "^3.3.2",
82-
"lodash": "^4.17.21",
8382
"react-element-to-jsx-string": "^15.0.0",
8483
"react-intersection-observer": "^9.5.3",
8584
"styled-system": "^5.1.5"

packages/core/src/DocsUtils/Section/Section.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import kebabCase from 'lodash/kebabCase'
21
import React from 'react'
3-
4-
import { Box, Text } from '../..'
2+
import { Box } from '../../Box/Box'
3+
import { Text } from '../../Text/Text'
4+
import { kebabCase } from '../../utils/strings'
55

66
export type SectionProps = {
77
heading: string

packages/core/src/DocsUtils/TableOfContents/TableOfContents.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import kebabCase from 'lodash/kebabCase'
21
import React from 'react'
3-
4-
import { Box, Link } from '../..'
2+
import { Box } from '../../Box/Box'
3+
import { Link } from '../../Link/Link'
4+
import { kebabCase } from '../../utils/strings'
55

66
const scrollTo = (id: string) => document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' })
77

0 commit comments

Comments
 (0)