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

requirejs-react-jsx

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requirejs-react-jsx - npm Package Compare versions

Comparing version 0.16.1 to 0.16.2

2

jsx.js

@@ -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 @@ }

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