diff --git a/package.json b/package.json index 23ee1de6..d63614bd 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "babel-preset-airbnb": "^1.0.1", "babel-register": "^6.4.3", "coffee": "^5.4.0", - "copy-dir": "^1.3.0", + "cpy": "^7.0.0", "cross-env": "^3.1.3", "egg": "^2.29.4", "egg-mock": "^4.1.0", diff --git a/test/ts.test.js b/test/ts.test.js index 96744ae5..5008b0c2 100644 --- a/test/ts.test.js +++ b/test/ts.test.js @@ -4,7 +4,7 @@ const path = require('path'); const coffee = require('coffee'); const mm = require('mm'); const fs = require('fs'); -const copyDir = require('copy-dir'); +const cpy = require('cpy'); const rimraf = require('mz-modules/rimraf'); const exec = require('mz/child_process').exec; const os = require('os'); @@ -214,7 +214,7 @@ describe('test/ts.test.js', () => { await exec('npx cnpm install', { cwd }); // copy egg to node_modules - copyDir.sync( + await cpy( path.join(__dirname, './fixtures/example-ts-cluster/node_modules/egg'), path.join(cwd, './node_modules/egg') ); @@ -234,7 +234,7 @@ describe('test/ts.test.js', () => { await exec('npx cnpm install ts-node@8.10.2 --no-save', { cwd }); // copy egg to node_modules - copyDir.sync( + await cpy( path.join(__dirname, './fixtures/example-ts-cluster/node_modules/egg'), path.join(cwd, './node_modules/egg') ); @@ -256,7 +256,7 @@ describe('test/ts.test.js', () => { await exec('npx cnpm install ts-node@8.10.2 --no-save', { cwd }); // copy egg to node_modules - copyDir.sync( + await cpy( path.join(__dirname, './fixtures/example-ts-cluster/node_modules/egg'), path.join(cwd, './node_modules/egg') ); @@ -312,7 +312,7 @@ describe('test/ts.test.js', () => { await exec('npx cnpm install', { cwd }); // copy egg to node_modules - copyDir.sync( + await cpy( path.join(__dirname, './fixtures/example-ts-cluster/node_modules/egg'), path.join(cwd, './node_modules/egg') );