8000 0.27.5 release · sec-js/javascript-obfuscator@87bf209 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 87bf209

Browse files
author
sanex3339
committed
0.27.5 release
1 parent d9bc590 commit 87bf209

File tree

9 files changed

+165
-113
lines changed

9 files changed

+165
-113
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ node_js:
55
- "10"
66
- "12"
77
- "13"
8+
- "14"
89
- "stable"
910

1011
cache:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Change Log
22

3+
v0.27.5
4+
---
5+
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/554
6+
37
v0.27.4
48
---
59
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/590

dist/index.browser.js

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.cli.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
"@gradecam/tsenum": "1.2.0",
2525
"@nuxtjs/opencollective": "0.2.2",
2626
"acorn": "7.1.1",
27-
"acorn-import-meta": "1.0.0",
27+
"acorn-import-meta": "1.1.0",
2828
"chalk": "4.0.0",
2929
"chance": "1.1.4",
30-
"class-validator": "0.11.1",
31-
"commander": "5.0.0",
30+
"class-validator": "0.12.2",
31+
"commander": "5.1.0",
3232
"escodegen": "1.14.1",
3333
"eslint-scope": "5.0.0",
34-
"estraverse": "5.0.0",
34+
"estraverse": "5.1.0",
3535
"eventemitter3": "4.0.0",
3636
"fast-deep-equal": "3.1.1",
3737
"inversify": "5.0.1",
@@ -40,7 +40,7 @@
4040
"mkdirp": "1.0.4",
4141
"multimatch": "4.0.0",
4242
"reflect-metadata": "0.1.13",
43-
"source-map-support": "0.5.16",
43+
"source-map-support": "0.5.19",
4444
"string-template": "1.0.0",
4545
"tslib": "1.11.1"
4646
},
@@ -55,18 +55,18 @@
5555
"@types/mkdirp": "1.0.0",
5656
"@types/mocha": "7.0.2",
5757
"@types/multimatch": "4.0.0",
58-
"@types/node": "13.11.1",
58+
"@types/node": "13.13.2",
5959
"@types/rimraf": "3.0.0",
6060
"@types/sinon": "9.0.0",
6161
"@types/string-template": "1.0.2",
62-
"@types/webpack-env": "1.15.1",
63-
"@typescript-eslint/eslint-plugin": "2.27.0",
64-
"@typescript-eslint/parser": "2.27.0",
62+
"@types/webpack-env": "1.15.2",
63+
"@typescript-eslint/eslint-plugin": "2.29.0",
64+
"@typescript-eslint/parser": "2.29.0",
6565
"chai": "4.2.0",
66-
"coveralls": "3.0.11",
66+
"coveralls": "3.1.0",
6767
"eslint": "6.8.0",
6868
"eslint-plugin-import": "2.20.2",
69-
"eslint-plugin-jsdoc": "23.0.0",
69+
"eslint-plugin-jsdoc": "24.0.0",
7070
"eslint-plugin-no-null": "1.0.2",
7171
"eslint-plugin-prefer-arrow": "1.2.0",
7272
"eslint-plugin-unicorn": "18.0.1",
@@ -78,11 +78,11 @@
7878
"pre-commit": "1.2.2",
7979
"rimraf": "3.0.2",
8080
"sinon": "9.0.2",
81-
"threads": "1.4.0",
82-
"ts-loader": "6.2.2",
81+
"threads": "1.4.1",
82+
"ts-loader": "7.0.1",
8383
"ts-node": "6.1.0",
8484
"typescript": "3.8.3",
85-
"webpack": "4.42.1",
85+
"webpack": "4.43.0",
8686
"webpack-cli": "3.3.11",
8787
"webpack-node-externals": "1.7.2"
8888
},

src/options/ValidationErrorsFormatter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ export class ValidationErrorsFormatter {
2424
* @returns {string}
2525
*/
2626
private static formatWithNestedConstraints (error: ValidationError): string {
27-
const constraints: TObject<string> = error.constraints;
27+
const constraints: TObject<string> | undefined = error.constraints;
28+
29+
if (!constraints) {
30+
return `\`${error.property}\` error\n`;
31+
}
2832

2933
const rootError: string = `\`${error.property}\` errors:\n`;
3034
const nestedErrors: string = Object

test/unit-tests/options/ValidationErrorsFormatter.spec.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,27 @@ describe('ValidationErrorsFormatter', () => {
6868
});
6969
});
7070

71-
describe('Variant #3: two constraint groups', () => {
71+
describe('Variant #3: one constraint group without constraints', () => {
72+
const constraintGroupRegExp: RegExp = /`foo` *error/;
73+
const validationErrors: ValidationError[] = [{
74+
target: {},
75+
property: 'foo',
76+
value: null,
77+
children: []
78+
}];
79+
80+
let validationError: string;
81+
82+
before(() => {
83+
validationError = ValidationErrorsFormatter.format(validationErrors);
84+
});
85+
86+
it('Should return valid validation error', () => {
87+
assert.match(validationError, constraintGroupRegExp);
88+
});
89+
});
90+
91+
describe('Variant #4: two constraint groups', () => {
7292
const regExpMatch: string = `` +
7393
`\`foo\` *errors:\\n` +
7494
`(?: *-)+ *constraint *group *#1 *text\\n+` +

0 commit comments

Comments
 (0)
0