diff --git a/packages/xdl/package.json b/packages/xdl/package.json index e05f4a3099..bfbff201d9 100644 --- a/packages/xdl/package.json +++ b/packages/xdl/package.json @@ -66,7 +66,6 @@ "md5hex": "1.0.0", "minimatch": "3.0.4", "mv": "2.1.1", - "ncp": "2.0.0", "node-forge": "0.10.0", "p-map": "3.0.0", "p-retry": "4.1.0", @@ -107,7 +106,6 @@ "@types/fs-extra": "^9.0.1", "@types/getenv": "^0.7.0", "@types/hapi__joi": "^17.1.2", - "@types/ncp": "^2.0.1", "@types/node-forge": "^0.9.7", "@types/text-table": "^0.2.1", "@types/raven": "^2.5.3", diff --git a/packages/xdl/src/internal.ts b/packages/xdl/src/internal.ts index 88e0d78b61..98149bb1aa 100644 --- a/packages/xdl/src/internal.ts +++ b/packages/xdl/src/internal.ts @@ -9,7 +9,7 @@ With this module in place, we can fix these circular dependency problems by changing the order in this file. */ -export * from './Utils'; +export { Semaphore } from './utils/Semaphore'; export * as Env from './Env'; export { default as Config } from './Config'; export * as Xcode from './Xcode'; diff --git a/packages/xdl/src/Utils.ts b/packages/xdl/src/utils/Semaphore.ts similarity index 77% rename from packages/xdl/src/Utils.ts rename to packages/xdl/src/utils/Semaphore.ts index 13b3707bba..59ba029dd7 100644 --- a/packages/xdl/src/Utils.ts +++ b/packages/xdl/src/utils/Semaphore.ts @@ -1,17 +1,3 @@ -import { ncp } from 'ncp'; - -export function ncpAsync(source: string, dest: string, options: any = {}) { - return new Promise((resolve, reject) => { - ncp(source, dest, options, (err: any) => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); -} - export class Semaphore { queue: ((v: boolean) => void)[] = []; available = 1; diff --git a/yarn.lock b/yarn.lock index 6d4edd2fb1..0b301812b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4198,13 +4198,6 @@ dependencies: "@types/minimatch" "*" -"@types/ncp@^2.0.1": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/ncp/-/ncp-2.0.3.tgz#68429472698a68f2c85a984932e9d8014d5f2ed0" - integrity sha512-eZatZMWhPHUHY/1hUUqwGrWzBAE9deYR3L0QJMicpVkBUOrQslhWblw5Ye+rKuzvFG/UQ3jDolMcjhC2WKUQ5w== - dependencies: - "@types/node" "*" - "@types/next-server@*": version "9.0.0" resolved "https://registry.yarnpkg.com/@types/next-server/-/next-server-9.0.0.tgz#4884670da2d846c0050a608153a48cd0c6cdbeb2" @@ -14779,7 +14772,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -ncp@2.0.0, ncp@~2.0.0: +ncp@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=