New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

update-pkgjson

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

update-pkgjson

**模块**

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

update-pkgjson

模块

  • getNextVersion 获得下一个版本
  • getUpdatedPackage 获取更新版本后的package内容
  • getPublishPackage 获取发布包的内容
npm install update-pkgjson

获取下一个版本

const { getNextVersion } = require('update-pkgjson')
const pkg = require('./package.json')
console.info(getNextVersion(pkg.version))

获取更新版本后的package内容

const { getUpdatedPackage } = require('update-pkgjson')
const pkg = require('./package.json')
console.info(getUpdatedPackage(pkg))

getPublishPackage

const { getPublishPackage } = require('update-pkgjson')
const pkg = require('./package.json')
const newPkg = getUpdatedPackage(pkg)

getPublishPackage(newPkg, {
  main: 'src/index.js', 
  homepage: '', 
  repository: {
    type: 'git',
    url: ''
  }, 
  bin: {
    '自定义命令': 'src/index.js'
  }
})

FAQs

Package last updated on 24 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts