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

r42

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r42 - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

4

lib/module.js

@@ -83,2 +83,6 @@ 'use strict';

if (_.isUndefined(content)) {
return;
}
// Prevent useless copies (might happen if exports is used)

@@ -85,0 +89,0 @@ if (this.content === content) {

4

lib/moduleContext.js

@@ -110,3 +110,3 @@ 'use strict';

if (_.isFunction(module)) {
return module.apply(global, this.computeArgs(parent, replace, module));
return module.apply(parent.content, this.computeArgs(parent, replace, module));
}

@@ -168,3 +168,3 @@

dep = path.shift();
if (dep in replace) {

@@ -171,0 +171,0 @@ dep = replace[dep];

{
"name": "r42",
"version": "0.8.1",
"version": "0.8.2",
"description": "Dependency injection done right.",

@@ -5,0 +5,0 @@ "author": {

@@ -237,6 +237,18 @@ ## r42

return exports;
return exports; // optional
});
```
exports is also accessible without injection using `this`:
```js
define(function(exports) {
this.fnA = function() {
// ...
};
// ...
});
```
##### Other load mechanism

@@ -477,2 +489,7 @@

#### 0.8.2
* make `return` optional in modules (prepare for deprecation)
* add `this` in module definitions as an alias to `exports`
#### 0.8.1

@@ -479,0 +496,0 @@

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