Skip to content

Releases: browserify/static-module

v3.0.4

26 Apr 09:49
d70e12c
Compare
Choose a tag to compare
  • Dependency updates.
  • Expand CI matrix to include all the way back to Node.js 0.10.

v3.0.3

12 Apr 16:37
f504c5c
Compare
Choose a tag to compare

Fix npm audit warning, thanks @jimmywarting!

v3.0.0

01 Jun 10:53
08da918
Compare
Choose a tag to compare

Implement scope tracking.

The core idea is this:

var fs = require('fs')
fs.readFileSync('./a.txt') // refers to require('fs'), is replaced
function whatever (fs) {
  fs.readFileSync() // different fs variable, is _not_ replaced
}

Additionally, the require call for a module will be kept if some of its uses in the file could not be replaced. For example, with fs:

var fs = require('fs')
fs.readFileSync(__filename)

Here, require('fs') will be removed because the fs.readFileSync call is statically evaluated and replaced.

var fs = require('fs')
fs.readFileSync(__filename)
fs.readFile(someUserInput)

Here, the fs.readFileSync() call is statically evaluated and replaced, but the fs.readFile call is not because it requires a runtime value someUserInput. In this case, the require('fs') call is kept.

v2.2.5

09 May 08:10
932fc54
Compare
Choose a tag to compare

Fix a rare bug that could cause statically evaluated content to interfere with surrounding code. See #14.

v2.2.4

10 Apr 14:39
7833507
Compare
Choose a tag to compare

v2.2.3

04 Apr 10:41
1a81d39
Compare
Choose a tag to compare
  • Fix source maps for files that do not contain any static module require()s (#44)

v2.2.2

07 Mar 14:14
b0af62e
Compare
Choose a tag to compare

Fix crash in source map generation when replacing 0 length ranges. (#41, 0b8b9f1)

v2.2.1

07 Mar 13:57
9c5868d
Compare
Choose a tag to compare

Only parse files if they contain a target module. (#20)

v2.2.0

28 Feb 15:01
2209539
Compare
Choose a tag to compare

Generate source maps (#40)

Pass sourceMap: true to generate inline source maps.

v2.1.1

30 Jan 09:53
74dcb7e
Compare
Choose a tag to compare

catch errors in statically evaluated expressions so the process does not crash

#39