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

@longucodes/nx-package-builder

v1.2.9

Published

### Sections

Downloads

9

Readme

@longucodes/nx-package-builder

Sections

Purpose

This package allows for easy version bumping and publishing of applications and libraries managed in a nx monorepo. It automatically bumps up the version depending on the commit according to conventional commits, create a commit with it, tags it and publishes the package/application.

Usage

The library consist of 2 executors, @logucodes/nx-package-builder:build-and-publish and @longucodes/nx-package-builder:ci

build-and-publish executor

This executor builds the package using provided executor, then publishes it using selected cli.

It can run without any configuration

{
  "publish": {
    "executor": "@longucodes/nx-package-builder:build-and-publish"
  }
}

The full configuration consists of following options:

  • buildScript - name of the build executor, default build
  • publishCli - cli used for publishing, default npm
  • publishArgs - list of arguments to pass to the cli, default []
  • dry - run without publishing, default false

To pass argument --tag abc to the cli, add to publishArgs:

{
  "name": "tag",
  "value": "abc"
}

To pass argument --minor to the cli, add to publishArgs:

{
  "name": "minor"
}

:warning: Due to NX limitations, if your library is dependent on other buildable libraries, they will be build using build executor (not the executor specified in buildScript) :warning:

ci executor

The ci executor is designed to work with previous one out of the box. It will detect commit type, bump the version in the package.json and then run selected "publish" executor.

It can run without any configuration.

{
  "publish": {
    "executor": "@longucodes/nx-package-builder:ci"
  }
}

The full configuration consists of following options:

  • commit - should a commit with the new version be made, default true
  • tag - should the commit be tagged, requires commit to be true, default true
  • tagDelimiter - delimiter between the name of the package and the version, default ||
  • push - should the commit be pushed, requires commit to be true, default true
  • publish - should the publish executor be run, default true
  • publishScript - name of the publish executor, default publish
  • publishCli - cli used for publishing, default npm
  • noCiMessage - additional message added in front of the commit, used for disabling CI run for this commit
  • versionBumpPattern - pattern of bumping the version depending on the commit type, default {feat: minor}
  • baseCommit - base commit to reference for proper bump type checking, default HEAD~1

:warning: Running the command without providing baseCommit or NX_BASE environment variable will lead to inconsistent version bumping :warning:

By default, every commit type will be considered a patch bump, except commit of feat type, which will bump minor and commits containing the words BREAKING CHANGE, which will bump major

If the commit header does not match conventional commit format, the commit type will be treated as unknown and not a breaking change.

:information_source: If your executor requires the version through environment variables, use NX_PUBLISH_VERSION :information_source: