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

@scrumsdotcom/semantic-release-config

v1.0.69

Published

Scrums.com's semantic-release shareable configuration

Downloads

2,158

Readme

@scrumsdotcom/semantic-release-config

Version Documentation Maintenance License: MIT

This is Scrums.com's shareable configuration for semantic-release, designed to automate versioning and package publishing. This configuration follows the Conventional Commits standard and integrates smoothly into popular CI/CD pipelines.

💡 Why Use This?

With this configuration, semantic-release will handle:

  • Automatic updates to your package.json version.
  • Creation and maintenance of a changelog.
  • Ensuring continuous software delivery by releasing only when specific conditions (like commit message requirements) are met.

🛠️ Installation

First, install the required packages in your project. You can choose your preferred package manager:

Using Yarn

yarn add -D semantic-release @scrumsdotcom/semantic-release-config

Using npm

npm install --save-dev semantic-release @scrumsdotcom/semantic-release-config

Using pnpm

pnpm add -D semantic-release @scrumsdotcom/semantic-release-config

Using Bun

bun add -d semantic-release @scrumsdotcom/semantic-release-config

📄 Basic Setup

1. Add Release Configuration

After installing, you need to define how your project should use the configuration. You can do this in two different ways:

Option 1: Use a .releaserc file

Create a .releaserc file in the root of your project directory with the following content:

{
  "extends": "@scrumsdotcom/semantic-release-config"
}

Option 2: Configure package.json directly

Alternatively, you can add the release configuration under the release section in your package.json:

{
  "release": {
    "extends": "@scrumsdotcom/semantic-release-config"
  }
}

2. Configure CI to Trigger Semantic Release

To automatically trigger releases, semantic-release needs to run in your CI pipeline when code is pushed. The configuration you need depends on the CI service you use, but here's a simple example for GitHub Actions:

GitHub Actions Example:

Create a .github/workflows/release.yml file:

name: Release

on:
  push:
    branches:
      - main

jobs:
  release:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '22'

      - name: Install dependencies
        run: npm install

      - name: Run semantic-release
        run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Note: CI tools like GitHub Actions require a token to publish to GitHub. This should be automatically populated by the GitHub Action runner. However, if it doesn't for you, you can find more information about GitHub Actions secrets here.

🔌 Plugins Used by This Config

Our configuration uses the following semantic-release plugins out of the box:

  1. @semantic-release/commit-analyzer: Analyzes your commits and decides if a release is necessary based on commit messages.
  2. @semantic-release/release-notes-generator: Automatically generates release notes based on the commit history.
  3. @semantic-release/npm: Publishes the package to npm and updates the version in your package.json.
  4. @semantic-release/git: Commits the updated package.json and changelog after a release.

Each plugin plays a specific role in ensuring a bulletproof release process, so no additional setup is typically required unless you’re customizing further.

📑 Additional Configuration (Optional)

While this shareable configuration provides a sensible default setup, you may want to make additional tweaks, especially for notification purposes.

For example, you can configure notifications to Slack using the semantic-release-slack-bot plugin to notify your team of new releases. This is not included by default in our package to ensure modularity.

To enable Slack notifications:

  1. Follow the Slackbot Setup Guide.
  2. Set the following environment variables in your CI:
  • SLACK_WEBHOOK: The webhook URL from your Slack.
  • SEMANTIC_RELEASE_PACKAGE: (Optional) Custom package name for notifications.

🛑 Troubleshooting

If you face issues while setting up or using the configuration, the official semantic-release documentation provides excellent resources, especially for:

🌟 Support and Contributions

If this project has been helpful to you, please consider giving it a star on GitHub. Contributions are welcome—feel free to submit issues or pull requests.

GitHub stars

Made with ❤️ by Scrums.com