Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electrum

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrum - npm Package Compare versions

Comparing version 2.18.1 to 2.18.2

test/test-require-patch.js

2

package.json
{
"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

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