Skip to content

Commit

Permalink
0.18.5 version. Dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
sanex3339 committed Nov 30, 2019
1 parent fdc077c commit 5c61532
Show file tree
Hide file tree
Showing 16 changed files with 2,077 additions and 1,328 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Change Log
===
v0.18.5
---
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/321

v0.18.4
---
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/437
Expand Down
8 changes: 4 additions & 4 deletions dist/index.browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.cli.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "javascript-obfuscator",
"version": "0.18.4",
"version": "0.18.5",
"description": "JavaScript obfuscator",
"keywords": [
"obfuscator",
Expand All @@ -21,64 +21,64 @@
},
"types": "index.d.ts",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"chalk": "2.4.1",
"chance": "1.0.16",
"class-validator": "0.9.1",
"commander": "2.17.1",
"escodegen-wallaby": "1.6.19",
"@babel/runtime": "7.7.4",
"chalk": "3.0.0",
"chance": "1.1.3",
"class-validator": "0.11.0",
"commander": "4.0.1",
"escodegen-wallaby": "1.6.27",
"espree": "4.0.0",
"estraverse": "4.2.0",
"inversify": "4.13.0",
"estraverse": "4.3.0",
"inversify": "5.0.1",
"js-string-escape": "1.0.1",
"md5": "2.2.1",
"mkdirp": "0.5.1",
"multimatch": "2.1.0",
"multimatch": "4.0.0",
"opencollective": "1.0.3",
"reflect-metadata": "0.1.12",
"source-map-support": "0.5.8",
"reflect-metadata": "0.1.13",
"source-map-support": "0.5.16",
"string-template": "1.0.0",
"tslib": "1.9.3"
"tslib": "1.10.0"
},
"devDependencies": {
"@babel/cli": "7.0.0-rc.1",
"@babel/core": "7.0.0-rc.1",
"@babel/plugin-transform-runtime": "7.0.0-rc.1",
"@babel/preset-env": "7.0.0-rc.1",
"@types/chai": "4.1.4",
"@types/chance": "1.0.1",
"@babel/cli": "7.7.4",
"@babel/core": "7.7.4",
"@babel/plugin-transform-runtime": "7.7.4",
"@babel/preset-env": "7.7.4",
"@types/chai": "4.2.5",
"@types/chance": "1.0.7",
"@types/escodegen": "0.0.6",
"@types/estraverse": "0.0.6",
"@types/estree": "0.0.38",
"@types/md5": "2.1.32",
"@types/md5": "2.1.33",
"@types/mkdirp": "0.5.2",
"@types/mocha": "5.2.5",
"@types/multimatch": "2.1.2",
"@types/node": "10.5.8",
"@types/rimraf": "2.0.2",
"@types/sinon": "5.0.1",
"@types/mocha": "5.2.7",
"@types/multimatch": "4.0.0",
"@types/node": "12.12.14",
"@types/rimraf": "2.0.3",
"@types/sinon": "7.5.1",
"@types/string-template": "1.0.2",
"@types/webpack-env": "1.13.6",
"awesome-typescript-loader": "5.2.0",
"babel-loader": "8.0.0-beta.3",
"chai": "4.1.2",
"coveralls": "3.0.2",
"@types/webpack-env": "1.14.1",
"awesome-typescript-loader": "5.2.1",
"babel-loader": "8.0.6",
"chai": "4.2.0",
"coveralls": "3.0.9",
"istanbul": "1.1.0-alpha.1",
"mocha": "5.2.0",
"mocha": "6.2.2",
"pjson": "1.0.9",
"pre-commit": "1.2.2",
"rimraf": "2.6.2",
"sinon": "6.1.5",
"rimraf": "3.0.0",
"sinon": "7.5.0",
"threads": "0.12.0",
"ts-node": "6.1.0",
"tslint": "5.11.0",
"tslint-eslint-rules": "5.3.1",
"tslint-language-service": "0.9.9",
"tslint-microsoft-contrib": "5.2.0",
"tslint-webpack-plugin": "1.2.2",
"typescript": "3.0.1",
"webpack": "4.16.5",
"webpack-cli": "3.1.0",
"typescript": "3.7.2",
"webpack": "4.41.2",
"webpack-cli": "3.3.10",
"webpack-node-externals": "1.7.2"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/utils/CLIUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class CLIUtils {
* @returns {TObject}
*/
public static getUserConfig (configPath: string): TObject {
let config: Object;
let config: TObject;

try {
config = require(configPath);
Expand Down
7 changes: 3 additions & 4 deletions src/interfaces/analyzers/IAnalyzer.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as ESTree from 'estree';
import { TObject } from '../../types/TObject';

export interface IAnalyzer {
export interface IAnalyzer <T> {
/**
* @param {Program} astTree
* @returns {TObject[]}
* @returns {T[]}
*/
analyze (astTree: ESTree.Program): TObject[];
analyze (astTree: ESTree.Program): T[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as ESTree from 'estree';
import { IAnalyzer } from '../IAnalyzer';
import { IStackTraceData } from './IStackTraceData';

export interface IStackTraceAnalyzer extends IAnalyzer {
export interface IStackTraceAnalyzer extends IAnalyzer<IStackTraceData> {
/**
* @param {Program} astTree
* @returns {IStackTraceData[]}
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/event-emitters/IObfuscationEventEmitter.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Events = NodeJS.Events;
import EventEmitter = NodeJS.EventEmitter;

import { ObfuscationEvent } from '../../enums/event-emitters/ObfuscationEvent';

export interface IObfuscationEventEmitter extends Events {
export interface IObfuscationEventEmitter extends EventEmitter {
/**
* @param event
* @param listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ export class LiteralTransformer extends AbstractNodeTransformer {
case 'boolean':
newLiteralNode = this.literalObfuscatingReplacerFactory(
LiteralObfuscatingReplacer.BooleanLiteralObfuscatingReplacer
).replace(<boolean>literalNode.value);
).replace(literalNode.value);

break;

case 'number':
newLiteralNode = this.literalObfuscatingReplacerFactory(
LiteralObfuscatingReplacer.NumberLiteralObfuscatingReplacer
).replace(<number>literalNode.value);
).replace(literalNode.value);

break;

case 'string':
newLiteralNode = this.literalObfuscatingReplacerFactory(
LiteralObfuscatingReplacer.StringLiteralObfuscatingReplacer
).replace(<string>literalNode.value);
).replace(literalNode.value);

break;

Expand Down
14 changes: 6 additions & 8 deletions src/node/NodeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import * as espree from 'espree';
import * as estraverse from 'estraverse';
import * as ESTree from 'estree';

import { TObject } from '../types/TObject';

import { NodeGuards } from './NodeGuards';
import { NodeMetadata } from './NodeMetadata';

Expand Down Expand Up @@ -110,16 +108,16 @@ export class NodeUtils {
return node;
}

const copy: TObject = {};
const copy: Partial<T> = {};
const nodeKeys: (keyof T)[] = <(keyof T)[]>Object.keys(node);

Object
.keys(node)
.forEach((property: string) => {
nodeKeys
.forEach((property: keyof T) => {
if (property === 'parentNode') {
return;
}

const value: T[keyof T] = node[<keyof T>property];
const value: T[keyof T] = node[property];

let clonedValue: T[keyof T] | T[keyof T][] | null;

Expand All @@ -133,7 +131,7 @@ export class NodeUtils {
clonedValue = value;
}

copy[property] = clonedValue;
copy[property] = <T[keyof T]>clonedValue;
});

return <T>copy;
Expand Down
2 changes: 1 addition & 1 deletion test/functional-tests/cli/JavaScriptObfuscatorCLI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ describe('JavaScriptObfuscatorCLI', function (): void {
});

describe('help output', () => {
let callback: sinon.SinonSpy,
let callback: sinon.SinonSpy<any, void>,
stdoutWriteMock: StdoutWriteMock;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/functional-tests/options/OptionsNormalizer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function getNormalizedOptions (optionsPreset: TInputOptions): TInputOptions {
const optionsNormalizer: IOptionsNormalizer = inversifyContainerFacade
.get<IOptionsNormalizer>(ServiceIdentifiers.IOptionsNormalizer);

return optionsNormalizer.normalize(options);
return <TInputOptions>optionsNormalizer.normalize(options);
}

describe('OptionsNormalizer', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit-tests/cli/utils/SourceCodeReader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ describe('SourceCodeReader', () => {
const expectedConsoleLogCallResult: boolean = true;
const expectedLoggingMessage: string = `[javascript-obfuscator-cli] Obfuscating file: ${inputPath}...`;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
loggingMessageResult: string;

Expand Down
14 changes: 7 additions & 7 deletions test/unit-tests/logger/Logger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Logger', () => {
const loggingMessage: string = '[javascript-obfuscator] foo';
const expectedConsoleLogCallResult: boolean = true;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
loggingMessageResult: string;

Expand Down Expand Up @@ -51,7 +51,7 @@ describe('Logger', () => {
const loggingMessage: string = '[javascript-obfuscator] Obfuscation started...';
const expectedConsoleLogCallResult: boolean = true;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade,
loggingMessageResult: string;
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('Logger', () => {
describe('`log` option is disabled', () => {
const expectedConsoleLogCallResult: boolean = false;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade;

Expand Down Expand Up @@ -122,7 +122,7 @@ describe('Logger', () => {
const loggingMessage: string = '[javascript-obfuscator] Obfuscation started...';
const expectedConsoleLogCallResult: boolean = true;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade,
loggingMessageResult: string;
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('Logger', () => {
describe('`log` option is disabled', () => {
const expectedConsoleLogCallResult: boolean = false;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade;

Expand Down Expand Up @@ -193,7 +193,7 @@ describe('Logger', () => {
const loggingMessage: string = '[javascript-obfuscator] Obfuscation started...';
const expectedConsoleLogCallResult: boolean = true;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade,
loggingMessageResult: string;
Expand Down Expand Up @@ -230,7 +230,7 @@ describe('Logger', () => {
describe('`log` option is disabled', () => {
const expectedConsoleLogCallResult: boolean = false;

let consoleLogSpy: sinon.SinonSpy,
let consoleLogSpy: sinon.SinonSpy<any, void>,
consoleLogCallResult: boolean,
inversifyContainerFacade: IInversifyContainerFacade;

Expand Down
Loading

0 comments on commit 5c61532

Please sign in to comment.