Skip to content

Commit 1026a4d

Browse files
author
Thomas Scholtes
committed
Fix missing 'lodash' production dependency
The package did not declare `lodash` as a production dependency altough it is used in `src/decoder`. Instead of using the complete `lodash` package we use the small `lodash.isequal` to keep the dependency size small.
1 parent 0b6fc1c commit 1026a4d

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@
6363
},
6464
"devDependencies": {
6565
"@types/jest": "^22.2.3",
66-
"@types/lodash": "^4.14.0",
66+
"@types/lodash.isequal": "^4.5.3",
6767
"@types/node": "^10.5.3",
6868
"colors": "^1.1.2",
6969
"cross-env": "^5.0.1",
7070
"jest": "^22.0.2",
71-
"lodash": "^4.17.5",
7271
"prettier": "^1.4.4",
7372
"rimraf": "^2.6.1",
7473
"rollup": "^0.53.0",
@@ -84,5 +83,8 @@
8483
"typedoc": "^0.11.1",
8584
"typedoc-plugin-markdown": "^1.0.13",
8685
"typescript": "~2.9.2"
86+
},
87+
"dependencies": {
88+
"lodash.isequal": "^4.5.0"
8789
}
8890
}

src/decoder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Result from './result';
2-
const isEqual = require('lodash/isEqual'); // this syntax avoids TS1192
2+
const isEqual = require('lodash.isequal'); // this syntax avoids TS1192
33

44
/**
55
* Information describing how json data failed to match a decoder.

yarn.lock

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,20 @@
5252
version "22.2.3"
5353
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.2.3.tgz#0157c0316dc3722c43a7b71de3fdf3acbccef10d"
5454

55+
"@types/lodash.isequal@^4.5.3":
56+
version "4.5.3"
57+
resolved "https://registry.yarnpkg.com/@types/lodash.isequal/-/lodash.isequal-4.5.3.tgz#b0d2747d3e76cc94da47ebd932c69a98c0ba61b4"
58+
dependencies:
59+
"@types/lodash" "*"
60+
61+
"@types/lodash@*":
62+
version "4.14.116"
63+
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9"
64+
5565
5666
version "4.14.104"
5767
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80"
5868

59-
"@types/lodash@^4.14.0":
60-
version "4.14.114"
61-
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.114.tgz#e6f251af5994dd0d7ce141f9241439b4f40270f6"
62-
6369
6470
version "0.3.0"
6571
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524"
@@ -2122,6 +2128,10 @@ locate-path@^2.0.0:
21222128
p-locate "^2.0.0"
21232129
path-exists "^3.0.0"
21242130

2131+
lodash.isequal@^4.5.0:
2132+
version "4.5.0"
2133+
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
2134+
21252135
lodash.sortby@^4.7.0:
21262136
version "4.7.0"
21272137
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"

0 commit comments

Comments
 (0)