javascript-obfuscator 5.4.4 → 5.4.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": "5.4.4",
3
+ "version": "5.4.6",
4
4
  "description": "JavaScript obfuscator",
5
5
  "keywords": [
6
6
  "obfuscator",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "types": "typings/index.d.ts",
23
23
  "dependencies": {
24
- "@javascript-obfuscator/escodegen": "2.4.1",
24
+ "@javascript-obfuscator/escodegen": "2.4.2",
25
25
  "@javascript-obfuscator/estraverse": "5.4.0",
26
26
  "@vercel/blob": ">=0.23.0",
27
27
  "acorn": "8.15.0",
@@ -2,6 +2,6 @@ import * as ESTree from 'estree';
2
2
  import { IMapStorage } from '../IMapStorage';
3
3
  import { IStringArrayStorageItemData } from './IStringArrayStorageItem';
4
4
  export interface ILiteralNodesCacheStorage extends IMapStorage<string, ESTree.Node> {
5
- buildKey(literalValue: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
5
+ buildKey(literalNode: ESTree.Literal, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
6
6
  shouldUseCachedValue(key: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): boolean;
7
7
  }
@@ -1,3 +1,4 @@
1
1
  export interface IEscapeSequenceEncoder {
2
2
  encode(string: string, encodeAllSymbols: boolean): string;
3
+ encodeLiteral(value: string, rawValue: string | undefined, encodeAllSymbols: boolean): string;
3
4
  }
@@ -6,6 +6,6 @@ import { IStringArrayStorageItemData } from '../../interfaces/storages/string-ar
6
6
  import { MapStorage } from '../MapStorage';
7
7
  export declare class LiteralNodesCacheStorage extends MapStorage<string, ESTree.Node> implements ILiteralNodesCacheStorage {
8
8
  constructor(randomGenerator: IRandomGenerator, options: IOptions);
9
- buildKey(literalValue: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
9
+ buildKey(literalNode: ESTree.Literal, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
10
10
  shouldUseCachedValue(key: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): boolean;
11
11
  }
@@ -3,6 +3,16 @@ export declare class EscapeSequenceEncoder implements IEscapeSequenceEncoder {
3
3
  private static readonly ASCIICharactersRegExp;
4
4
  private static readonly forceEscapeCharactersRegExp;
5
5
  private static readonly replaceRegExp;
6
+ private static readonly hexDigitRegExp;
7
+ private static readonly octalDigitRegExp;
6
8
  private readonly stringsCache;
7
9
  encode(string: string, encodeAllSymbols: boolean): string;
10
+ encodeLiteral(value: string, rawValue: string | undefined, encodeAllSymbols: boolean): string;
11
+ private encodeCharacter;
12
+ private encodePreservingUnicodeEscapes;
13
+ private readUnicodeEscapeSequence;
14
+ private readFixedLengthHexEscapeSequence;
15
+ private readCodePointEscapeSequence;
16
+ private readSimpleEscapeSequence;
17
+ private isHexString;
8
18
  }