terser 1.2.7 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a07350d62a203340e8926357c2759dec74d1761d93ef1cb7af86c23c7e46a7e0
4
- data.tar.gz: 7af83b6a4d487b12faf15b0da32a21b050fa630b50387389c6419c861345fed3
3
+ metadata.gz: 441784c6e6861c6fbfa1787df19042ee9a791ab568a1ae26c8ae177029294a64
4
+ data.tar.gz: 4fe899755795a6c5e80a1744591bb378b6f0104c357b2d5ea0284a72af1f1262
5
5
  SHA512:
6
- metadata.gz: 766ebe8ed2964232e38ab7b964697f87d672bff4e788d71a7a4a136d948101338c9107f19a30826ef7f0d45ec0e2118137a449ad240be11dc0a579ce617c7306
7
- data.tar.gz: bbe05c07b2f328fee8c74f2663c64a471ab9a0b202024db09fc8cdbf8c7503b9418b809c4823e658452da64d2d25a506a70206b10d019d7ef5a6ab14fe206ecd
6
+ metadata.gz: b3dbf1f3e7d3eedfe55ff882b90ce4bd3341524fd2bbf5c050ba8e29e93db9804a4761569b0556850a77718649f7498551d99083fa45e31561a1a44bd3411ed3
7
+ data.tar.gz: 21c26d475ae002801b13535c8e5dffa22746daf5362ba9024e414dfc9b6491fea0eb3213eec2d5e104cc4b5c8f17edca4078e64694dfd2f4dc25247597b8cfb8
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Behavioural changes in TerserJS are listed [here](https://github.com/terser/terser/blob/master/CHANGELOG.md).
2
2
 
3
3
  ## Unreleased
4
+ ## 1.2.9 (25 November 2026)
5
+ - update TerserJS to [5.51.4]
6
+
7
+ ## 1.2.8 (08 July 2026)
8
+ - update TerserJS to [5.49.0]
9
+
4
10
  ## 1.2.7 (23 March 2026)
5
11
  - added a new module option to enable minification of ES6 modules (default is false)
6
12
  - update TerserJS to [5.46.1]
data/lib/split.js CHANGED
@@ -1,117 +1,117 @@
1
- /*!
2
- * Cross-Browser Split 1.1.1
3
- * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
4
- * Available under the MIT License
5
- * ECMAScript compliant, uniform cross-browser split method
6
- */
7
-
8
- /**
9
- * Splits a string into an array of strings using a regex or string separator. Matches of the
10
- * separator are not included in the result array. However, if `separator` is a regex that contains
11
- * capturing groups, backreferences are spliced into the result each time `separator` is matched.
12
- * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
13
- * cross-browser.
14
- * @param {String} str String to split.
15
- * @param {RegExp|String} separator Regex or string to use for separating the string.
16
- * @param {Number} [limit] Maximum number of items to include in the result array.
17
- * @returns {Array} Array of substrings.
18
- * @example
19
- *
20
- * // Basic use
21
- * split('a b c d', ' ');
22
- * // -> ['a', 'b', 'c', 'd']
23
- *
24
- * // With limit
25
- * split('a b c d', ' ', 2);
26
- * // -> ['a', 'b']
27
- *
28
- * // Backreferences in result array
29
- * split('..word1 word2..', /([a-z]+)(\d+)/i);
30
- * // -> ['..', 'word', '1', ' ', 'word', '2', '..']
31
- */
32
- var split;
33
-
34
- // Avoid running twice; that would break the `nativeSplit` reference
35
- split = split || function (undef) {
36
-
37
- var nativeSplit = String.prototype.split,
38
- compliantExecNpcg = /()??/.exec("")[1] === undef, // NPCG: nonparticipating capturing group
39
- self;
40
-
41
- self = function (str, separator, limit) {
42
- // If `separator` is not a regex, use `nativeSplit`
43
- if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
44
- return nativeSplit.call(str, separator, limit);
45
- }
46
- var output = [],
47
- flags = (separator.ignoreCase ? "i" : "") +
48
- (separator.multiline ? "m" : "") +
49
- (separator.extended ? "x" : "") + // Proposed for ES6
50
- (separator.sticky ? "y" : ""), // Firefox 3+
51
- lastLastIndex = 0,
52
- // Make `global` and avoid `lastIndex` issues by working with a copy
53
- separator = new RegExp(separator.source, flags + "g"),
54
- separator2, match, lastIndex, lastLength;
55
- str += ""; // Type-convert
56
- if (!compliantExecNpcg) {
57
- // Doesn't need flags gy, but they don't hurt
58
- separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags);
59
- }
60
- /* Values for `limit`, per the spec:
61
- * If undefined: 4294967295 // Math.pow(2, 32) - 1
62
- * If 0, Infinity, or NaN: 0
63
- * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
64
- * If negative number: 4294967296 - Math.floor(Math.abs(limit))
65
- * If other: Type-convert, then use the above rules
66
- */
67
- limit = limit === undef ?
68
- -1 >>> 0 : // Math.pow(2, 32) - 1
69
- limit >>> 0; // ToUint32(limit)
70
- while (match = separator.exec(str)) {
71
- // `separator.lastIndex` is not reliable cross-browser
72
- lastIndex = match.index + match[0].length;
73
- if (lastIndex > lastLastIndex) {
74
- output.push(str.slice(lastLastIndex, match.index));
75
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
76
- // nonparticipating capturing groups
77
- if (!compliantExecNpcg && match.length > 1) {
78
- match[0].replace(separator2, function () {
79
- for (var i = 1; i < arguments.length - 2; i++) {
80
- if (arguments[i] === undef) {
81
- match[i] = undef;
82
- }
83
- }
84
- });
85
- }
86
- if (match.length > 1 && match.index < str.length) {
87
- Array.prototype.push.apply(output, match.slice(1));
88
- }
89
- lastLength = match[0].length;
90
- lastLastIndex = lastIndex;
91
- if (output.length >= limit) {
92
- break;
93
- }
94
- }
95
- if (separator.lastIndex === match.index) {
96
- separator.lastIndex++; // Avoid an infinite loop
97
- }
98
- }
99
- if (lastLastIndex === str.length) {
100
- if (lastLength || !separator.test("")) {
101
- output.push("");
102
- }
103
- } else {
104
- output.push(str.slice(lastLastIndex));
105
- }
106
- return output.length > limit ? output.slice(0, limit) : output;
107
- };
108
-
109
- if ("\n".split(/\n/).length == 0) {
110
- String.prototype.split = function (separator, limit) {
111
- return self(this, separator, limit);
112
- };
113
- }
114
-
115
- return self;
116
-
117
- }();
1
+ /*!
2
+ * Cross-Browser Split 1.1.1
3
+ * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
4
+ * Available under the MIT License
5
+ * ECMAScript compliant, uniform cross-browser split method
6
+ */
7
+
8
+ /**
9
+ * Splits a string into an array of strings using a regex or string separator. Matches of the
10
+ * separator are not included in the result array. However, if `separator` is a regex that contains
11
+ * capturing groups, backreferences are spliced into the result each time `separator` is matched.
12
+ * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
13
+ * cross-browser.
14
+ * @param {String} str String to split.
15
+ * @param {RegExp|String} separator Regex or string to use for separating the string.
16
+ * @param {Number} [limit] Maximum number of items to include in the result array.
17
+ * @returns {Array} Array of substrings.
18
+ * @example
19
+ *
20
+ * // Basic use
21
+ * split('a b c d', ' ');
22
+ * // -> ['a', 'b', 'c', 'd']
23
+ *
24
+ * // With limit
25
+ * split('a b c d', ' ', 2);
26
+ * // -> ['a', 'b']
27
+ *
28
+ * // Backreferences in result array
29
+ * split('..word1 word2..', /([a-z]+)(\d+)/i);
30
+ * // -> ['..', 'word', '1', ' ', 'word', '2', '..']
31
+ */
32
+ var split;
33
+
34
+ // Avoid running twice; that would break the `nativeSplit` reference
35
+ split = split || function (undef) {
36
+
37
+ var nativeSplit = String.prototype.split,
38
+ compliantExecNpcg = /()??/.exec("")[1] === undef, // NPCG: nonparticipating capturing group
39
+ self;
40
+
41
+ self = function (str, separator, limit) {
42
+ // If `separator` is not a regex, use `nativeSplit`
43
+ if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
44
+ return nativeSplit.call(str, separator, limit);
45
+ }
46
+ var output = [],
47
+ flags = (separator.ignoreCase ? "i" : "") +
48
+ (separator.multiline ? "m" : "") +
49
+ (separator.extended ? "x" : "") + // Proposed for ES6
50
+ (separator.sticky ? "y" : ""), // Firefox 3+
51
+ lastLastIndex = 0,
52
+ // Make `global` and avoid `lastIndex` issues by working with a copy
53
+ separator = new RegExp(separator.source, flags + "g"),
54
+ separator2, match, lastIndex, lastLength;
55
+ str += ""; // Type-convert
56
+ if (!compliantExecNpcg) {
57
+ // Doesn't need flags gy, but they don't hurt
58
+ separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags);
59
+ }
60
+ /* Values for `limit`, per the spec:
61
+ * If undefined: 4294967295 // Math.pow(2, 32) - 1
62
+ * If 0, Infinity, or NaN: 0
63
+ * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
64
+ * If negative number: 4294967296 - Math.floor(Math.abs(limit))
65
+ * If other: Type-convert, then use the above rules
66
+ */
67
+ limit = limit === undef ?
68
+ -1 >>> 0 : // Math.pow(2, 32) - 1
69
+ limit >>> 0; // ToUint32(limit)
70
+ while (match = separator.exec(str)) {
71
+ // `separator.lastIndex` is not reliable cross-browser
72
+ lastIndex = match.index + match[0].length;
73
+ if (lastIndex > lastLastIndex) {
74
+ output.push(str.slice(lastLastIndex, match.index));
75
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
76
+ // nonparticipating capturing groups
77
+ if (!compliantExecNpcg && match.length > 1) {
78
+ match[0].replace(separator2, function () {
79
+ for (var i = 1; i < arguments.length - 2; i++) {
80
+ if (arguments[i] === undef) {
81
+ match[i] = undef;
82
+ }
83
+ }
84
+ });
85
+ }
86
+ if (match.length > 1 && match.index < str.length) {
87
+ Array.prototype.push.apply(output, match.slice(1));
88
+ }
89
+ lastLength = match[0].length;
90
+ lastLastIndex = lastIndex;
91
+ if (output.length >= limit) {
92
+ break;
93
+ }
94
+ }
95
+ if (separator.lastIndex === match.index) {
96
+ separator.lastIndex++; // Avoid an infinite loop
97
+ }
98
+ }
99
+ if (lastLastIndex === str.length) {
100
+ if (lastLength || !separator.test("")) {
101
+ output.push("");
102
+ }
103
+ } else {
104
+ output.push(str.slice(lastLastIndex));
105
+ }
106
+ return output.length > limit ? output.slice(0, limit) : output;
107
+ };
108
+
109
+ if ("\n".split(/\n/).length == 0) {
110
+ String.prototype.split = function (separator, limit) {
111
+ return self(this, separator, limit);
112
+ };
113
+ }
114
+
115
+ return self;
116
+
117
+ }();
@@ -2,5 +2,5 @@
2
2
 
3
3
  class Terser
4
4
  # Current version of Terser.
5
- VERSION = "1.2.7"
5
+ VERSION = "1.2.9"
6
6
  end