瀏覽代碼

Dependencies update 20.11.20

sanex 4 年之前
父節點
當前提交
18dd2f28f9
共有 5 個文件被更改,包括 43 次插入16 次删除
  1. 0 0
      dist/index.cli.js
  2. 0 0
      dist/index.js
  3. 3 3
      package.json
  4. 28 1
      test/unit-tests/cli/utils/ObfuscatedCodeWriter.spec.ts
  5. 12 12
      yarn.lock

文件差異過大導致無法顯示
+ 0 - 0
dist/index.cli.js


文件差異過大導致無法顯示
+ 0 - 0
dist/index.js


+ 3 - 3
package.json

@@ -58,7 +58,7 @@
     "@types/mkdirp": "1.0.1",
     "@types/mocha": "8.0.4",
     "@types/multimatch": "4.0.0",
-    "@types/node": "14.14.8",
+    "@types/node": "14.14.9",
     "@types/rimraf": "3.0.0",
     "@types/sinon": "9.0.8",
     "@types/string-template": "1.0.2",
@@ -86,8 +86,8 @@
     "threads": "1.6.3",
     "ts-loader": "8.0.11",
     "ts-node": "9.0.0",
-    "typescript": "4.1.0-beta",
-    "webpack": "5.5.1",
+    "typescript": "4.1.2",
+    "webpack": "5.6.0",
     "webpack-cli": "4.2.0",
     "webpack-node-externals": "2.5.2"
   },

+ 28 - 1
test/unit-tests/cli/utils/ObfuscatedCodeWriter.spec.ts

@@ -88,6 +88,33 @@ describe('ObfuscatedCodeWriter', () => {
 
         describe('Variant #4: raw input path is a directory path, raw output path is a directory path', () => {
             describe('Variant #1: base directory name', () => {
+                const inputPath: string = path.join(tmpDirectoryPath, 'input', 'test-input.js');
+                const rawInputPath: string = path.join(tmpDirectoryPath, 'input');
+                const rawOutputPath: string = path.join(tmpDirectoryPath, 'output');
+                const expectedOutputCodePath: string = path.join(
+                    tmpDirectoryPath,
+                    'output',
+                    'test-input.js'
+                );
+
+                let outputCodePath: string;
+
+                before(() => {
+                    const obfuscatedCodeWriter: ObfuscatedCodeWriter = new ObfuscatedCodeWriter(
+                        rawInputPath,
+                        {
+                            output: rawOutputPath
+                        }
+                    );
+                    outputCodePath = obfuscatedCodeWriter.getOutputCodePath(inputPath);
+                });
+
+                it('should return output path that contains raw output path and actual file input path', () => {
+                    assert.equal(outputCodePath, expectedOutputCodePath);
+                });
+            });
+
+            describe('Variant #2: base nested directory name', () => {
                 const inputPath: string = path.join(tmpDirectoryPath, 'input', 'nested', 'test-input.js');
                 const rawInputPath: string = path.join(tmpDirectoryPath, 'input');
                 const rawOutputPath: string = path.join(tmpDirectoryPath, 'output');
@@ -115,7 +142,7 @@ describe('ObfuscatedCodeWriter', () => {
                 });
             });
 
-            describe('Variant #2: directory name with dot', () => {
+            describe('Variant #3: directory name with dot', () => {
                 const inputPath: string = path.join(tmpDirectoryPath, 'input', 'nested', 'test-input.js');
                 const rawInputPath: string = path.join(tmpDirectoryPath, 'input');
                 const rawOutputPath: string = path.join(tmpDirectoryPath, 'output', 'foo.bar');

+ 12 - 12
yarn.lock

@@ -530,10 +530,10 @@
   resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.3.tgz#6356df2647de9eac569f9a52eda3480fa9e70b4d"
   integrity sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA==
 
-"@types/[email protected].8":
-  version "14.14.8"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.8.tgz#2127bd81949a95c8b7d3240f3254352d72563aec"
-  integrity sha512-z/5Yd59dCKI5kbxauAJgw6dLPzW+TNOItNE00PkpzNwUIEwdj/Lsqwq94H5DdYBX7C13aRA0CY32BK76+neEUA==
+"@types/[email protected].9":
+  version "14.14.9"
+  resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.9.tgz#04afc9a25c6ff93da14deabd65dc44485b53c8d6"
+  integrity sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==
 
 "@types/normalize-package-data@^2.4.0":
   version "2.4.0"
@@ -4413,10 +4413,10 @@ typedarray@^0.0.6:
   resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
   integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
 
[email protected].0-beta:
-  version "4.1.0-beta"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-beta.tgz#e4d054035d253b7a37bdc077dd71706508573e69"
-  integrity sha512-b/LAttdVl3G6FEmnMkDsK0xvfvaftXpSKrjXn+OVCRqrwz5WD/6QJOiN+dTorqDY+hkaH+r2gP5wI1jBDmdQ7A==
[email protected].2:
+  version "4.1.2"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
+  integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
 
 typical@^5.0.0, typical@^5.2.0:
   version "5.2.0"
@@ -4536,10 +4536,10 @@ webpack-sources@^2.1.1:
     source-list-map "^2.0.1"
     source-map "^0.6.1"
 
-webpack@5.5.1:
-  version "5.5.1"
-  resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.5.1.tgz#d6537f85554a0e59f15e6e683af11befdd0476aa"
-  integrity sha512-v4RzZP9BG2xxMLhxcFIo89M+nyIqGjh35Bhm5EE+I2N8y3dc9jT5OSb1HewUMkzMPyyDscOkVD6pSn6EMtTwNQ==
+webpack@5.6.0:
+  version "5.6.0"
+  resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.6.0.tgz#282d10434c403b070ed91d459b385e873b51a07d"
+  integrity sha512-SIeFuBhuheKElRbd84O35UhKc0nxlgSwtzm2ksZ0BVhRJqxVJxEguT/pYhfiR0le/pxTa1VsCp7EOYyTsa6XOA==
   dependencies:
     "@types/eslint-scope" "^3.7.0"
     "@types/estree" "^0.0.45"

部分文件因文件數量過多而無法顯示