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

browserify

Package Overview
Dependencies
Maintainers
42
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify - npm Package Compare versions

Comparing version 16.5.2 to 17.0.0

test/json/invalid.js

13

index.js

@@ -21,3 +21,3 @@ var path = require('path');

var sanitize = require('htmlescape').sanitize;
var shasum = require('shasum');
var shasum = require('shasum-object');

@@ -666,3 +666,12 @@ var bresolve = require('browser-resolve');

if (/\.json$/.test(row.file)) {
row.source = 'module.exports=' + sanitize(row.source);
var sanitizedString = sanitize(row.source);
try {
// check json validity
JSON.parse(sanitizedString);
row.source = 'module.exports=' + sanitizedString;
} catch (err) {
err.message = 'While parsing ' + (row.file || row.id) + ': ' + err.message
this.emit('error', err);
return;
}
}

@@ -669,0 +678,0 @@ this.push(row);

16

package.json
{
"name": "browserify",
"version": "16.5.2",
"version": "17.0.0",
"description": "browser-side require() the node way",

@@ -38,6 +38,6 @@ "main": "index.js",

"defined": "^1.0.0",
"deps-sort": "^2.0.0",
"deps-sort": "^2.0.1",
"domain-browser": "^1.2.0",
"duplexer2": "~0.1.2",
"events": "^2.0.0",
"events": "^3.0.0",
"glob": "^7.1.0",

@@ -48,3 +48,3 @@ "has": "^1.0.0",

"inherits": "~2.0.1",
"insert-module-globals": "^7.0.0",
"insert-module-globals": "^7.2.1",
"labeled-stream-splicer": "^2.0.0",

@@ -55,3 +55,3 @@ "mkdirp-classic": "^0.5.2",

"parents": "^1.0.1",
"path-browserify": "~0.0.0",
"path-browserify": "^1.0.0",
"process": "~0.11.0",

@@ -63,5 +63,5 @@ "punycode": "^1.3.2",

"resolve": "^1.1.4",
"shasum": "^1.0.0",
"shasum-object": "^1.0.0",
"shell-quote": "^1.6.1",
"stream-browserify": "^2.0.0",
"stream-browserify": "^3.0.0",
"stream-http": "^3.0.0",

@@ -75,3 +75,3 @@ "string_decoder": "^1.1.1",

"url": "~0.11.0",
"util": "~0.10.1",
"util": "~0.12.0",
"vm-browserify": "^1.0.0",

@@ -78,0 +78,0 @@ "xtend": "^4.0.0"

@@ -7,2 +7,3 @@ var test = require('tap').test;

var concat = require('concat-stream');
var semver = require('semver');

@@ -17,3 +18,4 @@ var temp = require('temp');

test('crypto --insertGlobals', function (t) {
// `crypto-browserify` no longer works in node.js <4
test('crypto --insertGlobals', { skip: semver.lt(process.version, 'v4.0.0') }, function (t) {
t.plan(2);

@@ -20,0 +22,0 @@

@@ -7,2 +7,3 @@ var test = require('tap').test;

var concat = require('concat-stream');
var semver = require('semver');

@@ -17,3 +18,4 @@ var temp = require('temp');

test('*-browserify libs from node_modules/', function (t) {
// `crypto-browserify` no longer works in node.js <4
test('*-browserify libs from node_modules/', { skip: semver.lt(process.version, 'v4.0.0') }, function (t) {
t.plan(2);

@@ -20,0 +22,0 @@

@@ -49,1 +49,10 @@ var browserify = require('../');

});
test('invalid json', function (t) {
var b = browserify();
t.plan(1);
b.add(__dirname + '/json/invalid.js');
b.bundle(function (err, src) {
t.ok(err);
});
});

@@ -15,3 +15,3 @@ /**

// Main app bundle has the main app code and the shared libarary code
// Main app bundle has the main app code and the shared library code
var app = browserify([__dirname + '/reverse_multi_bundle/app.js'])

@@ -18,0 +18,0 @@ .external(__dirname + '/reverse_multi_bundle/lazy.js')

var Seq = require('seq');
var browserify = require('../');
var test = require('tap').test;
var shasum = require('shasum');
var shasum = require('shasum-object');

@@ -6,0 +6,0 @@ test('syntax cache - valid', function (t) {

var browserify = require('../');
var test = require('tap').test;
var util = require('util');
var xtend = require('xtend');
var vm = require('vm');

@@ -49,3 +50,4 @@

b.bundle(function (err, src) {
var c = { Object : { prototype: Object.prototype } };
var c = xtend({}, Object);
delete c.create;
vm.runInNewContext(src, c);

@@ -52,0 +54,0 @@ var EE = c.require('events').EventEmitter;

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