mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Merge branch 'master' into windows-support
# Conflicts: # package.json
This commit is contained in:
+1
-1
@@ -2,12 +2,12 @@
|
||||
.DS_Store
|
||||
.idea
|
||||
.nyc_output
|
||||
coverage
|
||||
npm-debug.log
|
||||
*.js.map
|
||||
/coverage
|
||||
/node_modules
|
||||
/test/fixtures/compile-performance-obfuscated.js
|
||||
/test-tmp
|
||||
/tmp
|
||||
/test/benchmark/**/**
|
||||
*dockerfile
|
||||
|
||||
@@ -7,4 +7,3 @@ examples
|
||||
images
|
||||
webpack
|
||||
test
|
||||
test-tmp
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "@istanbuljs/nyc-config-typescript"
|
||||
}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+20
-21
@@ -45,6 +45,7 @@
|
||||
"tslib": "2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "1.0.1",
|
||||
"@types/chai": "4.2.12",
|
||||
"@types/chance": "1.1.0",
|
||||
"@types/escodegen": "0.0.6",
|
||||
@@ -58,7 +59,7 @@
|
||||
"@types/multimatch": "4.0.0",
|
||||
"@types/node": "14.11.2",
|
||||
"@types/rimraf": "3.0.0",
|
||||
"@types/sinon": "9.0.7",
|
||||
"@types/sinon": "9.0.8",
|
||||
"@types/string-template": "1.0.2",
|
||||
"@types/webpack-env": "1.15.3",
|
||||
"@typescript-eslint/eslint-plugin": "4.3.0",
|
||||
@@ -95,26 +96,24 @@
|
||||
},
|
||||
"homepage": "https://obfuscator.io/",
|
||||
"scripts": {
|
||||
"start": "cross-env-shell scripts/start",
|
||||
"webpack:prod": "cross-env-shell scripts/webpack-prod",
|
||||
"webpack:dev": "cross-env-shell scripts/webpack-dev",
|
||||
"build": "cross-env-shell scripts/build",
|
||||
"watch": "cross-env-shell scripts/watch",
|
||||
"removeCacheDir": "cross-env-shell scripts/remove-cache-dir",
|
||||
"test:compile": "cross-env-shell scripts/test-compile",
|
||||
"test:dev": "cross-env-shell scripts/test-dev",
|
||||
"test:devCompilePerformance": "cross-env-shell scripts/test-dev-compile-performance",
|
||||
"test:devRuntimePerformance": "cross-env-shell scripts/test-dev-runtime-performance",
|
||||
"test:full": "cross-env-shell scripts/test-full",
|
||||
"test:coveralls": "cross-env-shell scripts/test-coveralls",
|
||||
"test:mocha": "cross-env-shell scripts/test-mocha",
|
||||
"test:mocha-memory-performance": "cross-env-shell scripts/test-mocha-memory-performance",
|
||||
"test:removeTmpDir": "cross-env-shell scripts/test-remove-tmp-dir",
|
||||
"test": "cross-env-shell scripts/test",
|
||||
"eslint": "cross-env-shell scripts/eslint",
|
||||
"travis": "cross-env-shell scripts/travis",
|
||||
"git:addFiles": "cross-env-shell scripts/git-add-files",
|
||||
"postinstall": "cross-env-shell opencollective || exit 0"
|
||||
"start": "scripts/start",
|
||||
"webpack:prod": "scripts/webpack-prod",
|
||||
"webpack:dev": "scripts/webpack-dev",
|
||||
"build": "scripts/build",
|
||||
"watch": "scripts/watch",
|
||||
"test:dev": "scripts/test-dev",
|
||||
"test:devCompilePerformance": "scripts/test-dev-compile-performance",
|
||||
"test:devRuntimePerformance": "scripts/test-dev-runtime-performance",
|
||||
"test:full": "scripts/test-full",
|
||||
"test:coveralls": "scripts/test-coveralls",
|
||||
"test:mocha": "scripts/test-mocha",
|
||||
"test:mocha-coverage": "scripts/test-mocha-coverage",
|
||||
"test:mocha-memory-performance": "scripts/test-mocha-memory-performance",
|
||||
"test": "scripts/test",
|
||||
"eslint": "scripts/eslint",
|
||||
"travis": "scripts/travis",
|
||||
"git:addFiles": "scripts/git-add-files",
|
||||
"postinstall": "opencollective || exit 0"
|
||||
},
|
||||
"pre-commit": [
|
||||
"build",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
yarn run removeCacheDir &&
|
||||
yarn run webpack:prod &&
|
||||
yarn run eslint &&
|
||||
yarn test
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf .awcache
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
$(yarn bin)/tsc -p test/tsconfig.test.json --outDir test-tmp &&
|
||||
rsync -a --prune-empty-dirs --include '*/' --include '*.js' --include '*.json' --exclude '*' test/ test-tmp/test/
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
yarn run test:removeTmpDir &&
|
||||
yarn run test:compile &&
|
||||
$(yarn bin)/nyc $(yarn bin)/mocha -- test-tmp/test/index.spec.js --exit &&
|
||||
$(yarn bin)/nyc report --reporter=text-lcov | $(yarn bin)/coveralls &&
|
||||
yarn run test:removeTmpDir
|
||||
yarn run test:mocha &&
|
||||
$(yarn bin)/nyc report --reporter=text-lcov | $(yarn bin)/coveralls
|
||||
+1
-4
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
yarn run test:removeTmpDir &&
|
||||
yarn run test:compile &&
|
||||
yarn run test:dev &&
|
||||
$(yarn bin)/nyc --reporter text-summary $(yarn bin)/mocha -- test-tmp/test/index.spec.js --exit &&
|
||||
yarn run test:removeTmpDir &&
|
||||
yarn run test:mocha-coverage &&
|
||||
yarn run test:mocha-memory-performance
|
||||
+1
-4
@@ -1,6 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
yarn run test:removeTmpDir &&
|
||||
yarn run test:compile &&
|
||||
$(yarn bin)/mocha test-tmp/test/index.spec.js &&
|
||||
yarn run test:removeTmpDir
|
||||
$(yarn bin)/mocha --require ts-node/register --require source-map-support/register test/index.spec.ts --exit
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
$(yarn bin)/nyc --reporter text-summary yarn run test:mocha
|
||||
@@ -1,6 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
yarn run test:removeTmpDir &&
|
||||
yarn run test:compile &&
|
||||
NODE_OPTIONS=--max-old-space-size=200 $(yarn bin)/mocha test-tmp/test/performance-tests/JavaScriptObfuscatorMemory.spec.js &&
|
||||
yarn run test:removeTmpDir
|
||||
NODE_OPTIONS=--max-old-space-size=220 $(yarn bin)/mocha --require ts-node/register test/performance-tests/JavaScriptObfuscatorMemory.spec.ts
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf test-tmp
|
||||
@@ -1,7 +1,5 @@
|
||||
import 'reflect-metadata';
|
||||
|
||||
require('source-map-support').install();
|
||||
|
||||
/**
|
||||
* Unit tests
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ describe('JavaScriptObfuscator memory', function () {
|
||||
const gcDiffThreshold: number = 10;
|
||||
const allowedHeapDiffThreshold: number = 80;
|
||||
|
||||
this.timeout(100000);
|
||||
this.timeout(250000);
|
||||
|
||||
describe('memory: heap usage', () => {
|
||||
it('should keep heap usage without memory leaks', () => {
|
||||
@@ -64,8 +64,8 @@ describe('JavaScriptObfuscator memory', function () {
|
||||
|
||||
const sortedMaxHeapUsed: number[] = [...maxHeapUsed].sort((a: number, b: number) => a - b);
|
||||
|
||||
const firstMaxHeapMBUsed: number = sortedMaxHeapUsed[0];
|
||||
const lastMaxHeapMbUsed: number = sortedMaxHeapUsed[sortedMaxHeapUsed.length - 1];
|
||||
const firstMaxHeapMBUsed: number = sortedMaxHeapUsed[0] ?? 0;
|
||||
const lastMaxHeapMbUsed: number = sortedMaxHeapUsed[sortedMaxHeapUsed.length - 1] ?? 0;
|
||||
|
||||
const diff: number = lastMaxHeapMbUsed - firstMaxHeapMBUsed;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../test-tmp",
|
||||
"noEmitHelpers": true,
|
||||
"importHelpers": true,
|
||||
"inlineSourceMap": true,
|
||||
|
||||
@@ -208,6 +208,13 @@
|
||||
js-yaml "^3.13.1"
|
||||
resolve-from "^5.0.0"
|
||||
|
||||
"@istanbuljs/nyc-config-typescript@1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.1.tgz#55172f5663b3635586add21b14d42ca94a163d58"
|
||||
integrity sha512-/gz6LgVpky205LuoOfwEZmnUtaSmdk0QIMcNFj9OvxhiMhPpKftMgZmGN7jNj7jR+lr8IB1Yks3QSSSNSxfoaQ==
|
||||
dependencies:
|
||||
"@istanbuljs/schema" "^0.1.2"
|
||||
|
||||
"@istanbuljs/schema@^0.1.2":
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
|
||||
@@ -404,10 +411,10 @@
|
||||
"@types/glob" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/sinon@9.0.7":
|
||||
version "9.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.7.tgz#c277e19cf9eb0c71106e785650f1e5c299262302"
|
||||
integrity sha512-uyFiy2gp4P/FK9pmU3WIbT5ZzH54hCswwRkQFhxX7xl8jzhW3g+xOkVqk5YP4cIO//Few8UDAX0MtzFpqBEqwA==
|
||||
"@types/sinon@9.0.8":
|
||||
version "9.0.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.8.tgz#1ed0038d356784f75b086104ef83bfd4130bb81b"
|
||||
integrity sha512-IVnI820FZFMGI+u1R+2VdRaD/82YIQTdqLYC9DLPszZuynAJDtCvCtCs3bmyL66s7FqRM3+LPX7DhHnVTaagDw==
|
||||
dependencies:
|
||||
"@types/sinonjs__fake-timers" "*"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user