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

rewire

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rewire - npm Package Compare versions

Comparing version 1.1.3 to 2.0.0

.jshintignore

6

CHANGELOG.md
##Changelog
###v2.0.0
- Removed client-side bundler extensions. Browserify is not supported anymore. Webpack support has been extracted
into separate repository https://github.com/jhnns/rewire-webpack
###v1.1.3
- removed IDE stuff from npm package
- Removed IDE stuff from npm package

@@ -6,0 +10,0 @@ ###v1.1.2

5

lib/index.js

@@ -14,9 +14,4 @@ var rewireModule = require("./rewire.js");

rewire.bundlers = {
browserify: require("./bundlers/browserify/browserifyMiddleware.js"),
webpack: require("./bundlers/webpack/configureWebpack.js")
};
module.exports = rewire;
delete require.cache[__filename]; // deleting self from module cache so the parent module is always up to date
{
"name" : "rewire",
"version" : "1.1.3",
"version" : "2.0.0",
"description" : "Dependency injection for node.js applications",

@@ -5,0 +5,0 @@ "keywords" : [

@@ -11,5 +11,8 @@ rewire

rewire does **not** load the file and eval the contents to emulate node's require mechanism. In fact it uses node's own require to load the module. Thus your module behaves exactly the same in your test environment as under regular circumstances (except your modifications).
rewire does **not** load the file and eval the contents to emulate node's require mechanism. In fact it uses node's own
require to load the module. Thus your module behaves exactly the same in your test environment as under regular
circumstances (except your modifications).
Good news to all caffeine-addicts: rewire works also with [Coffee-Script](http://coffeescript.org/). Note that in this case CS needs to be listed in your devDependencies.
Good news to all caffeine-addicts: rewire works also with [Coffee-Script](http://coffeescript.org/). Note that in this
case CoffeeScript needs to be listed in your devDependencies.

@@ -140,3 +143,3 @@ If you want to use rewire also on the client-side take a look at [client-side bundlers](https://github.com/jhnns/rewire#client-side-bundlers)

###browserify
rewire currently only supports browserify@1.x. I'm not planing to continue development, but if you're relying on this feature [please let me know](https://github.com/jhnns/rewire/issues/13).
If you're using browserify and want to use rewire with browserify [please let me know](https://github.com/jhnns/rewire/issues/13).

@@ -143,0 +146,0 @@ <br />

@@ -5,4 +5,3 @@ // Don't run code in ES5 strict mode.

var path = require("path"),
expect = require("expect.js"),
var expect = require("expect.js"),
rewire = require("rewire");

@@ -50,3 +49,3 @@

it("should not influence other modules", function () {
var rewiredModuleA = rewire("./moduleA.js");
rewire("./moduleA.js");

@@ -53,0 +52,0 @@ expect(require("./someOtherModule.js").__set__).to.be(undefined);

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