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

changeset-releaser

v0.1.2

Published

Incremental builds and tests runner for monorepo projects based on Atlassian Changesets

Downloads

48

Readme

changeset-releaser - a missing Atlassian Changesets companion tool

changeset-releaser allows you to test, build and run custom scripts in your monorepo incrementally, i.e. only for the packages that have changed and their dependencies and/or dependents.

How it works

Let's assume you have already set up your monorepo according to the Atlassian Changesets documentation.

Then you would want to setup your CI so that it would run build and test scripts only for relevant packages.

For example, if your monorepo dependency graph is the following:

graph TD
    app_1-->lib_1
    app_2-->lib_2
    app_2-->lib_3
    app_1-->tool_1
    lib_1-->lib_A
    lib_1-->lib_B
    lib_1-->lib_C

Example 1

And you have a changeset, that states that only app_2 have changed, then perhaps, changeset publish willl publish only app_2. But in order to test app_2 you would need to build all its dependencies, i.e. lib_2 and lib_3.

So if you run yarn changeset-releaser build, the following packages will be built:

  • lib_2
  • lib_3
  • app_2

Then you will need to test the changed packages. There is no need to test lib_2 and lib_3 as they have not changed. But app_2 will need to be tested. So if you run yarn changeset-releaser test, the following packages will be tested:

  • app_2

Example 2

Let's assume that in your changeset, you have the information that lib_B has changed.

Then it should be built. But that's not all. Because it has changed, all its dependants should be tested for possible regression. That's why all its dependants (and all their dependencies) must be built prior to testing.

changesets-releaser takes this into account. So if you run changesets-releaser build, the following packages will be built:

  • lib_A
  • lib_B
  • lib_C
  • lib_1
  • tool_1
  • app_1

And then, if you run changeset-releaser test, the following packages will be tested:

  • lib_B
  • lib_1
  • app_1

If you want to just lint the changed packages, you can run changeset-releaser lint. It will only lint the changed packages.

Usage

Run build script incrementally:

changeset-releaser build

Run test script incrementally:

changeset-releaser test

Run lint script incrementally:

changeset-releaser lint

Run any script incrementally:

changeset-releaser <group> script

Where group is one of the following:

  • build - run the script for those packages that would be built
  • test - run the script for those packages that would be tested
  • changed - run the script for those packages that have changed