Skip to content

Commit ba90789

Browse files
authoredDec 1, 2021
fix: remove lodash.template dep (#232)
1 parent 4478b39 commit ba90789

File tree

3 files changed

+38
-36
lines changed

3 files changed

+38
-36
lines changed
 

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"author": "Jeff Dickey @jdxcode",
66
"bugs": "https://github.com/oclif/plugin-warn-if-update-available/issues",
77
"dependencies": {
8-
"@oclif/core": "^0.5.39",
8+
"@oclif/core": "^1.0.4",
99
"chalk": "^4.1.0",
1010
"debug": "^4.1.0",
1111
"fs-extra": "^9.0.1",
1212
"http-call": "^5.2.2",
13-
"lodash.template": "^4.4.0",
13+
"lodash": "^4.17.21",
1414
"semver": "^7.3.2"
1515
},
1616
"devDependencies": {
17-
"@oclif/test": "^1.2.4",
17+
"@oclif/test": "^1.2.8",
1818
"@types/chai": "^4.1.6",
1919
"@types/fs-extra": "^9.0.1",
20-
"@types/lodash.template": "^4.4.5",
20+
"@types/lodash": "^4.14.177",
2121
"@types/mocha": "^8.0.0",
2222
"@types/node": "^14.0.14",
2323
"@types/semver": "^7.3.1",

‎src/hooks/init/check-update.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Hook} from '@oclif/core'
22
import * as Chalk from 'chalk'
33
import {spawn} from 'child_process'
44
import * as fs from 'fs-extra'
5-
import Template = require('lodash.template')
5+
import * as _ from 'lodash'
66
import * as path from 'path'
77
import * as semver from 'semver'
88

@@ -30,7 +30,7 @@ const hook: Hook<'init'> = async function ({config}) {
3030
}
3131
if (distTags && distTags.latest && semver.gt(distTags.latest.split('-')[0], config.version.split('-')[0])) {
3232
const chalk: typeof Chalk = require('chalk')
33-
const template: typeof Template = require('lodash.template')
33+
const template = _.template
3434
// Default message if the user doesn't provide one
3535
this.warn(template(message)({
3636
chalk,

‎yarn.lock

+32-30
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
supports-color "^5.4.0"
105105
tslib "^1"
106106

107-
"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0", "@oclif/command@^1.8.0":
107+
"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0":
108108
version "1.8.0"
109109
resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339"
110110
integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==
@@ -116,7 +116,7 @@
116116
debug "^4.1.1"
117117
semver "^7.3.2"
118118

119-
"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1", "@oclif/config@^1.17.0":
119+
"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1":
120120
version "1.17.0"
121121
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.17.0.tgz#ba8639118633102a7e481760c50054623d09fcab"
122122
integrity sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==
@@ -128,7 +128,7 @@
128128
is-wsl "^2.1.1"
129129
tslib "^2.0.0"
130130

131-
"@oclif/core@^0.5.34", "@oclif/core@^0.5.39":
131+
"@oclif/core@^0.5.34":
132132
version "0.5.39"
133133
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-0.5.39.tgz#d00705f31c5e6617145e84bb9dd50156cf3b01c5"
134134
integrity sha512-4XusxLX8PnHDQxtRP25PImlkIj1Mlx6wt0NWb1FxQGvTJOAgXGJZl3YB02ZeXZLYbeKA2A3AqqxFTTKbADnZng==
@@ -151,24 +151,28 @@
151151
widest-line "^3.1.0"
152152
wrap-ansi "^7.0.0"
153153

154-
"@oclif/dev-cli@^1.19.1":
155-
version "1.26.0"
156-
resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.26.0.tgz#e3ec294b362c010ffc8948003d3770955c7951fd"
157-
integrity sha512-272udZP+bG4qahoAcpWcMTJKiA+V42kRMqQM7n4tgW35brYb2UP5kK+p08PpF8sgSfRTV8MoJVJG9ax5kY82PA==
154+
"@oclif/core@^1.0.4":
155+
version "1.0.4"
156+
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.0.4.tgz#79ba3ed554441c3c08de38c3109275f3d9a1c188"
157+
integrity sha512-6WBFFb9WnSxvfXPkQa1NLbEBL6tgEpsinAao/CSP/c5yeLrDCHIEn0+0HFKJzaZcYFG+puTelai6cU2A2sTyOw==
158158
dependencies:
159-
"@oclif/command" "^1.8.0"
160-
"@oclif/config" "^1.17.0"
161-
"@oclif/errors" "^1.3.3"
162-
"@oclif/plugin-help" "^3.2.0"
163-
cli-ux "^5.2.1"
159+
"@oclif/linewrap" "^1.0.0"
160+
chalk "^4.1.0"
161+
clean-stack "^3.0.0"
162+
cli-ux "^5.1.0"
164163
debug "^4.1.1"
165-
find-yarn-workspace-root "^2.0.0"
166-
fs-extra "^8.1"
167-
github-slugger "^1.2.1"
168-
lodash "^4.17.11"
169-
normalize-package-data "^3.0.0"
170-
qqjs "^0.3.10"
171-
tslib "^2.0.3"
164+
fs-extra "^9.0.1"
165+
get-package-type "^0.1.0"
166+
globby "^11.0.1"
167+
indent-string "^4.0.0"
168+
is-wsl "^2.1.1"
169+
lodash "^4.17.21"
170+
semver "^7.3.2"
171+
string-width "^4.2.0"
172+
strip-ansi "^6.0.0"
173+
tslib "^2.0.0"
174+
widest-line "^3.1.0"
175+
wrap-ansi "^7.0.0"
172176

173177
"@oclif/errors@^1.2.1", "@oclif/errors@^1.2.2", "@oclif/errors@^1.3.3":
174178
version "1.3.4"
@@ -205,7 +209,7 @@
205209
chalk "^2.4.2"
206210
tslib "^1.9.3"
207211

208-
"@oclif/plugin-help@^3", "@oclif/plugin-help@^3.2.0":
212+
"@oclif/plugin-help@^3":
209213
version "3.2.0"
210214
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.0.tgz#b2c1112f49202ebce042f86b2e42e49908172ef1"
211215
integrity sha512-7jxtpwVWAVbp1r46ZnTK/uF+FeZc6y4p1XcGaIUuPAp7wx6NJhIRN/iMT9UfNFX/Cz7mq+OyJz+E+i0zrik86g==
@@ -251,7 +255,7 @@
251255
resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493"
252256
integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==
253257

254-
"@oclif/test@^1.2.4":
258+
"@oclif/test@^1.2.8":
255259
version "1.2.8"
256260
resolved "https://registry.yarnpkg.com/@oclif/test/-/test-1.2.8.tgz#a5b2ebd747832217d9af65ac30b58780c4c17c5e"
257261
integrity sha512-HCh0qPge1JCqTEw4s2ScnicEZd4Ro4/0VvdjpsfCiX6fuDV53fRZ2uqLTgxKGHrVoqOZnVrRZHyhFyEsFGs+zQ==
@@ -293,18 +297,16 @@
293297
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
294298
integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==
295299

296-
"@types/lodash.template@^4.4.5":
297-
version "4.5.0"
298-
resolved "https://registry.yarnpkg.com/@types/lodash.template/-/lodash.template-4.5.0.tgz#277654af717ed37ce2687c69f8f221c550276b7a"
299-
integrity sha512-4LgHxK16IPbGR7TmXpPvNT7iNGsLCdQY6Rc0mi1a/JECt8et/D4hx6NMVAJej/d932sj1mJsg0QYHKL189O0Qw==
300-
dependencies:
301-
"@types/lodash" "*"
302-
303300
"@types/lodash@*":
304301
version "4.14.121"
305302
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.121.tgz#9327e20d49b95fc2bf983fc2f045b2c6effc80b9"
306303
integrity sha512-ORj7IBWj13iYufXt/VXrCNMbUuCTJfhzme5kx9U/UtcIPdJYuvPDUAlHlbNhz/8lKCLy9XGIZnGrqXOtQbPGoQ==
307304

305+
"@types/lodash@^4.14.177":
306+
version "4.14.177"
307+
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.177.tgz#f70c0d19c30fab101cad46b52be60363c43c4578"
308+
integrity sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==
309+
308310
"@types/minimatch@*", "@types/minimatch@^3.0.3":
309311
version "3.0.5"
310312
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40"
@@ -3067,7 +3069,7 @@ lodash.zip@^4.2.0:
30673069
resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020"
30683070
integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=
30693071

3070-
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.5.1:
3072+
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.5.1:
30713073
version "4.17.21"
30723074
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
30733075
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -4877,7 +4879,7 @@ tslib@^1.8.1, tslib@^1.9.3:
48774879
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
48784880
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
48794881

4880-
tslib@^2.0.0, tslib@^2.0.3:
4882+
tslib@^2.0.0:
48814883
version "2.2.0"
48824884
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
48834885
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==

0 commit comments

Comments
 (0)
Please sign in to comment.