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

@shuyun-ep-team/specified-package-version-check

v1.10.6

Published

check the specified package version is outdated or not

Downloads

4

Readme

@shuyun-ep-team/specified-package-version-check

[ENGLISH] | 中文

Introduce

@shuyun-ep-team/specified-package-version-check is a script which can check the specified package version is outdated or not, if outdated, develop env process will be exist.

For some case, e.g. our team develop ourselves eslint rules as a npm package, if we update the npm package version, we hope all of our team member must use the latest npm version.

Usage

// Run this script first, e.g. { "start": node check && webpack-dev-server --open --history-api-fallback -d --colors}
//check.js
const checkDependenceVersion = require('@shuyun-ep-team/specified-package-version-check');

async function func() {
  await checkDependenceVersion({
    dependenceArr: ['axios', '@shuyun-ep-team/eslint-config'],
    useDepCheck: true,
    ignoreCheck: false,
    onlyWarn: false,
    checkAllLocalDependencies: false,
    ignoreSelf: false,
    remoteUrl: '',
  });

  console.log('end');
}

func();

API

| Property | Description | Type | Default | required | Version | | :------------------------ | :--------------------------------------------------------------- | :------- | :----------------------------------------------------------------------------------- | -------- | :------ | | dependenceArr | dependence need to be checked | string[] | [] | true | 1.0.0 | | ignoreCheck | skip check | boolean | undefined | false | 1.0.0 | | onlyWarn | only warn when specified package outdated | boolean | false | false | 1.0.0 | | checkAllLocalDependencies | check all packages version in package.json | boolean | undefined | false | 1.0.0 | | ignoreSelf | ignore check @shuyun-ep-team/specified-package-version-check | boolean | undefined | false | 1.0.0 | | remoteUrl | check specified npm global cli version | string | https://api-track.kylin.shuyun.com/monitor-service/static/global-package-info.json | false | 1.0.0 | | uploadPackageInfoUrl | upload package info | string | https://api-track.kylin.shuyun.com/monitor-service/upload-package-info | false | 1.2.1 | | useDepCheck | use depcheck to check useless dependencies and miss dependencies | boolean | undefined | false | 1.2.1 | | depcheckOptions | refer to https://github.com/depcheck/depcheck#api | object | {} | false | 1.2.1 | | autoFixOutdateDep | auto fix outdate specified package | boolean | true | false | 1.3.0 | | silent | hide output | boolean | false | false | 1.6.0 | | enableGlobalCliCheck | check specified global npm package cli version | boolean | true | false | 1.6.0 |

关于配置文件

Insert the following into script in package.json

{
  "prestart": "npx version-check"
}

Command will read current folder's .spvrc.js where package.json is, if not found that file, console would happen an error

//.spvrc.js like as follows
module.exports = {
  dependenceArr: ['@shuyun-ep-team/eslint-config', 'put your deps here...'],
  ignoreCheck: false,
  onlyWarn: false,
  checkAllLocalDependencies: false,
  useDepCheck: true,
  autoFixOutdateDep: true,
};

something about remoteUrl json

json content construct must be as following

{
  "info": [
    {
      "command": "show version command", //e.g. yarn -v
      "name": "package name" //e.g. yarn
    }
  ]
}