@rushstack/module-minifier 0.7.8 → 0.7.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.
package/CHANGELOG.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "@rushstack/module-minifier",
3
3
  "entries": [
4
+ {
5
+ "version": "0.7.9",
6
+ "tag": "@rushstack/module-minifier_v0.7.9",
7
+ "date": "Tue, 11 Mar 2025 00:11:25 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.9`"
12
+ },
13
+ {
14
+ "comment": "Updating dependency \"@rushstack/heft\" to `0.69.3`"
15
+ }
16
+ ]
17
+ }
18
+ },
4
19
  {
5
20
  "version": "0.7.8",
6
21
  "tag": "@rushstack/module-minifier_v0.7.8",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @rushstack/module-minifier
2
2
 
3
- This log was last generated on Sat, 01 Mar 2025 05:00:09 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 11 Mar 2025 00:11:25 GMT and should not be manually modified.
4
+
5
+ ## 0.7.9
6
+ Tue, 11 Mar 2025 00:11:25 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 0.7.8
6
11
  Sat, 01 Mar 2025 05:00:09 GMT
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.51.0"
8
+ "packageVersion": "7.51.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type * as WorkerThreads from 'worker_threads';
3
2
  import type { IMinifierConnection, IModuleMinificationCallback, IModuleMinificationRequest, IModuleMinifier } from './types';
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MessagePortMinifier.d.ts","sourceRoot":"","sources":["../src/MessagePortMinifier.ts"],"names":[],"mappings":";A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All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getIdentifier = exports.getOrdinalFromIdentifierInternal = exports.getIdentifierInternal = void 0;
5
+ exports.getIdentifierInternal = getIdentifierInternal;
6
+ exports.getOrdinalFromIdentifierInternal = getOrdinalFromIdentifierInternal;
7
+ exports.getIdentifier = getIdentifier;
6
8
  // TODO: Allow dynamic override of these values in the input to the minifier
7
9
  const constants_1 = require("./constants");
8
10
  // Set of ECMAScript reserved keywords (past and present): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
@@ -86,7 +88,6 @@ function getIdentifierInternal(ordinal) {
86
88
  }
87
89
  return ret;
88
90
  }
89
- exports.getIdentifierInternal = getIdentifierInternal;
90
91
  const leadingCharIndex = new Map();
91
92
  for (let i = 0; i < 64; i++) {
92
93
  leadingCharIndex.set(constants_1.IDENTIFIER_LEADING_DIGITS.charCodeAt(i), i);
@@ -116,7 +117,6 @@ function getOrdinalFromIdentifierInternal(identifier) {
116
117
  ordinal += leadingCharIndex.get(identifier.charCodeAt(0));
117
118
  return ordinal;
118
119
  }
119
- exports.getOrdinalFromIdentifierInternal = getOrdinalFromIdentifierInternal;
120
120
  /**
121
121
  * getIdentifier(n) would otherwise return each of these specified ECMAScript reserved keywords, which are not legal identifiers.
122
122
  */
@@ -144,5 +144,4 @@ function getIdentifier(ordinal) {
144
144
  }
145
145
  return getIdentifierInternal(ordinal);
146
146
  }
147
- exports.getIdentifier = getIdentifier;
148
147
  //# sourceMappingURL=MinifiedIdentifier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MinifiedIdentifier.js","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4EAA4E;AAC5E,2CAAoF;AAEpF,4IAA4I;AAC5I,MAAM,iBAAiB,GAAa;IAClC,UAAU;IACV,WAAW;IACX,SAAS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C,MAAM,OAAO,GAAW,gCAAgC,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC,EAAE,CAAC;AAEL;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,sCAAsC;IACtC,KACE,IAAI,CAAC,GAAW,CAAC,EAAE,GAAG,GAAW,iBAAiB,CAAC,MAAM,EACzD,CAAC,GAAG,GAAG,IAAI,OAAO,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;AAXD,sCAWC","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 ordinal = (ordinal / 54) | 0; // eslint-disable-line no-bitwise\n while (ordinal > 0) {\n --ordinal;\n ret += IDENTIFIER_TRAILING_DIGITS[ordinal & 0x3f]; // eslint-disable-line no-bitwise\n ordinal >>>= 6; // eslint-disable-line no-bitwise\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; // eslint-disable-line no-bitwise\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"]}
1
+ {"version":3,"file":"MinifiedIdentifier.js","sourceRoot":"","sources":["../src/MinifiedIdentifier.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AA6E3D,sDAWC;AAiBD,4EAmBC;AAuBD,sCAWC;AA5JD,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,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;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AAiB,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 ordinal = (ordinal / 54) | 0; // eslint-disable-line no-bitwise\n while (ordinal > 0) {\n --ordinal;\n ret += IDENTIFIER_TRAILING_DIGITS[ordinal & 0x3f]; // eslint-disable-line no-bitwise\n ordinal >>>= 6; // eslint-disable-line no-bitwise\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; // eslint-disable-line no-bitwise\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"]}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
3
  // See LICENSE in the project root for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.minifySingleFileAsync = void 0;
5
+ exports.minifySingleFileAsync = minifySingleFileAsync;
6
6
  const terser_1 = require("terser");
7
7
  const MinifiedIdentifier_1 = require("./MinifiedIdentifier");
8
8
  const nth_identifier = {
@@ -61,5 +61,4 @@ async function minifySingleFileAsync(request, terserOptions) {
61
61
  };
62
62
  }
63
63
  }
64
- exports.minifySingleFileAsync = minifySingleFileAsync;
65
64
  //# sourceMappingURL=MinifySingleFile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MinifySingleFile.js","sourceRoot":"","sources":["../src/MinifySingleFile.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,mCAAqG;AAGrG,6DAAqD;AAGrD,MAAM,cAAc,GAA4B;IAC9C,GAAG,EAAE,kCAAa;CACnB,CAAC;AAEF;;;GAGG;AACI,KAAK,UAAU,qBAAqB,CACzC,OAAmC,EACnC,aAA4B;IAE5B,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAEtD,IAAI,CAAC;QACH,MAAM,EACJ,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,cAAc,EACtB,GAAG,gBAAgB,EACpB,GAAG,aAAa,CAAC;QAElB,MAAM,MAAM,GAA4B,SAAS,IAAI,SAAS,IAAI,EAAE,CAAC;QAErE,MAAM,MAAM,GACV,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErG,MAAM,YAAY,GAAkB;YAClC,GAAG,gBAAgB;YACnB,MAAM;YACN,MAAM;SACP,CAAC;QACF,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC;QAExB,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;QACzC,CAAC;QAED,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;YACxB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpF,CAAC;QAED,2FAA2F;QAC3F,IAAI,UAAU,EAAE,CAAC;YACf,YAAY,CAAC,SAAS,GAAG;gBACvB,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,IAAI;aACf,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,SAAS,GAAG,KAAK,CAAC;QACjC,CAAC;QAED,MAAM,QAAQ,GAAiB,MAAM,IAAA,eAAM,EACzC;YACE,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,IAAI;SAC7B,EACD,YAAY,CACb,CAAC;QAEF,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ,CAAC,IAAK;YACpB,GAAG,EAAE,QAAQ,CAAC,GAA8B;YAC5C,IAAI;SACL,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO;YACL,KAAK,EAAE,KAAc;YACrB,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,SAAS;YACd,IAAI;SACL,CAAC;IACJ,CAAC;AACH,CAAC;AAnED,sDAmEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { minify, type MinifyOptions, type MinifyOutput, type SimpleIdentifierMangler } from 'terser';\nimport type { RawSourceMap } from 'source-map';\n\nimport { getIdentifier } from './MinifiedIdentifier';\nimport type { IModuleMinificationRequest, IModuleMinificationResult } from './types';\n\nconst nth_identifier: SimpleIdentifierMangler = {\n get: getIdentifier\n};\n\n/**\n * Minifies a single chunk of code. Factored out for reuse between WorkerPoolMinifier and LocalMinifier\n * @internal\n */\nexport async function minifySingleFileAsync(\n request: IModuleMinificationRequest,\n terserOptions: MinifyOptions\n): Promise<IModuleMinificationResult> {\n const { code, nameForMap, hash, externals } = request;\n\n try {\n const {\n format: rawFormat,\n output: rawOutput,\n mangle: originalMangle,\n ...remainingOptions\n } = terserOptions;\n\n const format: MinifyOptions['format'] = rawFormat || rawOutput || {};\n\n const mangle: MinifyOptions['mangle'] =\n originalMangle === false ? false : typeof originalMangle === 'object' ? { ...originalMangle } : {};\n\n const finalOptions: MinifyOptions = {\n ...remainingOptions,\n format,\n mangle\n };\n format.comments = false;\n\n if (mangle) {\n mangle.nth_identifier = nth_identifier;\n }\n\n if (mangle && externals) {\n mangle.reserved = mangle.reserved ? externals.concat(mangle.reserved) : externals;\n }\n\n // SourceMap is only generated if nameForMap is provided- overrides terserOptions.sourceMap\n if (nameForMap) {\n finalOptions.sourceMap = {\n includeSources: true,\n asObject: true\n };\n } else {\n finalOptions.sourceMap = false;\n }\n\n const minified: MinifyOutput = await minify(\n {\n [nameForMap || 'code']: code\n },\n finalOptions\n );\n\n return {\n error: undefined,\n code: minified.code!,\n map: minified.map as unknown as RawSourceMap,\n hash\n };\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n return {\n error: error as Error,\n code: undefined,\n map: undefined,\n hash\n };\n }\n}\n"]}
1
+ {"version":3,"file":"MinifySingleFile.js","sourceRoot":"","sources":["../src/MinifySingleFile.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAgB3D,sDAmEC;AAjFD,mCAAqG;AAGrG,6DAAqD;AAGrD,MAAM,cAAc,GAA4B;IAC9C,GAAG,EAAE,kCAAa;CACnB,CAAC;AAEF;;;GAGG;AACI,KAAK,UAAU,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ACD,YAAY,CACb,CAAC;QAEF,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ,CAAC,IAAK;YACpB,GAAG,EAAE,QAAQ,CAAC,GAA8B;YAC5C,IAAI;SACL,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO;YACL,KAAK,EAAE,KAAc;YACrB,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,SAAS;YACd,IAAI;SACL,CAAC;IACJ,CAAC;AACH,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\nimport { minify, type MinifyOptions, type MinifyOutput, type SimpleIdentifierMangler } from 'terser';\nimport type { RawSourceMap } from 'source-map';\n\nimport { getIdentifier } from './MinifiedIdentifier';\nimport type { IModuleMinificationRequest, IModuleMinificationResult } from './types';\n\nconst nth_identifier: SimpleIdentifierMangler = {\n get: getIdentifier\n};\n\n/**\n * Minifies a single chunk of code. Factored out for reuse between WorkerPoolMinifier and LocalMinifier\n * @internal\n */\nexport async function minifySingleFileAsync(\n request: IModuleMinificationRequest,\n terserOptions: MinifyOptions\n): Promise<IModuleMinificationResult> {\n const { code, nameForMap, hash, externals } = request;\n\n try {\n const {\n format: rawFormat,\n output: rawOutput,\n mangle: originalMangle,\n ...remainingOptions\n } = terserOptions;\n\n const format: MinifyOptions['format'] = rawFormat || rawOutput || {};\n\n const mangle: MinifyOptions['mangle'] =\n originalMangle === false ? false : typeof originalMangle === 'object' ? { ...originalMangle } : {};\n\n const finalOptions: MinifyOptions = {\n ...remainingOptions,\n format,\n mangle\n };\n format.comments = false;\n\n if (mangle) {\n mangle.nth_identifier = nth_identifier;\n }\n\n if (mangle && externals) {\n mangle.reserved = mangle.reserved ? externals.concat(mangle.reserved) : externals;\n }\n\n // SourceMap is only generated if nameForMap is provided- overrides terserOptions.sourceMap\n if (nameForMap) {\n finalOptions.sourceMap = {\n includeSources: true,\n asObject: true\n };\n } else {\n finalOptions.sourceMap = false;\n }\n\n const minified: MinifyOutput = await minify(\n {\n [nameForMap || 'code']: code\n },\n finalOptions\n );\n\n return {\n error: undefined,\n code: minified.code!,\n map: minified.map as unknown as RawSourceMap,\n hash\n };\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n return {\n error: error as Error,\n code: undefined,\n map: undefined,\n hash\n };\n }\n}\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ResourceLimits } from 'worker_threads';
3
2
  import type { MinifyOptions } from 'terser';
4
3
  import type { IMinifierConnection, IModuleMinificationCallback, IModuleMinificationRequest, IModuleMinifier } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"WorkerPoolMinifier.d.ts","sourceRoot":"","sources":["../src/WorkerPoolMinifier.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAE3B,0BAA0B,EAC1B,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,oBAAoB,CAAC,EAAE,cAAc,CAAC;CACvC;AAED;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,OAAO,CAAC,S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AAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyC;IACtE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6C;gBAE1D,OAAO,EAAE,0BAA0B;IAoCtD,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED,IAAW,UAAU,CAAC,OAAO,EAAE,MAAM,EAEpC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,2BAA2B,GAAG,IAAI;IAuD/F;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA+BzD;;OAEG;IAEU,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAGrD"}
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" preserve="true" />
1
2
  /**
2
3
  * This library wraps terser in convenient handles for parallelization.
3
4
  * It powers `@rushstack/webpack4-module-minifier-plugin` and `@rushstack/webpack5-module-minifier-plugin`
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,qBAAqB,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,eAAe,EACf,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA;;;;;;GAMG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,qBAAqB,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,eAAe,EACf,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAa3D,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,2DAAqD;AAA5C,mHAAA,aAAa,OAAA;AAEtB,uDAAqF;AAA5E,0HAAA,qBAAqB,OAA0B;AAExD,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAcrB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","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/**\n * This library wraps terser in convenient handles for parallelization.\n * It powers `@rushstack/webpack4-module-minifier-plugin` and `@rushstack/webpack5-module-minifier-plugin`\n * but has no coupling with webpack.\n *\n * @packageDocumentation\n */\n\nexport type { MinifyOptions } from 'terser';\n\nexport type { ILocalMinifierOptions } from './LocalMinifier';\nexport { LocalMinifier } from './LocalMinifier';\n\nexport { MessagePortMinifier } from './MessagePortMinifier';\n\nexport { getIdentifier } from './MinifiedIdentifier';\n\nexport { minifySingleFileAsync as _minifySingleFileAsync } from './MinifySingleFile';\n\nexport { NoopMinifier } from './NoopMinifier';\n\nexport type {\n IMinifierConnection,\n IModuleMinificationCallback,\n IModuleMinificationErrorResult,\n IModuleMinificationRequest,\n IModuleMinificationResult,\n IModuleMinificationSuccessResult,\n IModuleMinifier,\n IModuleMinifierFunction\n} from './types';\n\nexport type { IWorkerPoolMinifierOptions } from './WorkerPoolMinifier';\nexport { WorkerPoolMinifier } from './WorkerPoolMinifier';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAe3D,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,2DAAqD;AAA5C,mHAAA,aAAa,OAAA;AAEtB,uDAAqF;AAA5E,0HAAA,qBAAqB,OAA0B;AAExD,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAcrB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","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/// <reference types=\"node\" preserve=\"true\" />\n\n/**\n * This library wraps terser in convenient handles for parallelization.\n * It powers `@rushstack/webpack4-module-minifier-plugin` and `@rushstack/webpack5-module-minifier-plugin`\n * but has no coupling with webpack.\n *\n * @packageDocumentation\n */\n\nexport type { MinifyOptions } from 'terser';\n\nexport type { ILocalMinifierOptions } from './LocalMinifier';\nexport { LocalMinifier } from './LocalMinifier';\n\nexport { MessagePortMinifier } from './MessagePortMinifier';\n\nexport { getIdentifier } from './MinifiedIdentifier';\n\nexport { minifySingleFileAsync as _minifySingleFileAsync } from './MinifySingleFile';\n\nexport { NoopMinifier } from './NoopMinifier';\n\nexport type {\n IMinifierConnection,\n IModuleMinificationCallback,\n IModuleMinificationErrorResult,\n IModuleMinificationRequest,\n IModuleMinificationResult,\n IModuleMinificationSuccessResult,\n IModuleMinifier,\n IModuleMinifierFunction\n} from './types';\n\nexport type { IWorkerPoolMinifierOptions } from './WorkerPoolMinifier';\nexport { WorkerPoolMinifier } from './WorkerPoolMinifier';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/module-minifier",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
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,11 +14,12 @@
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.8"
17
+ "@rushstack/worker-pool": "0.5.9"
18
18
  },
19
19
  "devDependencies": {
20
+ "@types/node": "20.17.19",
20
21
  "@types/serialize-javascript": "5.0.2",
21
- "@rushstack/heft": "0.69.2",
22
+ "@rushstack/heft": "0.69.3",
22
23
  "local-node-rig": "1.0.0"
23
24
  },
24
25
  "peerDependencies": {