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

@uscreen.de/versionize

v0.7.1

Published

opinionated package versioner

Downloads

56

Readme

versionize

Test CI Test Coverage Known Vulnerabilities NPM Version

Opinionated package versioner

This package can be used for versioning your Node.js projects. It uses Semantic Versioning and increments versions by specifying the desired release type.

Prerequisites

  • node v18 or higher

Install

Add the module within your monorepo:

$ yarn add -D @uscreen.de/versionize

Usage

$ versionize latest // => increments (minor) pre-release version
$ versionize stable // => increments minor version
$ versionize hotfix // => increments patch version
$ versionize        // => outputs current version

Versions are written into package.json and manifest.json. The package.json always contains the current stable release version. The manifest.json contains the current pre-release version, if given, otherwise also the current stable release version.

Options

Raw output

If you want to use versionize's output for shell scripts or similar, use the option --raw. Instead of the default output, versionize will only write the new version to stdout, without any pretty printing.

Commit & tag via Git

If used with option --commit, versionize will automatically commit the changes it made to package.json and manifest.json. If used with option --tag, versionize will additionally tag the automatic commit with the new version.

You need a working git binary in your PATH.

JavaScript

The package also exposes some methods so you could use versionize inside your project:

import { getCurrentVersion, bumpVersion } from '@uscreen.de/versionize'

getCurrentVersion

Get the current version of your project:

const myVersion = getCurrentVersion()

You could overwrite the current working directory with the option cwd:

const myVersion = getCurrentVersion({ cwd: '/path/to/my/project' })

bumpVersion

Bump the version of your project:

bumpVersion('stable')

You could overwrite the current working directory with the option cwd:

bumpVersion('stable', { cwd: '/path/to/my/project' })

To commit or tag the version bump, use the corresponding options:

// commit:
bumpVersion('stable', { commit: true })

// (commit &) tag:
bumpVersion('stable', { tag: true })

Roadmap

  • TBD

Changelog

Format according to https://keepachangelog.com

v0.7.1

Fixed

  • fix api documentation in readme

v0.7.0

Added

  • expose method to bump version

Removed

  • node v16 support

v0.6.1

Fixed

  • write newline to end of package file

v0.6.0

Added

  • cli option to commit changes to git without tag

v0.5.0

Added

  • cli option to commit changes to git and tag new commit

v0.4.0

Added

  • cli option for raw output

v0.3.0

Added

  • show current version when calling versionize without arguments

Changed

  • give feedback about current version, too
  • small ui changes
  • refactoring

v0.2.0

Added

  • give feedback about new version

v0.1.0

Added

  • initial version with basic functionality

License

Licensed under MIT.

Published, Supported and Sponsored by u|screen