chore: remove npm pre-commit package #2096
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the npm pre-commit package which was added in https://github.com/pyth-network/pyth-crosschain/pull/805/files.
It appears that this package was added in a misguided attempt to get an automated installer for the pre-commit hook framework. However, the npm package, despite sharing the same name, actually has nothing to do with that framework. Instead, the npm package just created a git pre-commit hook that runs
npm test
at the repo root.This was a no-op until I added turborepo, because prior to adding turborepo, there was no
test
script at the root. When I added turbo repo, I set up atest
script at the root which runsturbo test
-- effectively running tests across every package in the monorepo.I believe this behavior is correct, but it's far too heavyweight to run as a pre-commit hook. Since it appears that the
pre-commit
npm package was added unintentionally and never did what it was expected to do, I think the right path forward is to remove the package for now so folks aren't experiencing slow pre-commit hooks. Later, I can figure out a better way to hook up useful bits of turborepo to thepre-commit
framework, and I can also figure out an automated way to get the framework hooks installed.