javascript-obfuscator 4.1.0 → 4.1.1

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": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "JavaScript obfuscator",
5
5
  "keywords": [
6
6
  "obfuscator",
@@ -12,7 +12,7 @@
12
12
  "js obfuscator"
13
13
  ],
14
14
  "engines": {
15
- "node": "^12.22.0 || ^14.0.0 || ^16.0.0 || ^17.0.0 || >=18.0.0"
15
+ "node": ">=12.22.0"
16
16
  },
17
17
  "main": "dist/index.js",
18
18
  "browser": "dist/index.browser.js",
@@ -27,7 +27,7 @@
27
27
  "assert": "2.0.0",
28
28
  "chalk": "4.1.2",
29
29
  "chance": "1.1.9",
30
- "class-validator": "0.14.0",
30
+ "class-validator": "0.14.1",
31
31
  "commander": "10.0.0",
32
32
  "eslint-scope": "7.1.1",
33
33
  "eslint-visitor-keys": "3.3.0",
@@ -72,7 +72,7 @@
72
72
  "cross-env": "7.0.3",
73
73
  "eslint": "8.34.0",
74
74
  "eslint-plugin-import": "2.27.5",
75
- "eslint-plugin-jsdoc": "40.0.0",
75
+ "eslint-plugin-jsdoc": "48.2.12",
76
76
  "eslint-plugin-no-null": "1.0.2",
77
77
  "eslint-plugin-prefer-arrow": "1.2.3",
78
78
  "eslint-plugin-unicorn": "45.0.2",
@@ -81,7 +81,7 @@
81
81
  "fork-ts-checker-webpack-plugin": "7.3.0",
82
82
  "husky": "8.0.3",
83
83
  "js-beautify": "1.14.7",
84
- "mocha": "10.2.0",
84
+ "mocha": "10.4.0",
85
85
  "nyc": "15.1.0",
86
86
  "pjson": "1.0.9",
87
87
  "rimraf": "4.1.2",
@@ -111,15 +111,16 @@
111
111
  "test:devCompilePerformance": "ts-node test/dev/dev-compile-performance.ts",
112
112
  "test:devRuntimePerformance": "ts-node test/dev/dev-runtime-performance.ts",
113
113
  "test:full": "yarn run test:dev && yarn run test:mocha-coverage && yarn run test:mocha-memory-performance",
114
- "test:mocha": "mocha --require source-map-support/register test/index.spec.ts --exit",
114
+ "test:mocha": "mocha --require ts-node/register --require source-map-support/register test/index.spec.ts --exit",
115
115
  "test:mocha-coverage": "cross-env NODE_OPTIONS=--max-old-space-size=4096 nyc --reporter text-summary --no-clean yarn run test:mocha",
116
116
  "test:mocha-coverage:report": "nyc report --reporter=lcov",
117
- "test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=280 mocha test/performance-tests/JavaScriptObfuscatorMemory.spec.ts",
117
+ "test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=280 mocha --require ts-node/register test/performance-tests/JavaScriptObfuscatorMemory.spec.ts",
118
118
  "test": "yarn run test:full",
119
119
  "eslint": "eslint src/**/*.ts",
120
120
  "git:addFiles": "git add .",
121
121
  "postinstall": "opencollective-postinstall",
122
122
  "precommit": "npm run build",
123
+ "prepublishOnly": "npm run build && npm run build:typings",
123
124
  "prepare": "husky install"
124
125
  },
125
126
  "author": {
@@ -0,0 +1 @@
1
+ export declare function GlobalVariableServiceWorkerTemplate(): string;
@@ -2,4 +2,5 @@ export declare const ObfuscationTarget: Readonly<{
2
2
  Browser: 'browser';
3
3
  BrowserNoEval: 'browser-no-eval';
4
4
  Node: 'node';
5
+ ServiceWorker: 'service-worker';
5
6
  }>;
@@ -17,7 +17,7 @@ export declare class NodeFactory {
17
17
  static expressionStatementNode(expression: ESTree.Expression): ESTree.ExpressionStatement;
18
18
  static forStatementNode(init: ESTree.VariableDeclaration | ESTree.Expression | null, test: ESTree.Expression | null, update: ESTree.Expression | null, body: ESTree.Statement): ESTree.ForStatement;
19
19
  static forInStatementNode(left: ESTree.VariableDeclaration | ESTree.Pattern, right: ESTree.Expression, body: ESTree.Statement): ESTree.ForInStatement;
20
- static forOfStatementNode(await: boolean, left: ESTree.VariableDeclaration | ESTree.Pattern, right: ESTree.Expression, body: ESTree.Statement): ESTree.ForOfStatement;
20
+ static forOfStatementNode(asAwait: boolean, left: ESTree.VariableDeclaration | ESTree.Pattern, right: ESTree.Expression, body: ESTree.Statement): ESTree.ForOfStatement;
21
21
  static functionDeclarationNode(functionName: string, params: ESTree.Identifier[], body: ESTree.BlockStatement): ESTree.FunctionDeclaration;
22
22
  static functionExpressionNode(params: ESTree.Pattern[], body: ESTree.BlockStatement): ESTree.FunctionExpression;
23
23
  static ifStatementNode(test: ESTree.Expression, consequent: ESTree.Statement, alternate?: ESTree.Statement | null): ESTree.IfStatement;