Skip to content

Commit

Permalink
fix: use lodash instead of lodash.template
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed May 6, 2024
1 parent be3672f commit d63276f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"chalk": "^5.3.0",
"debug": "^4.1.0",
"http-call": "^5.2.2",
"lodash.template": "^4.5.0"
"lodash": "^4.17.21"
},
"devDependencies": {
"@commitlint/config-conventional": "^18",
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/init/check-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ const hook: Hook.Init = async function ({config}) {
const newerVersion = await getNewerVersion({argv: process.argv, config, lastWarningFile, versionFile})
if (newerVersion) {
// Default message if the user doesn't provide one
const [template] = await Promise.all([
import('lodash.template'),
const [lodash] = await Promise.all([
import('lodash'),
// Update the modified time (mtime) of the last-warning file so that we can track the last time we
// showed the warning. This makes it possible to respect the frequency and frequencyUnit options.
writeFile(lastWarningFile, ''),
])
this.warn(
template.default(message)({
lodash.template(message)({
chalk,
config,
latest: newerVersion,
Expand Down

0 comments on commit d63276f

Please sign in to comment.