@rushstack/module-minifier 0.7.23 → 0.7.25
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.
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/module-minifier",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.7.25",
|
|
6
|
+
"tag": "@rushstack/module-minifier_v0.7.25",
|
|
7
|
+
"date": "Fri, 01 Aug 2025 00:12:49 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"dependency": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.25`"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.74.2`"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"version": "0.7.24",
|
|
21
|
+
"tag": "@rushstack/module-minifier_v0.7.24",
|
|
22
|
+
"date": "Wed, 23 Jul 2025 20:55:57 GMT",
|
|
23
|
+
"comments": {
|
|
24
|
+
"dependency": [
|
|
25
|
+
{
|
|
26
|
+
"comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.24`"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.74.1`"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
4
34
|
{
|
|
5
35
|
"version": "0.7.23",
|
|
6
36
|
"tag": "@rushstack/module-minifier_v0.7.23",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Change Log - @rushstack/module-minifier
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 01 Aug 2025 00:12:49 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.7.25
|
|
6
|
+
Fri, 01 Aug 2025 00:12:49 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 0.7.24
|
|
11
|
+
Wed, 23 Jul 2025 20:55:57 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
4
14
|
|
|
5
15
|
## 0.7.23
|
|
6
16
|
Sat, 21 Jun 2025 00:13:15 GMT
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinifiedIdentifier.d.ts","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":"AA0EA;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"MinifiedIdentifier.d.ts","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":"AA0EA;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAa7D;AAYD;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAmB3E;AAgBD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWrD"}
|
|
@@ -80,11 +80,13 @@ const RESERVED_KEYWORDS = [
|
|
|
80
80
|
*/
|
|
81
81
|
function getIdentifierInternal(ordinal) {
|
|
82
82
|
let ret = constants_1.IDENTIFIER_LEADING_DIGITS[ordinal % 54];
|
|
83
|
-
|
|
83
|
+
// eslint-disable-next-line no-bitwise
|
|
84
|
+
ordinal = (ordinal / 54) | 0;
|
|
84
85
|
while (ordinal > 0) {
|
|
85
86
|
--ordinal;
|
|
86
|
-
|
|
87
|
-
ordinal
|
|
87
|
+
// eslint-disable-next-line no-bitwise
|
|
88
|
+
ret += constants_1.IDENTIFIER_TRAILING_DIGITS[ordinal & 0x3f];
|
|
89
|
+
ordinal >>>= 6;
|
|
88
90
|
}
|
|
89
91
|
return ret;
|
|
90
92
|
}
|
|
@@ -107,7 +109,7 @@ function getOrdinalFromIdentifierInternal(identifier) {
|
|
|
107
109
|
if (ordinal >= 0x2000000) {
|
|
108
110
|
return NaN;
|
|
109
111
|
}
|
|
110
|
-
ordinal <<= 6;
|
|
112
|
+
ordinal <<= 6;
|
|
111
113
|
ordinal += trailingCharIndex.get(identifier.charCodeAt(i)) + 1;
|
|
112
114
|
}
|
|
113
115
|
if (ordinal >= 0x2000000) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinifiedIdentifier.js","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA6E3D,
|
|
1
|
+
{"version":3,"file":"MinifiedIdentifier.js","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA6E3D,sDAaC;AAiBD,4EAmBC;AAuBD,sCAWC;AA9JD,4EAA4E;AAC5E,2CAAoF;AAEpF,4IAA4I;AAC5I,MAAM,iBAAiB,GAAa;IAClC,UAAU;IACV,WAAW;IACX,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,OAAO;IACP,KAAK;IACL,UAAU;IACV,KAAK;IACL,MAAM;IACN,IAAI;IACJ,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,KAAK;IACL,WAAW;IACX,KAAK;IACL,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,SAAS;IACT,SA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IAAI,iBAAiB,CAAC,CAAC,CAAC,EAC1C,CAAC,EAAE,EACH,CAAC;QACD,EAAE,OAAO,CAAC;IACZ,CAAC;IAED,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// TODO: Allow dynamic override of these values in the input to the minifier\nimport { IDENTIFIER_LEADING_DIGITS, IDENTIFIER_TRAILING_DIGITS } from './constants';\n\n// Set of ECMAScript reserved keywords (past and present): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar\nconst RESERVED_KEYWORDS: string[] = [\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'get',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'set',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield'\n];\n\n/**\n * Gets a base54 string suitable for use as a JavaScript identifier, not accounting for reserved keywords\n * @param ordinal - The number to convert to a base54 identifier\n */\nexport function getIdentifierInternal(ordinal: number): string {\n let ret: string = IDENTIFIER_LEADING_DIGITS[ordinal % 54];\n\n // eslint-disable-next-line no-bitwise\n ordinal = (ordinal / 54) | 0;\n while (ordinal > 0) {\n --ordinal;\n // eslint-disable-next-line no-bitwise\n ret += IDENTIFIER_TRAILING_DIGITS[ordinal & 0x3f];\n ordinal >>>= 6;\n }\n\n return ret;\n}\n\nconst leadingCharIndex: Map<number, number> = new Map();\nfor (let i: number = 0; i < 64; i++) {\n leadingCharIndex.set(IDENTIFIER_LEADING_DIGITS.charCodeAt(i), i);\n}\n\nconst trailingCharIndex: Map<number, number> = new Map();\nfor (let i: number = 0; i < 64; i++) {\n trailingCharIndex.set(IDENTIFIER_TRAILING_DIGITS.charCodeAt(i), i);\n}\n\n/**\n * Converts an identifier into the ordinal that would produce it, not accounting for reserved keywords\n * Returns NaN if the result would exceed 31 bits\n * @param identifier - The identifier to convert to a numeric value\n */\nexport function getOrdinalFromIdentifierInternal(identifier: string): number {\n let ordinal: number = 0;\n\n for (let i: number = identifier.length - 1; i > 0; i--) {\n if (ordinal >= 0x2000000) {\n return NaN;\n }\n\n ordinal <<= 6;\n ordinal += trailingCharIndex.get(identifier.charCodeAt(i))! + 1;\n }\n\n if (ordinal >= 0x2000000) {\n return NaN;\n }\n\n ordinal *= 54;\n ordinal += leadingCharIndex.get(identifier.charCodeAt(0))!;\n return ordinal;\n}\n\n/**\n * getIdentifier(n) would otherwise return each of these specified ECMAScript reserved keywords, which are not legal identifiers.\n */\nconst RESERVED_ORDINALS: number[] = ((): number[] => {\n const reserved: number[] = [];\n for (const keyword of RESERVED_KEYWORDS) {\n const ordinal: number = getOrdinalFromIdentifierInternal(keyword);\n if (!isNaN(ordinal)) {\n reserved.push(ordinal);\n }\n }\n return reserved.sort((x: number, y: number) => x - y);\n})();\n\n/**\n * Gets a base54 string suitable for use as a JavaScript identifier, omitting those that are valid ECMAScript keywords\n *\n * @param ordinal - The number to convert to a base54 identifier\n *\n * @public\n */\nexport function getIdentifier(ordinal: number): string {\n // Need to skip over reserved keywords\n for (\n let i: number = 0, len: number = RESERVED_ORDINALS.length;\n i < len && ordinal >= RESERVED_ORDINALS[i];\n i++\n ) {\n ++ordinal;\n }\n\n return getIdentifierInternal(ordinal);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/module-minifier",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.25",
|
|
4
4
|
"description": "Wrapper for terser to support bulk parallel minification.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "dist/module-minifier.d.ts",
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
"serialize-javascript": "6.0.2",
|
|
15
15
|
"source-map": "~0.7.3",
|
|
16
16
|
"terser": "^5.9.0",
|
|
17
|
-
"@rushstack/worker-pool": "0.5.
|
|
17
|
+
"@rushstack/worker-pool": "0.5.25"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "20.17.19",
|
|
21
21
|
"@types/serialize-javascript": "5.0.2",
|
|
22
|
+
"eslint": "~9.25.1",
|
|
22
23
|
"local-node-rig": "1.0.0",
|
|
23
|
-
"@rushstack/heft": "0.74.
|
|
24
|
+
"@rushstack/heft": "0.74.2"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"@types/node": "*"
|