Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bump-file

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

bump-file

Bump JSON files (e.g. package.json and friends)

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.4K
decreased by-6.77%
Maintainers
1
Weekly downloads
 
Created
Source

file-bump

Installation

npm install file-bump

Usage

Node.js

import bump from 'bump-file';

bump(file, [increment='patch']);

The second argument can also be an object:

bump(file, {
  increment,
  preId,        // Prerelease identifier (such as "alpha", "beta", "rc")
  get,          // Function to get version. Default: pkg => pkg.version
  set           // Function to set version. Default: (pkg, version) => pkg.version = version
});

CLI

You can install this globally (npm install -g file-bump), and use from CLI:

bump file [increment] [preId]

Examples

bump('package.json', 'minor'); // 1.0.0 → 1.1.0

bump('package.json', {         // 1.4.2 → 2.0.0-beta.0
  increment: 'premajor',
  preId: 'beta'
});

See the tests for more example.

Keywords

FAQs

Package last updated on 07 Jan 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc