husky
semver
Our great sponsors
husky | semver | |
---|---|---|
124 | 7 | |
31,506 | 4,955 | |
- | 1.2% | |
8.8 | 7.2 | |
16 days ago | 2 days ago | |
JavaScript | JavaScript | |
MIT License | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
husky
-
Streamline Your Workflow: Setting Up Git Hooks with Husky to Simplify Version Updates
Dive deeper into the world of Husky with the official documentation. Explore the capabilities of Standard Version through its comprehensive documentation. Unravel the mysteries of semantic-release with its detailed documentation. Discover the versatility of bumpp with its comprehensive documentation.
-
Git Project Configuration With Husky and ESLint
Letâs walk through the steps for a one-time setup to configure husky pre-commit and pre-push hooks, ESLint with code styles conventions, prettier code formatter, and lint-staged. Husky automatically runs a script on each commit or push. This is useful for linting files to enforce code styles that keeps the entire code base following conventions.
- Padronizando seu código através dos Git Hooks
- Angular 14 + Prettier + Husky Setup
-
How Automation Saved Me from Oops Moments: Never Skip Tests in Production Again!
We were already using lint-staged and have a pre-commit hook in place using Husky in our project for linter and prettier. So it made sense to add a check here.
- Pre-commit with husky & lint-staged
-
How to Improve Development Experience of your React Project
Now, let's talk about Husky. It's a wonderful tool that enables you to run scripts on any Git hooks. We'll add a pre-commit hook to run ESLint and Stylelint checks before committing. This ensures that we don't commit code with errors.
- Como adicionar hooks aos commits de seu projeto utilizando Husky
-
My script to install husky, commitlint and lint-staged with zx
In all my projects I use husky, lint-staged and commitlint.
-
Joys and woes of monorepos
One of the greatest things about a monorepo is that you can centralise a lot of tooling configuration. For example, chuck a .prettierrc in the root of your monorepo and you'll never have arguments about code style again. Put a few base tsconfigs in the there to extend, and suddenly TypeScript behaves with beautiful consistency across all your packages. Add formatting, linting and husky as dependencies in the root of your workspace and you no longer need to work through upgrading everything individually when a new version comes out.
semver
-
The curious case of semver
Yeah, but it talks about the semver package, which is related and why it caused performance issues
-
Release NPM Package With Automatic Versioning
This release script increments the version number of the package and publishes the package to the NPM registry (or other registry). To correctly increment the version number, npm's semver package automatically finds the next version number according to the specified level minor (major/minor/patch).
-
Symbols in package.json
In a later post, I shall be sharing some actual examples using node-semver, which is the tool that npm uses to parse these Semantic Versioning Complaint dependencies version.
-
npm-registry-firewall
{ "server": { "host": "localhost", // Defaults to 127.0.0.1 "port": 3000, // 8080 by default "secure": { // Optional. If declared serves via https "cert": "ssl/cert.pem", "key": "ssl/key.pem" }, "base": "/", // Optional. Defaults to '/' "healthcheck": "/health", // Optional. Defaults to '/healthcheck'. Pass null to disable "keepAliveTimeout": 15000, // Optional. Defaults 61000 "headersTimeout": 20000, // Optional. Defaults 62000 "requestTimeout": 10000 // Optional. Defaults 30000 }, "firewall": { "registry": "https://registry.npmmirror.com", // Remote registry "entrypoint": "https://r.qiwi.com/npm", // Optional. Defaults to `${server.secure ? 'https' : 'http'}://${server.host}:${server.port}${route.base}` "base": "/", // Optional. Defaults to '/' "rules": [ { "policy": "allow", "org": "@qiwi" }, { "policy": "allow", "name": ["@babel/*", "@jest/*", "lodash"] // string[] or "comma,separated,list". * works as .+ in regexp }, { "policy": "deny", "name": "colors", "version": ">= v1.4.0" // Any semver range: https://github.com/npm/node-semver#ranges }, { "policy": "deny", "license": "dbad" // Comma-separated license types or string[] }, { "policy": "allow", "username": ["sindresorhus", "isaacs"] // Trusted npm authors. }, { "policy": "allow", "name": "d", // `allow` is upper, so it protects `< 1.0.0`-ranged versions that might be omitted on next steps "version": "< 1.0.0" }, { "policy": "deny", // Checks pkg version publish date against the range "dateRange": ["2010-01-01T00:00:00.000Z", "2025-01-01T00:00:00.000Z"] }, { "policy": "allow", "age": 5 // Check the package version is older than 5 days. Like quarantine } ] } }
-
Package.json File explained!!!
Note: ~ and ^ you see in the dependency versions are notations for version ranges defined in semver as it follows semantic versioning.
-
SemVer - 0.x.x
To prevent potential breaking changes, when you do a minor update of a dependency, NPM treats versions a bit different:
-
One-stop shop for working with semantic versions in your GitHub Actions workflows
Yeah, it's basically a wapper around semver package, so the outputs may look familiar to you. But if you need more in your workflows â feel free to open an issue with a feature youâre missing.
What are some alternatives?
simple-git-hooks - A simple git hooks manager for small projects
dotenv - Loads environment variables from .env for nodejs projects.
lerna - :dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
Electron - :electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
pre-commit - A framework for managing and maintaining multi-language pre-commit hooks.
opencv - OpenCV Bindings for node.js
standard-version - :trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
os-locale - Get the system locale
prettier - Prettier is an opinionated code formatter.
hypernova - A service for server-side rendering your JavaScript views
pretty-quick - ⥠Get Pretty Quick
jsdom - A JavaScript implementation of various web standards, for use with Node.js