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

nodepath-qiansimin

v1.1.0

Published

update some npm package

Downloads

8

Readme

一个一键更新/安装 许多或者所有项目 下面node_module包 的命令行工具,基于nodejs

h2 说明:

  • 👌这个命令行工具是为了那些在某个目录下面有很多项目并且有同时更新或者更新很多项目下面的包的版本而编写的
  • 👌建议不填-e命令,不然很容易发生版本冲突导致git push冲突失败
  • 👌仅仅适合升级node_module的包版本使用
  • 👌不仅仅可以升级包工具,还有用install命令来安装包, 请确保安装和升级区分开,没有的包就用install命令,有的包就用update两个不能混淆使用

安装

npm install -g nodepath-qiansimin

示例1 : 升级指定规则名的项目

nodepath update -k phoenix -p vue -v 1.0.3 -c /Users/apple/code

就会打印出所有的 绝对路径 /Users/apple/code 下面文件名有phoenix关键字并且有包vue 的版本集合,并且可以选择一键升级

┌────────┬──────────────────────────────┬─────────────────────────┬─────────────────────────┬───────────────┐
│ 索引    │ 匹配到的项目                   │ 当前vue的版本号           │ vue升级到的版本号         │ 处理          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 0      │ phoenix-commodity-backend    │ ^1.0.26                 │ 1.0.3                   │ 升级          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 1      │ phoenix-data-backend         │ ^1.0.26                 │ 1.0.3                   │ 升级          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 2      │ phoenix-m-article            │ ^1.0.26                 │ 1.0.3                   │ 升级          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 3      │ phoenix-m-community          │ ^1.0.26                 │ 1.0.3                   │ 升级          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 4      │ phoenix-m-data               │ ^1.0.26                 │ 1.0.3                   │ 升级          │
└────────┴──────────────────────────────┴─────────────────────────┴─────────────────────────┴───────────────┘

示例2 :升级特定项目名的包升级

nodepath update -s phoenix-m-article phoenix-m-data -p tm-m-headers -v 1.0.9 -c /Users/apple/code

就会打印出所有的 绝对路径 /Users/apple/code 下面phoenix-m-article phoenix-m-data两个项目并且有包vue 的版本集合,并且可以选择一键升级

┌────────┬──────────────────────────────┬─────────────────────────┬─────────────────────────┬───────────────┐
│ 索引    │ 匹配到的项目                   │ 当前tm-m-headers的版本…   │ tm-m-headers升级到的版…  │ 处理          │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 0      │ phoenix-m-article            │ ^1.1.0                  │ 1.0.9                   │ 不处理        │
├────────┼──────────────────────────────┼─────────────────────────┼─────────────────────────┼───────────────┤
│ 1      │ phoenix-m-data               │ ^1.0.8                  │ 1.0.9                   │ 升级          │
└────────┴──────────────────────────────┴─────────────────────────┴─────────────────────────┴───────────────┘

示例3 :安装包

nodepath install -p superagent -k vue

就会打印出所有的 绝对路径 /Users/apple/code 下面有vue关键字项目名目的集合,并且可以选择一键安装-p参数所声明的npm包


`注意`: install命令 不要使用-v参数,是无效的

┌────────┬──────────────────────────────┬───────────────────────────────────┐
│ 索引    │ 匹配到的项目                   │ 安装的包名                          │
├────────┼──────────────────────────────┼───────────────────────────────────┤
│ 0      │ vue-picker                   │ superagent                        │
├────────┼──────────────────────────────┼───────────────────────────────────┤
│ 1      │ vue-scrollload               │ superagent                        │
└────────┴──────────────────────────────┴───────────────────────────────────┘

参数说明

-k : 输入关键字来匹配项目 
-s : 多参数选择项目名 (多参数形式的 特别指定项目名  和上面的  k  二选一哦)
-p : 输入包名 (default: tm-c-oss)
-c : 包含所有项目的目录绝对路径(default: /Users/qsm/Code)
-v : 需要升级到的版本号(install模式下没有效果)
-e : 选择执行的环境,有develop,daily,test三个环境可以选,-e不填默认选择三个环境同时提交

一键升级的目前是 三个环境develop daily test同时发布  所需你必须要有这三个远程和本地分支哦