getodk / central-frontend

Vue.js based frontend for ODK Central

Home Page:https://docs.getodk.org/central-intro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace yorkie

matthew-white opened this issue · comments

We use yorkie to add a Git hook to ensure that bin/transifex/destructure.js is run for each commit:

"gitHooks": {
"pre-commit": "node bin/transifex/restructure.js && git diff --exit-code -- transifex/strings_en.json"
},

yorkie is a fork of husky, but we use yorkie because it came with Vue CLI: https://cli.vuejs.org/guide/cli-service.html#git-hooks. However, yorkie doesn't seem to be maintained: it hasn't been updated since 2018 even as updates have been made to husky. After we move to Vite (#671), I think we should consider replacing yorkie with something else (with husky?). yorkie seems to be reasonably popular, with 412K downloads in the past week, though that's much less than husky's 8.7M.

One thing to keep in mind is that yorkie may need to be manually uninstalled in repos in which npm install has been run. Uninstalling the npm package isn't enough to remove the Git hooks that yorkie adds when it's installed. I think that unless yorkie is manually uninstalled, trying to make a commit will result in an error. See #827 (comment) for details.