Ver Fonte

Update to typescript 2.7.1

sanex3339 há 7 anos atrás
pai
commit
a633857fed

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/index.js


+ 5 - 5
package.json

@@ -1,6 +1,6 @@
 {
   "name": "javascript-obfuscator",
-  "version": "0.14.0-beta.3",
+  "version": "0.14.0-beta.4",
   "description": "JavaScript obfuscator",
   "keywords": [
     "obfuscator",
@@ -46,12 +46,12 @@
     "@types/estree": "0.0.38",
     "@types/md5": "2.1.32",
     "@types/mkdirp": "0.5.2",
-    "@types/mocha": "2.2.47",
+    "@types/mocha": "2.2.48",
     "@types/node": "9.4.0",
     "@types/rimraf": "2.0.2",
     "@types/sinon": "4.1.3",
     "@types/string-template": "1.0.2",
-    "@types/webpack-env": "1.13.3",
+    "@types/webpack-env": "1.13.5",
     "awesome-typescript-loader": "3.4.1",
     "babel-cli": "6.26.0",
     "babel-loader": "7.1.2",
@@ -69,8 +69,8 @@
     "tslint": "5.9.1",
     "tslint-eslint-rules": "4.1.1",
     "tslint-language-service": "0.9.8",
-    "tslint-webpack-plugin": "1.0.0",
-    "typescript": "2.6.2",
+    "tslint-webpack-plugin": "1.1.0",
+    "typescript": "2.7.1",
     "webpack": "3.10.0",
     "webpack-node-externals": "1.6.0"
   },

+ 2 - 2
src/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.ts

@@ -1,8 +1,9 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
+import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';
 
 import { IOptions } from '../../interfaces/options/IOptions';
@@ -17,7 +18,6 @@ import { initializable } from '../../decorators/Initializable';
 
 import { AbstractCustomNode } from '../AbstractCustomNode';
 import { NodeUtils } from '../../node/NodeUtils';
-import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 
 @injectable()
 export class ConsoleOutputDisableExpressionNode extends AbstractCustomNode {

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/domain-lock-nodes/DomainLockNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/node-calls-controller-nodes/NodeCallsControllerFunctionNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/self-defending-nodes/SelfDefendingUnicodeNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayCallsWrapper.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayRotateFunctionNode.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { TIdentifierNamesGeneratorFactory } from '../../types/container/generators/TIdentifierNamesGeneratorFactory';
 import { TStatement } from '../../types/node/TStatement';

+ 1 - 11
src/utils/RandomGenerator.ts

@@ -1,7 +1,7 @@
 import { inject, injectable, postConstruct } from 'inversify';
 import { ServiceIdentifiers } from '../container/ServiceIdentifiers';
 
-import * as md5 from 'md5';
+import md5 from 'md5';
 import { Chance } from 'chance';
 
 import { IInitializable } from '../interfaces/IInitializable';
@@ -18,16 +18,6 @@ export class RandomGenerator implements IRandomGenerator, IInitializable {
      */
     public static readonly randomGeneratorPool: string = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
 
-    /**
-     * @type {string}
-     */
-    public static readonly randomGeneratorPoolNumbers: string = '0123456789';
-
-    /**
-     * @type {string}
-     */
-    public static readonly randomGeneratorPoolHexadecimal: string = `abcdef${RandomGenerator.randomGeneratorPoolNumbers}`;
-
     /**
      * @type {IOptions}
      */

+ 1 - 1
test/functional-tests/templates/GlobalVariableNoEvalTemplate.spec.ts

@@ -1,6 +1,6 @@
 import 'reflect-metadata';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { assert } from 'chai';
 

+ 1 - 1
test/functional-tests/templates/domain-lock-nodes/DomainLockNodeTemplate.spec.ts

@@ -1,4 +1,4 @@
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { assert } from 'chai';
 

+ 1 - 1
test/functional-tests/templates/string-array-nodes/StringArrayCallsWrapperNodeTemplate.spec.ts

@@ -1,6 +1,6 @@
 import 'reflect-metadata';
 
-import * as format from 'string-template';
+import format from 'string-template';
 
 import { assert } from 'chai';
 

+ 2 - 0
tsconfig.json

@@ -8,12 +8,14 @@
       "dom"
     ],
     "module": "commonjs",
+    "esModuleInterop": true,
     "noEmitHelpers": true,
     "noImplicitThis": false,
     "noUnusedLocals": true,
     "removeComments": true,
     "sourceMap": true,
     "strict": true,
+    "strictPropertyInitialization": false,
     "target": "es2015",
     "plugins": [
       {

+ 1 - 0
tsconfig.test.json

@@ -9,6 +9,7 @@
     "noEmitHelpers": true,
     "importHelpers": true,
     "module": "commonjs",
+    "esModuleInterop": true,
     "inlineSourceMap": true,
     "inlineSources": true,
     "emitDecoratorMetadata": true,

+ 12 - 12
yarn.lock

@@ -58,9 +58,9 @@
   dependencies:
     "@types/node" "*"
 
-"@types/[email protected]7":
-  version "2.2.47"
-  resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.47.tgz#30bbd880834d4af0f609025f282a69b8d4458f06"
+"@types/[email protected]8":
+  version "2.2.48"
+  resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab"
 
 "@types/node@*":
   version "8.0.53"
@@ -93,9 +93,9 @@
   version "0.0.30"
   resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1"
 
-"@types/[email protected].3":
-  version "1.13.3"
-  resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.3.tgz#0ecbe70f87341767793774d3683b51aa3246434c"
+"@types/[email protected].5":
+  version "1.13.5"
+  resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.5.tgz#ca854e9fbdbcdf45d7376882875f28e2c60593f8"
 
 abbrev@1, [email protected]:
   version "1.0.9"
@@ -3729,9 +3729,9 @@ [email protected]:
   version "0.9.8"
   resolved "https://registry.yarnpkg.com/tslint-language-service/-/tslint-language-service-0.9.8.tgz#22a6f2f926b7c0a4cafed3ae1f65021e8008dc96"
 
-tslint-webpack-plugin@1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/tslint-webpack-plugin/-/tslint-webpack-plugin-1.0.0.tgz#c3fdf3b29e77ae4f54e6981b3a85a65909f39ec9"
+tslint-webpack-plugin@1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/tslint-webpack-plugin/-/tslint-webpack-plugin-1.1.0.tgz#7b222a1115aa7da83a3f2952ba72ba8fd583ea00"
   dependencies:
     chalk "^2.1.0"
 
@@ -3794,9 +3794,9 @@ typedarray@^0.0.6:
   version "0.0.6"
   resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
 
-typescript@2.6.2:
-  version "2.6.2"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
+typescript@2.7.1:
+  version "2.7.1"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359"
 
 uglify-js@^2.6, uglify-js@^2.8.29:
   version "2.8.29"

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff