Skip to content

Commit 570c718

Browse files
committed
fix: use lodash instead of lodash modular packages
1 parent c1111d7 commit 570c718

File tree

4 files changed

+62
-18
lines changed

4 files changed

+62
-18
lines changed

.babelrc

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
{
2-
"presets": ["es2015", "stage-1", "flow", "react"],
3-
"plugins": ["transform-runtime", "flow-react-proptypes"],
4-
"env": {
5-
"test": {
6-
"plugins": ["istanbul"]
2+
presets: [
3+
'es2015',
4+
'stage-1',
5+
'flow',
6+
'react',
7+
],
8+
plugins: [
9+
'transform-runtime',
10+
'flow-react-proptypes',
11+
'lodash',
12+
],
13+
env: {
14+
test: {
15+
plugins: [
16+
'istanbul',
17+
'lodash',
18+
],
719
},
8-
"production": {
9-
"plugins": ["transform-react-constant-elements"]
10-
}
11-
}
12-
}
20+
production: {
21+
plugins: [
22+
'transform-react-constant-elements',
23+
'lodash',
24+
],
25+
},
26+
},
27+
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"babel-eslint": "^8.2.1",
7272
"babel-plugin-flow-react-proptypes": "^13.0.2",
7373
"babel-plugin-istanbul": "^4.1.5",
74+
"babel-plugin-lodash": "^3.3.4",
7475
"babel-plugin-transform-react-constant-elements": "^6.9.1",
7576
"babel-plugin-transform-runtime": "^6.22.0",
7677
"babel-preset-es2015": "^6.22.0",
@@ -89,7 +90,6 @@
8990
"eslint-plugin-flowtype": "^2.41.0",
9091
"eslint-plugin-react": "^7.5.1",
9192
"eslint-watch": "^3.1.3",
92-
"flow-bin": "^0.63.1",
9393
"flow-bin": "^0.70.0",
9494
"flow-copy-source": "^1.2.1",
9595
"flow-watch": "^1.1.0",
@@ -114,7 +114,7 @@
114114
},
115115
"dependencies": {
116116
"inline-style-prefixer": "^4.0.0",
117-
"lodash.range": "^3.2.0",
117+
"lodash": "^4.17.10",
118118
"prop-types": "^15.6.0"
119119
}
120120
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import * as React from 'react'
55
import Prefixer from 'inline-style-prefixer'
6-
import range from 'lodash.range'
6+
import { range } from "lodash"
77

88
type TransitionState = 'in' | 'out' | 'entering' | 'leaving'
99

yarn.lock

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
dependencies:
3333
"@babel/types" "7.0.0-beta.44"
3434

35+
"@babel/helper-module-imports@^7.0.0-beta.49":
36+
version "7.0.0-beta.51"
37+
resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.51.tgz#ce00428045fbb7d5ebc0ea7bf835789f15366ab2"
38+
dependencies:
39+
"@babel/types" "7.0.0-beta.51"
40+
lodash "^4.17.5"
41+
3542
3643
version "7.0.0-beta.44"
3744
resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc"
@@ -78,6 +85,14 @@
7885
lodash "^4.2.0"
7986
to-fast-properties "^2.0.0"
8087

88+
"@babel/[email protected]", "@babel/types@^7.0.0-beta.49":
89+
version "7.0.0-beta.51"
90+
resolved "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz#d802b7b543b5836c778aa691797abf00f3d97ea9"
91+
dependencies:
92+
esutils "^2.0.2"
93+
lodash "^4.17.5"
94+
to-fast-properties "^2.0.0"
95+
8196
"@commitlint/cli@^6.0.2":
8297
version "6.1.3"
8398
resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-6.1.3.tgz#4606e138b05b43034dc84af15da18e2139058537"
@@ -1221,6 +1236,16 @@ babel-plugin-istanbul@^4.1.5:
12211236
istanbul-lib-instrument "^1.10.1"
12221237
test-exclude "^4.2.1"
12231238

1239+
babel-plugin-lodash@^3.3.4:
1240+
version "3.3.4"
1241+
resolved "https://registry.npmjs.org/babel-plugin-lodash/-/babel-plugin-lodash-3.3.4.tgz#4f6844358a1340baed182adbeffa8df9967bc196"
1242+
dependencies:
1243+
"@babel/helper-module-imports" "^7.0.0-beta.49"
1244+
"@babel/types" "^7.0.0-beta.49"
1245+
glob "^7.1.1"
1246+
lodash "^4.17.10"
1247+
require-package-name "^2.0.1"
1248+
12241249
babel-plugin-macros@^2.2.0:
12251250
version "2.2.0"
12261251
resolved "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.2.0.tgz#31fc16748d6480697a517f692dc4421cb7bff0cc"
@@ -4412,7 +4437,7 @@ glob-to-regexp@^0.3.0:
44124437
version "0.3.0"
44134438
resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
44144439

4415-
[email protected], glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2:
4440+
[email protected], glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2:
44164441
version "7.1.2"
44174442
resolved "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
44184443
dependencies:
@@ -5833,10 +5858,6 @@ [email protected], lodash.pick@^4.4.0:
58335858
version "4.4.0"
58345859
resolved "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
58355860

5836-
lodash.range@^3.2.0:
5837-
version "3.2.0"
5838-
resolved "https://registry.npmjs.org/lodash.range/-/lodash.range-3.2.0.tgz#f461e588f66683f7eadeade513e38a69a565a15d"
5839-
58405861
58415862
version "4.1.1"
58425863
resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
@@ -5890,6 +5911,10 @@ lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.3,
58905911
version "4.17.5"
58915912
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
58925913

5914+
lodash@^4.17.10:
5915+
version "4.17.10"
5916+
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
5917+
58935918
log-driver@^1.2.5:
58945919
version "1.2.7"
58955920
resolved "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
@@ -8094,6 +8119,10 @@ require-main-filename@^1.0.1:
80948119
version "1.0.1"
80958120
resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
80968121

8122+
require-package-name@^2.0.1:
8123+
version "2.0.1"
8124+
resolved "https://registry.npmjs.org/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9"
8125+
80978126
require-uncached@^1.0.3:
80988127
version "1.0.3"
80998128
resolved "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"

0 commit comments

Comments
 (0)