babel-plugin-inline-json-import
Advanced tools
+1
-1
@@ -50,3 +50,3 @@ 'use strict'; | ||
| if (init.type === 'CallExpression' && init.callee.type === 'Identifier' && init.callee.name === 'require' && init.arguments.length === 1 && init.arguments[0].type === 'StringLiteral') { | ||
| if (init != null && init.type === 'CallExpression' && init.callee.type === 'Identifier' && init.callee.name === 'require' && init.arguments.length === 1 && init.arguments[0].type === 'StringLiteral') { | ||
| changed = true; | ||
@@ -53,0 +53,0 @@ |
+1
-1
| { | ||
| "name": "babel-plugin-inline-json-import", | ||
| "version": "0.3.0", | ||
| "version": "0.3.1", | ||
| "description": "Inlines JSON file imports straight into JS code", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -129,2 +129,15 @@ import fs from 'fs' | ||
| it('supports opt variable declaration', () => { | ||
| const t = configureTransform() | ||
| const result = t(` | ||
| var a; | ||
| let c; | ||
| `) | ||
| expect(normalize(result.code)).to.equal(normalize(` | ||
| var a; | ||
| let c; | ||
| `)) | ||
| }) | ||
| function configureTransform(options = {}, isFile) { | ||
@@ -131,0 +144,0 @@ return function configuredTransform(string) { |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
16278
1.59%213
5.45%