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

@muraldevkit/ds-semrel-manager

v1.0.0

Published

Mural's design system's manager for monorepo dependency versioning in Semantic Release

Downloads

8

Readme

Mural design system Semantic Release Dependency Manager

We use Semantic Release for version management and the package release workflow. This package ensures that the monorepo's packages are kept in sync with their current published version. When coding locally, you will see a wildcard (*) version in the package.json of each of the monorepo's packages. However, in production, each package.json will use the most recently published version instead.

Table of contents

  1. Prerequisites
  2. Usage
  3. How it works

Prerequisites

This package requires that you have a Semantic Release configuration setup. If you're configuration is a separate NPM package, it needs to be a peerDependency in the package.json file:

"peerDependencies": {
	"@muraldevkit/ds-semrel-config": "*"
}

Usage

In order to use this plugin, you will need to add it to your Semantic Release configuration and pass it an array of packages to maintain.

const plugins = [
	[
		'@muraldevkit/ds-semrel-manager', {
			wildcards: [
				'@muraldevkit/ds-component-button',
				'@muraldevkit/ds-semrel-config'
				// ... the rest of the packages you wish to manage
			]
		}
	]
];

If you are managing your monorepo with Lerna, we have also added a function that you can import into your configuration file to get all of the packages in your monorepo:

const { getLernaPackages } = require('@muraldevkit/ds-semrel-manager');

const plugins = [
	[
		'@muraldevkit/ds-semrel-manager', {
			wildcards: getLernaPackages()
		}
	]
];

Once this is configured, in each package.json file, you will want to change the dependency, devDependency, and peerDependency references of each monorepo sub-packages to a wildcard (*):

"dependencies": {
	"@muraldevkit/ds-component-button": "*"
	// ... your additional dependencies
},
"devDependencies": {
	"@muraldevkit/ds-utilities": "*"
	// ... your additional devDependencies
}

How it works

This plugin iterates over each package.json file in the monorepo and ensures that the configured packages are updated to their most recent version when we prepare to publish a release. When you use this plugin in your Semantic Release configuration, the prepare script is where all the magic happens. A basic summary of the steps in this function are as follows:

  1. It makes a couple of checks to make sure that the context and configuration are acceptable.
  2. Once everything is ready, it gets all of the releases (and thus tags) of the configured packages.
  3. It gets the package contents of each package in the monorepo to find wildcards.
  4. It updates the package.json to add the next release version.

Once the prepare script is finished, Semantic Release is ready to run!