Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove 'use strict'; from systemjs when strict=false (#3101)
- Loading branch information
1 parent
8dceaf6
commit d13cb90
Showing
9 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
description: 'use strict should not be present', | ||
options: { | ||
output: { | ||
strict: false | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
define(function () { | ||
|
||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function () { | ||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} | ||
|
||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
System.register([], function () { | ||
|
||
return { | ||
execute: function () { | ||
|
||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} | ||
|
||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(function (factory) { | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
factory(); | ||
}(function () { | ||
const localVariable = 'local'; | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const localVariable = 'local' | ||
|
||
try { | ||
globalVariable = localVariable; | ||
} catch (error) { | ||
console.log('use strict; detected', error); | ||
|
||
Function("g", "globalVariable = g")(localVariable); | ||
} |