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

insert-module-globals

Package Overview
Dependencies
Maintainers
2
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 6.4.3 to 6.5.0

9

bin/cmd.js
#!/usr/bin/env node
var insert = require('../');
var through = require('through');
var through = require('through2');
var concat = require('concat-stream');

@@ -12,3 +12,3 @@ var JSONStream = require('JSONStream');

.pipe(JSONStream.parse([ true ]))
.pipe(through(write))
.pipe(through.obj(write))
.pipe(JSONStream.stringify())

@@ -18,3 +18,3 @@ .pipe(process.stdout)

function write (row) {
function write (row, enc, next) {
var self = this;

@@ -24,5 +24,6 @@ var s = insert(row.id, { basedir: basedir });

row.source = src.toString('utf8');
self.queue(row);
self.push(row);
next();
}));
s.end(row.source);
}
var parseScope = require('lexical-scope');
var through = require('through');
var through = require('through2');
var merge = require('xtend');
var path = require('path');
var fs = require('fs');
var processPath = require.resolve('process/browser.js');

@@ -24,4 +23,4 @@ var combineSourceMap = require('combine-source-map');

__filename: function (file, basedir) {
var file = '/' + path.relative(basedir, file);
return JSON.stringify(file);
var filename = '/' + path.relative(basedir, file);
return JSON.stringify(filename);
},

@@ -46,3 +45,2 @@ __dirname: function (file, basedir) {

var resolved = {};
var chunks = [];

@@ -52,3 +50,3 @@

function write (buf) { chunks.push(buf) }
function write (chunk, enc, next) { chunks.push(chunk); next() }

@@ -66,4 +64,4 @@ function end () {

if (opts.always !== true && !quick.test(source)) {
this.queue(source);
this.queue(null);
this.push(source);
this.push(null);
return;

@@ -99,4 +97,4 @@ }

this.queue(closeOver(globals, source, file, opts));
this.queue(null);
this.push(closeOver(globals, source, file, opts));
this.push(null);
}

@@ -103,0 +101,0 @@ };

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

@@ -15,8 +15,8 @@ "main": "index.js",

"process": "~0.11.0",
"through": "~2.3.4",
"through2": "^1.0.0",
"xtend": "^4.0.0"
},
"devDependencies": {
"tap": "~0.4.0",
"browser-pack": "^4.0.3",
"tap": "^1.1.0",
"browser-pack": "^5.0.0",
"buffer": "^3.0.0",

@@ -23,0 +23,0 @@ "module-deps": "^3.7.11"

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