requirejs-react-jsx
Advanced tools
Comparing version 0.16.1 to 0.16.2
@@ -29,3 +29,3 @@ define(function () { | ||
if (process.env.ISTANBUL === 'true') { | ||
if (process.env.running_under_istanbul) { | ||
var istanbul = require.nodeRequire('istanbul'); | ||
@@ -32,0 +32,0 @@ var coverageVariable = Object.keys(global).filter(function (key) { return key.indexOf('$$cov_') === 0 })[0]; |
{ | ||
"name": "requirejs-react-jsx", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"description": "A RequireJS plugin for loading jsx in require.js and r.js", | ||
@@ -5,0 +5,0 @@ "main": "jsx.js", |
@@ -147,4 +147,6 @@ # requirejs-react-jsx | ||
The `--hook-run-in-context` only makes Istanbul pick up normally loaded RequireJS files though, and not the ones transformed by requirejs-react-jsx. So requirejs-react-jsx has an added programmatic code instrumentation which is triggered based on the `ISTANBUL` environment variable being `'true'`. | ||
requirejs-react-jsx will automatically detect that it is being run in an Istanbul enabled environment and | ||
The `--hook-run-in-context` only makes Istanbul pick up normally loaded RequireJS files though, and not the ones transformed by RequireJS plugins. So requirejs-react-jsx will automatically detect that it is being run in an Istanbul enabled environment and manually instrument the transpiled code so Istanbul can collect coverage. | ||
A full example of a coverage script in `package.json` could look like this: | ||
@@ -156,3 +158,3 @@ | ||
"test": "mocha", | ||
"coverage": "ISTANBUL=true istanbul cover --hook-run-in-context _mocha" | ||
"coverage": "istanbul cover --hook-run-in-context _mocha" | ||
} | ||
@@ -159,0 +161,0 @@ } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
12084
165