public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ee1b0d
)
improve sandbox `async` detection (#5185)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Mon, 22 Nov 2021 18:29:54 +0000
(18:29 +0000)
committer
GitHub
<noreply@github.com>
Mon, 22 Nov 2021 18:29:54 +0000
(
02:29
+0800)
closes #5184
test/sandbox.js
patch
|
blob
|
history
diff --git
a/test/sandbox.js
b/test/sandbox.js
index
0ba179e
..
7266345
100644
(file)
--- a/
test/sandbox.js
+++ b/
test/sandbox.js
@@
-28,7
+28,7
@@
exports.run_code = semver.satisfies(process.version, "0.8") ? function(code, top
if ([
/\basync[ \t]*\([\s\S]*?\)[ \t]*=>/,
/\b(async[ \t]+function|Promise|setImmediate|setInterval|setTimeout)\b/,
- /\basync([ \t]+|[ \t]*#|[ \t]*\*[ \t]*)[^\s()[\]{}#,.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
+ /\basync([ \t]+|[ \t]*#|[ \t]*\*[ \t]*)[^\s()[\]{}#
:;
,.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
].some(function(pattern) {
return pattern.test(code);
})) {