javascript-obfuscator 3.2.5 → 3.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-obfuscator",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "JavaScript obfuscator",
5
5
  "keywords": [
6
6
  "obfuscator",
@@ -6,11 +6,11 @@ import { AbstractIdentifierNamesGenerator } from './AbstractIdentifierNamesGener
6
6
  export declare class MangledIdentifierNamesGenerator extends AbstractIdentifierNamesGenerator {
7
7
  private static readonly maxRegenerationAttempts;
8
8
  private static readonly initMangledNameCharacter;
9
- private static readonly lastMangledNameInScopeMap;
10
9
  private static readonly nameSequence;
11
10
  private static readonly reservedNamesSet;
11
+ private lastMangledName;
12
+ private readonly lastMangledNameForScopeMap;
12
13
  private readonly lastMangledNameForLabelMap;
13
- private previousMangledName;
14
14
  private readonly setUtils;
15
15
  constructor(randomGenerator: IRandomGenerator, options: IOptions, setUtils: ISetUtils);
16
16
  generateNext(nameLength?: number): string;
@@ -4,5 +4,6 @@ export declare class NodeMetadata {
4
4
  static get<T extends ESTree.BaseNodeMetadata, TMetadataKey extends keyof T>(node: ESTree.Node, metadataKey: TMetadataKey): T[TMetadataKey] | undefined;
5
5
  static isForceTransformNode(node: ESTree.Node): boolean;
6
6
  static isIgnoredNode(node: ESTree.Node): boolean;
7
+ static isPropertyKeyToRenameNode(node: ESTree.Identifier | ESTree.Literal): boolean;
7
8
  static isStringArrayCallLiteralNode(literalNode: ESTree.Literal): boolean;
8
9
  }
@@ -12,9 +12,9 @@ export declare abstract class AbstractControlFlowReplacer implements IControlFlo
12
12
  protected readonly identifierNamesGenerator: IIdentifierNamesGenerator;
13
13
  protected readonly options: IOptions;
14
14
  protected readonly randomGenerator: IRandomGenerator;
15
- protected readonly replacerDataByControlFlowStorageId: Map<string, Map<string, string[]>>;
15
+ protected readonly replacerDataByControlFlowStorageId: Map<string, Map<string | number, string[]>>;
16
16
  constructor(controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory, identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory, randomGenerator: IRandomGenerator, options: IOptions);
17
17
  generateStorageKey(controlFlowStorage: IControlFlowStorage): string;
18
- protected insertCustomNodeToControlFlowStorage(customNode: ICustomNode, controlFlowStorage: IControlFlowStorage, replacerId: string, usingExistingIdentifierChance: number): string;
18
+ protected insertCustomNodeToControlFlowStorage(customNode: ICustomNode, controlFlowStorage: IControlFlowStorage, replacerId: string | number, usingExistingIdentifierChance: number): string;
19
19
  abstract replace(node: ESTree.Node, parentNode: ESTree.Node, controlFlowStorage: IControlFlowStorage): ESTree.Node;
20
20
  }
@@ -12,9 +12,5 @@ export declare class RenamePropertiesTransformer extends AbstractNodeTransformer
12
12
  getVisitor(nodeTransformationStage: NodeTransformationStage): IVisitor | null;
13
13
  prepareNode(node: ESTree.Node, parentNode: ESTree.Node): void;
14
14
  transformNode(node: ESTree.Node, parentNode: ESTree.Node): ESTree.Node;
15
- private transformPropertyNode;
16
- private transformPropertyDefinitionNode;
17
- private transformMemberExpressionNode;
18
- private transformMethodDefinitionNode;
19
15
  private analyzeAutoExcludedPropertyNames;
20
16
  }