javascript-obfuscator 3.2.0 → 3.2.4

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.0",
3
+ "version": "3.2.4",
4
4
  "description": "JavaScript obfuscator",
5
5
  "keywords": [
6
6
  "obfuscator",
@@ -23,7 +23,6 @@
23
23
  "dependencies": {
24
24
  "@javascript-obfuscator/escodegen": "2.3.0",
25
25
  "@javascript-obfuscator/estraverse": "5.4.0",
26
- "@nuxtjs/opencollective": "0.3.2",
27
26
  "acorn": "8.7.0",
28
27
  "assert": "2.0.0",
29
28
  "chalk": "4.1.2",
@@ -38,6 +37,7 @@
38
37
  "md5": "2.3.0",
39
38
  "mkdirp": "1.0.4",
40
39
  "multimatch": "5.0.0",
40
+ "opencollective-postinstall": "2.0.3",
41
41
  "process": "0.11.10",
42
42
  "reflect-metadata": "0.1.13",
43
43
  "source-map-support": "0.5.21",
@@ -53,45 +53,46 @@
53
53
  "@types/eslint-scope": "3.7.3",
54
54
  "@types/eslint-visitor-keys": "1.0.0",
55
55
  "@types/estraverse": "5.1.1",
56
- "@types/estree": "0.0.50",
56
+ "@types/estree": "0.0.51",
57
57
  "@types/js-beautify": "1.13.3",
58
58
  "@types/js-string-escape": "1.0.1",
59
59
  "@types/md5": "2.3.1",
60
60
  "@types/mkdirp": "1.0.2",
61
61
  "@types/mocha": "9.1.0",
62
62
  "@types/multimatch": "4.0.0",
63
- "@types/node": "17.0.13",
63
+ "@types/node": "17.0.15",
64
64
  "@types/rimraf": "3.0.2",
65
- "@types/sinon": "10.0.9",
65
+ "@types/sinon": "10.0.10",
66
66
  "@types/string-template": "1.0.2",
67
67
  "@types/webpack-env": "1.16.3",
68
- "@typescript-eslint/eslint-plugin": "5.10.1",
69
- "@typescript-eslint/parser": "5.10.1",
68
+ "@typescript-eslint/eslint-plugin": "5.10.2",
69
+ "@typescript-eslint/parser": "5.10.2",
70
70
  "chai": "4.3.6",
71
71
  "chai-exclude": "2.1.0",
72
72
  "cross-env": "7.0.3",
73
73
  "eslint": "8.8.0",
74
74
  "eslint-plugin-import": "2.25.4",
75
- "eslint-plugin-jsdoc": "37.7.0",
75
+ "eslint-plugin-jsdoc": "37.7.1",
76
76
  "eslint-plugin-no-null": "1.0.2",
77
77
  "eslint-plugin-prefer-arrow": "1.2.3",
78
78
  "eslint-plugin-unicorn": "40.1.0",
79
+ "eslint-webpack-plugin": "3.1.1",
79
80
  "fork-ts-checker-notifier-webpack-plugin": "4.0.0",
80
- "fork-ts-checker-webpack-plugin": "6.4.0",
81
+ "fork-ts-checker-webpack-plugin": "7.0.0",
81
82
  "husky": "7.0.4",
82
83
  "js-beautify": "1.14.0",
83
84
  "mocha": "9.2.0",
84
85
  "nyc": "15.1.0",
85
86
  "pjson": "1.0.9",
86
87
  "rimraf": "3.0.2",
87
- "sinon": "13.0.0",
88
+ "sinon": "13.0.1",
88
89
  "source-map-resolve": "0.6.0",
89
90
  "terser": "5.10.0",
90
91
  "threads": "1.7.0",
91
92
  "ts-loader": "9.2.6",
92
93
  "ts-node": "10.4.0",
93
94
  "typescript": "4.5.5",
94
- "webpack": "5.67.0",
95
+ "webpack": "5.68.0",
95
96
  "webpack-cli": "4.9.2",
96
97
  "webpack-node-externals": "3.0.0"
97
98
  },
@@ -117,7 +118,7 @@
117
118
  "test": "yarn run test:full",
118
119
  "eslint": "eslint src/**/*.ts",
119
120
  "git:addFiles": "git add .",
120
- "postinstall": "opencollective",
121
+ "postinstall": "opencollective-postinstall",
121
122
  "precommit": "npm run build",
122
123
  "prepublishOnly": "npm run build && npm run build:typings",
123
124
  "prepare": "husky install"
@@ -0,0 +1 @@
1
+ export declare const reservedIdentifierNames: string[];
@@ -13,7 +13,7 @@ export declare abstract class AbstractIdentifierNamesGenerator implements IIdent
13
13
  preserveNameForLexicalScope(name: string, lexicalScopeNode: TNodeWithLexicalScope): void;
14
14
  isValidIdentifierName(name: string): boolean;
15
15
  isValidIdentifierNameInLexicalScopes(name: string, lexicalScopeNodes: TNodeWithLexicalScope[]): boolean;
16
- private notReservedName;
16
+ private isReservedName;
17
17
  abstract generateForGlobalScope(nameLength?: number): string;
18
18
  abstract generateForLexicalScope(lexicalScopeNode: TNodeWithLexicalScope, nameLength?: number): string;
19
19
  abstract generateForLabel(label: string, nameLength?: number): string;
@@ -3,4 +3,5 @@ export interface IIteratedStatementsSimplifyData {
3
3
  startIndex: number | null;
4
4
  unwrappedExpressions: ESTree.Expression[];
5
5
  hasReturnStatement: boolean;
6
+ hasStatementsAfterReturnStatement: boolean;
6
7
  }
@@ -65,7 +65,7 @@ export declare class NodeGuards {
65
65
  static isReturnStatementNode(node: ESTree.Node): node is ESTree.ReturnStatement;
66
66
  static isSequenceExpressionNode(node: ESTree.Node): node is ESTree.SequenceExpression;
67
67
  static isSpreadElementNode(node: ESTree.Node): node is ESTree.SpreadElement;
68
- static isStaticBlockNode(node: ESTree.Node): boolean;
68
+ static isStaticBlockNode(node: ESTree.Node): node is ESTree.StaticBlock;
69
69
  static isSuperNode(node: ESTree.Node): node is ESTree.Super;
70
70
  static isSwitchCaseNode(node: ESTree.Node): node is ESTree.SwitchCase;
71
71
  static isTaggedTemplateExpressionNode(node: ESTree.Node): node is ESTree.TaggedTemplateExpression;
@@ -5,6 +5,7 @@ import { TControlFlowCustomNodeFactory } from '../../types/container/custom-node
5
5
  import { TControlFlowReplacerFactory } from '../../types/container/node-transformers/TControlFlowReplacerFactory';
6
6
  import { TControlFlowStorageFactoryCreator } from '../../types/container/node-transformers/TControlFlowStorageFactoryCreator';
7
7
  import { TNodeWithStatements } from '../../types/node/TNodeWithStatements';
8
+ import { IControlFlowStorage } from '../../interfaces/storages/control-flow-transformers/IControlFlowStorage';
8
9
  import { IOptions } from '../../interfaces/options/IOptions';
9
10
  import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
10
11
  import { IVisitor } from '../../interfaces/node-transformers/IVisitor';
@@ -12,7 +13,6 @@ import { ControlFlowReplacer } from '../../enums/node-transformers/control-flow-
12
13
  import { NodeTransformationStage } from '../../enums/node-transformers/NodeTransformationStage';
13
14
  import { NodeTransformer } from '../../enums/node-transformers/NodeTransformer';
14
15
  import { FunctionControlFlowTransformer } from './FunctionControlFlowTransformer';
15
- import { IControlFlowStorage } from '../../interfaces/storages/control-flow-transformers/IControlFlowStorage';
16
16
  export declare class StringArrayControlFlowTransformer extends FunctionControlFlowTransformer {
17
17
  readonly runAfter: NodeTransformer[];
18
18
  protected readonly controlFlowReplacersMap: Map<string, ControlFlowReplacer>;
@@ -20,6 +20,7 @@ export declare class StringArrayControlFlowTransformer extends FunctionControlFl
20
20
  constructor(controlFlowStorageFactoryCreator: TControlFlowStorageFactoryCreator, controlFlowReplacerFactory: TControlFlowReplacerFactory, controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory, randomGenerator: IRandomGenerator, options: IOptions);
21
21
  getVisitor(nodeTransformationStage: NodeTransformationStage): IVisitor | null;
22
22
  protected transformFunctionBodyNode(node: ESTree.Node, parentNode: ESTree.Node | null, functionNode: ESTree.Function, controlFlowStorage: IControlFlowStorage): estraverse.VisitorOption | ESTree.Node;
23
+ protected getControlFlowStorage(hostNode: TNodeWithStatements): IControlFlowStorage;
23
24
  protected appendControlFlowStorageNode(hostNode: TNodeWithStatements, controlFlowStorageNode: ESTree.VariableDeclaration): void;
24
25
  protected isAllowedTransformationByThreshold(): boolean;
25
26
  }