
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@vercel/git-hooks
Advanced tools
No nonsense Git hook management.
Install this module, preferably as a dev-dependency:
yarn add --dev @vercel/git-hooks
That's it. You can now use the module in two ways:
{
"scripts": {
"git-pre-commit": "eslint"
}
}
The above will run a single command line, just like running npm run git-pre-commit
or yarn git-pre-commit
,
every time you git commit
.
Alternatively, if you'd like to run several scripts in succession upon a hook, you may define a git
top-level
property and specify an array of scripts to run:
{
"git": {
"pre-commit": "lint"
}
}
or
{
"git": {
"pre-commit": ["lint", "test"]
}
}
Note that any "scripts"
hooks supplant any corresponding "git"
hooks. That is to say, if you define both a
{"scripts": {"git-pre-commit": "..."}}
hook and a {"git": {"pre-commit": []}}
hook, the hook in "scripts"
will be the only hook that is executed.
*Caveat: The package manager needs to be npm compliant in terms of environment variables. Worst case, define the environment variables
npm_node_execpath
(node binary) andnpm_execpath
(package manager entry point) as environment variables prior to installing.
Copyright © 2021 by Vercel, Inc.
Released under the MIT License.
FAQs
No nonsense Git hook management
The npm package @vercel/git-hooks receives a total of 4,864 weekly downloads. As such, @vercel/git-hooks popularity was classified as popular.
We found that @vercel/git-hooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 36 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.