Skip to content

Commit

Permalink
chore(emotion): replace lodashes isEqual with our own
Browse files Browse the repository at this point in the history
  • Loading branch information
Brailor committed May 25, 2022
1 parent a82a61e commit cba9339
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 54 deletions.
4 changes: 1 addition & 3 deletions packages/emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@
"@instructure/ui-react-utils": "8.24.2",
"@instructure/ui-themes": "8.24.2",
"@instructure/ui-utils": "8.24.2",
"emotion-theming": "^11",
"hoist-non-react-statics": "^3.3.2",
"lodash": "^4",
"prop-types": "^15"
},
"devDependencies": {
"@instructure/ui-babel-preset": "8.24.2",
"@instructure/ui-test-utils": "8.24.2",
"@types/lodash": "^4.14.171",
"cpy-cli": "^3.1.1"
"@types/lodash": "^4.14.171"
},
"peerDependencies": {
"react": ">=16.8 <=17"
Expand Down
2 changes: 2 additions & 0 deletions packages/emotion/src/getTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const getTheme =
'No theme provided for [InstUISettingsProvider], using default `canvas` theme.'
)
}
//TODO: replace cloneDeeps with native `structuredClone` API
//once we hit last 2 version browser support
currentTheme = cloneDeep(globalTheme || canvas)
} else {
currentTheme = cloneDeep(ancestorTheme)
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/src/withStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import type {
RefAttributes
} from 'react'

import { isEqual } from 'lodash'
import hoistNonReactStatics from 'hoist-non-react-statics'

import { deepEqual as isEqual } from '@instructure/ui-utils'
import { warn } from '@instructure/console'
import { decorator } from '@instructure/ui-decorator'

Expand Down
53 changes: 3 additions & 50 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2227,8 +2227,6 @@ __metadata:
"@instructure/ui-themes": 8.24.2
"@instructure/ui-utils": 8.24.2
"@types/lodash": ^4.14.171
cpy-cli: ^3.1.1
emotion-theming: ^11
hoist-non-react-statics: ^3.3.2
lodash: ^4
prop-types: ^15
Expand Down Expand Up @@ -13441,19 +13439,7 @@ __metadata:
languageName: node
linkType: hard

"cpy-cli@npm:^3.1.1":
version: 3.1.1
resolution: "cpy-cli@npm:3.1.1"
dependencies:
cpy: "npm:^8.0.0"
meow: "npm:^6.1.1"
bin:
cpy: cli.js
checksum: 0852a0095a64d01974931cfff2492d89b057aa358cff3cdd55dee183d15536a38ee51243274b298671aeec027c5878cbb8e170c09583499a6809f8d5909d22fb
languageName: node
linkType: hard

"cpy@npm:^8.0.0, cpy@npm:^8.1.0, cpy@npm:^8.1.2":
"cpy@npm:^8.1.0, cpy@npm:^8.1.2":
version: 8.1.2
resolution: "cpy@npm:8.1.2"
dependencies:
Expand Down Expand Up @@ -15362,13 +15348,6 @@ __metadata:
languageName: node
linkType: hard

"emotion-theming@npm:^11":
version: 11.0.0
resolution: "emotion-theming@npm:11.0.0"
checksum: d823a50c4d3df3d9a4c21574c354cdbddbe06ad1d07b7fc2807cdc2eaf5d765ea1486d9d3292ea1855d9fb18b29edd39a7e3a784da4afa54ef5f1c02970142ed
languageName: node
linkType: hard

"enabled@npm:2.0.x":
version: 2.0.0
resolution: "enabled@npm:2.0.0"
Expand Down Expand Up @@ -24160,25 +24139,6 @@ __metadata:
languageName: node
linkType: hard

"meow@npm:^6.1.1":
version: 6.1.1
resolution: "meow@npm:6.1.1"
dependencies:
"@types/minimist": "npm:^1.2.0"
camelcase-keys: "npm:^6.2.2"
decamelize-keys: "npm:^1.1.0"
hard-rejection: "npm:^2.1.0"
minimist-options: "npm:^4.0.2"
normalize-package-data: "npm:^2.5.0"
read-pkg-up: "npm:^7.0.1"
redent: "npm:^3.0.0"
trim-newlines: "npm:^3.0.0"
type-fest: "npm:^0.13.1"
yargs-parser: "npm:^18.1.3"
checksum: 77b569781145ad030be77130623d9f74d6eef0af5e0a349419d3df39bcf6d88cc25be046a7757062162a88160fb5d8604e540b5177b371d2bbc2aaf73ec01479
languageName: node
linkType: hard

"meow@npm:^8.0.0":
version: 8.1.2
resolution: "meow@npm:8.1.2"
Expand Down Expand Up @@ -24482,7 +24442,7 @@ __metadata:
languageName: node
linkType: hard

"minimist-options@npm:4.1.0, minimist-options@npm:^4.0.2":
"minimist-options@npm:4.1.0":
version: 4.1.0
resolution: "minimist-options@npm:4.1.0"
dependencies:
Expand Down Expand Up @@ -33011,13 +32971,6 @@ __metadata:
languageName: node
linkType: hard

"type-fest@npm:^0.13.1":
version: 0.13.1
resolution: "type-fest@npm:0.13.1"
checksum: e6bf2e3c449f27d4ef5d56faf8b86feafbc3aec3025fc9a5fbe2db0a2587c44714521f9c30d8516a833c8c506d6263f5cc11267522b10c6ccdb6cc55b0a9d1c4
languageName: node
linkType: hard

"type-fest@npm:^0.16.0":
version: 0.16.0
resolution: "type-fest@npm:0.16.0"
Expand Down Expand Up @@ -35253,7 +35206,7 @@ __metadata:
languageName: node
linkType: hard

"yargs-parser@npm:^18.1.2, yargs-parser@npm:^18.1.3":
"yargs-parser@npm:^18.1.2":
version: 18.1.3
resolution: "yargs-parser@npm:18.1.3"
dependencies:
Expand Down

0 comments on commit cba9339

Please sign in to comment.