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

mono-release

v2.9.14

Published

A tiny monorepo release tool

Downloads

593

Readme

Mono Release 🎉

npm npm GitHub Workflow Status

A tiny monorepo release tool.

Features

  • ➡️ Select a package to operate
  • 🤖 Automatic version derivation
  • 🔖 Semantic version by semver
  • ✅ Configure via file or command line
  • 🔒 Branch protection
  • 🛞 Rollback protection
  • 📄 Changelog by conventional-changelog-cli
  • 📦 Unlimited package manager
  • 📢 Also contains a publish command

Install

npm i mono-release -D
# Or Yarn
yarn add mono-release -D
# Or PNPM
pnpm add mono-release -D

Note: You may need to add -W flag to install it in a monorepo workspace.

Usage

Use directly:

npx mono-release
# Or
npx mor

Or through a script in package.json:

{
  "scripts": {
    "release": "mono-release"
  }
}

Publish

It also provides a command for publishing packages:

npx mono-release publish [email protected]

The tag format must be: <pkg>@<version>.

Configuration

You can add a "mono-release" key to package.json to add configuration for it:

{
  "mono-release": {
    "packagesPath": "packages-path",
    "exclude": ["pkg-will-not-be-released"],
    "changelog": true,
    "dry": false,
    "push": true
  }
}

mono-release.config.ts ('.js' | '.cjs' | '.mjs' | '.json') is also available:

import { defineConfig } from 'mono-release'

export default defineConfig({
  packagesPath: 'packages-path',
  exclude: ['pkg-will-not-be-released'],
  changelog: true,
  dry: false,
  push: true
})

CLI Options

config

mono-release --config mono-release.config.ts

Use specified config file.

specified package

mono-release --specified-package pkg-name

Specified package which will be released, skip selector, ignore exclude.

changelog

mono-release --changelog
# Or disabled
mono-release --no-changelog

Whether to generate changelog.

Note: You need to install conventional-changelog-cli to generate changelog.

include

mono-release --include pkg1,pkg2,pkg3

Include packages, if specified, this tool will only work on specified packages, exclude will override include.

exclude

mono-release --exclude pkg1,pkg2,pkg3

Excludes specified packages (These packages will not appear in the list of options).

dry

mono-release --dry

Dry run. (default: false)

disable push

mono-release --disable-push
# Or disabled
mono-release --no-push

By default, this tool will push commit and tag to remote, use this option to disable it. (default: false)

commit check

mono-release --commit-check
# Or disabled
mono-release --no-commit-check

Whether to check commit before release. (default: true)

Warning: If disabled, you may lose all uncommited changes when rollback.

version type

mono-release --version-type alpha-minor

Default version type, if you specify it, will skip version select action. (default: undefined) Available values: next, alpha-minor, alpha-major, beta-minor, beta-major, minor, major.

ci

mono-release --ci

Run in CI mode, will skip all select actions, you must specify --specified-package.

ci msg suffix

mono-release --ci --ci-msg-suffix "[skip ci]"

Specify commit message suffix in CI mode, example: [skip ci].

before release

mono-release --before-release "npm run test"

You can specify command to be executed before release.

specified package manager

mono-release publish --use pnpm

Use specified package manager for publishing. (default: npm)

Note: Some packages may depend on other packages under the same monorepo, and publishing with a specific package manager can handle these relationships automatically. (eg, pnpm workspace protocol)

before publish

mono-release publish --before-publish "npm run test"

You can specify command to be executed before publish.

Note: The default cwd is the package directory when running before publish command

help

mono-release --help

Print help information.

version

mono-release --version

Print the version.

How it works

When you need release a package from monorepo project, you can run this tool to execute a command-line script, which you can select the package that needs to release and select a recommended version. It will automatically generate a commit message about this release, and push this commit. In addition, a tag about this version will also be pushed.

Much of the code for this tool references Vite's release scripts. You can observe the details of its release to understand more how it works

License

MIT License © 2022 Archer Gu