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

@napalmpapalam/rlx

v0.4.1

Published

Work with releases with ease

Downloads

207

Readme

Table of Contents

Changelog

For the changelog, see CHANGELOG.md.

Installation

To install the rlx with the npm, run:

npm i -D @napalmpapalam/rlx

or with the yarn:

yarn add -D @napalmpapalam/rlx

Build from source

Before building the rlx from the source, make sure you have the Rust installed on your machine.

To build the rlx from the source, run:

git clone https://github.com/napalmpapalam/rlx.git
cd rlx
cargo build --release
cp ./target/release/rlx /usr/local/bin/rlx # or any other directory in the PATH

Configuration

There are a few ways to configure the rlx:

  • .rlx.yml file in the root of the project, names of the options equal to the CLI flags but in the snake case (e.g. tag-prefix -> tag_prefix)
  • Global flags which will be passed to the rlx command
  • Environment variables with the RLX_ prefix

Options:

| Option name | Option alias | Environment variable | Description | | ---------------- | ------------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | workspace-path | -w | RLX_WORKSPACE_PATH | Path to the workspace directory with the packages directories if it's mono-repo (eg. rlx --workspace-path ./packages). Used to infer the packages path for validating package.json version. If not provided, the current directory will be used. | | changelog-path | -cp | RLX_CHANGELOG_PATH | Path to the changelog file (eg. rlx --changelog-path ./CHANGELOG.md). If not provided, the CHANGELOG.md file in the root of the project will be used. | | debug | ❌ | RLX_DEBUG | Enable debug mode, which will print debug logs. | | remote-url | -url | RLX_REMOTE_URL | The Git Remote URL of the repository, used to generate compare links in the changelog. If not provided it will be inferred from the git configuration. | | tag-prefix | -t | RLX_TAG_PREFIX | The tag prefix to use (e.g. rlx --tag-prefix v), used to generate compare links in the changelog. If not provided it will empty. | | head | ❌ | RLX_HEAD | The head to use (by default HEAD, e.g. rlx --head master), used to generate compare links in the changelog |

Usage

rlx CLI provides a set of commands to work with the releases, which you can use to automate the release process.

rlx rsc

Release Sanity Check. Check that a release is sane (package.json, CHANGELOG.md and semantic versioning are valid for the release).

Usage:

npx rlx rsc [OPTIONS] <VERSION>

Arguments:

  • <VERSION> - The release version to check, if not provided, the not pushed git tag will be used. If no git tag is found, the check will be skipped

The command will check the following:

  • The provided version is a valid semver version
  • The package.json version is equal to the provided version
  • The CHANGELOG.md contains the provided version release notes and the release date is equal to the current date, and the release compares link is valid\exists

Example:

npx rlx rsc 1.0.0

rlx version

Version commands, used to manipulate the version in the package.json file.

rlx version apply

Set the provided version to the package.json file. The --workspace-path option can be used as well to apply the version to the mono-repo packages.

Usage:

npx rlx version apply [OPTIONS] <VERSION>

Arguments:

  • <VERSION> - The version to apply to the package.json file

Example:

npx rlx version apply 1.0.0

rlx changelog

Changelog commands, used to parse and manipulate changelog.

rlx changelog new

Generate a new changelog file.

Usage:

npx rlx changelog new [OPTIONS]

Example:

npx rlx changelog new

rlx changelog get

Get the release changelog for the provided version.

Usage:

npx rlx changelog get [OPTIONS] <VERSION>

Arguments:

  • <VERSION> - The release version to get the changelog for, alternatively, you can use latest to get the latest release changelog

Example:

npx rlx changelog get 1.0.0

rlx changelog format

Format the changelog file, making sure it's valid and consistent.

Usage:

npx rlx changelog format [OPTIONS]

rlx changelog validate

Validate the changelog file, making sure it's valid and consistent.

Usage:

npx rlx changelog validate [OPTIONS]

rlx changelog release

Make a release from [Unreleased] section

Usage:

npx rlx changelog release [OPTIONS] <VERSION>

Arguments:

  • <VERSION> - The release version to make the release for.

Example:

npx rlx changelog release 1.0.0

rlx help

Display help for the rlx CLI

Usage:

npx rlx help

It will display the help message with the available commands and options such as:

Usage: rlx [OPTIONS] <COMMAND>

Commands:
  rsc         Release Sanity Check. Check that a release is sane (`package.json`, `CHANGELOG.md` and semantic versioning are valid for the release)
  changelog   Changelog commands, used to parse and manipulate changelog
  version     Version commands, used to manipulate versions
  help        Print this message or the help of the given subcommand(s)

Options:
  -w, --workspace-path <WORKSPACE_PATH>
          Path to the workspace directory with the packages directories if it's mono-repo (eg. "./packages"). Used to infer the package(s) path for validating package.json version.

          If not provided, the current directory will be used.

          Can be set via `RLX_WORKSPACE_PATH` environment variable or `workspace_path` config option in the `.rlx.yml` file.

      --debug
          Enable debug mode, which will print debug logs.

          Can be set via `RLX_DEBUG` environment variable or `debug` config option in the `.rlx.yml` file.

      --changelog-path <CHANGELOG_PATH>
          The path to the changelog file, defaults to `CHANGELOG.md`

          Can be set via `RLX_CHANGELOG_PATH` environment variable or `changelog_path` config option in the `.rlx.yml` file.

      --remote-url <REMOTE_URL>
          The Git Remote URL of the repository, used to generate compare links in the changelog.

          If not provided it will be inferred from the git configuration.

          Can be set via `RLX_REMOTE_URL` environment variable or `remote_url` config option in the `.rlx.yml` file.

  -t, --tag-prefix <TAG_PREFIX>
          The tag prefix to use (e.g. `v`), used to generate compare links in the changelog.

          If not provided it will empty.

          Can be set via `RLX_TAG_PREFIX` environment variable or `tag_prefix` config option in the `.rlx.yml` file.

      --head <HEAD>
          The head to use (by default `HEAD`), used to generate compare links in the changelog

          Can be set via `RLX_HEAD` environment variable or `head` config option in the `.rlx.yml` file.

  -h, --help
          Print help (see a summary with '-h')

Contribute

First off, thanks for taking the time to contribute! Now, take a moment to be sure your contributions make sense to everyone else.

Reporting Issues

Found a problem? Want a new feature? First of all, see if your issue or idea has already been reported. If don't, just open a new clear and descriptive issue.

Submitting pull requests

Pull requests are the greatest contributions, so be sure they are focused in scope and avoid unrelated commits.

  • Fork it!
  • Clone your fork: git clone https://github.com/<your-username>/rlx
  • Navigate to the newly cloned directory: cd rlx
  • Create a new branch for the new feature: git checkout -b feature/my-new-feature
  • Make your changes.
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin feature/my-new-feature
  • Submit a pull request with full remarks documenting your changes.

License

MIT License © Semen Loktionov