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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nextstarproject/version

v1.0.1

Published

unified update multiple package version

Downloads

7

Readme

@nextstarproject/version

ps: 之前使用的是 @nextstar/version ,后来改成了 @nextstarproject/version,主要原因在于 github 和 npm 的 scope 设置一样方便自动化

github repo GitHub package npm

安装

npm install -g @nextstarproject/version

使用

将运行的目录下全部更新至指定版本

$ ns-version u 2.0.0

结果

| (index) | file | | :-----: | :-----------------------------: | | 0 | 'package.json' | | 1 | 'packages/version/package.json' |

此处更新时只会默认忽略掉 node_modules 文件夹下的 package.json 文件。其余 package.json 文件将会全部更新

更新指定工作目录下的版本

$ ns-version up -w "./" -i minor

此处代指只更新当前目录下根路径中的 package.json 版本

结果

| (index) | file | old | new | | :-----: | :------------: | :-----: | :-----: | | 0 | 'package.json' | '1.0.0' | '1.1.0' |

其中输入的 -w 代表 --workspace ,可以多次输入,每个输入的都会使用 glob 来做匹配。

比如输入为: packages/**apps/** ,则其可以查看源码,将会对齐拼接为 packages/**/package.jsonapps/**/package.json , 将其输入到 glob 来进行处理。

其和 unified 一样,默认忽略 node_modules

参数

$ ns-version             
Usage: ns-version [options] [command]

CLI unified Update version

Options:
  -v, --version                  output the version number
  -h, --help                     display help for command

Commands:
  unified|u [options] <version>  Unified update to the specified version, default ignore node_modules
  update|up [options]            Upgrade the version under the specified workspace
  help [command]                 display help for command

unified

$ ns-version unified -h
Usage: ns-version unified|u [options] <version>

Unified update to the specified version, default ignore node_modules

Arguments:
  version                Specifying the version

Options:
  -s, --spaces <number>  Number of spaces to indent (default: "2")
  -h, --help             display help for command

update

$ ns-version update -h 
Usage: ns-version update|up [options]

Upgrade the version under the specified workspace

Options:
  -w, --workspace <workspace...>  Target workspace, default: **, Results: [workspace]/package.json, ignore node_modules (default: "**")
  -i, --increment <level>         Increment a version by the specified level.  Level can be one of: major, minor, patch, premajor, preminor, prepatch, or
                                  prerelease.  Default level is 'patch'. Only one version may be specified. (default: "patch")
  -s, --spaces <number>           Number of spaces to indent (default: "2")
  -h, --help                      display help for command

其中 -w 默认 ** 其实拼接后和 unified 是一样的。