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 1d524f2
Showing
11 changed files
with
439 additions
and
679 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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); | ||
} |