You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d87c4e5
Browse filesBrowse the repository at this point in the historyBrowse files
"javascript syntax: the one-pass minify reads one source, without `wrap`, `enclose`, `nameCache`, `ie8`, `safari10`, property mangling or `keep_fnames`/`keep_classnames` as a function or pattern"
"javascript syntax: the one-pass minify reads one source, without `wrap`, `enclose`, `nameCache`, `ie8`, `safari10`, property mangling or `keep_fnames`/`keep_classnames` as a function or pattern"
9975
+
)
9974
9976
);
9977
+
error.code = ONE_PASS_UNSUPPORTED;
9978
+
throw error;
9975
9979
}
9976
9980
/** @type {ParsedTree | null} */
9977
9981
let parsedTree = null;
@@ -18071,6 +18075,9 @@ const PARSE_FUNCTION_BODY = Symbol("a source read as a function body");
18071
18075
// The option a minify is read and mangled under for the JavaScript
18072
18076
// `SourceProcessor`, which compresses it as it prints.
18073
18077
const PREPARES_NODE_PRINT = Symbol("a minify the SourceProcessor prints");
18078
+
// The `code` of the error a one-pass minify throws for what only terser's
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
3
-
exports[`ConfigCacheTestCases optimization minify-object-enumeration exported tests should enumerate a string's UTF-16 code units 1`] =`"function(){return[[\`0\`,\`1\`],[\`a\`,\`b\`],[[\`0\`,\`a\`]],[\`\\\\ud800\`],[],[],[]]}"`;
3
+
exports[`ConfigCacheTestCases optimization minify-object-enumeration exported tests should enumerate a string's UTF-16 code units 1`] =`"function enumerate(){return[Object.keys(\\"\\\\u{1f600}\\"),Object.values(\\"ab\\"),Object.entries(\\"a\\"),Object.values(\\"\\\\ud800\\"),Object.keys(\\"\\"),Object.values(\\"\\"),Object.entries(\\"\\")]}"`;
4
4
5
-
exports[`ConfigCacheTestCases optimization minify-object-enumeration exported tests should enumerate array literals without reading holes or length 1`] =`"function(){return[[\`0\`,\`2\`],[10,30],[[\`0\`,10],[\`2\`,30]],[],[],[]]}"`;
5
+
exports[`ConfigCacheTestCases optimization minify-object-enumeration exported tests should enumerate array literals without reading holes or length 1`] =`"function enumerate(){return[Object.keys([10,,30]),Object.values([10,,30]),Object.entries([10,,30]),Object.keys([]),Object.values([,,]),Object.entries([])]}"`;
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
3
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should keep repeated member reads before a later write 1`] =`"function read(object){varresult=object.value+object.value+(object.value=5)+object.value;returnobject.value=9,result}"`;
3
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should keep repeated member reads before a later write 1`] =`"function read(object){varresult=object.value+object.value+(object.value=5)+object.value;object.value=9;returnresult}"`;
4
4
5
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should keep repeated member reads before a later write 2`] =`"function e(e){vart=e.value+e.value+(e.value=5)+e.value;returne.value=9,t}"`;
5
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should keep repeated member reads before a later write 2`] =`"function e(e){vara=e.value+e.value+(e.value=5)+e.value;e.value=9;returna}"`;
6
6
7
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve assignments when joining bare declarations across blocks 1`] =`"function joined(flag,calls){flag&&(extra=calls.push(1)),calls.push(2);varextra,result=calls.push(3);return[calls.push(4),extra,result]}"`;
7
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve assignments when joining bare declarations across blocks 1`] =`"function joined(flag,calls){varvalue;if(flag){var extra;extra=calls.push(1)}value=calls.push(2);function inner(){varvalue;value=calls.push(3);returnvalue}varresult=inner();value=calls.push(4);return[value,extra,result]}"`;
8
8
9
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve assignments when joining bare declarations across blocks 2`] =`"function e(e,t){e&&(a=t.push(1)),t.push(2);vara,o=t.push(3);return[t.push(4),a,o]}"`;
9
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve assignments when joining bare declarations across blocks 2`] =`"function e(e,a){vart;if(e){var r;r=a.push(1)}t=a.push(2);varo=function(){var e;returne=a.push(3)}();return[t=a.push(4),r,o]}"`;
10
10
11
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve captured values beside nested functions with their own variables 1`] =`"function capture(make){varsource=make();return[function(){varcopy=source;returncopy.value+copy.value},function(){for(varsource=make(),index=0;index<source.value;index++)var copy=index;returncopy},()=>make().value]}"`;
11
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve captured values beside nested functions with their own variables 1`] =`"function capture(make){function nested(){var source=make();for(var index=0;index<source.value;index++)var copy=index;returncopy}constarrow=()=>{var source=make();returnsource.value};varsource=make();function read(){var copy=source;returncopy.value+copy.value}return[read,nested,arrow]}"`;
12
12
13
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve captured values beside nested functions with their own variables 2`] =`"function e(e){vart=e();return[function(){returnt.value+t.value},function(){for(vart=e(),a=0;a<t.value;a++)varo=a;returno},()=>e().value]}"`;
13
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve captured values beside nested functions with their own variables 2`] =`"function e(e){vara=e();return[function(){var e=a;returne.value+e.value},function(){vara=e();for(var t=0;t<a.value;t++)varr=t;returnr},()=>e().value]}"`;
14
14
15
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies of variables initialized inside a loop 1`] =`"function capture(values){letreaders=[];for(varindex=0;index<values.length;index++){var source=values[index];(function(){var copy=source;readers.push(()=>copy.value+copy.value)})()}returnreaders}"`;
15
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies of variables initialized inside a loop 1`] =`"function capture(values){constreaders=[];for(varindex=0;index<values.length;index++){var source=values[index];(function(){var copy=source;readers.push(()=>copy.value+copy.value)})()}returnreaders}"`;
16
16
17
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies of variables initialized inside a loop 2`] =`"function e(e){lett=[];for(vara=0;a<e.length;a++){var o=e[a];(function(){var e=o;t.push(()=>e.value+e.value)})()}returnt}"`;
17
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies of variables initialized inside a loop 2`] =`"function e(e){leta=[];for(vart=0;t<e.length;t++){var r=e[t];(function(){var e=r;a.push(()=>e.value+e.value)})()}returna}"`;
18
18
19
19
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies when a generator resumes inside a loop 1`] =`"function*capture(values){for(varsourceofvalues)yieldfunction(){var copy=source;return()=>copy.value+copy.value}()}"`;
20
20
21
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies when a generator resumes inside a loop 2`] =`"function*e(e){for(vartofe)yieldfunction(){var e=t;return()=>e.value+e.value}()}"`;
21
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve copies when a generator resumes inside a loop 2`] =`"function*e(e){for(varaofe)yieldfunction(){var e=a;return()=>e.value+e.value}()}"`;
22
22
23
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve getters and shadowed parameters during assignment folding 1`] =`"function read(object,other){varresult=object.value+function(object){var value=object.value+object.value;returnobject.value=7,value+object.value}(other)+object.value;returnresult}"`;
23
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve getters and shadowed parameters during assignment folding 1`] =`"function read(object,other){varresult=object.value+function(object){var value=object.value+object.value;object.value=7;returnvalue+object.value}(other)+object.value;returnresult}"`;
24
24
25
-
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve getters and shadowed parameters during assignment folding 2`] =`"function e(e,t){vara=e.value+function(e){vart=e.value+e.value;returne.value=7,t+e.value}(t)+e.value;returna}"`;
25
+
exports[`ConfigCacheTestCases optimization minify-traversal-work exported tests should preserve getters and shadowed parameters during assignment folding 2`] =`"function e(e,a){returne.value+function(e){vara=e.value+e.value;e.value=7;returna+e.value}(a)+e.value}"`;
0 commit comments