Skip to content

Commit a750521

Browse files
committed
remove strict mode detection
1 parent 819c59e commit a750521

File tree

3 files changed

+3
-36
lines changed

3 files changed

+3
-36
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Changelog
22
---------
33

4+
### 3.0.0
5+
- Capture imports and add them to the global scope for testing
6+
47
### 2.5.2
58
- Fix cluttering of `require.extensions` even if CoffeeScript is not installed [#98](https://github.com/jhnns/rewire/pull/98)
69

lib/detectStrictMode.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

lib/rewire.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ var Module = require('module'),
22
fs = require('fs'),
33
getImportGlobalsSrc = require('./getImportGlobalsSrc.js'),
44
getDefinePropertySrc = require('./getDefinePropertySrc.js'),
5-
detectStrictMode = require('./detectStrictMode.js'),
65
moduleEnv = require('./moduleEnv.js'),
76
addImportsAsVars = require('./addImportsAsVars');
87

@@ -53,11 +52,6 @@ function internalRewire(parentModulePath, targetPath) {
5352
// End of IIFE
5453
appendix += '})();';
5554

56-
57-
if (detectStrictMode(src) === true) {
58-
prelude = ` "use strict"; ${prelude}`;
59-
}
60-
6155
moduleEnv.inject(prelude, appendix);
6256
moduleEnv.load(targetModule);
6357

0 commit comments

Comments
 (0)