@mokr/plugins
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -74,4 +74,5 @@ import { PluginType, enqueueRemoveDependency, exec, installDependency, isMonorepo, isReadableAndWritableFile, readFile, removeDirectory, removeFile, updatePackage, warning, writeFile, writePackage, } from "@mokr/core"; | ||
} | ||
await exec("yarn", ["husky", "add", PRE_COMMIT_FILENAME, `"${command}"`], { | ||
cwd: directory, | ||
await setPreCommitHookCommands({ | ||
directory, | ||
commands: [...(await getPreCommitHookCommands({ directory })), command], | ||
}); | ||
@@ -85,11 +86,3 @@ } | ||
const newCommands = (await getPreCommitHookCommands({ directory })).filter((line) => line !== command); | ||
if (newCommands.length === 2) { | ||
/** | ||
* We're left with only these lines: | ||
* | ||
* ``` | ||
* #!/usr/bin/env sh | ||
* . "$(dirname -- "$0")/_/husky.sh" | ||
* ``` | ||
*/ | ||
if (newCommands.length === 0) { | ||
await removeFile({ path: getPreCommitHookPath({ directory }) }); | ||
@@ -96,0 +89,0 @@ return; |
{ | ||
"name": "@mokr/plugins", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Moker plugins", | ||
@@ -25,3 +25,3 @@ "repository": "https://github.com/hongaar/moker", | ||
"dependencies": { | ||
"@mokr/core": "4.2.0" | ||
"@mokr/core": "4.3.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76360
1595
+ Added@mokr/core@4.3.0(transitive)
- Removed@mokr/core@4.2.0(transitive)
Updated@mokr/core@4.3.0