New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-json

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-json - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

4

CHANGELOG.md
# rollup-plugin-json changelog
## 2.3.0
* Always parse JSON, so malformed JSON is identified at bundle time ([#27](https://github.com/rollup/rollup-plugin-json/issues/27))
## 2.2.0

@@ -4,0 +8,0 @@

6

dist/rollup-plugin-json.cjs.js

@@ -17,6 +17,5 @@ 'use strict';

var data = JSON.parse(json);
var code = '';
// Manipulating properties so keeping as `let`
// eslint-disable-next-line prefer-const
var ast = {

@@ -30,3 +29,3 @@ type: 'Program',

if (json[0] !== '{') {
if (Object.prototype.toString.call(data) !== '[object Object]') {
code = "export default " + json + ";";

@@ -47,3 +46,2 @@

} else {
var data = JSON.parse(json);
var indent = 'indent' in options ? options.indent : '\t';

@@ -50,0 +48,0 @@

@@ -15,6 +15,5 @@ import { createFilter, makeLegalIdentifier } from 'rollup-pluginutils';

var data = JSON.parse(json);
var code = '';
// Manipulating properties so keeping as `let`
// eslint-disable-next-line prefer-const
var ast = {

@@ -28,3 +27,3 @@ type: 'Program',

if (json[0] !== '{') {
if (Object.prototype.toString.call(data) !== '[object Object]') {
code = "export default " + json + ";";

@@ -45,3 +44,2 @@

} else {
var data = JSON.parse(json);
var indent = 'indent' in options ? options.indent : '\t';

@@ -48,0 +46,0 @@

{
"name": "rollup-plugin-json",
"version": "2.2.0",
"version": "2.3.0",
"main": "dist/rollup-plugin-json.cjs.js",

@@ -11,5 +11,5 @@ "module": "dist/rollup-plugin-json.es.js",

"mocha": "^3.0.2",
"rollup": "^0.37.0",
"rollup": "^0.41.6",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-node-resolve": "^3.0.0",
"source-map-support": "^0.4.2"

@@ -33,4 +33,4 @@ },

"dependencies": {
"rollup-pluginutils": "^1.5.2"
"rollup-pluginutils": "^2.0.1"
}
}

@@ -13,7 +13,6 @@ import { createFilter, makeLegalIdentifier } from 'rollup-pluginutils';

const data = JSON.parse(json);
let code = '';
// Manipulating properties so keeping as `let`
// eslint-disable-next-line prefer-const
let ast = {
const ast = {
type: 'Program',

@@ -26,3 +25,3 @@ sourceType: 'module',

if (json[0] !== '{') {
if (Object.prototype.toString.call(data) !== '[object Object]') {
code = `export default ${json};`;

@@ -43,3 +42,2 @@

} else {
const data = JSON.parse(json);
const indent = 'indent' in options ? options.indent : '\t';

@@ -46,0 +44,0 @@

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