Comparing version 5.16.5 to 5.16.6
# Changelog | ||
## v5.16.7 | ||
- Become less conservative with analyzing function definitions for `reduce_vars` | ||
- Parse `import.meta` as a real AST node and not an `object.property` | ||
## v5.16.5 | ||
@@ -4,0 +9,0 @@ |
@@ -70,2 +70,3 @@ /*********************************************************************** | ||
AST_Import, | ||
AST_ImportMeta, | ||
AST_Jump, | ||
@@ -314,2 +315,3 @@ AST_LabeledStatement, | ||
}); | ||
def_has_side_effects(AST_ImportMeta, return_false); | ||
def_has_side_effects(AST_LabeledStatement, function(compressor) { | ||
@@ -418,2 +420,3 @@ return this.body.has_side_effects(compressor); | ||
def_may_throw(AST_This, return_false); | ||
def_may_throw(AST_ImportMeta, return_false); | ||
@@ -782,2 +785,7 @@ function any(list, compressor) { | ||
}); | ||
def_find_defs(AST_ImportMeta, function(compressor, suffix) { | ||
var defines = compressor.option("global_defs"); | ||
var name = "import.meta" + suffix; | ||
if (HOP(defines, name)) return to_node(defines[name], this); | ||
}); | ||
})(function(node, func) { | ||
@@ -784,0 +792,0 @@ node.DEFMETHOD("_find_defs", func); |
@@ -451,11 +451,3 @@ /*********************************************************************** | ||
// Sometimes we detach the lambda for safety, and instead of push() | ||
// we go to an entirely fresh lineage of safe_ids. | ||
let previous_safe_ids; | ||
if (this instanceof AST_Defun || this.uses_arguments || this.pinned()) { | ||
previous_safe_ids = tw.safe_ids; | ||
tw.safe_ids = Object.create(null); | ||
} else { | ||
push(tw); | ||
} | ||
push(tw); | ||
@@ -492,10 +484,6 @@ reset_variables(tw, compressor, this); | ||
} | ||
descend(); | ||
pop(tw); | ||
if (previous_safe_ids) { | ||
tw.safe_ids = previous_safe_ids; | ||
} else { | ||
pop(tw); | ||
} | ||
return true; | ||
@@ -502,0 +490,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
"license": "BSD-2-Clause", | ||
"version": "5.16.5", | ||
"version": "5.16.6", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=10" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2069338
58926
7
41