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

browser-pack

Package Overview
Dependencies
Maintainers
39
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-pack - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

26

index.js

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

var umd = require('umd');
var Buffer = require('safe-buffer').Buffer;

@@ -48,9 +49,9 @@ var fs = require('fs');

var pre = umd.prelude(opts.standalone).trim();
stream.push(new Buffer(pre + 'return '));
stream.push(Buffer.from(pre + 'return ', 'utf8'));
}
else if (first && stream.hasExports) {
var pre = opts.externalRequireName || 'require';
stream.push(new Buffer(pre + '='));
stream.push(Buffer.from(pre + '=', 'utf8'));
}
if (first) stream.push(new Buffer(prelude + '({'));
if (first) stream.push(Buffer.from(prelude + '({', 'utf8'));

@@ -86,3 +87,3 @@ if (row.sourceFile && !row.nomap) {

stream.push(new Buffer(wrappedSource));
stream.push(Buffer.from(wrappedSource, 'utf8'));
lineno += newlinesIn(wrappedSource);

@@ -99,11 +100,14 @@

function end () {
if (first) stream.push(new Buffer(prelude + '({'));
if (first) stream.push(Buffer.from(prelude + '({', 'utf8'));
entries = entries.filter(function (x) { return x !== undefined });
stream.push(new Buffer('},{},' + JSON.stringify(entries) + ')'));
stream.push(
Buffer.from('},{},' + JSON.stringify(entries) + ')', 'utf8')
);
if (opts.standalone && !first) {
stream.push(new Buffer(
stream.push(Buffer.from(
'(' + JSON.stringify(stream.standaloneModule) + ')'
+ umd.postlude(opts.standalone)
+ umd.postlude(opts.standalone),
'utf8'
));

@@ -119,5 +123,7 @@ }

}
stream.push(new Buffer('\n' + comment + '\n'));
stream.push(Buffer.from('\n' + comment + '\n', 'utf8'));
}
if (!sourcemap && !opts.standalone) stream.push(new Buffer(';\n'));
if (!sourcemap && !opts.standalone) {
stream.push(Buffer.from(';\n', 'utf8'));
}

@@ -124,0 +130,0 @@ stream.push(null);

{
"name": "browser-pack",
"version": "6.0.2",
"version": "6.0.3",
"description": "pack node-style source files from a json stream into a browser bundle",

@@ -11,4 +11,5 @@ "main": "index.js",

"JSONStream": "^1.0.3",
"combine-source-map": "~0.7.1",
"combine-source-map": "~0.8.0",
"defined": "^1.0.0",
"safe-buffer": "^5.1.1",
"through2": "^2.0.0",

@@ -18,3 +19,3 @@ "umd": "^3.0.0"

"devDependencies": {
"tap": "^2.2.0",
"tap": "^10.7.2",
"uglify-js": "1.3.5",

@@ -21,0 +22,0 @@ "concat-stream": "~1.5.1",

Sorry, the diff of this file is not supported yet

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