Skip to content

Commit

Permalink
fix(wb): support husky v9
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Feb 19, 2024
1 parent c5d5b72 commit 4c4be66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/wb/src/commands/optimizeForDockerBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ function optimizeScripts(packageJson: PackageJson): void {
for (const [name, content] of Object.entries(scripts)) {
if (
nameWordsOfUnnecessaryScripts.some((word) => name.includes(word)) ||
contentWordsOfUnnecessaryScripts.some((word) => content.includes(word))
// Support "husky" since husky v9 requires `"postinstall": "husky"`
contentWordsOfUnnecessaryScripts.some((word) => content.includes(word) || content.trim() === word.trim())
) {
delete scripts[name];
}
Expand Down

0 comments on commit 4c4be66

Please sign in to comment.