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 - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

5

index.js
'use strict';
const fs = require('fs');
const path = require('path');
const semver = require('semver');

@@ -15,3 +14,3 @@ const detectIndent = require('detect-indent');

const readFile = (filePath, cb) => {
fs.readFile(filePath, 'utf8', function(err, data) {
fs.readFile(filePath, 'utf8', (err, data) => {
if (err) return cb(err);

@@ -50,3 +49,3 @@ let json = null;

set(json, incVersion);
fs.writeFile(filePath, new Buffer(JSON.stringify(json, null, indent) + '\n'), err => {
fs.writeFile(filePath, Buffer.from(JSON.stringify(json, null, indent) + '\n'), err => {
if (err) return reject(new BumpError(err.message));

@@ -53,0 +52,0 @@ resolve(json);

4

package.json
{
"name": "bump-file",
"version": "1.0.0",
"version": "2.0.0",
"description": "Bump JSON files (e.g. package.json and friends)",

@@ -47,4 +47,4 @@ "keywords": [

"engines": {
"node": ">=4"
"node": ">=6"
}
}
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