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

gulp-json-editor

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-json-editor - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 2.5.2
### Changed
- Update dependencies
## 2.5.1

@@ -2,0 +8,0 @@

3

index.js

@@ -48,3 +48,4 @@ var jsbeautify = require('js-beautify').js_beautify;

if (file.isStream()) {
this.emit('error', new PluginError('gulp-json-editor', 'Streaming is not supported'));
this.emit('error',
new PluginError('gulp-json-editor', 'Streaming is not supported'));
return callback();

@@ -51,0 +52,0 @@ }

{
"name": "gulp-json-editor",
"version": "2.5.1",
"version": "2.5.2",
"description": "A gulp plugin to edit JSON objects",

@@ -16,4 +16,4 @@ "license": "MIT",

"deepmerge": "^3.2.0",
"detect-indent": "^5.0.0",
"js-beautify": "^1.9.0",
"detect-indent": "^6.0.0",
"js-beautify": "^1.9.1",
"plugin-error": "^1.0.1",

@@ -23,12 +23,9 @@ "through2": "^3.0.1"

"devDependencies": {
"eslint": "^5.14.1",
"eslint": "^5.16.0",
"eslint-config-gulp": "^3.0.1",
"gulp": "^4.0.0",
"mocha": "^6.0.2",
"gulp": "^4.0.1",
"mocha": "^6.1.4",
"should": "^13.2.3",
"vinyl": "^2.2.0"
},
"engines": {
"node": ">=6"
},
"keywords": [

@@ -40,5 +37,6 @@ "gulpplugin",

"scripts": {
"lint": "eslint --fix **/*.js",
"eslint": "eslint *.js test/*.js",
"eslint:fix": "eslint --fix *.js test/*.js",
"test": "mocha"
}
}

@@ -1,2 +0,2 @@

var jedit = require('../');
var json = require('../');
var fs = require('fs');

@@ -7,3 +7,3 @@ var File = require('vinyl');

it('should raise error when missing option', function(done) {
should(function() {jedit();}).throw('missing "editor" option');
should(function() {json();}).throw('missing "editor" option');
done();

@@ -14,3 +14,4 @@ });

it('should raise error when invalid type of option', function(done) {
should(function() {jedit(1);}).throw('"editor" option must be a function or object');
should(function() {json(1);})
.throw('"editor" option must be a function or object');
done();

@@ -21,3 +22,3 @@ });

it('should do path-through when input is null', function(done) {
jedit({})
json({})
.on('data', function(file) {

@@ -32,3 +33,3 @@ should(file.contents).eql(null);

it('should raise error when streaming input', function(done) {
jedit({})
json({})
.on('error', function(err) {

@@ -35,0 +36,0 @@ err.message.should.equal('Streaming is not supported');

@@ -10,3 +10,4 @@ var json = require('../');

array: [
'1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
],

@@ -56,3 +57,4 @@ nested: {

array: [
'1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
],

@@ -99,3 +101,4 @@ nested: {

array: [
'1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
'1234567890', '1234567890', '1234567890', '1234567890',
],

@@ -112,3 +115,8 @@ nested: {

stream.on('data', function(file) {
var expected = '{"name":"test object","version":"2.0.0","nested":{"name":"nested object","version":"2.0.1","description":"this is test for nested"},"authors":["tom"],"description":"this is test","array":["1234567890","1234567890","1234567890","1234567890","1234567890","1234567890","1234567890","1234567890"]}';
var expected = '{"name":"test object","version":"2.0.0",' +
'"nested":{"name":"nested object","version":"2.0.1",' +
'"description":"this is test for nested"},"authors":["tom"],' +
'"description":"this is test",' +
'"array":["1234567890","1234567890","1234567890","1234567890",' +
'"1234567890","1234567890","1234567890","1234567890"]}';
file.contents.toString().should.eql(expected);

@@ -115,0 +123,0 @@ done();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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