Browserify version 1.5.0 represents a minor update over its predecessor, version 1.4.8, both aiming to bring the power of Node.js-style require() statements to the browser. The core functionality, allowing developers to organize JavaScript code into modules and manage dependencies on the client-side, remains consistent. The key dependencies for core functionalities like nub, resolve, optimist, commondir, detective, and coffee-script are unchanged, indicating a focus on stability and incremental improvements.
The most notable difference lies in the devDependencies, which hint at changes in the testing and development environment. Version 1.5.0 introduces tap for testing and removes expresso, suggesting a shift in preferred testing frameworks. Also notable is the addition of traverse which is a utility widely used for recursive object traversal. The release notes provide more details on the specific reasons for these changes. For developers, this means potentially needing to adapt their testing workflows if they were relying on expresso. Otherwise, the migration from 1.4.8 to 1.5.0 should be relatively straightforward. Both versions remain licensed under the MIT/X11 license and are authored by James Halliday (substack), ensuring a familiar and well-supported environment for developers seeking to leverage Browserify for modular browser-based JavaScript development. The update was released a day after the previous version.
All the vulnerabilities related to the version 1.5.0 of the package
Incorrect Handling of Non-Boolean Comparisons During Minification in uglify-js
Versions of uglify-js
prior to 2.4.24 are affected by a vulnerability which may cause crafted JavaScript to have altered functionality after minification.
Upgrade UglifyJS to version >= 2.4.24.
Regular Expression Denial of Service in uglify-js
Versions of uglify-js
prior to 2.6.0 are affected by a regular expression denial of service vulnerability when malicious inputs are passed into the parse()
method.
var u = require('uglify-js');
var genstr = function (len, chr) {
var result = "";
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
u.parse("var a = " + genstr(process.argv[2], "1") + ".1ee7;");
$ time node test.js 10000
real 0m1.091s
user 0m1.047s
sys 0m0.039s
$ time node test.js 80000
real 0m6.486s
user 0m6.229s
sys 0m0.094s
Update to version 2.6.0 or later.