dropped node 0.12 support, now using yarn instead npm for scripts and travis-ci testing

This commit is contained in:
sanex3339
2017-01-13 11:40:33 +03:00
parent b95a248c00
commit 35007886b3
28 changed files with 3440 additions and 174 deletions
-4
View File
@@ -2,10 +2,6 @@
import * as fs from 'fs';
if (!(<any>global)._babelPolyfill) {
require('babel-polyfill');
}
(function () {
const JavaScriptObfuscator: any = require("../../index");
+63 -68
View File
@@ -1,81 +1,76 @@
'use strict';
if (!(<any>global)._babelPolyfill) {
require('babel-polyfill');
}
(function () {
const JavaScriptObfuscator: any = require("../../index");
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
var start = new Date();
var log = console.log;
console.log = function () {};
${String(`
(function () {
var result = 1,
term1 = 0,
term2 = 1,
i = 1;
while(i < 10)
{
var test = 10;
result = term1 + term2;
console.log(result);
term1 = term2;
term2 = result;
i++;
}
console.log(test);
var test = function (test) {
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(`
var start = new Date();
var log = console.log;
console.log = function () {};
${String(`
(function () {
var result = 1,
term1 = 0,
term2 = 1,
i = 1;
while(i < 10)
{
var test = 10;
result = term1 + term2;
console.log(result);
term1 = term2;
term2 = result;
i++;
}
console.log(test);
if (true) {
var test = 5
var test = function (test) {
console.log(test);
if (true) {
var test = 5
}
return test;
}
return test;
}
console.log(test(1));
function test2 (abc) {
function test1 () {
console.log('inside', abc.item);
console.log(test(1));
function test2 (abc) {
function test1 () {
console.log('inside', abc.item);
}
console.log('тест', abc);
var abc = {};
return abc.item = 15, test1();
};
var regexptest = /version\\/(\\d+)/i;
console.log(regexptest);
test2(22);
console.log(105.4);
console.log(true, false);
var sA = 'shorthand1';
var sB = 'shorthand2';
console.log({sA, sB});
try {
} catch (error) {
console.log(error);
}
console.log('тест', abc);
var abc = {};
return abc.item = 15, test1();
};
var regexptest = /version\\/(\\d+)/i;
console.log(regexptest);
test2(22);
console.log(105.4);
console.log(true, false);
var sA = 'shorthand1';
var sB = 'shorthand2';
console.log({sA, sB});
try {
} catch (error) {
console.log(error);
}
})();
`).repeat(1000)}
console.log = log;
console.log(new Date() - start);
})();
`).repeat(1000)}
console.log = log;
console.log(new Date() - start);
`,
{
disableConsoleOutput: false,
-4
View File
@@ -1,10 +1,6 @@
'use strict';
import { NO_CUSTOM_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
if (!(<any>global)._babelPolyfill) {
require('babel-polyfill');
}
(function () {
const JavaScriptObfuscator: any = require("../../index");
@@ -86,8 +86,4 @@ describe('DomainLockNodeTemplate (): string', () => {
singleNodeCallControllerFunctionName
}, singleNodeCallControllerFunctionName, currentDomain));
});
afterEach(() => {
delete (<any>global).promisePolyfillActivationFlag;
});
});
-2
View File
@@ -1,8 +1,6 @@
import { BabelPolyfill } from './polyfills/BabelPolyfill';
import 'reflect-metadata';
require('source-map-support').install();
BabelPolyfill.append();
/**
* Unit tests
-7
View File
@@ -1,7 +0,0 @@
export class BabelPolyfill {
public static append (): void {
if (!(<any>global)._babelPolyfill) {
require('babel-polyfill');
}
}
}