Comparing version 2.18.1 to 2.18.2
{ | ||
"name": "electrum", | ||
"version": "2.18.1", | ||
"version": "2.18.2", | ||
"description": "Electrum simplifies framework-agnostic declaration of React components.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,2 +9,3 @@ /*globals __dirname */ | ||
babelConfig.babel = babel; | ||
module.exports = function (wallaby) { | ||
@@ -17,5 +18,3 @@ return { | ||
{pattern: 'src/utils/**/*.js'}, | ||
{pattern: 'src/*.js'}, | ||
{pattern: 'node_modules/electrum.js'}, | ||
{pattern: 'package.json', instrument: false} | ||
{pattern: 'src/*.js'} | ||
], | ||
@@ -33,6 +32,27 @@ tests: [ | ||
}, | ||
bootstrap: function () { | ||
bootstrap: function (wallaby) { | ||
// See http://wallabyjs.com/docs/config/bootstrap.html | ||
var path = require ('path'); | ||
var sep = path.sep; | ||
console.log ('Setup wallaby'); | ||
var sep = require ('path').sep; | ||
// Ensure that we can require self (just like what module 'require-self' | ||
// does), but remapping by default the path to './src' rather than './lib' | ||
// as specified by package "main". | ||
// See https://github.com/wallabyjs/public/issues/453 | ||
var packageConfig = require (path.join (wallaby.localProjectDir, 'package.json')); | ||
var packageName = packageConfig.name; | ||
var modulePrototype = require ('module').Module.prototype; | ||
if (!modulePrototype._originalRequire) { | ||
modulePrototype._originalRequire = modulePrototype.require; | ||
modulePrototype.require = function (filePath) { | ||
if (filePath === packageName) { | ||
return modulePrototype._originalRequire.call (this, path.join (wallaby.projectCacheDir, 'src')); | ||
} else { | ||
return modulePrototype._originalRequire.call (this, filePath); | ||
} | ||
}; | ||
} | ||
// Remove react from the require.cache, or else some code might not get | ||
@@ -47,2 +67,3 @@ // executed when editing the source code. | ||
}); | ||
// Include the test helper, which sets up the document and window objects | ||
@@ -49,0 +70,0 @@ // as globals: |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137844
68
2555
5