Comparing version 1.1.3 to 2.0.0
##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 |
@@ -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); |
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
149
8
0
43263
30
887