浏览代码

Usage of StringUtils inside StringUtils

sanex 4 年之前
父节点
当前提交
19ccb0e662

文件差异内容过多而无法显示
+ 0 - 0
dist/index.browser.js


文件差异内容过多而无法显示
+ 0 - 0
dist/index.cli.js


文件差异内容过多而无法显示
+ 0 - 0
dist/index.js


+ 2 - 2
package.json

@@ -57,7 +57,7 @@
     "@types/multimatch": "4.0.0",
     "@types/multimatch": "4.0.0",
     "@types/node": "14.11.2",
     "@types/node": "14.11.2",
     "@types/rimraf": "3.0.0",
     "@types/rimraf": "3.0.0",
-    "@types/sinon": "9.0.5",
+    "@types/sinon": "9.0.6",
     "@types/string-template": "1.0.2",
     "@types/string-template": "1.0.2",
     "@types/webpack-env": "1.15.3",
     "@types/webpack-env": "1.15.3",
     "@typescript-eslint/eslint-plugin": "4.2.0",
     "@typescript-eslint/eslint-plugin": "4.2.0",
@@ -67,7 +67,7 @@
     "coveralls": "3.1.0",
     "coveralls": "3.1.0",
     "eslint": "7.9.0",
     "eslint": "7.9.0",
     "eslint-plugin-import": "2.22.0",
     "eslint-plugin-import": "2.22.0",
-    "eslint-plugin-jsdoc": "30.5.1",
+    "eslint-plugin-jsdoc": "30.5.2",
     "eslint-plugin-no-null": "1.0.2",
     "eslint-plugin-no-null": "1.0.2",
     "eslint-plugin-prefer-arrow": "1.2.2",
     "eslint-plugin-prefer-arrow": "1.2.2",
     "eslint-plugin-unicorn": "22.0.0",
     "eslint-plugin-unicorn": "22.0.0",

+ 2 - 2
src/node-transformers/preparing-transformers/EvalCallExpressionTransformer.ts

@@ -2,7 +2,6 @@ import { inject, injectable, } from 'inversify';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
 
 
 import * as ESTree from 'estree';
 import * as ESTree from 'estree';
-import jsStringEscape from 'js-string-escape';
 
 
 import { IOptions } from '../../interfaces/options/IOptions';
 import { IOptions } from '../../interfaces/options/IOptions';
 import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
 import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
@@ -15,6 +14,7 @@ import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
 import { NodeFactory } from '../../node/NodeFactory';
 import { NodeFactory } from '../../node/NodeFactory';
 import { NodeGuards } from '../../node/NodeGuards';
 import { NodeGuards } from '../../node/NodeGuards';
 import { NodeUtils } from '../../node/NodeUtils';
 import { NodeUtils } from '../../node/NodeUtils';
+import { StringUtils } from '../../utils/StringUtils';
 
 
 @injectable()
 @injectable()
 export class EvalCallExpressionTransformer extends AbstractNodeTransformer {
 export class EvalCallExpressionTransformer extends AbstractNodeTransformer {
@@ -180,7 +180,7 @@ export class EvalCallExpressionTransformer extends AbstractNodeTransformer {
         return NodeFactory.callExpressionNode(
         return NodeFactory.callExpressionNode(
             NodeFactory.identifierNode('eval'),
             NodeFactory.identifierNode('eval'),
             [
             [
-                NodeFactory.literalNode(jsStringEscape(obfuscatedCode))
+                NodeFactory.literalNode(StringUtils.escapeJsString(obfuscatedCode))
             ]
             ]
         );
         );
     }
     }

+ 8 - 8
yarn.lock

@@ -534,10 +534,10 @@
     "@types/glob" "*"
     "@types/glob" "*"
     "@types/node" "*"
     "@types/node" "*"
 
 
-"@types/[email protected].5":
-  version "9.0.5"
-  resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.5.tgz#56b2a12662dd8c7d081cdc511af5f872cb37377f"
-  integrity sha512-4CnkGdM/5/FXDGqL32JQ1ttVrGvhOoesLLF7VnTh4KdjK5N5VQOtxaylFqqTjnHx55MnD9O02Nbk5c1ELC8wlQ==
+"@types/[email protected].6":
+  version "9.0.6"
+  resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.6.tgz#fb4b6883fe0417e6a1ac5d9753bdcb7016dd4dd0"
+  integrity sha512-j3GK0fiHgn8fe7sqOpInMjm0A2Tary1NBZ8gbI/sZ0C0JxYeO+nh8H0/pW/0l94vNWcH1FnZOZu/cOvIfNZTrg==
   dependencies:
   dependencies:
     "@types/sinonjs__fake-timers" "*"
     "@types/sinonjs__fake-timers" "*"
 
 
@@ -2138,10 +2138,10 @@ [email protected]:
     resolve "^1.17.0"
     resolve "^1.17.0"
     tsconfig-paths "^3.9.0"
     tsconfig-paths "^3.9.0"
 
 
[email protected].1:
-  version "30.5.1"
-  resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.5.1.tgz#b024295db3ce3b258909419d9bcf747b8e65e2a7"
-  integrity sha512-cY3YNxdhFcQVkcQLnZw/iZGsTPMuWa9yWZclorMWkjdHprBQX0TMWMEcmJYM3IjHp1HJr7aD0Z0sCRifEBhnzg==
[email protected].2:
+  version "30.5.2"
+  resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.5.2.tgz#a2002c52d5fb4a9d42b9fa3a3136a9dbdcb7f69e"
+  integrity sha512-LJfjqVGYrPUZv4Gt+1OB5NHhySVPeX4Sdd1qUUjTPnBSwbezry7j3NdPVIeU67VwCVJU2rmqd6jhZ7VYec37Cw==
   dependencies:
   dependencies:
     comment-parser "^0.7.6"
     comment-parser "^0.7.6"
     debug "^4.1.1"
     debug "^4.1.1"

部分文件因为文件数量过多而无法显示