
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
browserify-casesensitiverequire
Advanced tools
A simple browserify transform to ensure that the case of require()'d file names are consistent, and warn the user if they aren't
This project is no longer maintained
A simple browserify transform to ensure that the case of require()'d file names are consistent, and warn the user if they aren't. This makes sure that browersify code that is written on Windows will also work on *nix's.
Example usage (command line)
npm i browserify-casesensitiverequire -g
browserify -t browserify-casesensitiverequire ./myindex.js
I was originally tempted to create a transform that would automatically alter the case for you, however this seemed like bad practice so I have opted for emitting warnings instead.
If the same file is require()'d by Browserify using different casing, on Windows this will cause the same file to be processed & compiled twice (which works, but is undesirable). On case-sensitive file systems, the operation will fail. So we have code that can build on Windows but not unix. This transform aims to resolve that, by warning the developer they have require()'d the same file at different points in their code using different casing.
Example
File: index1.js
var a = require( './index3.js' );
File: index2.js
var b = require( './INDEX3.js' );
This will emit a warning that index3.js is referenced in multiple files using different casing.
Example (using relative paths from different subfolders)
File: index1.js
var a = require( './index3.js' );
File: subfolder/index2.js
var b = require( '../INDEX3.js' );
browserify-casesensitiverequire is smart enough to figure out that they are referencing the same index3.js, so will also emit a warning.
FAQs
A simple browserify transform to ensure that the case of require()'d file names are consistent, and warn the user if they aren't
The npm package browserify-casesensitiverequire receives a total of 6 weekly downloads. As such, browserify-casesensitiverequire popularity was classified as not popular.
We found that browserify-casesensitiverequire demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.