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

insert-module-globals

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insert-module-globals - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

48

index.js

@@ -85,32 +85,26 @@ var parseScope = require('lexical-scope');

for(var name in vars) {
if(~scope.globals.implicit.indexOf(name)) {
var value = vars[name].call(this, row, basedir);
if(!value)
Object.keys(vars).forEach(function (name) {
if (scope.globals.implicit.indexOf(name) >= 0) {
var value = vars[name].call(tr, row, basedir);
if (!value) {}
else if ('object' == typeof value) {
value.deps = value.deps || {};
if (!resolved[name]) tr.queue(value);
var igName = '__browserify_' + name;
row.deps[igName] = value.id;
resolved[name] = true;
globals[name] = 'require('
+ JSON.stringify(igName)
+ ')'
+ (value.suffix || '')
;
else if('object' == typeof value) {
value.deps = value.deps || {}
if(!resolved[name])
this.queue(value);
var igName = '__browserify_'+name
row.deps[igName] = value.id
resolved[name] = true
globals[name] =
'require('
+ JSON.stringify(igName)
+ ')'
+ (value.suffix || '');
}
else
globals[name] = value;
else globals[name] = value;
}
}
row.source = closeOver(globals, row.source)
this.queue(row);
});
row.source = closeOver(globals, row.source);
tr.queue(row);
}

@@ -117,0 +111,0 @@

{
"name": "insert-module-globals",
"version": "1.1.0",
"version": "1.1.1",
"description": "insert implicit module globals into a module-deps stream",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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