npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@limanio/release-czech-husky

v1.2.2

Published

A wrapper for husky, git-cz, and semantic-release to unleash the united thrust these gems provide.

Downloads

11

Readme

release-czech-husky

A wrapper for husky, git-cz, and semantic-release to unleash the united thrust these gems provide.

Installation

Install this package with:

npm i -D @limanio/release-czech-husky

and satisfy its peer dependencies (required!) with:

npm i -D @semantic-release/changelog@3 @semantic-release/git@8 @semantic-release/gitlab@4 conventional-changelog-conventionalcommits@4 git-cz@4 husky@4 semantic-release@16

Run the setup of this package with:

./node_modules/.bin/release-czech-husky install

Lastly, configure the git commit hook with:

"husky": {
  "hooks": {
    "prepare-commit-msg": "node .git-hooks/pre-commit-msg.js"
  }
}

in package.json.

Update

Update this package with:

npm i -D @limanio/release-czech-husky@latest

Configuration

Update the configuration of this package with:

./node_modules/.bin/release-czech-husky update

This will setup new configuration files and prompt you whether to reset already existing configuration files. To forcefully overwrite those, instead, run:

./node_modules/.bin/release-czech-husky update --overwrite

Git Hook for macOS

The Git hook for macOS is automatically recompiled during the update of the configuration. In case you want to update the default Git hook for macOS yourself, you can run

./node_modules/.bin/release-czech-husky update --mac-os

to recompile it.

Configuration

husky

You can configure husky as usually and fine-tune the predefined git commit hook by editing .git-hooks/pre-commit-msg.js and .git-hooks/pre-commit-msg.applescript on macOS.

git-cz

You can configure git-cz as usually in changelog.config.js.

semantic-release

You can configure semantic-release as usually in release.config.js.

GitLab CI/CD

You can configure the GitLab CI/CD as usually in .gitlab-ci.yml.

GitLab CI/CD Token

@semantic-release/gitlab used during deployment requires the environment variable GITLAB_TOKEN to be present during execution. Most easily, you can configure the variables of GitLab CI/CD for this purpose. It is recommended to set the variable as protected and masked due to its confidential nature.

Opinionated Defaults

git commit hook on Windows

Under Windows, the git commit hook assumes that Git is installed at %ProgramFiles%\Git.

git commit hook on macOS

Under macOS, the git commit hook assumes the use of Fork and iTerm 2.

Deployment with GitLab

The deployment with GitLab CI/CD is assumed.

FAQ

Why does the version in package.json and package-lock.json not get updated when running the GitLab CI/CD pipeline?

The package @semantic-release/npm is responsible for updating the version in package.json and package-lock.json. That package is not included as step in the default configuration of semantic-release.

Why is @semantic-release/npm not included in the default configuration of semantic-release?

By default, @semantic-release/npm attempts to publish your package to the npm registry. As the GitLab CI/CD pipeline lacks the environment variable necessary to execute this step during deployment, the pipeline would fail.
If you still desire to update the version in package.json and package-lock.json, you can include @semantic-release/npm before @semantic-release/git and add "private": true to your package.json. This way, your package does not get accidentally published to the npm registry and your GitLab CI/CD pipeline does not require NPM_TOKEN to be set.

With @semantic-release/npm included in my configuration, why does the version in package.json and package-lock.json within a nested npm package not get updated when running the GitLab CI/CD pipeline?

By default, @semantic-release/npm updates the version of package.json and package-lock.json found in ., i.e. the root of your project. On top of that, @semantic-release/npm can only handle one pair of package.json and package-lock.json. You can still update any number of nested npm packages, by using the postpublish npm-script:

"scripts": {
  "postpublish": "cd nested/package && npm version $(node -pe 'require('../../package.json').version') && cd ../.."
}